# Broken grubby/grub-mkconfig? edit

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!

edit retag close merge delete

This sounds a lot like my problem asked here:

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

( 2018-01-27 14:19:56 -0500 )edit

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.

( 2018-01-28 08:58:58 -0500 )edit

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.

( 2018-01-28 11:13:00 -0500 )edit
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.16085946559906006, "perplexity": 10928.586513055863}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-17/segments/1618038069133.25/warc/CC-MAIN-20210412175257-20210412205257-00125.warc.gz"}