Can I change the device of the "/" mount point at boot time.

Mike Meyer mwm-keyword-freebsdhackers2.e313df at mired.org
Mon Jul 14 20:58:04 UTC 2008


On Tue, 15 Jul 2008 01:40:24 +0530
"Tapan Chaudhari" <tapan.list at gmail.com> wrote:

> Hi,
>    Thanks a lot Mike. But the problem is the device I am talking about is
> not the physical device. I am writing a driver which will create a virtual
> device and all the i/os done on this virtual device will be ultimately
> redirected to the original device. Correct me if I am wrong, but I guess the
> loader will try to mount my new device on '/' and then load the modules into
> the kernel. Since my driver would not be loaded at that point in time, it
> will fail to even mount '/'. Am I right? Or can our drivers get loaded
> before loader mounts '/' ?

You gotta keep your "/"'s straight. The kernel will boot of off a
physical devices - pretty much required.  At that point, you can use
boot.config to load modules from that device, including any needed to
keep your driver happy. Set the vsf.root.mountfrom to tell the kernel
what where to find what's going to become the root file system when it
gets to that point.

The process is documented in the man pages, starting with say
boot(8). Read through that and some of the "SEE ALSO" pages.

	 <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