Comment 4 for bug 253786

Revision history for this message
Peter Cordes (peter-cordes) wrote :

I was looking into this because it triggered bug 278954.

initramfs bind-mounts /dev to /dev/.static/dev before the init scripts remount / read-write.

I've been working around the XFS bug with a line in fstab:
/dev /dev/.static/dev bind remount,rw 0 0

 This has the side-effect of making /dev/.static/dev writeable again, also enabling things that want to run MAKEDEV to work successfully. Some packages do want to run MAKEDEV in their postinst, IIRC, and fail because of that.

 So if you get rid of /dev/.static/dev, you need to change MAKEDEV so it always returns true, or change all the packages, or something. Or just have the /etc/rcS.d/S20checkroot.sh make the bind mount read-write, just after remounting the root fs.
mount -n /dev /dev/.static/dev -o remount,rw
(-n because my fstab workaround puts it in mtab, but that's not the default.)

 I think (the real, on root fs) /dev would be needed by people who build their own non-initramfs not-so-modular kernel. You need a /dev/null until /etc/rcS.d/S10udev, probably.
I don't know if that's still supported, either. I used to do that, before I had too many different machines to customize kernels for (and plenty of RAM in most of them :). Oh, the good old days of worrying about kB used by the kernel.