You are not logged in.

#1 2016-01-31 01:49:38

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Stuck at boot screen with ZFS root

After trying at least 6 times to install on a ZFS using GRUB, reEFInd , and now systemd-boot (which is what I prefer) I can't seem to get my system to boot using a ZFS root. I'm using a UEFI system with no data sets besides root and I've tried repeatedly with no luck.

Right now I have the system all set up but I just can't seem to get it to boot, on startup I get the boot screen with the two options and after choosing one it restarts the boot sequence and then goes to the firmware interface, after that it reboots.

I'm using a separate drive's FAT partition to boot off.

This is the sequence I went through :

Setup zpool:

zpool create -f -o ashift=12 vault mirror ata-SanDisk_SDSSDXPS480G_152271401093  ata-SanDisk_SDSSDXPS480G_154501401266

zfs create vault/ARCHON
zfs set mountpoint=/ vault/ARCHON
zfs set compression=on vault

zfs create vault/ARCHON/home -o mountpoint=/home

zfs create vault/ARCHON/root -o mountpoint=/root

zpool set bootfs=vault/ARCHON vault

zpool export vault
zpool import -d /dev/disk/by-id -R /mnt vault

mkdir /mnt/boot
mount /dev/sdg1 /mnt/boot

mkdir -p /mnt/etc/zfs
cp /etc/zfs/zpool.cache /mnt/etc/zfs/zpool.cache


pacstrap -i /mnt base base-devel

genfstab -U -p /mnt >> /mnt/etc/fstab

# Confirm fstab is correct (mount only boot)
nano /mnt/etc/fstab

# Add hooks after block:  keyboard zfs filesystems
nano /mnt/etc/mkinitcpio.conf

arch-chroot /mnt /bin/bash

Next I added zfs and did a normal install until bootloader

Bootloader setup:

# Bootloader
pacman -S intel-ucode
bootctl install

# Bootloader - add following to /boot/loader/loader.conf

# default arch
# linux /vmlinuz-linux
# initrd /intel-ucode.img
# initrd /initramfs-linux.img
# options zfs=vault/archon

nano /boot/loader/loader.conf

# End bootloader


echo "Archon" > /etc/hostname

# Edit hosts file
nano /etc/hosts

# Internet
systemctl enable dhcpcd@eno1.service

echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen

passwd

# Check fstab
nano /etc/fstab

# Exit and reboot
exit

umount /mnt/boot

zfs umount -a
zpool export vault

Last edited by jasonwryan (2016-01-31 15:47:29)

Offline

#2 2016-01-31 13:18:26

whitesnow
Member
Registered: 2015-01-04
Posts: 52

Re: Stuck at boot screen with ZFS root

For systemd-boot I don't know if I really can help you.

I use grub.
And in the grub.cfg I have at least 2 settings regarding the zpool.

zfs=rpool/ROOT/rootfs root=ZFS=rpool/ROOT/rootfs

So for yours I don't know anything.
Did you read:
https://wiki.archlinux.org/index.php/In … nux_on_ZFS

The kernel parameters in refind_linux.conf for ZFS should include zfs=bootfs or zfs=zroot so the system can boot from ZFS. 

Does this belong to the systemd-boot?

# Bootloader - add following to /boot/loader/loader.conf

# default arch
# linux /vmlinuz-linux
# initrd /intel-ucode.img
# initrd /initramfs-linux.img
# options zfs=vault/archon

I hope you did delete the #.

Would you post your /boot/loader/loader.conf?
Do you have a refind_linux.conf?

Offline

#3 2016-01-31 13:33:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Stuck at boot screen with ZFS root

IMO, ZFS is a data file system.  Not a good choice for a system file system.  Save yourself a headache and potential data loss.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2016-01-31 14:09:05

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: Stuck at boot screen with ZFS root

I know *nothing* about ZFS (as you already know), but:

STREBLO wrote:

Bootloader setup:

# Bootloader
pacman -S intel-ucode
bootctl install

# Bootloader - add following to /boot/loader/loader.conf

# default arch
# linux /vmlinuz-linux
# initrd /intel-ucode.img
# initrd /initramfs-linux.img
# options zfs=vault/archon

