Pierre M.R. wrote: > Bruce Dubbs wrote: >> I do think there is a bug in umount. > Some changes in mount/umount introduced in utils-linux-2.21.1 are > documented in the code. There are useful comments in > libmount/src/context_umount.c,context_mount.c, tab.c >> >> I edited my mountfs script to add some debugging output below the line: >> >> umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc >> > Starting from utils-linux>=2.21.1 the root fs is ignored by umount -a > (and by mount -a)
Thanks for the research. It looks like the man pages need to be updated to reflect that. >> In other words mount -r does not work for the root file system any more. > the umount of root fs doesn't fail, it is IGNORED. >> >> It seems a little strange to me that the kernel uses /dev/root because >> that entry is not in the /dev devtmpfs. Also, I don't understand the >> rootfs in /proc/mounts. It does not get changed when remounting / read >> only. This condition is normally only present for the fraction of a >> second between stopping mountfs and the halt/reboot scripts. > from /usr/src/linux/Documentation/filesystems/ramfs-rootfs-initramfs.txt > ... > What is rootfs? > --------------- > > Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), > which is > always present in 2.6 systems. You can't unmount rootfs for > approximately the > same reason you can't kill the init process; rather than having special code > to check for and handle an empty list, it's smaller and simpler for the > kernel > to just make sure certain lists can't become empty. > > Most systems just mount another filesystem over rootfs and ignore it. The > amount of space an empty instance of ramfs takes up is tiny. Good spot. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
