Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This is something that took me an extraordinary amount of time to iron out, and the literature is distributed over several websites. I also didn't like the idea of doing it through the alternate CD, as I thought software RAID (slightly) inferior to doing it through the BIOS. Also, only a select number of distros actually possess the alternate install iso, and the USB support for them is a little weak. Anyways, I thought I could write the step-by-step that worked for me.

1) Start by setting up the BIOS raid.

2) Boot into a live usb Ubuntu Distribution of your choice.

3) Open Gparted and partition the RAID as follows:

(i) 500 MB Ext partition for GRUB.

(ii) Ext partition with all remaining data.

(iii) A swap partition of equal size to your RAM.

*These statements are modifiable. For example, I setup a 4 GB swap partition since I have 16 GB of RAM, and have never actually seen it used but wanted to be safe. Also, of the 500 MB partition which is recommended uniformly across the interwebs, it currently only occupies about 75 MB.

4) Start the installer, and proceed as usual until it asks for the install option. Select "Something else" or "Advanced Options", depending on distribution, to open the built in partition manager. Select partition (i) created above and hit "change". Select Ext4 (or any Ext of your choice) Journalling System, format, and set it to "/boot". Similary, select partition (ii), hit "change", Ext4, format, and set it to "/". Then proceed with the installation.

5) Nearing the end of the install, it will tell you it failed to install grub at the current location, and ask you to relocate it. Use "Continue without a bootloader".

6) At the end it will ask you if you are ready to restart, or continue testing. Select the latter option.

7) Run the following commands in terminal:

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

8) Open Boot-Repair, which should find the $/boot$ partition created earlier, and hit the recommended repair option, follow the steps putting the necessary commands into terminal and it will tell you at the end that GRUB was repaired successfully. As a reference, 'https://help.ubuntu.com/community/Boot-Repair'.

9) Reboot into your new Ubuntu-ready-computer!

Hope this works, reply if you have any issue.

share|improve this question
    
Do you have a reason for thinking one is better than the other? If so, I'd appreciate you spelling out that reason at "RAID -- software vs. hardware ... is there any reasons to choose one over the other?". –  David Cary Jul 29 at 15:19

1 Answer 1

Software RAID (mdadm) is not inferior to BIOS RAID. You might need the latter in a multi-OS environment (dualboot with Windows), but other than that, mdadm is good.

As for your installation method, I did the same, for Ubuntu 13.04 on LVM on LUKS on RAID-1. Create the partitions and set up the RAID, LUKS and LVM from the terminal. I had to do this w/o swap as for me, the installer would crash for swap on mdadm for some reason. I set up swap once the install was finished instead.

The steps I took however differ from yours at point 7)/8). I never heard of boot-repair before. So my steps instead look like this:

A) Chroot into your install.

mount /dev/your/root /mnt
mount /dev/your/boot /mnt/boot
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc
chroot /mnt /bin/bash

Now you have a chroot-shell in the Ubuntu you just installed.

B) Install software necessary for the extra stuff you did. As well as the missing bootloader.

apt-get install mdadm
apt-get install cryptsetup
apt-get install lvm2
apt-get install grub2

C) Set up your /etc/crypptab (only if you used some kind of encryption which wasn't set up by the installer)

echo yourluks UUID=`cryptsetup luksUUID /dev/yourluksdev` none luks > /etc/crypttab

D) Update initramfs

update-initramfs -u -k all

E) Install GRUB2 onto the RAID members

grub-install /dev/sda
grub-install /dev/sdb
update-grub

F) Sync & Reboot

sync
exit # chroot
reboot

Note that there are some oddities after the install, at least for 13.04. In Unity there is a "Install RELEASE" button left over, so for whatever reason the installer installed the installer...? Other than that everything seems to be working fine though.

So it's entirely possible (although probably not the recommended way) to use the regular Desktop CD for complex mdadm/luks/lvm setups.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.