You are not logged in.

#1 2011-09-06 14:02:00

ChojinDSL
Member
From: Germany
Registered: 2010-11-30
Posts: 64
Website

[SOLVED] Confused about GTP, EFI, GRUB2.

I've been using Linux for years, but never bothered to make the jump to Grub2.

I've got a situation here where I'm trying to install a root server which has 30TB of storage.

The motherboard is a S5520HC from intel.

I started a standard arch install, and configured the partitions using cfdisk. So, yes, they are mbr.
/dev/sda1 boot (ext2)
/dev/sda2 LVM Physical volume for my System partitions. (100GB in total)
/dev/sda3 LVM Physical volume intended for DRBD/OCFS2 Storage with 30TB of space.

I then noticed that of course, my sda3 was not the full size. Then the whole deal with partition limits dawned on me and I realized my folly by using cfdisk.
Ok, so that part is no big deal, I'm still just setting up, so I can reformat if I need to. For now, I just let gdisk convert the mbr to a gpt.

However now I'm a bit stumped. Especially with regards to grub2 using efi or grub2 using bios.
From what I gather, this server motherboard supports EFI. However it also does bios emulation.

Do I HAVE to use the grub2-efi path. Or is it sufficient to use grub2-bios?

Also I'm a bit confused with the whole, fat32 partition deal.
Do I need to reformat /dev/sda1 as fat32 and re-install grub2?

Would be greatful if someone could clarify things a bit for me. Since its all a bit overwhelming all at once.

I think I'll try converting my own PC to grub2, to at least get some experience with that.

Last edited by ChojinDSL (2011-09-06 21:58:56)

Offline

#2 2011-09-06 14:19:29

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

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

Grub2 does support booting from GPT disks in BIOS mode, but I don't know how well it scales for disk sizes above 2 TiB. I guess with the disk size of 30 TiB that you have, better go for grub2 UEFI boot. You do not  need to format /dev/sda1 to fat32. Just create a >=200 MiB FAT32 partition in any free space in your drive and mark it as EF00 gdisk type code (EFI SYSTEM PARTITION). Since /dev/sda3 is not a big deal for you. Create a 200 to 400 MiB FAT32 EFISYS partition and use the remaining space as you wish. The 200 MiB minimum size is just to make sure you have sufficient space to have all UEFI files in the EFISYS partition. Its not a hard requirement.

One Question: Are you trying to convert existing Arch install or planning to reinstall? If reinstalling, try Archboot iso https://wiki.archlinux.org/index.php/Archboot , it supports grub2 UEFI and GPT . And tell me about any issues about the UEFI install.

Also do not forget to read Archwiki UEFI, GPT and GRUB2 pages.

Last edited by skodabenz (2011-09-06 14:20:51)


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

Offline

#3 2011-09-06 14:28:02

ChojinDSL
Member
From: Germany
Registered: 2010-11-30
Posts: 64
Website

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

Well, I started to install arch the regular way. So now I'm in the process of converting. But since I'm still at the beginning, I don't have a problem with starting over.
I'd rather have a cleanly implented fresh system.

So, ok. Let me get this straight,

For EFI Grub2, it needs a fat32 partition. Not for Grub2-bios. Strange. Isn't it weird that grub2-efi would rely on a FAT32 partition of all things? Or does it just have to be any kind of filesystem that grub2 can read, and the fat32 is just recommended since its the most compatible between all Operating Systems?

I'm just wondering since fat32 isn't exactly opensource and patent free. But thats another argument for another thread.

Offline

#4 2011-09-06 14:43:32

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

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

ChojinDSL wrote:

Well, I started to install arch the regular way. So now I'm in the process of converting. But since I'm still at the beginning, I don't have a problem with starting over.
I'd rather have a cleanly implented fresh system.

So, ok. Let me get this straight,

