You are not logged in.

#1 2010-09-10 04:39:06

alphasix
Member
Registered: 2008-10-06
Posts: 15

Using GRUB on MBR for booting GPT

Hey everybody,

I found many articles on booting GRUB on a GPT partitioned harddrive. But when I've got a BIOS-based system with two internal harddrives, isn't it more elegant to keep the first one MBR partitioned (containing the /boot partition, windows and an exchange partition) and installing Arch (without bootloader), Mac OS and another exchange partition on the second (GPT partitioned) harddisc? Does GRUB detect the kernel on the GPT-drive automatically? Can I use legacy GRUB in this case?

So in short:
- BIOS-based system and two HDDs
- First: MBR with GRUB, /boot, Win 7 and Exchange
- Second: GPT with Arch-root, Swap, Mac OS and Exchange2

Questions:
- Does GRUB work in this configuration at all? If not out-of-the-box, what do I have to do?
- Do I need GRUB2?
- This is without Hybrid MBR/GPT and therefore better, am I right?

The alternative would be to swap the two drives, use GRUB2 with BIOS Boot Partition on the GPT drive for booting and use devicemap to fix the Windows-on-the-second-drive issue. But that doesn't sound good in my ear.

Maybe you can post your opinion on what's the best triple-boot solution for me.

Yours,
Alpha

Offline

#2 2010-09-10 17:17:46

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Using GRUB on MBR for booting GPT

Yes, this configuration will work as long as grub-legacy does not directly access the second GPT HDD. Your kernel should be installed in the /boot in the first HDD. You have to pass root= parameter for the kernel pointing to the Arch root partition in the second HDD. Personally I recommend grub2 since you are using GPT. Grub-legacy is too old for GPT and does not understand mixing MBR and GPT and stuff like that.

GRUB2 with a BIOS Boot partition is much cleaner than embedding core.img in a 63-sector gap in case of MBR disks. Do not swap the drives and install grub2 in then second HDD itself. GRUB2 does not have problem with that and there will be no Windows-on-the-second-drive issue.

I have a pure GPT partitioned 320GB internal HDD with Archlinux x86_64 and Windows 7 x64 Pro both booting in UEFI-GPT mode and additionally Archlinux booting in BIOS-GPT mode using grub2 with 1 MB BIOS Boot Partition ( http://wiki.archlinux.org/index.php/GUI … tion_Table ). For GPT partitioning I recommend GPT fdisk (gdisk package in extra repo).


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#3 2010-09-10 17:34:14

yejun
Member
Registered: 2009-10-21
Posts: 66

Re: Using GRUB on MBR for booting GPT

Grub can boot grub2 stage2 directly as a linux kernel.
cat lnxboot.img core.img >grub2

Then copy your grub2 to somewhere grub1 can read.
kernel grub2.

When you make core.img, you probably want to include full prefix where grub2 root is something like --preix=(hd1,1)/boot

Or just install grub2 to your first hd's MBR and get rid of grub1.

Last edited by yejun (2010-09-10 17:36:20)

Offline

Board footer

Powered by FluxBB