[Bug 750897] New: grub2-install failed to install to extended partition
https://bugzilla.novell.com/show_bug.cgi?id=750897 https://bugzilla.novell.com/show_bug.cgi?id=750897#c0 Summary: grub2-install failed to install to extended partition Classification: openSUSE Product: openSUSE 12.2 Version: Milestone 1 Platform: x86 OS/Version: openSUSE 12.2 Status: NEW Severity: Major Priority: P5 - None Component: Bootloader AssignedTo: mchang@suse.com ReportedBy: mchang@suse.com QAContact: jsrain@suse.com Found By: Development Blocker: --- My partition setup: $ fdisk -l Device Boot Start End Blocks Id System /dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris /dev/sda2 * 4208640 213921791 104856576 f W95 Ext'd (LBA) /dev/sda5 4210688 46153727 20971520 83 Linux Try to install grub2 (embedding boot.img) in extended partition as secondary bootstrap .. $ grub2-install --force /dev/sda2 /usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map. However the device.map looks fine .. it did contains grub/os drive mapping correctly $ cat /boot/grub2/device.map (hd0) /dev/disk/by-id/ata-SAMSUNG_HM250HJ_S2ATJ1KZB00186 Inside grub2-install script, the command line invocation below has trouble: $ /usr/sbin/grub2-probe --device-map=/boot/grub2/device.map --target=drive --device /dev/sda2 expected result: return (hd0,msdos2) actual result: return /usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map. Need to check why the failure occur and could the installation be successful after it get fixed? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c1
--- Comment #1 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c2
--- Comment #2 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c3
--- Comment #3 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c4
--- Comment #4 from Michael Chang
Use --skip-fs-probe, I can embed core,img into extended partition
s/core/boot/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c5
--- Comment #5 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c6
--- Comment #6 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c7
--- Comment #7 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c8
--- Comment #8 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c9
--- Comment #9 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c10
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c11
--- Comment #11 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c12
--- Comment #12 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c13
--- Comment #13 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c14
Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c15
--- Comment #15 from Michael Chang
on my experience with the laptop, I changed that to install on "/boot" (sda6). The grub install went fine, but the reboot to complete the install failed. Booting to rescue mode, I noticed that the extended partition had been marked active even though grub2 was not installed there. That is surely a bug. I
To be honest I'm not sure whether this is bug or not. I suppose it isn't. The /boot is logical partition and not able to be directly chainloaded via master boot code(only primary and extended partitions are possible via toggling the active flag), so the best effort we can do is marking extended partition to active, jumping to it and anticipating that there's boot code there that is in charge of chainloading to the other logical partitions .. Above is just my two cents, I'm not sure grub could work on such setup or not in the past, if yes this is definitely a regression bug. But if not that wouldn't surprise me because that's also expected. :)
switched the active partition back to where it should have been, and rebooted. That got me to my grub boot menu for 12.1, and there I selected the entry I already had to boot the 12.2 M2 system. Things went fine.
Just out of my curios, did you flag /dev/sda5 to active to rescue this? Could you give more description on how you did to rescue the system? I want to know because I'm afraid there's something I didn't understand ..
If the installer had done something like: dd if=/dev/sda6 of=/dev/sda4 bs=440 count=1 after the grub2 install, that would probably also have worked.
Yes. it would work. Btw .. next milestone should fix installing to extended partition .. things should get work out or box (hopefully). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c16
--- Comment #16 from Neil Rickert
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c17
--- Comment #17 from Michael Chang
If it didn't work, there is something buggy about that.
As I recall, the grub1 install might do something similar (switch the active flag). However, there's an option to have it not do that. And I always select that option when installing on a logical drive. That option was not available on the grub2 configuration screen. I'm hoping it will get there by the time of the final 12.2 release.
Yes I am aware of such option in grub. It should be added in final 12.2 release .
Flagging "/dev/sda5" active would not help. I flagged "/dev/sda3" active, since that's what I normally use. That gets me to the grub menu for my 12.1 install. I have an entry in the 12.1 menu to boot "/dev/sda6" (chainloader), and using that got me to the grub2 menu.
Now I got it. Thanks for your explanations.
My personal opinion: If grub is not installed on one of the primary partition sectors, then the installer should leave the active flag the way it is, and perhaps display a notice that the user will need to find a way to boot from the logical partition where it was installed.
Sounds good to me. We might have to consider this in the future (recently the focus is on completing grub2 function, compared grub2, still lots of work to do..).
In any case, if installing to the extended partition will work for future versions, that should solve the problem.
I added my comments above just to provide feedback on where there might be problems with M2.
Thanks. That's very much appreciated. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c18
--- Comment #18 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=750897
https://bugzilla.novell.com/show_bug.cgi?id=750897#c19
Michael Chang
participants (1)
-
bugzilla_noreply@novell.com