FS#10639 - grub 0.97-12 - gpt patch broke partition commands
Attached to Project:
Arch Linux
Opened by Michal Soltys (msoltyspl) - Wednesday, 11 June 2008, 16:57 GMT
Last edited by Ronald van Haren (pressh) - Wednesday, 12 November 2008, 11:02 GMT
Opened by Michal Soltys (msoltyspl) - Wednesday, 11 June 2008, 16:57 GMT
Last edited by Ronald van Haren (pressh) - Wednesday, 12 November 2008, 11:02 GMT
|
Details
This is common on all my arch systems, where grub supplied
with gpt patch is used. Partition related commands, like
parttype, hide, unhide don't work anymore, always
returning
"Error 22: No such partition", both from boot shell and os shell. I made a quick test and recompiled the grub w/o gpt patch, and the problem is gone - so the culprit is in it somewhere. I haven't digged any deeper in the code though. |
This task depends upon
Closed by Ronald van Haren (pressh)
Wednesday, 12 November 2008, 11:02 GMT
Reason for closing: Fixed
Additional comments about closing: patch removed in grub 0.97-14
Wednesday, 12 November 2008, 11:02 GMT
Reason for closing: Fixed
Additional comments about closing: patch removed in grub 0.97-14
see http://repos.archlinux.org/viewvc.cgi/core/base/grub/PKGBUILD?root=core&r1=1.39&r2=1.40 and http://bugs.archlinux.org/task/9864
As i'm was the "guy with the gpt patch" i would meantime prefer to remove this patch. If one needs GPT support in grub it's easier to build a own grub (or we put a package in AUR). Also my approach to Arch and patching have changed, maybe this report and the discussion would be a good argument against patching in core packages.
One thing of interesst: Could someone with a gpt-patched grub on another distro (debian,gentoo) also confirm this on their patched grub? I have no access to such a machine currently, so test could be: set partition type of your swap partition
to swap (which was no change, but test the command):
parttype (hd0,0) 0x82
were hd0,0 must reflect the swap partition of YOUR installation.
So we should look what else must be patched to get back the grub base functions (and gpt). Or we revert the patch, have a full functionally grub again, and if someone needs gpt or other patches in Grub he should do this himselve (or via a AUR grub paket).
I would assume to remove the gpt patch ASAP, it breaks the bootloader.
There was a comment from Robin Johnson in this thread http://bugs.gentoo.org/show_bug.cgi?id=211584 which takes me on the path. Im not a c developer but after some hours staring on the patch code an some cups of strong coffee i saw the mistake ;-)
I attach a patch which fixes these. It's a patch against the patched code when grub-0.97-gpt.patch has beed applied. So my fix should run after this patch. Cause this is patching a patch i think it's not the best way. But i'm not very firm with patches, so if one of you could perhaps correct the grub-0.97-gpt.patch-File direkt...
(Oh my english... May anyone understand what i mean with that.. ;-)