Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Mar 2012 16:46:39 -0400
From:      "illoai@gmail.com" <illoai@gmail.com>
To:        Mark Saad <nonesuch@longcount.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: FreeBSD 9-STABLE can not mount root from a glabled device
Message-ID:  <CAHHBGkriEWyJbU1Fgny3JTK3_1kC04B4HuWihOYZifHbNMhqxQ@mail.gmail.com>
In-Reply-To: <CAMXt9NaMhjeLShsu=zq622k6q61wXg5oEU9JUTYBy6LL17ChpQ@mail.gmail.com>
References:  <CAMXt9NaMhjeLShsu=zq622k6q61wXg5oEU9JUTYBy6LL17ChpQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23 March 2012 14:50, Mark Saad <nonesuch@longcount.org> wrote:
> All
> =A0I upgraded two of my 7-STABLE servers to 9-STABLE today and found
> two foot shooters. I believe they are bugs only when you upgrade from
> pre 8.0-RELEASE to 9.0-RELEASE or 9-STABLE
>
> 1. On 7.x I had been using glabel to label my root filesystem slice,
> swap slice , and var slice . Like this
>
> glabel label rootfs /dev/da0s1a
> glabel label var /dev/da0s1d
> glabel label SWAP /dev/da0s1b
>
> Then in fstab I would have entries like this.
> # Device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Mountpoint =A0 =A0 =A0FStype =A0O=
ptions =A0 =A0 =A0 =A0 Dump =A0 =A0Pass#
> /dev/label/rootfs =A0 =A0 =A0 / =A0 =A0 =A0 =A0 =A0 =A0 =A0 ufs =A0 =A0 r=
w =A0 =A0 =A0 =A0 =A0 =A0 =A01 =A0 =A0 =A0 1
> /dev/label/var =A0 =A0 =A0 =A0 =A0/var =A0 =A0 =A0 =A0 =A0 =A0ufs =A0 =A0=
 rw =A0 =A0 =A0 =A0 =A0 =A0 =A02 =A0 =A0 =A0 2
> /dev/label/SWAP =A0 =A0 =A0 =A0 none =A0 =A0 =A0 =A0 =A0 =A0swap =A0 =A0s=
w =A0 =A0 =A0 =A0 =A0 =A0 =A00 =A0 =A0 =A0 0
>
> This has worked for me in 6.x and 7.x however upon upgrading to
> 9-STABLE ( from yesterday ) or 9.0-RELEASE the boot loader could not
> find the labeled device.
> I had to manually set vfs.root.mountfrom=3Dufs:/dev/da0s1a" or key that
> in when the boot process bombed out.
>
> 2. After fixing the fstabs to use the real da names I wanted to see
> what the boot loader would do with ufs labels. I rebooted my box into
> single user mode and ran this
>
> tunefs -L rootfs /dev/da0s1a
> tunefs -L var /dev/da0s1d
>
> Then edited the fstab to use the labeled filesystems and rebooted,
> much to my surprise it failed in the same way.
>
> I compared this to a new 9.0-STABLE install i =A0did which used gpt
> labels that did would
>
> # Device =A0 =A0 =A0 =A0Mountpoint =A0 =A0 =A0FStype =A0Options Dump =A0 =
=A0Pass#
> /dev/label/SWAP none =A0 =A0 =A0 =A0 =A0 =A0swap =A0 =A0sw =A0 =A0 =A00 =
=A0 =A0 =A0 0
> /dev/gpt/rootfs / =A0 =A0 =A0 =A0 =A0 =A0 =A0 ufs =A0 =A0 rw =A0 =A0 =A01=
 =A0 =A0 =A0 1
> /dev/gpt/var =A0 =A0/var =A0 =A0 =A0 =A0 =A0 =A0ufs =A0 =A0 rw =A0 =A0 =
=A02 =A0 =A0 =A0 2
> /dev/gpt/data =A0 /data =A0 =A0 =A0 =A0 =A0 ufs =A0 =A0 rw =A0 =A0 =A02 =
=A0 =A0 =A0 2
>
>
> So far as I can tell the only difference is that the fresh install
> uses the GPT partitioning scheme where as the upgraded boxes us the
> older mbr/fdisk setup.
>
> Any ideas on what I can try to get past this ? I liked using
> /dev/label as it made the devices sort of agnostic to what filesystem
> or partitioning scheme was on them.
>

tunefs should put your labels under /dev/ufs/
Though I've not had any problems under 9.0
with labels on root.  Is GEOM_LABEL built into
your kernel or is it a module?  (though I have
my doubts about that causing this problem)

The boot loader should merely grab the first
512K of whatever partition is marked as bootable
without worrying where / might eventually be
mounted from.

/dev/label/swap0 none swap sw 0 0
/dev/ufs/rootfs /       ufs     rw,noatime 1 1
/dev/ufs/homefs /home   ufs     rw,noatime 2 3
/dev/ufs/usrfs  /usr    ufs     rw,noatime 2 2
/dev/ufs/varfs  /var    ufs     rw,noatime,async 2 2
tmpfs /tmp tmpfs rw 0 0
&cet

--=20
--



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