Date: Sun, 13 Nov 2005 13:21:50 +0800 From: Dinesh Nair <dinesh@alphaque.com> To: Dinesh Nair <dinesh@alphaque.com> Cc: freebsd-hackers@FreeBSD.org, freebsd-questions@FreeBSD.org Subject: [patch] Re: Loading mfsroot read-write on FreeBSD 6.0-RELEASE Message-ID: <4376CD6E.4050803@alphaque.com> In-Reply-To: <4375E7DA.1090204@alphaque.com> References: <4375E7DA.1090204@alphaque.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 | +=========================================================================+
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4376CD6E.4050803>