#2550: Udev bootscript enhancement
-------------------------+--------------------------------------------------
 Reporter:  mickb        |       Owner:  lfs-b...@…                   
     Type:  enhancement  |      Status:  new                          
 Priority:  normal       |   Milestone:  6.6                          
Component:  Bootscripts  |     Version:  SVN                          
 Severity:  minor        |    Keywords:                               
-------------------------+--------------------------------------------------

Comment(by br...@…):

 > I think it's opportune to check /dev in the same way, because an
 initramfs which uses udev (or mdev in busybox) may already have mounted it
 (and moved it to the new root with a "mount -o move" command).

 - Frankly, with all the recent kernel changes around sysfs, I'm surprised
 mdev works.  :-)  But apart from that...

 - In initramfs, you can't (reliably anyway) keep groups.  They might come
 from files, which works, but they might also come from NIS/LDAP/whatever,
 which won't work.  That's why my initramfs generator strips out all the
 GROUP= settings from the rules before copying them in.  And I believe that
 means you have to rebuild /dev after booting anyway -- so why not just
 unmount it inside initramfs before running switch-root?  Then it doesn't
 matter what the bootscript does, because it gets the same setup whether
 there's an initramfs or not.

 Or at least, that's why I did it that way...

 (I should note: I *explicitly* don't use busybox for an initramfs.
 There's no point: you delete everything and kill all processes anyway
 after it's done mounting the rootfs.  And it just makes life inside the
 initramfs harder, and adds package dependencies.)

 > mount -n -t tmpfs tmpfs /dev -o size=256k

 Maybe...  though I'm not convinced it's required, given the directory
 permissions (if root screws themselves over by creating a too-large file,
 so what? there are hundreds of ways of doing that, and most are simpler...
 :-) ), and the downside of getting it too small is a huge problem halfway
 through "udevadm trigger".

 > mode=755

 Isn't that the default?  The current scripts don't mention mode= at all,
 and my /dev is 0755 already.  (From mount(8): mode= for tmpfs sets the
 initial mode of the mountpoint directory after the mount finishes.
 Presumably nothing else changes that directory...)

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2550#comment:1>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to