Installing Ubuntu 11.04 (Natty Narwhal) on a (fake) RAID0 SSD is not easy or straight-forward. This post describes how I got it all to work!
All changes I made was done through a terminal running from the Live media (USB or CD doesn't matter.)
My hard-drives were set up as follows:
/dev/mapper/sil_bhafabbhfgah2 / /dev/mapper/sil_bhafabbhfgah1 /boot /dev/sda1 /var /dev/sdb2 /home tmpfs /tmp
First we mount all hard-drives of the computer, in their own places:
$ sudo mount /dev/mapper/sil_bhafabbhfgah2 /target $ sudo mount /dev/mapper/sil_bhafabbhfgah1 /target/boot $ sudo mount /dev/sda1 /target/var $ sudo mount /dev/sdb2 /target/home $ sudo mount -o bind /proc /target/proc $ sudo mount -o bind /sys /target/sys $ sudo mount --rbind /dev /target/dev
It is important that all target partitions are mounted.
Now we do a chroot
to the mount system.
$ sudo chroot /target /bin/bash
From here we need to install the dmraid package:
$ apt-get install dmraid
Now create the file device.map
, used by GRUB.
$ echo "(hd0) /dev/mapper/sil_bhafabbhfgah" > /boot/device.map $ cp /boot/device.map /boot/grub/
Change the device name (sil_bhafabbhfgah
) to the appropriate for your system.
Now make sure GRUB is installed properly on the device:
$ grub-setup /dev/mapper/sil_bhafabbhfgah $ update-grub
Now we might need to edit the GRUB configuration file: /boot/grub/grub.cfg
. All lines looking something like:
set root='(hd6,msdos2)'
should be changed to:
set root='(hd0,msdos2)'
The actual line (the parts containing hd6
and msdos2
) may of course be different.
The final thing to do is edit the /etc/fstab
file, replacing all partion-references with UUIDs. Here is my fstab as example:
UUID=7e9f38de-b0b3-4eaf-8f5b-2f83b1a0674c / ext4 errors=remount-ro,noatime,nodiratime 0 1 none /tmp tmpfs rw,nodev,nosuid,noatime,nodiratime,size=1024m,auto 0 2 none /var/tmp tmpfs rw,nodev,nosuid,noatime,nodiratime,size=1024m,auto 0 2 # /var was on /dev/sda1 during installation UUID=f1abaa31-25a9-414e-a7fa-f05ab492d5a0 /var ext4 rw,noatime,auto,nodev,nodiratime 0 2 # /boot was on /dev/mapper/sil_bhafabbhfgah1 during installation UUID=55a9024e-7806-4ec5-b68e-8e6065cf3587 /boot ext4 rw,nodev,noexec,noatime,nodiratime,auto 0 2 # /home was on /dev/sdb2 during installation UUID=2e0f5ff4-146d-492f-a6e7-cad460db79ee /home ext4 rw,noatime,nodiratime,auto,nodev,nosuid 0 2 # /home/arrow/extra1 was on /dev/sdc2 during installation UUID=4867268a-b6d1-469f-9190-b2807695b09e /home/arrow/extra1 ext4 rw,noatime,nodiratime,auto,nodev,nosuid 0 2 # /home/arrow/extra2 was on /dev/sdc2 during installation UUID=73430b1a-91df-4908-bd16-4b1ed07876e4 /home/arrow/extra2 ext4 rw,noatime,nodiratime,auto,nodev,nosuid 0 2 # swap was on /dev/sdc1 during installation UUID=68a20ae0-12e0-413d-b80f-b39fd42e3153 none swap sw 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
Now reboot, and keep your fingers crossed!