You are not logged in.

#1 2020-04-24 21:18:31

devil_kc
Member
Registered: 2008-09-14
Posts: 93

[SOLVED?]arch on native encrypted zfs roo

Hello,

I created a script that installs arch on encrypted zfs root and script itself works more or less great smile

thing is it installs OS, but grub is not setup right
i have this in my script:
sed -i "s#GRUB_CMDLINE_LINUX=.*#GRUB_CMDLINE_LINUX=\"zfs=zroot/encr/ROOT/default\"#" /etc/default/grub
and then i install grub:
ZPOOL_VDEV_NAME_PATH=1 grub-install --target=x86_64-efi --bootloader-id=GRUB /dev/sda --recheck
ZPOOL_VDEV_NAME_PATH=1 grub-mkconfig -o /boot/grub/grub.cfg

and on boot problem is this:
linux    /vmlinuz-linux root=ZFS=/encr/ROOT/default rw zfs=zroot/ROOT/default loglevel=3 quiet

and grub won't load OS

and if i change the linux line to:
linux    /vmlinuz-linux root=ZFS=zroot/encr/ROOT/default rw zfs=zroot/ROOT/default loglevel=3 quiet

it just works

I'd edit grub.cfg but that won't help my issue as it won't read from it on boot
Any idea how to set it up to build correct config?

Last edited by devil_kc (2020-04-25 19:51:49)

Offline

#2 2020-04-25 19:53:50

devil_kc
Member
Registered: 2008-09-14
Posts: 93

Re: [SOLVED?]arch on native encrypted zfs roo

so to make it work i had to edit line 76 of /etc/grub.d/10_linux

it says
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"

so i just
sed -i '76s#\"ZFS=\${rpool}\${bootfs\%/}\"#\"ZFS=zroot\/encr\/os\"#' /etc/grub.d/10_linux

and it works. not a real fix, more of a workaround

Offline

Board footer

Powered by FluxBB