FS#72663 - [grub,booster] grub generate menuentry with missing initrd line

Attached to Project: Arch Linux
Opened by fsdsfd (BCD889) - Monday, 08 November 2021, 10:11 GMT
Last edited by Toolybird (Toolybird) - Sunday, 11 June 2023, 03:50 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi

I switched to booster from mkinitcpio, when regenerated grub config file, grub-mkconfig create 2 menuentry blocks: block 0 with missing initrd line and a second menuentry with kernel and initramfs image respectively.
obviously after reboot, a kernel panic occurred. as a temporary workaround, at least on my machine, is to add GRUB_DEFAULT=1 to /etc/default/grub

* package version(s)

- grub 2:2.06-2
- booster 0.7-1

Steps to reproduce:

sudo grub-mkconfig -o /boot/grub/grub.cfg
   grub.cfg (4.1 KiB)
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 11 June 2023, 03:50 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments from PM.
Comment by bobpaul (bobpaul) - Thursday, 02 December 2021, 20:37 GMT
If you look at /etc/grub.d/10_linux, you'll see that kernels are matched with initrd files based on a naming convention. If there's no matching initrd then the script assumes the kernel doesn't need one. So if you have a kernel file named `vmlinuz-linux-zen` which needs an initrd, then your initrd should be named like initird-linux-zen.img, initrd.img-linux-zen, initramfs-genkernel-linux-zen, etc. That's provided by upstream grub.

Arch includes a patch that also looks for `booster-*.img` initrd images to make the "booster" entries. This doesn't alter the above functionality from upstream. I think the expectation is that users will have both mkinitcpio and booster installed side by side and can change `GRUB_DEFAULT=` as you did to select a default.

If you want a single entry using the booster initrd then you can `booster-linux-zen.img` to `initrd-linux-zen.img`.
Comment by Christian Hesse (eworm) - Saturday, 25 December 2021, 21:42 GMT
So you uninstalled mkinitcpio? What files do you have in /boot?
Comment by fsdsfd (BCD889) - Saturday, 25 December 2021, 21:58 GMT
yes, i uninstalled mkinitcpio.



/boot/grub/
/boot/amd-ucode.img
/boot/booster-linux-zen.img
/boot/vmlinuz-linux-zen
Comment by Christian Hesse (eworm) - Saturday, 25 December 2021, 22:15 GMT
I think it is expected behavior. Building a monolithic kernel that does not need an initrd is perfectly possible. So the first entry is generated for any kernel, with or without initrd.
Additional entries are generated for alternative initrd images.

So not generating the first entry may break other setups...

Loading...