Install issues

Chad J. Milios milios at ccsys.com
Mon Oct 5 17:59:37 UTC 2015


> On Oct 5, 2015, at 12:41 PM, Polytropon <freebsd at edvax.de> wrote:
> 
>> On Mon, 5 Oct 2015 12:06:02 -0400, kpneal at 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 "<fstype>:<device>" 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

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


More information about the freebsd-questions mailing list