Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FreeBSD 9-STABLE can not mount root from a glabled device

8 views
Skip to first unread message

Mark Saad

unread,
Mar 23, 2012, 2:50:12 PM3/23/12
to
All
I 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 Mountpoint FStype Options Dump Pass#
/dev/label/rootfs / ufs rw 1 1
/dev/label/var /var ufs rw 2 2
/dev/label/SWAP none swap sw 0 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=ufs:/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 did which used gpt
labels that did would

# Device Mountpoint FStype Options Dump Pass#
/dev/label/SWAP none swap sw 0 0
/dev/gpt/rootfs / ufs rw 1 1
/dev/gpt/var /var ufs rw 2 2
/dev/gpt/data /data ufs rw 2 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.

--
mark saad | none...@longcount.org
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"

ill...@gmail.com

unread,
Mar 23, 2012, 4:46:39 PM3/23/12
to
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

--
--
0 new messages