From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 28 15:57:37 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 115B616A4CE for ; Mon, 28 Feb 2005 15:57:37 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98BF743D39 for ; Mon, 28 Feb 2005 15:57:36 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j1SFvYpF035766; Mon, 28 Feb 2005 09:57:34 -0600 (CST) (envelope-from dan) Date: Mon, 28 Feb 2005 09:57:34 -0600 From: Dan Nelson To: ?? ?? Message-ID: <20050228155734.GF8778@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-hackers@freebsd.org Subject: Re: about the source of loader X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 15:57:37 -0000 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