ZFS FreeBSD 8.2 RC3 - boots only in single user mode (manual mount of filesystems)

Hello,

I installed FreeBSD 8.2-RC3 amd64 on my T61p without UFS (ZFS). It seems to me that OS cannot mount ZFS file systems during standard boot procedure. I can see lots of errors:
Code:
init: can't exec getty '/usr/libexec/getty' for port /dev/ttyvx
where x is digit. I can easily reboot system by CTRL+ALT+DEL.

If I boot in verbose mode I see that basic programs are not available:
(sed not found, logger not found)

If I choose single user mode there is no problem in mounting file systems.
Code:
# mount -u /
# zfs mount -a
# exit

OS boots without any problem.

I use GPT.

/boot/loader.conf:
Code:
# ZFS
zfs_load=YES
vfs.root.mountfrom="zfs:tank"

# WLAN
if_iwn_load="YES"

/etc/rc.conf:
Code:
zfs_load=YES
hostname="t61p"
moused_enable="YES"
sendmail_enable="NONE"

# WLANS
wlans_iwn0="wlan0"
ifconfig_wlan0="wpa DHCP"

/etc/fstab:
Code:
proc /proc procfs rw 0 0
/dev/ad4p2 none swap sw 0 0

zpool config:
Code:
# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank    87G  1.44G  85.6G     1%  ONLINE  -

# zfs list
NAME            USED  AVAIL  REFER  MOUNTPOINT
tank           1.44G  84.2G   290M  legacy
tank/home      26.5K  84.2G  26.5K  /home
tank/obj       4.67M  84.2G  4.67M  /usr/obj
tank/ports      369M  84.2G   369M  /usr/ports
tank/src        537M  84.2G   537M  /usr/src
tank/tmp         23K  84.2G    23K  /tmp
tank/usr        269M  84.2G   269M  /usr
tank/usrlocal    18K  84.2G    18K  /usr/local
tank/var        478K  84.2G   478K  /var

disk config:
Code:
# gpart list
Geom name: ad4
state: OK
fwheads: 16
fwsectors: 63
last: 195371534
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ad4p1
   Mediasize: 65536 (64K)
   Sectorsize: 512
   Mode: r0w0e0
   rawuuid: c3f4a060-2d90-11e0-b00c-001e37cca61f
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 17408
   type: freebsd-boot
   index: 1
   end: 161
   start: 34
2. Name: ad4p2
   Mediasize: 6442450944 (6.0G)
   Sectorsize: 512
   Mode: r1w1e0
   rawuuid: cfd9d36f-2d90-11e0-b00c-001e37cca61f
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b

I don't have idea how solve this problem. Did I forget about sth in loader.conf?
 
I cannot edit post. I made mistake in gpart list:
Code:
Geom name: ad4
state: OK
fwheads: 16
fwsectors: 63
last: 195371534
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ad4p1
   Mediasize: 65536 (64K)
   Sectorsize: 512
   Mode: r0w0e0
   rawuuid: c3f4a060-2d90-11e0-b00c-001e37cca61f
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 17408
   type: freebsd-boot
   index: 1
   end: 161
   start: 34
2. Name: ad4p2
   Mediasize: 6442450944 (6.0G)
   Sectorsize: 512
   Mode: r1w1e0
   rawuuid: cfd9d36f-2d90-11e0-b00c-001e37cca61f
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 6442450944
   offset: 82944
   type: freebsd-swap
   index: 2
   end: 12583073
   start: 162
3. Name: ad4p3
   Mediasize: 93587692032 (87G)
   Sectorsize: 512
   Mode: r1w1e1
   rawuuid: 13441203-2d91-11e0-b00c-001e37cca61f
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 93587692032
   offset: 6442533888
   type: freebsd-zfs
   index: 3
   end: 195371534
   start: 12583074
Consumers:
1. Name: ad4
   Mediasize: 100030242816 (93G)
   Sectorsize: 512
   Mode: r2w2e3
 
I also use gpt and on 8.2-rc3 for one server (upgraded yesterday), it boots fine.

your first line in loader.conf looks off.

shouldnt it be?

Code:
vfs.root.mountfrom="zfs:tank/root"
 
Nothing wrong with the mountfrom parameter. As you can see from his # zfs list output there is no tank/root filesystem and he is using the root filesystem of the pool as /
 
Thanks for a clue.
I modified /etc/fstab to:
Code:
proc /proc procfs rw 0 0
/dev/ad4p2 none swap sw 0 0 
tank/usr /usr zfs rw 0 0
tank/ports /usr/ports zfs rw 0 0
tank/src /usr/src zfs rw 0 0
tank/home /home zfs rw 0 0
tank/var /var zfs rw 0 0
tank/usrlocal /usr/local zfs rw 0 0
tank/obj /usr/obj zfs rw 0 0
tank/tmp /tmp zfs rw 0 0

Solved.
 
Sorry to bust the whole joy state of trance but it's not really solved because:

  1. You shouldn't need to specify anything in /etc/fstab when you are using ZFS because it should be mounted automagically @ boot
  2. If you use this workaround (because this IS a workaround) you do not need to mount everything, just the "/" partition. Try it. The rest will mount automagically.

I will return in a couple of hours, after I run some tests and update you guys.
 
I am at a loss here, my VM boots fine on 8.2-PRERELEASE, and the server I updated last night boots fine on 8.2-RC3, I do not mount via fstab it is done with the loader.conf line. So baffling its done this to you guys. I am using GPT labels.
 
You have
Code:
zfs_load="YES"
in /etc/rc.conf when it should be
Code:
zfs_enable="YES"

I've never actually booted any ZFS system without this line but I believe ZFS filesystems will not be mounted without it (you have to add them to /etc/fstab as mentioned). I would still expect / to mount but it appears not.

So simple fix, either correct /etc/rc.conf or add all zfs filesystems to /etc/fstab.
 
usdmatt said:
You have zfs_load="YES" in /etc/rc.conf when it should be zfs_enable="YES".

I've never actually booted any ZFS system without this line but I believe ZFS filesystems will not be mounted without it (you have to add them to /etc/fstab as mentioned). I would still expect / to mount but it appears not.

So simple fix, either correct /etc/rc.conf or add all zfs filesystems to /etc/fstab.

I can confirm I have that line on all zfs systems. Good find.
 
Back
Top