Re: Init.c, making it chroot



On Sun, 31 Dec 2006, Tim Kientzle wrote:

Robert Watson wrote:
... It used to be that only certain file systems could be used as a root file system, because only they knew how to bypass the lookup procedure to find their device node, short-circuiting to the in-kernel device list.

So why are the MD_ROOT and NFS_ROOT options still around? It sounds like there must still be something special about root-capable file systems.

NFS_ROOT has to do with extracting the root mount configuration information from the interface list, loader environment, prior to the file system mount process so that NFS knows where to go to find a file system, configure networking, etc.

MD_ROOT has to do with setting up the md device to mount the root file system from in memory without having mdconfig run. A glance at the md(4) source code suggests that it also tweaks the default root device to be "ufs:/dev/md0". This is not actually a file system option so much as an option in the behavior of the md(4) device driver.

At least, this is my understanding from a very casual glance at the source. In both cases, we now use the single vfs_mount VFSOP.

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Using Subversion with D3 Unix/Linux for Version Control
    ... Sounds very cool, congrats Marshall. ... I've been wanting to use FUSE to integrate the D3 file system with the ... host OS, sort of the way OSFI allows us to use the host OS to store ... Once all the source code is in the file system Subversion can handle ...
    (comp.databases.pick)
  • Re: Kernel Source install (post config) fails
    ... There is plenty of physical space left on my / file system - the db ... the install CD and try and install the kernel source code (post install ... to install the source code for the Kernel to build a new Kernel. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: hi...iam a student from nit warangal india plz help me in linux encrypted file system project...
    ... i studied fs source code in linux.[i mean what are functions in it. ... when vfs_writecalls the actual file system call .. ... underlying filesystem code nor any kind of modification of the ...
    (comp.os.linux.setup)
  • Re: UFS snapshots
    ... > through the read-only copy of the file system was. ... > snapshot was old enough. ... > UFS snapshot process actually works or point me to a good reference? ... You can read the source code on Opensolars.org ...
    (comp.unix.solaris)