From owner-freebsd-questions@freebsd.org Mon Oct 5 19:47:08 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 0D4D49B672C for ; Mon, 5 Oct 2015 19:47:08 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFD351FE8 for ; Mon, 5 Oct 2015 19:47:07 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-213-32.knology.net [216.186.213.32] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id t95Jl5Gj002564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 5 Oct 2015 14:47:06 -0500 Subject: Re: Install issues References: <5612938F.4080508@hiwaay.net> <20151005173644.d3b9c5ce.freebsd@edvax.de> <20151005160602.GA34349@neutralgood.org> <20151005184134.306a3287.freebsd@edvax.de> Cc: FreeBSD Questions !!!! From: "William A. Mahaffey III" Message-ID: <5612D3B9.4060508@hiwaay.net> Date: Mon, 5 Oct 2015 14:52:35 -0453.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 19:47:08 -0000 On 10/05/15 13:05, Chad J. Milios wrote: >> On Oct 5, 2015, at 12:41 PM, Polytropon wrote: >> >>> 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 >>>>> 'ufs:/dev/da0s1a rw' & it proceeded to boot the installer. >>>> 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. >>> I thought mountroot (prompt? loader.conf option) took a list of >>> filesystems to attempt to mount. Spaces between the possible roots. >>> So 'rw' would be examined only if the first filesystem wasn't >>> mountable. >> 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. >> >> 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 job of one of the rc.d scripts to (-u)pdate the mount options according to fstab. (I can't remember which script but u can grep the files in rc.d looking for the words fstab and/or mount for more insight into the whole process if curious.) > > The thing is that when u boot single-user mode u r given shell control BEFORE /etc/rc.d (even before /etc/rc actually) so every bit of resource control is 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 with the boot process into "multi-user" mode (which isn't so aptly named, it just means your system is up and ready as u r accustomed to with resources available and services running, which MAY constitute other users able to log in, 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 nail down a procedure, u may consider adding your own custom script to rc.d. See `man rcorder` to learn a lot about how /etc/rc deals with the files in rc.d I am definitely heading in that direction (fully customized install script), small steps at a time :-/ .... > > There should be some simpler solution to why the mountroot> prompt even shows 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 device node because those can shift around from computer to computer My BIOS is UEFI, & appears very nice on the screen, but w/ rather limited access to useful options. No matter, it did figure out that I needed to boot from the USB drive, even though there were *NO* BIOS settings on that topic .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.