From owner-freebsd-questions@FreeBSD.ORG Sun Nov 13 05:25:03 2005 Return-Path: X-Original-To: freebsd-questions@FreeBSD.org Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FCFD16A41F for ; Sun, 13 Nov 2005 05:25:03 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 27D9343D49 for ; Sun, 13 Nov 2005 05:25:01 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 39043 invoked by uid 0); 13 Nov 2005 05:25:00 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 13 Nov 2005 05:25:00 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jAD5Lpsi001579; Sun, 13 Nov 2005 13:21:51 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <4376CD6E.4050803@alphaque.com> Date: Sun, 13 Nov 2005 13:21:50 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20051026 MIME-Version: 1.0 To: Dinesh Nair References: <4375E7DA.1090204@alphaque.com> In-Reply-To: <4375E7DA.1090204@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, freebsd-questions@FreeBSD.org Subject: [patch] Re: Loading mfsroot read-write on FreeBSD 6.0-RELEASE X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2005 05:25:03 -0000 On 11/12/05 21:02 Dinesh Nair said the following: > how does one specify a read/write mount of mfsroot in 6.0 in the > bootloader ? apparently, the behaviour of vfs_mountroot_try() has changed in 6.0. previously, if the root filesystem was mounted from a memory disk, as would be the case with an mfsroot.gz, it would be mounted R/W while other fs types would be mounted R/O before /etc/rc scripts upgraded the mount to R/W. however, in 6.0, all root filesystems are mounted R/O. the following patch mounts all root filesystems R/W. it's a quick and dirty fix however, for a cleaner fix would be to duplicate 5.x behaviour of only mounting memory disks R/W and other disks R/O. the kernel needs to be rebuilt for this patch to take effect. is there enough interest in having memory root file systems mounted R/W at boot ? if there is, i could put in a little bit more effort into duplicating 5.x behaviour on this and submitting it as a PR to 6.0. --- CUT HERE --- --- sys/kern/vfs_mount.c.orig Sat Nov 12 23:22:07 2005 +++ sys/kern/vfs_mount.c Sat Nov 12 23:59:50 2005 @@ -1297,7 +1297,7 @@ strcpy(path, ROOTNAME); error = kernel_vmount( - MNT_RDONLY | MNT_ROOTFS, + MNT_ROOTFS, "fstype", vfsname, "fspath", "/", "from", path, --- CUT HERE --- -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+