Installing Ubuntu Server 12.04 LTS using Hardware Raid1
So my new 10,000 rpm raptor drives came in today, and I’ve had a sabrent hardware 4 port sata raid controller sitting around for a while, and decided to put them to work in a desktop server I plan on migrating the site’s I host (including this one) over to during the next few weeks.
One of the main reasons for the move is I this new raid1 setup will help ensure that me and my clients data will remain safe, in the case of a hardware failure. While I do currently backup with mysqldump and some rsync magic, restoration is alot easier using raid, then moving and re-installing everything from backups, not to mention just add’s to the geek cred
However I ran into a problem installing grub the error stated:
Unable to install GRUB in /dev/mapper
Executing ‘grub-install ‘/dev/mapper’ failed.
This is a fatal error
and because I haven’t had a lot of experience with either raid configurations or ever having installed linux to a machine with such a configuration I needed to do some research.
I found a few good posts, but most of them recommended creating another partition just for grub, and then using the raid drives for the rest of the install.
To me that sounded like a poor workaround, I want the data to be mirrored on both drives, equally, grub and all.
That led me to try a few other avenues to figure out the correct and easy way to get through the install.
Long story short, here’s a breakdown of how to get it setup and working, the easy way. In this breakdown I’ll assume you can follow the easy installer prompts for Ubuntu, have “activated the serial ata raid devices”, have taken note of the array’s name (you can take note of it on the “[!!] Partition disks” screen that looks like the purple box on the left. (sorry not a vm so I had to take a picture of the screen…) in my case the name of the array is “sil_biegdfaaeabh”, and have continued onto the part of the install where it asks where to install grub.
- First let’s find the name of the raid array, in case you forgot to take note of the name as mentioned in the previous paragraph (as I’ve done a few times when just mindlessly pressing next in the wee hours of the morning..) press Ctrl +alt+F2 to drop into a busybox terminal session. Press enter when prompted to start the terminal.
- Type in the command [codesyntax lang="bash" lines="no" title="command"]
1ls -l /dev/mapper
[/codesyntax] and find that funny-named array after the entry named controller and then head back to your install terminal by pressing Ctrl+Alt+F1.
- enter that name after the /dev/mapper that is populated by default. In my case:
[codesyntax lang="bash" lines="no" title="install grub to:"]
[/codesyntax]Of course CHANGE THE NAME and substitute your OWN in the example above!
- Continue setting up Ubuntu as you see fit, as the rest should complete without any further hassle!
sudo apt-get –-no-install-recommends install ubuntu-desktop
- All in one webserver from the ground up. A Virtualized Debian How-to
- Auto Start your WiFi on Raspberry Pi
- rsync with ReadyNAS and debian
- Uploading to Usenet on debian (or ubuntu) linux
- Deluge Torrent – My New Favorite Bit Torrent app!
- Talking MP3 Players!
- Simplify extracting files in the commandline with this alias for your .bashrc file.
- Getting your Zune to work in linux, kinda.
- awesome rar-sfv script for gnome – nautilus
- Screenlets make for a beautiful and informational desktop