Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#27 closed defect (fixed)

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

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

Description

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 (12)

comment:1 Changed 13 years ago by Jeremy Utley

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 13 years ago by Joe Ciccone

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 13 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 13 years ago by Jeremy Utley

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 13 years ago by Jim Gifford

Owner: changed from clfs-commits@… to Jeremy Utley

Assigning to Jermey to update.

comment:6 Changed 13 years ago by Jim Gifford

Milestone: CLFS 1.0

comment:7 Changed 13 years ago by Jeremy Utley

Priority: majorblocker

comment:8 Changed 13 years ago by Jeremy Utley

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 13 years ago by Jeremy Utley

Owner: changed from Jeremy Utley to Jim Gifford

comment:10 Changed 13 years ago by Jim Gifford

Looks good, closing ticket.

comment:11 Changed 13 years ago by Jim Gifford

Resolution: fixed
Status: newclosed

comment:12 Changed 13 years ago by Jim Gifford

Version: unstable1.0.0
Note: See TracTickets for help on using tickets.