Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2012 13:34:27 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Alexander Yerenkow <yerenkow@gmail.com>
Cc:        freebsd-current <freebsd-current@FreeBSD.org>
Subject:   Re: A little question about safe mode
Message-ID:  <507FDB33.10900@FreeBSD.org>
In-Reply-To: <CAPJF9wku0MiuLv=s2NG7F3zpKFq94_NcUZ_F9TXhBssWE7bFeg@mail.gmail.com>
References:  <CAPJF9wm-dvUwgQzZzijakD=FBM9HTBQ%2BF4jC510KX%2BUOG-SfgA@mail.gmail.com> <507FB6C7.50402@FreeBSD.org> <CAPJF9wku0MiuLv=s2NG7F3zpKFq94_NcUZ_F9TXhBssWE7bFeg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
on 18/10/2012 12:11 Alexander Yerenkow said the following:
> 
> 
> 2012/10/18 Andriy Gapon <avg@freebsd.org <mailto:avg@freebsd.org>>
> 
> 
>     First, I see "safe mode" mentioned in the subject, but nowhere in the body of
>     the message?  So, what's up with the safe mode? :-)
> 
> 
> The single mode of course, which is forced :) Mistype, sorry.
> 
> 
>     on 18/10/2012 10:35 Alexander Yerenkow said the following:
>     > Hello there.
>     > I have problem here, and don't know if it's bug or "feature" :)
>     > If I prerare boot media (hdd, sd card,usb, etc) with FreeBSD, and NOT
>     > create there fstab, I see such behavior:
>     >
>     > 1. I need enter manually where from mount root (e.g. ufs:ada0s1a or
>     > ufs:ada0s1a rw)
> 
>     This is a feature.
>     You might want consider using options ROOTDEVNAME in your kernel.
> 
> 
> Okay, then why little help there mentioning "rw" as an option? It's of bug in
> help there, or in parsing mount options (rw is ignored).

Again, it's a feature, "rw" is simply ignored.
The help message is just trying to confuse you.

> If I'm not fully clear - I can provide some screenshots.
>  
> 
> 
>     > 2. If I enter ufs:ada0s1a rw - I have / mounted in read-only anyway. <== Is
>     > this bug?...
> 
>     It looks like a feature.  The low-level mountroot code always mounts / as r/o. 
> 
>     It's supposed to be later remounted as r/w by rc.d/root script.
> 
> 
> Yes, it's feature when it mounting with default parameters (e.g. with none). But
> what about rw?

This should be answered above.

>     > 3. If I try to make it rw, with commands
>     > mount -o rw -u /dev/ada0s1a /
>     > there is no errors, but root is still RO.
> 
>     This sounds like a bug.
>     Is there anything on the system console?
> 
> 
> Nope, I'm already on console in single mode. 
> 
> 
>     > 4. I can't umount / remount some elsewhere this disk, just to create fstab
>     >  (it's already mounted and can't be updated).
>     >
>     > So, is this as-by-design, that you need "any other" media to boot, just to
>     > create fstab, or there is "rw" mode broken, or I just missed something?
>     >
>     > It's very disappointing to be able boot interactively into system, but have
>     > no way to "fix" fstab to make it non-interactively bootable :)
> 
>     You can try to create an md-based filesystem, mount it under /mnt and then
>     unionfs-mount it over /etc.
> 
> 
> That's not solve problem that on my rootfs no fstab exists, so next boot will
> bring me to same situation.

You may try to edit /etc/fstab on top of unionfs and then see if you can remount
the real root r/w.

> If someone willing to help/debug with this thing - get any bootable media (like
> live FreeBSD), and just rename/move/delete fstab file, and simply boot.

There indeed appears to be a bug.  Unfortunately, ENOTIME to dig into this.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?507FDB33.10900>