Please note the edit at the end
I'm building a home server (my first attempt at it) using Ubuntu Server 14.04.1 on an old machine (BIOS doesn't support UEFI), and I want to set up the whole system on RAID5 using 3 empty disks (3TB each). I won't be installing any other OS on that machine.
I mostly followed the steps outlined by this guide, except that my understanding was that grub2 supports both mdadm-created RAID and LVM2, and therefore no tinkering with /boot
partitions is necessary (based on answers such as this; same user--@psusi--also commented on AskUbuntu to the same effect). Hence, I set the following partitioning scheme:
Each drive has a single partition spanning as much of the drive as the server-live-installer would use (some 1MB remained unused at the end of each drive). I'll reiterate that my system doesn't support UEFI, so I'm left to assume the live-installer created an MBR table on all drives. These partitions are marked to be used in RAID.
A single RAID5 device
md0
is created with these 3 partitions.A single LVM physical volume fills
md0
. It has a single volume groupsrv-vg1
, which contains 3 logical volumes:srv-lvboot
contains 5GB and is used asext4
and mounted as/boot
srv-lvswap
contains 20GB (intentional overkill) and is used asLUKS
with a random key, on which I created a singlelinux-swap
partition (mounted asswap
).srv-lvroot
spans the rest of the logical group and is used asLUKS
with passphrase, on which I created a singleex4
partition mounted as/
.
Using this partitioning scheme I continued with the installation, until I was prompted to Install the GRUB boot loader to the master boot record
(of my first drive). I tried to continue, but an error message returned:
Unable to install GRUB in /dev/sda
Executing 'grub-install /dev/sda' failed.
This is a fatal error.
I can go back and attempt to install GRUB to a different device, but I don't know which one to choose (if I install it to md0
or srv-lvboot
, assuming it would even work, wouldn't I then need to chainload it from another bootloader?). Also, I'm not 100% sure my partitioning scheme is viable. Can anyone assist?
Edit:
I eventually discovered that the reason why grub cannot install to the MBR of my first disk was because my disks (at 3TB) had a GPT table, so I should've created a 2MB partition with the bios_grub
flag at the beginning of each drive. After doing that, the installation completes without errors. However, my server doesn't boot into Ubuntu. Rather, it keeps rebooting (apparently grub fails to load into the OS, for some reason). I attempted to use boot-repair to solve the issue, without success (it reportedly saved its logs to http://paste.ubuntu.com/9414135).