Call for testing kernel-install-for-dracut

I’ll see if I can experiment on ARM.

You can just sudo pacman -Rc dracut, then yay -S kernel-install-mkinitcpio mkinitcpio-openswap

Lastly, re-run my script. If it fails, delete everything in /efi/5f36d8c0aa64460e9be33539d6a364bd before running it.

That should put you back on mkinitcpio.

Hmm, I never had kernel-install-mkinitcpio installed at any point. I thought kernel-install-dracut was a replacement for it so I only ever installed the dracut version. Might that have been any issue? It wasn’t quite clear to me I need both kernel-install mkinitcpio and dracut, unless I misunderstood something, which is very possible.

No, you aren’t supposed to have both installed. However, to fix your current problem, switching to the mkinitcpio version will make your initrams smaller again. The issue here isn’t systemd-boot, it is dracut.

Read this for more info
https://wiki.archlinux.org/title/Dracut

I’m totally cool to follow through with this right? Not everyday I remove all kernels :sweat_smile:

[scott@EndeavourOS ~]$ sudo pacman -Rc dracut
[sudo] password for scott: 
checking dependencies...
:: base optionally requires linux: bare metal support
:: libratbag optionally requires linux: Linux 5.2 is required for Logitech wireless devices

Package (5)                Old Version     Net Change 

kernel-install-for-dracut  1.2-1             -0.02 MiB
linux                      5.19.4.arch1-1  -178.69 MiB
linux-lts                  5.15.63-1       -130.97 MiB
linux-zen                  5.19.4.zen1-1   -185.83 MiB
dracut                     056-1             -0.97 MiB

Total Removed Size:  496.49 MiB

:: Do you want to remove these packages? [Y/n] 

Nooooo don’t do it

Install mkinitcpio first

Also don’t use -Rc use -Rs instead

-Rc removes all packages that depend on that package
while
-Rs removes all dependencies of that package if not needed by other packages

That is crap. I always use Rc. Not only does not have the silly side-effects of -Rs, it is what virtually every other distro does by default.

Yes, definitely do this @Scotty_Trees

What are the side effects of -Rs? orphans?

It removes optional dependencies of other packages for one thing.

Most places recommend using -Rs, thats why I always use it. I might need to change the way I do things and even change my aliases.

Surprisingly archwiki recommends -Rs
https://wiki.archlinux.org/title/Pacman#Removing_packages

Virtually everything related to Arch recommends -Rs, because -Rc carries more risk. It is an Arch-ism that is probably more tied to not wanting to do support or be responsible when someone decides to pacman -Rc glibc or something similar.

But if you are responsible enough to look at the list of packages before pressing “Y”, it is a more useful tool in my opinion.

sudo pacman -S mkinitcpio #which removed kernel-install-for-dracut
sudo pacman -Rc dracut #which removed only dracut this time and left all my kernels installed (phew!)
yay -S kernel-install-mkinitcpio mkinitcpio-openswap #which both installed successfully

Side note, I didn’t see any mention of mkinitcpio-openswap in your convert to systemd-boot guide, this is the first I’m hearing about it, but I see it is in the EndeavourOS repos. Just keep it installed since I do have a swap file I take it?

Lastly I ran the script for the final time, and success!

[scott@EndeavourOS ~]$ sudo bash ./convert.sh
mkdir: cannot create directory ‘/efi/5f36d8c0aa64460e9be33539d6a364bd’: File exists
Installing kernel 5.15.63-1-lts
==> Starting build: 5.15.63-1-lts
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/5f36d8c0aa64460e9be33539d6a364bd/5.15.63-1-lts/initrd
==> Image generation successful
==> Starting build: 5.15.63-1-lts
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/5f36d8c0aa64460e9be33539d6a364bd/5.15.63-1-lts/initrd-fallback
==> Image generation successful
Installing kernel 5.19.4-arch1-1
==> Starting build: 5.19.4-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/5f36d8c0aa64460e9be33539d6a364bd/5.19.4-arch1-1/initrd
==> Image generation successful
==> Starting build: 5.19.4-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/5f36d8c0aa64460e9be33539d6a364bd/5.19.4-arch1-1/initrd-fallback
==> Image generation successful
Installing kernel 5.19.4-zen1-1-zen
==> Starting build: 5.19.4-zen1-1-zen
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/5f36d8c0aa64460e9be33539d6a364bd/5.19.4-zen1-1-zen/initrd
==> Image generation successful
==> Starting build: 5.19.4-zen1-1-zen
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/5f36d8c0aa64460e9be33539d6a364bd/5.19.4-zen1-1-zen/initrd-fallback
==> Image generation successful
[scott@EndeavourOS ~]$ 

Am I fully good to go now? I’m excited to test out a reboot, but also equally happy for all the help and support I’ve received, so a huge thank you for your time, it’s very appreciated!

I had you install it since you removed it with mkinitcpio earlier. The guide wouldn’t need to mention it since it would just either be installed or not but not changed.

As long as you have followed all the other steps, you should be good, yes.

Rebooted and I get stuck at the Acer logo boot screen with the following error:

error: file ‘/@/boot/grub/x86_64-efi/normal.mod’ not found.
Entering rescue mode…
grub rescue>

Posting from mobile so sorry for any spelling mistakes

You may need to go into your BIOS and select the correct boot entry from the list.

It looks like it is still booting grub.

You know I think in my excitement to reboot after I re-ran your script, I did not re-run the remove grub command. Perhaps I need to re run that somehow?

This command: sudo rm -r /boot/efi /boot/grub /boot/initramfs* /boot/vmlinuz*

Which I ran once before earlier in this setup. Should I have run it again as well maybe?

No, there are two possibilities that I can think of

  • You forgot to run bootctl install
  • Your BIOS/firmware ignored the request to change the EFI boot order. That actually happens quite a bit. It is one of the reasons some people are having a harder time recovering from the grub issue.

I ran bootctl install and then changed the timeout to 5 seconds. I think what happened was what you suggested as the second possibility. So I went into my BIOS and changed the boot order and now I am back up and running again on my EndeavourOS install. I rebooted twice just to confirm and make sure my Acer stuck with my current selection and so far it has.

Side note, I have no idea how to delete BIOS order entries, but that might be something I may need to do since the grub entry that won’t let me boot at all is still in my BIOS boot order list, it’s just now at the bottom of the list so it shouldn’t ever let me boot into it, I hope, but you never know.

Sorry I wasn’t able to help test out the dracut version for you, but if you ever think an update changes/fixes it, I’m more than happy to try again later to test it out of course.

efibootmgr
sudo efibootmgr -B b xxxx

Where xxxx is the number of the entry you want to delete.