From Linux From Scratch Chapter 6.8. Populating /dev
6.8.1. Creating Initial Device Nodes
When the kernel boots the system, it requires the presence of a few device nodes, in particular the console and null devices. Create these by running the following commands:
mknod -m 600 /dev/console c 5 1 mknod -m 666 /dev/null c 1 3
You should then continue with the steps in “6.8.2. Mounting tmpfs and Populating /dev”. Note the <--
below, and I suggest you read the entire free LFS.
mount -n -t tmpfs none /dev mknod -m 622 /dev/console c 5 1 mknod -m 666 /dev/null c 1 3 mknod -m 666 /dev/zero c 1 5 mknod -m 666 /dev/ptmx c 5 2 mknod -m 666 /dev/tty c 5 0 # <-- mknod -m 444 /dev/random c 1 8 mknod -m 444 /dev/urandom c 1 9 chown root:tty /dev/{console,ptmx,tty}
Related Posts:
- How to fix ‘sudo: no tty present and no askpass program specified’ error?
- Directory Inode vs Regular File Inode
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- How do I list loaded Linux module parameter values?
- Does the “bs” option in “dd” really improve the speed?
- Best way to disable swap in Linux
- Chmod 777 to a folder and all contents [duplicate]
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to install grub after installing Windows 10
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- mysql_config not found when installing mysqldb python interface
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Shell command to tar directory excluding certain files/folders
- Meaning of exit status 1 returned by linux command
- How does “cat << EOF" work in bash?
- X11 forwarding request failed on channel 0
- What is difference between arm64 and armhf?
- Extract file basename without path and extension in bash
- How to change permissions for a folder and its subfolders/files in one step
- mysql_config not found when installing mysqldb python interface
- linux command to get size of files and directories present in a particular folder?
- ./configure : /bin/sh^M : bad interpreter
- How to count lines in a document?
- What does `set -x` do?
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- How to get the process ID to kill a nohup process?
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- Writing a simple shell in C using fork/execvp
- Using ls to list directories and their total sizes
- configure: error: cannot run C compiled programs
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- What does set -e mean in a bash script?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Pipe to/from the clipboard in a Bash script
- Difference between exec, execvp, execl, execv?
- what does -zxvf mean in tar -zxvf filename?
- Retrieve last 100 lines logs
- Configuring Apache for localhost
- Restarting cron after changing crontab file?
- cd into directory without having permission
- Android – Command not found
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- What does ‘bash -c’ do?
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- WordPress cloning issue
- How can I sort du -h output by size
- Why is my crontab not working, and how can I troubleshoot it?
- Showing total progress in rsync: is it possible?
- How to bind MySQL server to more than one IP address?
- Why is “chmod -R 777 /” destructive?
- What’s the best way of handling permissions for Apache 2’s user www-data in /var/www?
- How to check if a library is installed?
- Is it normal to get hundreds of break-in attempts per day?
- How to setup passwordless `sudo` on Linux?
- How do I prevent accidental rm -rf /*?
- How do I verify the speed of my NIC?
- What does Virtual memory size in top mean?
- What’s the best way to check if a volume is mounted in a Bash script?
- How do I find the UUID of a filesystem
- Find out symbolic link target via command line
- Meaning of directories on Unix and Unix like systems
- How to handle security updates within Docker containers?
- Job scheduling using crontab, what will happen when computer is shutdown during that time?
- Is it possible to make Nginx listen to different ports?
- how do you create an ssh key for another user?
- REJECT vs DROP when using iptables
- Linux command line best practices and tips?
- How to run command as user who has /usr/sbin/nologin as Shell?
- How to get pid of just started process
- How to disable everything in crontab -l?
- df says disk is full, but it is not
- Perform rsync while following sym links
- What is the maximum port number?
- Show all users and their groups/vice versa
- Why is TCP accept() performance so bad under Xen?
- Caching/preloading files on Linux into RAM
- How to sort ps output by process start time?
- What’s wrong with always being root?
- Is there a proper way to clear logs?
- Hundreds of failed ssh logins
- Transfer 15TB of tiny files
- What should I do when I got the KEYEXPIRED error message after an apt-get update?
- protocol version mismatch — is your shell clean?
- How do I join two named pipes into single input stream in linux
- How should an IT department choose a standard Linux distribution?
- Command line program to test DHCP service
- Service start request repeated too quickly, refusing to start limit