On 7/12/2011 12:00 PM, Mr. B-o-B cried from the depths of the abyss: > Mike Miller cried from the depths of the abyss... > > >> It gets worse. This time I created two partitions in the RAID 1: / and >> /swap. That should have worked, but when I get to the part where it >> wants to start writing to disk, it can't do it. It couldn't install >> the package manager and it couldn't install GRUB. > > Try to do the raid prep/setup outside of the Ubuntu installer first. > > This is how I setup software RAID 1's, and this has worked every time > for me. I have to be honest I haven't done this on Ubuntu, but I did > just load the latest Ubuntu live cd to check, and all the commands exist > so this should work fine. I have done this >30 times on Slackware, and a > handful of times on Centos & Fedora. I actually used a Slackware install > disk to setup the raid's on Fedora & Centos, but this is not necessary. > The Ubuntu disk will work just fine. > > I personally like fdisk to create my partitions, but can use cfdisk (or > anything else Ubuntu might have that you like). One disk 1 (lets call it > /dev/sda) Create at least two partitions (one for swap & one for /). > Change the types on both partitions to "Linux RAID autodetect" type "FD". > > I like to leave a coupe hundred megs fee at the end of the disk just in > case I need to replace one latter that isn't exactly the same size. This > of course is optional. > > Now copy your partitions to the 2nd drive (lets call it /dev/sdb) like: > sfdisk -d /dev/sda | sfdisk /dev/sdb > > When this command finishes it will display your Raid disk/partition > scheme. both drives should match. > > Next create your raid 1's > 1st - root partition (or swap depending how you created your partitions) > > mdadm --create /dev/md0 --level 1 --raid-devices 2 \ > /dev/sda1 /dev/sdb1 --metadata=0.90 > > Do the same for your other partition > > mdadm --create /dev/md1 --level 1 --raid-devices 2 \ > /dev/sda2 /dev/sdb2 > > Now format your swap array (assuming your swap is /dev/md1) > mkswap /dev/md1 > > Now start your install like normal. You should see /dev/md1 available > for your swap, and /dev/md0 available for your root. > > At this point I must take a step back. I'm old school, and prefer LILO > on my boxes. There are a few post install steps to config LILO properly. > I can send those if you are interested. > > For GRUB you will need to do the following post install (prior to reboot). > > I am guessing that UBUNTU(not sure, don't really use it) will attempt to > install grub for you(install in to your MBR). If it does it most likely > will fail (I've been surprised before though, and perhaps those sneaky > people over at Ubuntu have this figured out). If it fails that is OK. > Let's just play it safe & assume it's all F-ed up, and we are going to > make it right. > > put grub on disk 1's MBR: > grub-install --root-directory=/boot /dev/sda > > cd /boot/boot/grub > > touch menu.lst > > Create a menu.lst for GRUB. I usually do something like this: > > timeout 10 > title Slackware Linux is better than Ubuntu > root (hd0,0) > kernel /vmlinuz root=/dev/md0 ro > boot > > (not sure the naming scheme for Ubuntu, so double check the kernel part > & make sure to point the root= to the proper /dev/md# for your root > partition) > > Save this, and take a peek at your /etc/fstab file to make sure your > swap & / are pointing to /dev/md0 & /dev/md1 > > /dev/md1 swap swap defaults 0 0 > /dev/md0 / ext3 defaults 1 1 > > OK. Now reboot it, and enjoy the ride. > > Hope this helps & Good Luck! > > Mr. B-o-B > FOR LILO (if anyone else uses it anymore besides me), here is how to handle that. Same as with GRUB, this needs to be completed post-install, but prior to reboot - also installed to your disk 1 MBR. Edit /etc/lilo.conf add a new line with: raid-extra-boot = mbr-only change the "boot" option to point to your raid 1 partition like: boot = /dev/md0 save & exit issue the "lilo" command to rewrite it to the MBR. Reboot & enjoy the ride. Please note these notes only apply to RAID 1 setups. RAID 0 & RAID 5 is similar, but the config is slightly different. Just wanted to throw that out there. Mr. B-o-B