johnramsden / zectl

ZFS Boot Environment manager for Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does zectl update /efi/loader/entries/* ?

carpenike opened this issue · comments

Hello!

Love this tool! I followed the systemboot guide to configure systemd-bootloader (https://github.com/johnramsden/zectl/blob/master/docs/plugins/systemdboot.md) and most things work as expected, but the 'options' line below doesn't update to point to the new boot environment after using zectl activate <newname>

Should this be updated by the tool or does this need to get manually updated?

cat /efi/loader/entries/org.zectl-default.conf
title     Arch Linux (Surface)
linux     /env/org.zectl-default/vmlinuz-linux-surface
initrd    /env/org.zectl-default/intel-ucode.img
initrd    /env/org.zectl-default/initramfs-linux-surface.img
options   zfs=zroot/ROOT/default rw
commented

Yes, it should be auto-updated.

Can you post the output from:

zectl get
commented

Also, to clarify it doesn't modify in-place it creates a new configuration on create.

So when you create:

zectl activate <newname>

You end up with:

<efi root>/loader/entries/org.zectl-<newname>.conf

Upon activating <newname>, <efi root>/loader/loader.conf is modified to look like:

default    org.zectl-<newname>.conf
# Other settings ....

Yes, it should be auto-updated.

Can you post the output from:

zectl get
PROPERTY                   VALUE  
org.zectl.systemdboot:efi  /efi   
org.zectl:bootloader              
org.zectl:bootpoolroot            
org.zectl:bootpoolprefix

Ah ok. No i don't get a new loader:

ryan in ﴱ home-cluster in cluster/default/zigbee2mqtt on  master ❯ sudo zectl list
Name          Active  Mountpoint  Creation          
base_install  NR      /                 2020-12-22 15:31  
swaywm                -                 2020-12-26 10:49  
 ryan in ﴱ home-cluster in cluster/default/zigbee2mqtt on  master ❯ 
sudo zectl create test
 ryan in ﴱ home-cluster in cluster/default/zigbee2mqtt on  master ❯ sudo zectl activate test                                                                                    [19:54:44]
 ryan in ﴱ home-cluster in cluster/default/zigbee2mqtt on  master ❯ sudo zectl list                                                                                             [19:54:48]
Name          Active  Mountpoint  Creation          
base_install  N       /                 2020-12-22 15:31  
test          R       -                 2020-12-29 19:54  
swaywm                -                 2020-12-26 10:49  
 ryan in ﴱ home-cluster in cluster/default/zigbee2mqtt on  master ❯ ls -lh /efi/loader/entries/                                                                                 [19:54:51]
total 4.0K
-rwxr-xr-x 1 root root 237 Dec 26 11:59 org.zectl-default.conf*
commented

The issue is that you don't have a bootloader set

Once you have set a bootloader, you should see something similar to the following depending on what you have set:

$ zectl get
PROPERTY                                       VALUE               
org.zectl.systemdboot:efi                      /efi            
org.zectl:bootloader                           systemdboot         
org.zectl:bootpoolroot                                             
org.zectl:bootpoolprefix

@johnramsden -- That was the fix! Thank you! I had assumed that because there was only one bootloader plugin available and that the command wasn't listed out on the systemboot.md walkthrough that it would be a default command and therefore unneeded. Added that option and fixed up all my other configs to point to the current BE and it all works as expected.

Thanks again!