Date: Mon, 5 Oct 2015 13:59:28 -0400 From: "Chad J. Milios" <milios@ccsys.com> To: Polytropon <freebsd@edvax.de> Cc: kpneal@pobox.com, FreeBSD Questions !!!! <freebsd-questions@freebsd.org> Subject: Re: Install issues Message-ID: <BF9F1722-9213-4C43-80A8-D9218DFA128D@ccsys.com> In-Reply-To: <20151005184134.306a3287.freebsd@edvax.de> References: <5612938F.4080508@hiwaay.net> <20151005173644.d3b9c5ce.freebsd@edvax.de> <20151005160602.GA34349@neutralgood.org> <20151005184134.306a3287.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Oct 5, 2015, at 12:41 PM, Polytropon <freebsd@edvax.de> wrote: >=20 >> On Mon, 5 Oct 2015 12:06:02 -0400, kpneal@pobox.com wrote: >>> On Mon, Oct 05, 2015 at 05:36:44PM +0200, Polytropon wrote: >>>> On Mon, 5 Oct 2015 10:18:49 -0453.75, William A. Mahaffey III wrote: >>>> I entered=20 >>>> 'ufs:/dev/da0s1a rw' & it proceeded to boot the installer. >>>=20 >>> If I remember correctly, the boot process will mount root >>> read-only, this is the default behaviour of single-user mode. >>> That's why there is no "rw" option at this prompt; "rw" will >>> therefore be ignored. Otherwise, the options from /etc/fstab >>> would apply. >>=20 >> I thought mountroot (prompt? loader.conf option) took a list of=20 >> filesystems to attempt to mount. Spaces between the possible roots. >> So 'rw' would be examined only if the first filesystem wasn't >> mountable. >=20 > Hmmm... if I read /usr/src/sys/kern/vfs_mount.c correctly, > it's around line 1850, the path for the root partition is > set to "/" and the mount options to "ro" via mount_arg(). > So no matter what you enter, it will be ignored if the > first match is in the form "<fstype>:<device>" and can > be mounted (read-only), see vfs_mountroot_ask() in the same > file, around line 1900. >=20 > Loder options (set via /boot/loader.conf or interactively) > are being parsed as environmental variables and also considered > in this process. Yeah, the kernel always mounts root read only to start and then it is the jo= b of one of the rc.d scripts to (-u)pdate the mount options according to fst= ab. (I can't remember which script but u can grep the files in rc.d looking f= or the words fstab and/or mount for more insight into the whole process if c= urious.) The thing is that when u boot single-user mode u r given shell control BEFOR= E /etc/rc.d (even before /etc/rc actually) so every bit of resource control i= s at your manual discretion (and therefore labor :) ). William you'll need to mount your custom partitions yourself and/or `mount -= uw /` at that point. `exit`ing the single user shell lets /etc/rc continue w= ith the boot process into "multi-user" mode (which isn't so aptly named, it j= ust means your system is up and ready as u r accustomed to with resources av= ailable and services running, which MAY constitute other users able to log i= n, but in the case of the install image's config, not quite so) If you want to make your install stick into a repeatable process, after u na= il down a procedure, u may consider adding your own custom script to rc.d. S= ee `man rcorder` to learn a lot about how /etc/rc deals with the files in rc= .d There should be some simpler solution to why the mountroot> prompt even show= s up, in an ideal world your USB stick should breeze right past that and the= normal boot routine could mount your special partitions based on entries in= fstab. Maybe the wrong/missing setting in /boot/loader.conf. It's better to= point at a glabel or gptid device node instead of a driver+number-based dev= ice node because those can shift around from computer to computer=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF9F1722-9213-4C43-80A8-D9218DFA128D>