From owner-freebsd-questions@freebsd.org Mon Oct 5 17:59:37 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E905F9B5208 for ; Mon, 5 Oct 2015 17:59:36 +0000 (UTC) (envelope-from milios@ccsys.com) Received: from cargobay.net (cargobay.net [198.178.123.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B26A54 for ; Mon, 5 Oct 2015 17:59:36 +0000 (UTC) (envelope-from milios@ccsys.com) Received: from [192.168.0.4] (cblmdm72-240-160-19.buckeyecom.net [72.240.160.19]) by cargobay.net (Postfix) with ESMTPSA id 8E13A3A1; Mon, 5 Oct 2015 17:59:29 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: Install issues From: "Chad J. Milios" X-Mailer: iPhone Mail (13A452) In-Reply-To: <20151005184134.306a3287.freebsd@edvax.de> Date: Mon, 5 Oct 2015 13:59:28 -0400 Cc: kpneal@pobox.com, FreeBSD Questions !!!! Content-Transfer-Encoding: quoted-printable Message-Id: References: <5612938F.4080508@hiwaay.net> <20151005173644.d3b9c5ce.freebsd@edvax.de> <20151005160602.GA34349@neutralgood.org> <20151005184134.306a3287.freebsd@edvax.de> To: Polytropon X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 17:59:37 -0000 > On Oct 5, 2015, at 12:41 PM, Polytropon 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 ":" 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=