[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: changing from BIOS to GPT



On 07/06/15 04:11 PM, Arno Schuring wrote:
(sending again through hotmail's web interface -- apologies for
anything my MUA may do to the content)
Seems to have worked this time.


Date: Sun, 7 Jun 2015 14:23:40 -0500
From: deblis@lionunicorn.co.uk

Quoting Gary Dale:
Arno Schuring said:
"reconfigure grub" in this case meant uninstalling grub-pc and
installing grub-efi, right?
No actually. I never uninstalled grub-pc. The machine seemed to have
grub-efi-amd64 all along. What I meant was the more mundane
update-grub sequence. Also, I've been using EF02 as the gpt partition
type for the efi partition. So far I've never had a problem with that.
I don't think that matters. I have read that converting a disk from
MBR to GPT, quite simply, breaks grub, whichever version. So it needs to
be reinstalled.
It does, but what it breaks is the installed bootloader, not the grub
installation. So "it needs to be reinstalled" is correct, but "aptitude
reinstall grub-pc" is the wrong solution. You should be running
update-grub and grub-install, using the package manager will not solve
the issue (except for the fact that both update-grub and grub-install
/may/ be triggered as part of the package installation).
I've tried purging and doing a fresh install as opposed to a reinstall. That didn't work either.


On top of that, grub installs its stage2 bootloader in the unclaimed
space between the MBR and the first partition. That space is not unused
in the GPT disk format, so when you simply convert your existing
partitions, grub will have no place to install its stage2 and
grub-install will error out. To have grub-pc boot from a GPT disk, you
need to have a Bios Boot Partition (gdisk partition type ef02) of at
least 128kB.
I added one early on in the process. It's 100M which should be plenty. I later formatted it as FAT32 after reading that it need that, but it didn't help. When I switched my main workstation to boot from a GPT disk, I don't recall having these problems. But it only had Linux on it.


Luckily, most partition tools start their first partition at the 1MB
boundary, so you can usually create that bios boot partition between
sectors 40 and 2048, but that's not a given.
The original Windows layout had a recovery partition starting at 2048 and the main Windows partition coming after that. There wasn't an EFI partition on the original layout. Nor did I add one when I shrank the main partition and installed Linux. I only added an EFI partition after switching to GPT.


Note that the above applies if simply switching from dos-style to
gpt-style partitioning. It doesn't apply when switching from legacy
boot to efi boot.
From what I gather, I should purge the grub-efi-amd64 setup and try a grub-pc setup. It didn't work earlier when I tried it, but I'll give it another try. I have nothing to indicate that an EFI boot is required...


Reply to: