I’ve already written about creating a partition size larger than 2TB under Linux using GNU parted command with GPT. In this tutorial, I will provide instructions for booting to a flat 2TB or larger RAID array under Linux using the GRUB boot loader.
How to Boot a 2TB or Larger Array in Linux
Run fdisk -l to see disk drive geometry and note down heads, sectors and cylinders. If your device name is /dev/sda, enter:
# fdisk -l /dev/sda
Note down drive geometry from the output including heads, sectors, cylinders etc. Type the grub, enter:
# grub
At grub prompt type the following commands:
grub> geometry (hd0) <#cylinders><#heads><#sectors>
grub> root (hd0,0)
grub> setup (hd0)
Replace <#cylinders><#heads><#sectors> with actual values. /dev/sda is hd0 i.e. first scsi hard disk. command geometry can be used to print the information for the drive drive. In the grub shell, you can set the geometry of the drive arbitrarily. The number of cylinders, the number of heads, the number of sectors and the number of total sectors are set to CYLINDER, HEAD, SECTOR and TOTAL_SECTOR, respectively. If you omit TOTAL_SECTOR, then it will be calculated based on the C/H/S values automatically.
GRUB should update MBR and other information in order to boot your system. Before, you issue reboot command make sure grub.conf (menu.lst) has correct syntax.
mate, this stuff totally does not work. the geometry command gives a negative number of total cylinders and error 22 during further installation.
Does this even make sense? fdisk does not work with GPT drives, and indeed, a fair number of machine BIOS’es probably don’t work either, so booting might never be possible?
For folks looking for an answer who happen to use 3ware RAID cards, these can be configured when you create your array to contain a small virtual drive at the start, then your massive terabytes drive afterwards – so you can use MBR on the smaller drive to boot from, and hopefully GPT on the huge one after. eg – here I use the ThreeWareCommandLineUtility (tw_cli) to create a 12gig disk (using v0=12) to put my boot/swap partitions on, and a 14TB one for the rest (/):-
Unfortunately I don’t see how this helps, I’ve tried it. What I ended up doing is making my own grub boot disc. I used the latest Debian unstable grub .97 diff/patch on top of the original .97 GNU Grub. You really need a patched grub to write the MBR on a 2TB+ hard drive. Remember that .97 GRUB does NOT work with GPT EFI partitions either (and I personally don’t like them anyway). I believe Grub 2 uses it, but most distros are still using their own form of patched .97.
Personally I blame GRUB, they should be making new releases so the distros can all use a standardized GRUB, instead of patching it for peculiar things with EXT3 etc…