zectl icon indicating copy to clipboard operation
zectl copied to clipboard

Default systemd-boot entry not working

Open eoli3n opened this issue 3 years ago • 11 comments

This is not a zectl issue : https://github.com/systemd/systemd/issues/15068

But as it is an important feature for zectl, i'm wondering if you workedaround it ? If you reboot without beeing in front of your screen and without speedly select (and remember) the right boot env, so you get the last created boot env booted. It could be really painful if you didn't notice it...

I still don't get why i need to "activate" a bootenv after booted it ? As we select a bootenv in systemd-boot at boot, it sound like making the work twice, and being more complex without beeing useful. If i want to revert, i reboot to the previous boot env, so why activate mechanism offers more ?

eoli3n avatar Nov 17 '20 15:11 eoli3n

Activating a boot env marks it as the default entry in the boot loader and promotes the dataset clone.

zhimsel avatar Nov 17 '20 15:11 zhimsel

Ok thanks. Why not making auto-default+promote at startup ? and using activate to "revert" if needed ? I don't even know if you need activate, this seems to me a more logic workflow:

  1. Create a boot env "before install x"
  2. Something is wrong, lets reboot and select the boot env "before install x"
  3. At startup, it become the default boot env. Then two cases: a. I'm ok with this: nothing to do b. I'm not ok, lets reboot on another bootenv, then goto 3 :)

@zhimsel do you face the issue of systemd-boot not correctly boot defaultly set entry ?

eoli3n avatar Nov 17 '20 17:11 eoli3n

I think I may have noticed it a week or so ago, but I don't remember. I can check specifically if needed...

zhimsel avatar Nov 17 '20 17:11 zhimsel

@zhimsel can you try and tell me if its working please ?

eoli3n avatar Nov 20 '20 09:11 eoli3n

Sure. I'll test this later today.

zhimsel avatar Nov 20 '20 15:11 zhimsel

@eoli3n So I just tested what I think was the issue, and it didn't occur for me. My test procedure (while booted into the default boot env):

  • zectl create test
  • zectl activate test
  • Confirm that loader.conf had test as the default BE
  • Reboot, verify that test was the actively selected bootloader entry (i.e. the default)
  • Select and boot into default instead
  • Confirm that loader.conf still had test as the default
  • Reboot again and verify again that test was still selected in the bootloader by default.

So it seems to have been fixed. I vaguely remember seeing it as a bug that was fixed in systemd-bootloader's bug tracker.

For reference:

  • zectl version: 0.1.2
  • systemd version: 246.6-1

¯\_(ツ)_/¯

zhimsel avatar Nov 20 '20 16:11 zhimsel

Thanks for testing, I will try to understand what's going on here.

eoli3n avatar Nov 20 '20 16:11 eoli3n

I also attempted @zhimsel 's test and cannot reproduce

bootctl version: systemd 246 (246.6-1-arch)

johnramsden avatar Nov 24 '20 22:11 johnramsden

I think that my bootenv names are problematic:

pacmanhook-20200523T162905  NR      /                 2020-05-23 16:29  
pacmanhook-20201121T114946          -                 2020-11-21 11:49  

I will test @zhimsel procedure when i have time @johnramsden what do you think of https://github.com/johnramsden/zectl/issues/29#issuecomment-729077715 ?

eoli3n avatar Nov 25 '20 07:11 eoli3n

related to https://github.com/johnramsden/zectl/commit/4d9139e242a472fb024bc8399e83049413904df4 and #7 ? I'm running into this same problem on a fresh install for a new laptop. Tried loader.conf with org.zectl-default.conf and org.zectl-default, no change in behavior with systemdboot efi default entry when I zectl activate foo. :/

schmitmd avatar Jan 09 '22 21:01 schmitmd

I'm still running that bug, which is pretty annoying.

eoli3n avatar Jan 10 '22 10:01 eoli3n