I'm having some problems getting GRUB configured for Ubuntu 12.04LTS on a fake RAID 0. I can either get the GRUB rescue prompt at startup, or just a GRUB prompt but I cannot boot to Ubuntu manually. How can I configure the GRUB to actually use the Ubuntu install?
The steps taken:
Installing Ubuntu on fake raid
The Ubuntu installer cannot install Ubuntu on the drive. After defining the partitions to use it fails with
"Error: ???", pressing OK terminates the installer.
Therefore, I used GParted to configure the partitions:
/dev/mapper/sil_agadaccfacbg: (the RAID configuration, created partition):
/dev/mapper/sil_agadaccfacbg1:ext2, 200MiB, (with 'boot' flag)
/dev/mapper/sil_agadaccfacbg3:ext2, 67.75GiB, (which will contain Ubuntu)
/dev/mapper/sil_agadaccfacbg2:extended, 1.00GiB, (for swap) Contains:
Because of the fake-RAID, I already mounted the destination partitions before running the Ubuntu installer:
> mkdir /mnt/boot > sudo mount /dev/mapper/sil_agadaccfacbg1 /mnt/boot > mkdir /mnt/ubuntu > sudo mount /dev/mapper/sil_agadaccfacbg3 /mnt/ubuntu
In the installer I chose the following partition usage:
/dev/mapper/sil_agadaccfacbg1ext2, mount at /boot (209MB)
/dev/mapper/sil_agadaccfacbg3ext2, mount at / (72751MB)
Device for boot loader installation:
/dev/mapper/sil_agadaccfacbg, linux device-mapper (striped) (74.0GB)
This will install Ubuntu, but will fail to install GRUB (it seems to use
/dev/sda no matter which one I choose)
Installing GRUB with
I followed this guide, but adapted it for two partitions:
sudo mount /dev/mapper/sil_agadaccfacbg3 /mnt/ubuntu
sudo mount --bind /dev /mnt/ubuntu/dev
sudo mount --bind /proc /mnt/ubuntu/proc
sudo mount --bind /sys /mnt/ubuntu/sys
sudo mount /dev/mapper/sil_agadaccfacbg1 /mnt/boot
sudo mount --bind /boot /mnt/boot
sudo chroot /mnt/ubuntu
However, it does not ask where to install GRUB (I should choose
After reboot I get the GRUB rescue prompt with message
no such device
Installing GRUB with
After the same mount commands as above, I continued with:
> sudo grub-install --root-directory=/mnt/boot /dev/mapper/sil_agadaccfacbg
This gives the following message:
/usr/sbin/grub-probe: error: cannot find a device for /mnt/boot/boot/grub (is /dev mounted?)
It does succeed when mounting just the boot partition :
sudo mount /dev/mapper/sil_agadaccfacbg1 /mnt
sudo grub-install --root-directory=/mnt/ /dev/mapper/sil_agadaccfacbg
This finishes with:
Installation finished. No error reported.
After reboot I get the GRUB console, with welcome text.
Attempting to manually start Ubuntu:
- (hd0) (hd0,msdos3) : (Ubuntu install partition)
- (hd0,msdos1) : (Ubuntu boot partition)
- (hd1) (hd1,msdos1) : (Ubuntu live USB)
- vmlinuz - lib/ - tmp/ - initrd.img - mnt/ - var/ - proc/ - boot/ - root/ - etc/ - run/ - media/ - sbin/ - bin/ - selinux/ - dev/ - srv/ - home/ - sys/
-grub/ -boot/ -initrd.img-3.8.0-29-generic -vmlinuz-188.8.131.52-generic -config-3.8
"error: out of disk"
Installing GRUB on Ubuntu partition with grub-install
> sudo mount /dev/mapper/sil_agadaccfacbg3 /mnt > sudo grub-install --root-directory=/mnt/ /dev/mapper/sil_agadaccfacbg
This finishes with message:
> Installation finished. No error reported.
After reboot get the message
"error: out of disk" and the GRUB rescue prompt.
Configuring GRUB with
Attempting to run
grub-mkconfig with different destinations results in the same message:
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
Initially I didn't use a separate /boot partition, but the GRUB install then also failed. Because some mention that a small partition at the beginning of the drive is necessary on old machines, I retried with a /boot partition
This is a single boot (no other OS's installed/used)
*With fake RAID I mean a software/bios RAID, provided with the motherboard.