Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2005 09:57:34 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        ?? ?? <ppmmssgg@hotmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: about the source of loader
Message-ID:  <20050228155734.GF8778@dan.emsphone.com>
In-Reply-To: <BAY15-F90A08D31D9E12C00DF37ACF580@phx.gbl>
References:  <BAY15-F90A08D31D9E12C00DF37ACF580@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 28), ?? ?? said:
> I have some questions of source of loader
> 
> 1. Where is the source of the "ls" command?

/sys/boot/common/ls.c

> 2. How it mount the ufs boot partition as "/" when it start,Is it a
>    function or something else?.

The loader can't mount anything, since it isn't the kernel.  Since it
can read UFS filesystems, though, if it can find an /etc/fstab, it will
try and pass the path to the root volume to the kernel in the tunable
"vfs.root.mountfrom".  See /sys/boot/common/boot.c:getrootmount() and
/sys/kern/vfs_mount.c:vfs_mountroot() .

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050228155734.GF8778>