tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: "dynamic" fstab
On Wed, 13 Mar 2013, iMil wrote:
For my particular purposes, I hacked /etc/rc.d/fsck_root[1] in
order to build a fstab corresponding to the output of `sysctl
-n kern.root_device'. It works, but that's ugly. Is there any
cleaner way to achieve that trick?
I use "from_mount" in the fs_spec column of /etc/fstab. This is
documented in mount(8), but not in fstab(5). /etc/rc.d/fsck_root
does not know how to deal with that, but I have an unusual setup
and use "0" in the fs_passno column to suppress fsck_root.
I'd suggest modifying /etc/rc.d/fsck_root to look for
fs_spec="from_mount" flag, and use sysctl kern.root_device in that
case. It does not have to edit /etc/fstab; it just has to pass
the correct device name to fsck(8). We could/should also modify
fsck(8) to understand fs_spec="from_mount".
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index