nano /boot/loader/loader.conf

# End bootloader

You need to create /boot/loader/entries/arch.conf (or similar) to hold all the configuration details (everything from "linux /vmlinuz-linux" down) rather than placing it in /boot/loader/loader.conf -- the latter file should only have the "timeout" & "default" lines (and these will be overridden anyway if you use the keyboard shortcuts on the bootctl systemd-boot loader screen).

And don't use "#" before the lines, as already mentioned.

See https://wiki.archlinux.org/index.php/Sy … figuration

Last edited by Head_on_a_Stick (2016-01-31 14:09:50)

Offline

#5 2016-01-31 20:30:17

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Re: Stuck at boot screen with ZFS root

whitesnow wrote:

For systemd-boot I don't know if I really can help you.

I use grub.
And in the grub.cfg I have at least 2 settings regarding the zpool.

zfs=rpool/ROOT/rootfs root=ZFS=rpool/ROOT/rootfs

So for yours I don't know anything.
Did you read:
https://wiki.archlinux.org/index.php/In … nux_on_ZFS

The kernel parameters in refind_linux.conf for ZFS should include zfs=bootfs or zfs=zroot so the system can boot from ZFS. 

Does this belong to the systemd-boot?

# Bootloader - add following to /boot/loader/loader.conf

# default arch
# linux /vmlinuz-linux
# initrd /intel-ucode.img
# initrd /initramfs-linux.img
# options zfs=vault/archon

I hope you did delete the #.

Would you post your /boot/loader/loader.conf?
Do you have a refind_linux.conf?

>_< yes I deleted the hash signs, they were there to explain to you what I added.

I says "either" zfs= or rootfs= was fine.

I'm using systemd-boot, not rEFInd.

Head_on_a_Stick wrote:

I know *nothing* about ZFS (as you already know), but:
You need to create /boot/loader/entries/arch.conf (or similar) to hold all the configuration details (everything from "linux /vmlinuz-linux" down) rather than placing it in /boot/loader/loader.conf -- the latter file should only have the "timeout" & "default" lines (and these will be overridden anyway if you use the keyboard shortcuts on the bootctl systemd-boot loader screen).

SHIIIII- of course, forgot bout the entry, stand by, attempting...

Offline

#6 2016-01-31 22:25:56

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Re: Stuck at boot screen with ZFS root

Ok, awesome. It's now booting. Unfortunately its stuck in read only mode and wont connect to internet... Cant change anything because read only.

Offline

#7 2016-02-01 05:32:47

whitesnow
Member
Registered: 2015-01-04
Posts: 52

Re: Stuck at boot screen with ZFS root

Here this happend similarly.
http://freebsd.1045724.n5.nabble.com/ZF … 89931.html

To me, I don't remember such things happen to me personally.

# zfs get all | grep readonly 
# zfs set readonly=off zroot

so you may try that as a temporary solution.
the

zfs get all | grep readonly

will show you, if it is the zfs property, that causes the readonly.
If so, you should be able to set

zfs set readonly=off vault

and recheck with

zfs get all | grep readonly

it might be inherited by all filesystems (I'm no expert on these details, I now some properties are inherited).
if not, you repeat for every filesystem

zfs set readonly=off vault/archon

Then try to find the reason, there was some more to read on that link, I posted on top. I don't have the time now.

Offline

#8 2016-02-01 07:17:43

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Re: Stuck at boot screen with ZFS root

whitesnow wrote:

Here this happend similarly.
http://freebsd.1045724.n5.nabble.com/ZF … 89931.html

To me, I don't remember such things happen to me personally.

Then try to find the reason, there was some more to read on that link, I posted on top. I don't have the time now.

I also noticed on boot I'm getting messages:

failed start volatile files and directories
load / save random read

Why would it always stop me from being able to connect from the internet though? Would it be because it can't change anything?

Thanks, I actually found that while looking too, i'm now looking for a permanent solution. I could always run a script on boot but there should be a better way,

Last edited by STREBLO (2016-02-01 07:19:28)

Offline

Board footer

Powered by FluxBB