You are not logged in.

#1 2013-04-26 00:03:05

alvaro martinez
Member
Registered: 2012-08-07
Posts: 4

wont boot with zfs not in root after upgrade

i updated the whole system (even AUR packs) from linux 3.6.9 to 3.8.8-1. I have /boot in a ext2 partition, root on ext4 on one disk and /var and /home in zfs in 3 disks. bootloader is Syslinux and zfs 0.6.1 packages are the ones from AUR. Everything worked fine for months (with 0.6.0), but when i upgraded all packages (and recompiled the ones in AUR) it didnt boot normally.

after kernel load it showed the message:

filesystem '' cannot be mounted, unable to open the dataset
ERROR: Failed to mount the real root device.

and exited to a minimal shell enviroment. after some tryouts i managed to boot by simply mounting the root partition (sdd5) in /new_root and continue with init:

exec switch_root /new_root /sbin/init

and it ran flawless, starting the whole system.
The problem is that it will do the same thing at reboot, i reinstalled the bootloader, reinstalled systemd, and my conclusion was that the "zfs" hook in /etc/mkinitcpio.conf was the problem, for some reason that hook forces to boot to a zfs root partition, even when it is not zfs. When i disable that in mkinicpio.conf, the system boots, but it wont mount the /var and /home (zfs) partitions automatically.

How can i force to boot to a non-zfs root partition loading the others at start?

Last edited by alvaro martinez (2013-04-26 00:30:42)

Offline

#2 2013-04-26 00:09:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: wont boot with zfs not in root after upgrade

From my understanding of the zfs-utils package, if you have zfs on root, then you need the zfs hook in mkinitcpio.  If you don't, but rather have non-root filesystems like /home and /var, you need to enable the zfs.service, as this is apparently what activates (and mounts) those filesystems.

At least this is what I have gathered from playing around with ZFS yesterday.

Offline

#3 2013-04-26 01:16:45

alvaro martinez
Member
Registered: 2012-08-07
Posts: 4

Re: wont boot with zfs not in root after upgrade

thankyou for the answer, i already have zfs.service enabled since the former version of zfs (0.6.0).
Without the hook /var is mounted after some other things that need it.
i will try moving /var to /root partition, leaving only some subdirs on zfs with a softlink

Offline

Board footer

Powered by FluxBB