QEMU: /bin/sh: can’t access tty; job control turned off

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}

Leave a Comment