0

I have a Debian-based system with three drives in it. All three drives have the following partition layout:

Model: ATA ST4000DM000-1F21 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  99.6MB  98.6MB  fat32              boot
 2      99.6MB  40.1GB  40.0GB                     raid
 3      40.1GB  4001GB  3961GB                     raid

The first partition is the EFI system partition. The second and third partitions form two software RAID arrays: a 40GB RAID 1 array containing /, and an ~8TB RAID 5 array storing data (which is mounted as the home directory for a single user).

The motherboard hosting this system has failed, and I need to get these drives booted in another system. Pulling the data is not enough; I need to actually get the drives to boot.

I have connected all three drives to another machine, and can confirm that it detects the drives. When live booting into Ubuntu, I can confirm that the RAID arrays are intact: mdadm --assemble --scan has no problem detecting and reassembling both arrays and I can mount and access their contents. I can also successfully mount the ESP partition on all three drives, but due to either a misconfiguration or some misunderstanding on my part, only the ESP partition on the first drive contains anything (a single, 128KB file: /EFI/debian/grubx64.efi).

However, I can't get the drives to boot. The new host machine is a first-generation i7 (X58 chipset) which does not support EFI. What can I do to get this booting? My hope is that I can somehow boot GRUB off of a USB thumb drive and from there, continue booting off of the drives, but I have no idea how to set up something like that – EFI is something of a mystery to me, and I suspect the fact / is on a RAID doesn't make it any easier. Can someone give me some idea of where to go from here?

1
  • Some Gigabyte's motherboard with X58 chipset supports a feature called Hybrid EFI. (might need a BIOS update) It was designed to boot from 2TB+ drives, but it's a full UEFI 2.31 conformning firmware based on Tianocore which is able to boot UEFI apps. Take a look at rodsbooks.com/gb-hybrid-efi . You can also use CloverEFI or something similar which has the same behavior. Personnally I'm using both, Hybrid EFI as the UEFI firmware and CloverEFI as boot manager.
    – piernov
    Apr 5, 2014 at 22:26

1 Answer 1

0

There's really nothing special to it. A BIOS cannot boot a system configured for UEFI. However, it is very much possible to boot a GPT disk on a BIOS-only system. All you need is a boot manager compatible with GPT, like Grub 2.

You need a BIOS Boot Partition (ID EF02), ideally as the first partition of your disk. It doesn't have to be very big, 1MB is plenty. This means, however, that the ESP is in the way and has to be removed. Not that it's needed anymore anyway.

grub-install /dev/sda will automatically find and use a BIOS Boot Partition. Sometimes, it's necessary to explicitly specify the architecture, like this: grub-install --target=i386-pc /dev/sda. Since your system is currently not bootable, you would need to do this from a chroot environment. I'm sure there's instructions available for Debian on this topic.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .