Broken grubby/grub-mkconfig?
After an update to fedora 27 I ran into a problem similiar to this one: https://ask.fedoraproject.org/en/ques...
The "solution" to replace the broken simlink with a os-release file worked for me until a first kernel update. After the update I was stuck at grub, so I've loaded the kernel and init ram manually and then mounted /dev/sda1 to investigate the grub.cfg.
I've found out, that grub.cfg was not modified correctly by the update. See the first 2(the first is the new one after kernel update) entries:
menuentry '' (4.14.14-300.fc27.x86_64) ' --class generic --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.14.6-300.fc27.x86_64-advanced-3b0d890c-a6f1-473b-90dc-1448f8848560' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 2c276ad3-531b-4984-85be-cef235732659 else search --no-floppy --fs-uuid --set=root 2c276ad3-531b-4984-85be-cef235732659 fi linux16 /vmlinuz-4.14.14-300.fc27.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-667b87ca-8827-43cd-ba35-d3e83658432a rd.lvm.lv=fedora/swap rhgb quiet LANG=en_US.UTF-8 } menuentry '(4.14.6-300.fc27.x86_64)' --class generic --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.14.6-300.fc27.x86_64-advanced-3b0d890c-a6f1-473b-90dc-1448f8848560' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 2c276ad3-531b-4984-85be-cef235732659 else search --no-floppy --fs-uuid --set=root 2c276ad3-531b-4984-85be-cef235732659 fi linux16 /vmlinuz-4.14.6-300.fc27.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-667b87ca-8827-43cd-ba35-d3e83658432a rd.lvm.lv=fedora/swap rhgb quiet initrd16 /initramfs-4.14.6-300.fc27.x86_64.img }
It is obvious, that info about init ram for the new kernel was not added even though it is located where it is supposed to be.
This happened to me already second time and the only way out for me was to switch the order of the entries manually and then after a successful boot install grub again as instructed: https://fedoraproject.org/wiki/GRUB_2
Does anyone have any idea, how to fix this properly? Thanks!
This sounds a lot like my problem asked here:
https://ask.fedoraproject.org/en/question/116432/seems-grubby-is-not-working-properly/
Is that the same? Could this be a bug, but not many people noticing because they don't see their grub menu and don't check all the time which kernel they are running?
Regards, Peter
Hi Peter, thanks for comment! Well I tried reinstalling the mentioned packages as instructed in your link, but lets see after the next kernel update if it gets broken again.
I am most interested in why the menu entry has a broken syntax right after the update and why the info about init ram image is missing. See the first line and the double quote
menuentry '' (4.14.14-300.fc27.x86_64) '
which is obviously incorrect. I noticed that just after checking the differences between correct and wrong/boot/grub2/grub.cfg
file.Note I was stuck at the grub shell, I did not have a chance to see any boot menu as the grub config was broken.