Ticket #27 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

No devices at "Making the LFS system bootable" in chroot

Reported by: ken Owned by: jim
Priority: blocker Milestone: CLFS Standard 1.0.0
Component: BOOK Version: CLFS Standard 1.0.0
Keywords: Cc:


Since we stopped running 'udevstart', by the time we get to the final stage in 'bootable/' those of us who chrooted do not have any devices. Certainly, grub, lilo and yaboot require disk devices (yaboot also needs /dev/nvram). I assume that all bootloaders have to write some data to a device.

I propose to add something to the start of 'Making the LFS System Bootable' reminding people who used the chroot option that they need to mount --bind /dev /mnt/lfs/dev from the host system before trying to install the bootloader.

Or does anybody have a better place to do this (remembering that we need to create /dev/console and /dev/null on the underlying partition) ?

Change History

comment:1 Changed 12 years ago by jeremy

I would set this up just before we actually chroot. Create $LFS/dev/null and $LFS/dev/console, then mount --bind /dev $LFS/dev, then chroot.

comment:2 Changed 12 years ago by jciccone

The suggestion jeremy had is what I've been doing for a while now. It works just as well as starting udev in the chroot. UID/GID differences shouldn't affect us because we are logged in with a UID and GID of 0 in the chroot.

Would using a host like Mac-OSX affect this in any way?

comment:3 Changed 12 years ago by William

I think job control in Bash needs another device /dev/initctl. In case someone boot with init=/bin/bash to say, recover root password, bash would print a warning like "initialize_job_control:setpgid: Operation not permitted."

comment:4 Changed 12 years ago by jeremy

Joe -

When building from a host such as OS X, you would not be able to use the chroot method, which is the only time this particular problem comes into play. In the reboot path, we actually build a minimal udev which will start after reboot.

William -

I do know that RH/Fedora includes /dev/initctl on the underlying filesystem, along with a couple of other devices (I'd have to look at my fedora notes for work to know exactly what they include). Job control isn't strictly necessary, bash will still function without it, but it might be something to think about.

comment:5 Changed 12 years ago by jim

  • Owner changed from clfs-commits@… to jeremy

Assigning to Jermey to update.

comment:6 Changed 12 years ago by jim

  • Milestone set to CLFS 1.0

comment:7 Changed 12 years ago by jeremy

  • Priority changed from major to blocker

comment:8 Changed 12 years ago by jeremy

OK, the fix for this is in. Jim, I'd like for you to proofread things - also, there may be a need to change the names of some of the files, since chroot/common/devices.xml no longer really has anything to do with devices - all that's being done there is to mount /dev/pts and /dev/shm.

SVN revision 1724 contains the fix for this.

comment:9 Changed 12 years ago by jeremy

  • Owner changed from jeremy to jim

comment:10 Changed 12 years ago by jim

Looks good, closing ticket.

comment:11 Changed 12 years ago by jim

  • Status changed from new to closed
  • Resolution set to fixed

comment:12 Changed 12 years ago by jim

  • Version changed from unstable to 1.0.0
Note: See TracTickets for help on using tickets.