How To Install Ubuntu 12.04 Precise Pangolin with Grub Bootloader on an Nvidia RAID Controller
After dumping a Sunday afternoon into getting Ubuntu to install on my Zotac GF9300-D-E with RAID enabled, I figured I’d post a quick how-to as extensive Googling never compelled a solution. A divergence from the usual pit farts on a snare drum that occupies this space, but I know others are going to run into this problem and the solution is awfully janky.
The Problem
After a hard drive dirt-napped in my Gonzee Box media center, I decided to replace the itsy bitsy single 1.5 terabyte drive with a 4 terabyte Barracuda stripe. As the Nvidia 9300 northbridge on the board sported a “hardware” RAID controller, I reckoned I’d just have to set up an array, plug in a USB install key and have that machine back to playing high def Robot Chicken re-runs in no time. However, my first go-round installing Ubuntu 12.04 (Precise Pangolin) on the array ended in fail.
Central problem is that Ubuntu 12.04 by default cannot install the Grub2 bootloader onto the array. Even after specifying the correct device (/dev/mapper/nvidia_asdfasdfasdf), the Ubuntu install fails every time. After a couple tries, the install program usually crashes, rendering the Ubuntu install failed. Error looks like:
Unable to install GRUB in /dev/mapper/nvidia_asdfasdf Executing 'grub-install '/dev/mapper/nvidia_asdfasdf' failed. This is a fatal error.
Bogus Answers
A number of answers found while Googling weren’t very current or useful workarounds. They usually recommended 1) installing the bootloader on a separate partition on a single disk, 2) using software raid to stripe the disks or 3) downgrading or upgrading from 12.04.
I want my media center to remain stable, so choosing the latest LTS release is a requirement. Additionally while this stripe will die with a single disk failure and the GeForce 3000 northbridge is really fake hardware RAID, there were a few monitoring advantages keeping this array on the BIOS as opposed to in software I wanted to preserve.
Ultimately, I found a solution that allowed me to use the Nvidia controller and still install Grub. It will work with whatever RAID level you specify.
Solution
I finally got to install Grub onto the Nvidia RAID array following these steps:
- Download the Ubuntu 12.04 alternate desktop installer. This will include a couple packages that will recognize the RAID array and install the bootloader post-install.
- Do not select custom partitioning - instead select the array (/dev/mapper/nvidia_asdfasdf) and install the default partitioning scheme with “Install Ubuntu on this disk”
- Set the configuration options that follow as you like. Continue until the installer indicates it requires no more input and just starts copying the files.
- When the bootloader install eventually fails (~70% through install process), select “Continue without installing bootloader” and click “Continue.”
- Complete the installation.
- On reboot, be sure to select to boot from the install USB key or CD.
- Select “Try Ubuntu” when the install key boots.
- Open a terminal and install the BootRepair utility with these steps:
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update sudo apt-get install -y boot-repair && (boot-repair &) - Select “Recommended Repair (repairs most frequent problems) and follow each of the copy/paste instructions.
- After BootRepair completes, reboot the host and remove the install key.
- Enjoy Ubuntu on your Nvidia RAID controller!
Conclusions
The Boot Repair utility from Canonical can install the Grub bootloader to an Nvidia GeForce 3000 RAID array where the Ubuntu installer cannot. Though I have no tested on any other hardware than the Zotac board specified above, I strongly suspect this will work for a number of fake hardware RAID controllers out there.
Welcome your feedback at @dn0t or rob [at] thisdomain.com.
2 Notes
yanemail-blog liked this califaschic-blog liked this
brooklynhacker posted this