Can I change the device of the "/" mount point at boot time.
Mike Meyer
mwm-keyword-freebsdhackers2.e313df at mired.org
Mon Jul 14 19:37:15 UTC 2008
On Tue, 15 Jul 2008 00:48:42 +0530
"Tapan Chaudhari" <tapan.list at gmail.com> wrote:
> This is not exactly what I wanted. I will try to elaborate myself.
> I am creating my own device which will act as a new boot slice which must be
> mounted as '/'. New device will process i/o calls and then redirect the i/o
> calls to original device of '/'. Now since I cannot unmount '/' and mount it
> again with my new device while system is running, I will have to find a way
> to tell kernel to mount my new device as '/' from next time onwards it
> boots.
> does anyone have suggestions on this?
That's pretty much exactly what vfs.root.mountfrom does. Edit
/boot/loader.conf to add a line:
vfs.root_mountfrom="fstype:devicespec"
and you're good to go. The kernel will boot from your default root
partition, then remount root using the value of that variable. I.e. -
I set mine to "zfs:internal/root" to boot my system to a zfs root.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
More information about the freebsd-hackers
mailing list