For EFI Grub2, it needs a fat32 partition. Not for Grub2-bios. Strange. Isn't it weird that grub2-efi would rely on a FAT32 partition of all things? Or does it just have to be any kind of filesystem that grub2 can read, and the fat32 is just recommended since its the most compatible between all Operating Systems?

Its not a limitation of grub2-uefi. Its a requirement of UEFI Specification. UEFI firmwares launch uefi files from a filesystem, do not rely of bootsectors like in BIOS booting. For holding the files, the spec allows only FAT12/16/32 filesystem. I.e. The UEFI firmwares have support to read only fat filesystem and the best FS among them is FAT32. This fat32 partition is not for grub2 to read. It is used for holding all the grub2-uefi files among which grub.efi will be launched by the firmware. Read Archwiki and Wikipedia UEFI pages on how it works.

I'm just wondering since fat32 isn't exactly opensource and patent free. But thats another argument for another thread.

Yes FAT32 isn't open-source. Someone has to tell the UEFI Forum member companies to use a better FS other than fat32.


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

Offline

#5 2011-09-06 15:10:08

ChojinDSL
Member
From: Germany
Registered: 2010-11-30
Posts: 64
Website

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

skodabenz wrote:

Yes FAT32 isn't open-source. Someone has to tell the UEFI Forum member companies to use a better FS other than fat32.

Ah, I see. I somehow failed to register that thats due to UEFI. Makes sense then.

Offline

#6 2011-09-06 15:51:34

ChojinDSL
Member
From: Germany
Registered: 2010-11-30
Posts: 64
Website

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

Ok, I've backed up my installation, and redid the partitions from scratch using gdisk.

/dev/sda1 250MB Fat32 mounted on /boot/efi
/dev/sda2 LVM Physical Volume (100G) Here are my system partitions and stuff.
/dev/sda3 LVM Physical Volume (30TB) This will be the storage volume.

I've installed grub2 as per the Archwiki, however when I reboot, goes through the usual BIOS bootup procedure and then just hangs at "grub"

Did I mess something up, or is there perhaps still a left over grub-legacy stuck in the mbr of the disk? I reformatted it, but perhaps I overlooked something.

It's worth mentioning that this is a root server which I'm installing remotely. As such I'm seeing the output of the boot procedure through a KVM.

Offline

#7 2011-09-06 16:28:42

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

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

ChojinDSL wrote:

I've installed grub2 as per the Archwiki, however when I reboot, goes through the usual BIOS bootup procedure and then just hangs at "grub"

Did I mess something up, or is there perhaps still a left over grub-legacy stuck in the mbr of the disk? I reformatted it, but perhaps I overlooked something.

Erase your MBR using

dd if=/dev/zero of=/dev/sda bs=440 count=1

and enable "UEFI boot only" option in BIOS (if such an option exists).


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

Offline

#8 2011-09-06 21:58:31

ChojinDSL
Member
From: Germany
Registered: 2010-11-30
Posts: 64
Website

Re: [SOLVED] Confused about GTP, EFI, GRUB2.

Thank you for your help.
I finally manged to get it to work.
I reformatted everything and went the grub2-bios route.
1              40            2087   1024.0 KiB  EF02  BIOS boot partition
2            2088          514087   250.0 MiB   0700  Linux/Windows data
3          514088       210229287   100.0 GiB   8E00  Linux LVM
4       210229288     58594426846   27.2 TiB    8E00  Linux LVM

/dev/sda2 ist just a standard /boot partition. /dev/sda1 ist a 1MB large partition, without a filesystem. Just like the wiki says.

From my research on the net, there don't seem to be any drawbacks to using grub2-bios with a GPT partition setup. At least not in my case.

I managed to get into the efi console of the mainboard during boot. But I wasn't able to access any of my partitions there. I also found a BIOS option for only activating the modules needed for UEFI booting, but that just resulted in the server not being able to reboot anymore, or at least the KVM stayed blank. The provider reset the BIOS I guess.

Either way, I'll leave meddling with EFI for another time when I have a machine with physical access to it.

Offline

Board footer

Powered by FluxBB