-
Ubuntu Grub headaches
Posted on June 19th, 2015 No commentsToday I had to install an Ubuntu 14.04.2 LTS system on a two-disk PC, with software RAID1, which I did many times before.
The disks and raid setup went fine, but when reaching the GRUB install it reports “fatal error”.
I skipped the bootloader install and finished the OS setup. Of course, the system didn’t boot…After a little googling, I can resolve all booting problems.
I was able to boot from CD in rescue mode, but grub-install didn’t work either:
The PC contains a new UEFI BIOS (GigaByte 3D UEFI DualBIOS).The OS install sets GPT partition automatically but there’s no BIOS boot partition entry created which
is a must for Grub2 second stage. This must be due to the “manual partitioning”.Luckily, the setup left ~1MB unused space on the drives before the first partition (partition alignment policy), so I can use it for the boot partition.
To edit the partition table I needed the parted tool. After entering the command I got a new prompt.
The following commands can be entered afterwards.Repeat these steps for the second drive in the RAID array (e.g. /dev/sdb) then quit from parted.
After this changes, the new partition list may looks like this:
Install the Grub2 bootloader into both disks then restart PC:
grub-install /dev/sda grub-install /dev/sdb
After these changes, I was still unable to boot into Ubuntu Linux. The boot procedure stops at the Grub> prompt. To be able to boot from this point, I entered the following commands:
set root=(md/0) linux /vmlinuz root=/dev/md0 ro initrd /initrd.img boot
I repeated the grub-install commands and update-grub then everything went fine, the OS boots after restart. However, there is one glitch remains. At the boot process the following error message shows for a few seconds:
After a quick search, I found this is a bug: Bug #1274320 “Error: diskfilter writes are not supported”
The solution is to patch the /etc/grub.d/00_header file: link to patch.
I preserve here the complete diff:
Leave a Reply