Bug 840079
Description
Henrik Johansson
2012-07-13 15:54:21 UTC
Created attachment 598102 [details]
/etc/grub.d/40_custom
Created attachment 598107 [details]
The unbootable and bootable /boot/grub2/grub.cfg
Adding both the unbottable grub.cfg and the manually corrected.
Created attachment 598109 [details]
Two grub.cfg-files
The unbootable and the manually corrected /boot/grub2/grub.cfg.
Created attachment 600169 [details]
Two new grub.cfg-files, generated and edited
Removed the unbootable kernel-3.4.4-5.fc17.x86_64 and kernel-devel-3.4.4-5.fc17.x86_64, 'rpm --erase'.
Updated with 'Software Update' today, a new kernel (kernel-3.4.6-2.fc17.x86_64) was installed and a new grub.cfg was built.
The new grub.cfg had som extra characters at the end of 'set root'-row in the boot-entry from /etc/grub.d/40_custom. I edited grub.cfg before reboot, difference between the grub.cfg built by kernel install (grub.cfg.20120724) and the manually updated (grub.cfg):
[root@xxxxxxxx tmp]# diff grub.cfg grub.cfg.20120724
104c104
< set root='(hd1,3)';setlegacy_hdbias='0'
---
> set root='(hd1,3)';setlegacy_hdbias='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'='0'
The kernel booted OK and SLED11 was also OK.
Adding an attachment with the new grub.cfg-files.
Found an old boot-entry in grub.cfg, the kernel is not installed: menuentry 'Fedora (3.3.7-1.fc16.x86_64)' --class fedora --class gnu-linux --class gnu --class os { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root 7ac39dc2-383a-45dc-8516-9938939e3a11 echo 'Loading Fedora (3.3.7-1.fc16.x86_64)' linux /vmlinuz-3.3.7-1.fc16.x86_64 root=/dev/mapper/vg_uw000140-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=sv-latin1 quiet SYSFONT=latarcyrheb-sun16 rhgb rd.lvm.lv=vg_uw000140/lv_swap rd.luks=0 rd.lvm.lv=vg_uw000140/lv_root LANG=en_US.UTF-8 echo 'Loading initial ramdisk ...' initrd /initramfs-3.3.7-1.fc16.x86_64.img } Removed the old boot-entry, from grub.cfg. (Please upload files individually as text/plain - that is much easier to read and search than having to download archives.) What do 'generated' in comment 4 mean? Anyway: grubby can apparently not handle that you have two statements on one line. Try to put them on separate lines and see if that helps. Created attachment 600384 [details]
This grub.cfg was built when kernel-3.4.6-2.fc17.x86_64 was installed
Created attachment 600385 [details]
Manually edited grub.cfg, after install of kernel-3.4.6-2.fc17.x86_64
I uploaded the latest files again (separate). With generated I mean, built by kernel-install. Does the kernel-install run grubby? Are the existing grub.cfg used as one input to the new grub.cfg? I separated the two statements in 40_custom. I don't know how to test, the new 40_custom. I tested 'grub2-mkconfig -o /tmp/test.cfg', but that generated warnings and a grub.cfg with lots of differences. The warnings: /usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. Ignoring it. Please correct or delete your device.map. The file /boot/grub2/device.map: # this device map was generated by anaconda (hd0) /dev/sda (hd1) /dev/sdb (hd2) /dev/sdc (hd0,1) /dev/sda1 [henrik@uw000140 ~]$ (In reply to comment #10) > Does the kernel-install run grubby? yes > Are the existing grub.cfg used as one input to the new grub.cfg? for grubby, yes > I separated the two statements in 40_custom. > I don't know how to test, the new 40_custom. You could edit the section in grub.cfg and verify that installing a new kernel doesn't mangle it. > I tested 'grub2-mkconfig -o /tmp/test.cfg', but that generated warnings and > a grub.cfg with lots of differences. That is however the right and only way to generate a new grub.cfg. > The warnings: > /usr/sbin/grub2-probe: warning: the device.map entry `hd0,1' is invalid. > Ignoring it. Please correct or delete your device.map. > The file /boot/grub2/device.map: > # this device map was generated by anaconda > (hd0) /dev/sda > (hd1) /dev/sdb > (hd2) /dev/sdc > (hd0,1) /dev/sda1 As it says: your device.map is invalid. That should however not matter for recent grubs - they will ignore it and issue a warning. Just remove it. Created attachment 600590 [details]
grub.cfg built by 'grub2-mkconfig -o /boot/grub2/grub.cfg'
Renamed /boot/grub2/device.map before building new grub.cfg, grub2-mkconfig didn't create a new device.map.
Grub reports some error and displays three menu-entries:
- Fedora
- Advanced options for Fedora
- SUSE Linux Enterprise Desktop 11 - 2.6.27.39-0.3
It's only the SUSE-entry that is OKtouch any key to. The Fedora-entry reports some errors and ends with 'touch any key to continue...', the latest Fedora-kernel boots OK.
The Advanced entry displays six Fedora-entries, only tested the first, it ends with 'touch any key to continue...', that entry doesn't boot.
Has changed to the previous grub.cfg.
(In reply to comment #12) > Grub reports some error and displays three menu-entries: ... > The Fedora-entry reports some errors and ends with 'touch any key to continue...' I guess that is because you haven't run 'grub2-install /dev/sda' with the grub version you have now (beta6?)? You thus have a config file that use some new features that your "old" installed bootloader don't know. I didn't know that I should use grub2-install. Anything more I should do, are there a HowTo for this? When are device.map needed? See /usr/share/doc/grub2-tools-2.0/README.Fedora and https://fedoraproject.org/wiki/GRUB_2 (where I just added some extra info). You most other users don't need device.map. Created attachment 600801 [details] A log from my terminal window, at update of grub config The saved entry was 'Fedora Linux, with Linux 3.3.1-3.fc16.x86_64', the same kernel-version that I removed from grub.cfg. In grub.cfg it was the last Fedora-entry and not the default. I've updated the grub config, as written in https://fedoraproject.org/wiki/GRUB_2. I've tested the new config (bbot), several times, grub writes an error message before the menu is written, maybe about a file. I'm too slow reader. I'tested four of the entries, all OK. (In reply to comment #16) > The saved entry was 'Fedora Linux, with Linux 3.3.1-3.fc16.x86_64', the same > kernel-version that I removed from grub.cfg. > In grub.cfg it was the last Fedora-entry and not the default. I'm not sure what you are telling here - but it doesn't seem to be related to the issue reported on this issue. > I've updated the grub config, as written in > https://fedoraproject.org/wiki/GRUB_2. Note that some parts of that page is wrong/outdated. I added a disclaimer. > I've tested the new config (bbot), several times, grub writes an error > message before the menu is written, maybe about a file. I'm too slow reader. Bug 817187. (In reply to comment #17) > (In reply to comment #16) > > The saved entry was 'Fedora Linux, with Linux 3.3.1-3.fc16.x86_64', the same > > kernel-version that I removed from grub.cfg. > > In grub.cfg it was the last Fedora-entry and not the default. > > I'm not sure what you are telling here - but it doesn't seem to be related > to the issue reported on this issue. This seems to be a problem, at a previous kernel-upgrade. The references to a removed kernel, wasn't removed from /boot/grub2/grub.cfg and from the variable for the default 'menuentry'. (In reply to comment #18) FWIW: I still don't get it. You could try to make a more explicit and self-contained description. But: 1. grubby will probably do all kind of bad things if there is a line it can't handle - including not removing old kernel entries. 2. Other than that, it doesn't seem like it is directly related to the problem you reported here. Created attachment 601552 [details] Updated /etc/grub.d/40_custom Followed the suggestion in Comment 28 for Bug 817187. 'cp /boot/grub2/locale/en /boot/grub2/locale/en.mo'. No error from Grub. Are there still problems with the contents in /etc/grub.d/40_custom? (In reply to comment #20) > Are there still problems with the contents in /etc/grub.d/40_custom? I don't know. Try it. It's OK to close this ticket. No new grub.cfg-problems since 2012-07-31. I'm saving a copy of grub.cfg at every kernel-update, as an insurance. Upgraded to Fedora 18 2013-03-31. /Henrik This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |