booster: `booster: mount(efivarfs): no such device` when UEFI booting on Alpine Linux via QEMU

@anatol I am excited to have come across Booster, and pretty keen to use it for generating my initramfs; thanks for creating it! I hope it gains wide adoption in the various Linux distros.

I initially tried getting it working on Arch Linux with a ZFS root file system. After beating my head against the wall for a few days I found #33, and realised it was never going to work šŸ˜„. So I switched over to XFS and was able to get the system to boot.

Iā€™m now trying to reproduce this in Alpine Linux. Iā€™ve spent a fair amount of time over the last several days trying to get it working, but just canā€™t seem to get it to work no matter what I doā€“even though it seems others have?

If it helps I created a repo containing a (simplified) Packer template to build the QEMU images Iā€™m using for testing with: https://github.com/111A5AB1/packer-alpine-booster

It builds from Alpine Linux v3.15.4 ā€œExtendedā€ and ā€œVirtā€ ISOs using edge repos; and installs the Booster package from Testing. Two additional Grub entries are also added to boot from Booster for the standard (lts/virt) and ā€œedgeā€ kernels.

Summary:

  • Alpine Linux mkinitfs made initramfs boots fine (first two Grub entries).
  • Booster made initramfs with lts (extended)/virt (virt) kernels just hang after ā€œLoading ramdisk ā€¦ā€ (no output even with Booster debug enabled)
    • Extended: 5.15.37-0-lts
    • Virt: 5.15.37-0-virt
  • Booster made initramfs with edge kernel appears to try and start booting, but fails very quickly with booster: mount(efivarfs): no such device.
    • Edge: 5.17.5.-0-edge (x86_64)

In addition to the setup in the repo Iā€™ve also tried combinations of making a Universal initramfs, adding modules and additional files, as well as using Booster built direct from main (master). I originally* tried to boot directly via EFI without a boot loader; I saw the same results of the ā€œBooting intramfsā€ hang and ā€œefivarsā€ issue. I made one of the initramfs images with busybox+ls and confirmed an ls /sys/firmware/efi/efivars is emptyā€“it seems Booster is maybe not mounting it for some reason šŸ˜ž?

*Booting directly from EFI is my desired end goal; I dropped back to GRUB for testing since its the default/traditional Alpine installation via setup-alpine.

Thanks very much in advance for pointing me in the right direction of how to get Alpine booting with Booster created initramfs images. Let me know if you need any more information or if there is anything you want me to try.

Cheers!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I reopened this issue as I think that efivarfs needs to be handled in a more automatic way.

To clarify - to make your issue go away at Alpine one needs the patch from issue-149 branch + add efivarfs module to the image. Is it correct?

Since there are no examples yet in the README for booting on Alpine Iā€™ll write something up and submit a pull request.

Thank you! Please do. Documentation/examples/blogposts that explain how to work with booster are very welcome.

Derp! It looks like that forced load of the module before attempting to mount worked.

I forgot to change back to the 149 branch when I blew away the directory and pulled from from Git. Let me just do a few sanity checks to confirm before I close this as solved.

Sorry, my comment above should have contained efivarfs module (not efivars). I updated the patch and pushed it to issue-149 branch.

universal: false modules_force_load: -*,ata_generic,ata_piix,cdrom,crc16,crc32c_generic,ext4,failover,jbd2,libata,loop,mbcache,net_failover,pata_acpi,scsi_common,scsi_mod,sd_mod,sr_mod,t10_pi,usb_common,usbcore,usb_storage,virtio_net,virtio_pci,virtio_pci_legacy_dev,virtio_pci_modern_dev,virtio_ring,virtio

May I ask you to add efivars to this list as well? And then compile/test this branch https://github.com/anatol/booster/tree/issue-149 There is a patch that forces loading efivars before using it.

Attached is the kernel log with above Booster config and vanilla (unpatched) generated image.

kernel.log