ubuntuforums.org READ IT!
Most cheap hardware RAID controllers such as the VIA VT6421 are not purely hardware RAID systems, but should be seen as semi-soft, or FakeRAID controllers.
There is a bug for those who wants to CTRL+C – CTRL+V this script.The /etc/mkinitramfs/scripts/local-top/dmraid should be replaced by
Some quotes are not ASCII.
#!/bin/shIn addition to the dm-mod module, the previous script launches the dm-mirror module. This means that the dm-mirror module should be copied. This is done by adding the line
case $1 in
# get pre-requisites
modprobe -q dm-mod
modprobe -q dm-mirror
dm-mirrorto the /etc/mkinitramfs/modules file.
in hardy heron /etc/mkinitramfs doesn’t exist.
where create the dmraid script???
maybe in /etc/initramfs-tools/scripts/local-top/dmraid???
The rest of the Ubuntu FakeRaid Howto gives a good explanation of the tasks that should be done in order to configure the FakeRaid array.
What is fakeRAID?
The most common reason for using fakeRAID is in a dual-boot environment, where both Linux and Windows must be able to read and write to the same RAID partitions.
Multiboot configurations are common among users who need multiple operating systems available on the same machine. These people shouldn't have to add a separate hard drive just so they can boot Linux. FakeRAID allows these users to access partitions interchangeably from either Linux or Windows.
Another reason for using FakeRAID is if you define a disk mirror and a hard drive crashes, you can down the system and replace the failed drive and rebuild the mirror from the BIOS without having to boot into the operating system.
Ubuntu 10.04 (Lucid Lynx) and 10.10 (Maverick Meerkat)
Gigabyte MA78GPM-DS2H 15 Jan 2009
I configured RAID using BIOS, launched 'try Ubuntu' mode and added dmraid as described at the top of the page. Unfortunately, I've got the following error:
dmraid -ay ERROR: creating degraded mirror mapping for pdc_xxxxx
- - "Gigabyte bonduary" to "NO" - "Fast Init" to "NO"
title Windows XP rootnoverify (hd1,0) makeactive map (hd0) (hd1) map (hd1) (hd0) chainloader +1hd0 is my (booting) RAID as seen by GRUB. hd1 is my (non-booting) ATA drive with windows in the first partition (hd1,0). The two map commands fool Windows into thinking it is on the first drive. This works.
Asus A8V 25 Apr 2009
Ubuntu 9.10 How-To
GRUB2 currently does not have the means to boot a fakeraid setup and is rumored to be fixed in time for 10.4's release.
$ sudo lsmod
$ sudo dmraid -tay
$ sudo dmraid -ay
- Output should show the activation of the new partition(s).
$ mkfs.ext4 /dev/mapper/isw_beeaakeeaa_fiveZ
- Z is the number of the new partition.
- Example: $ mkfs.ext4 /dev/mapper/isw_beeaakeeaa_five5
grub> geometry (hd0) C H S
- Replace C H S (Cylinders, Heads and Sectors) above with the proper numbers. You can find them using cfdisk at the top of the main screen (be aware: they are not displayed in the same order).
- Example: 18079 255 63 for a RAID stripe of two 74GB Raptor discs.
grub> root (hdY,X)
- Replace Y with the drive number. Usually 0 as specified in the step 9.l.i.
- Replace X with the partition number from the previous step.
- Example: root (hd0,4)
- Edit the file:
# nano /boot/grub/device.map
- and add the following line:
- Make sure there is no other line beginning by (hd0).
(hd0) /dev/mapper/nvidia_fdaacfde (hd1) /dev/mapper/nvidia_fffadgic
# echo dm_raid45 >> /etc/initramfs-tools/modules
# nano /etc/modules
- and add dm_raid45 if not exists
- In case of a dual boot with Win7, grub may have some problem to launch windows. An easy solution is to install grub on the linux partition (not the MBR). Cf. step 9.l.iv, grub> setup (hd0,4) Then, use the Win7 boot manager to choose between windows and linux. To add a new entry into the win7 boot manager, you can use the official "bcdedit" command or the unofficial graphical utility named "EasyBCD 2.0 beta".
to the boot options. It wasn't me who figured that out.
Have a look at http://samueltaylor.me.uk/2011/01/31/setting-up-nvidia-nforce-fakeraid-on-ubuntu-10-10/ for the full story and a more detailed tutorial. Note that his conclusions are a bit off in that this doesn't have anything to do with nVidia, and ignore_hpa=0 actually DISABLES access to the protected area, not enables it.
How-to Install 9.10 karmic on fakeraidYou actually have the meaning of ignore_hpa upside down. By default Ubuntu has ignore_hpa=1, which means it ignores the protection mechanism and ALLOWS access to that part of the disk. This interferes with the fakeraid because the bios writes the metadata relative to the end of the disk when the protection is in place. When the kernel unlocks the HPA, the metadata is now in the wrong location relative to the real end of the disk.Also this is not an nVidia nvraid thing. The vast majority of motherboards do not use the HPA. Whether they are nVraid or otherwise, a few oddball boards enable the HPA for no apparent reason.
2. Create a mounting point
sudo mkdir /mnt/root
3. ls /dev/mapper
In this example the output would have shown "nvidia_cffbdeda, nvidia_cffbdeda1, nvidia_cffbdeda2" where nvidia_cffbdeda is the hdd. All the others listing a # on the end are the partitions. If you don't know what partition is the root of your installation check out gparted. I will use nvidia_cffbdeda1 in the following steps as an example for mounting and chrooting into the installation.
4. Mount the installation
sudo mount /dev/mapper/nvidia_cffbdeda1 /mnt/root
*If this fails use nautilus (thunar in xbuntu) to mount your Ubuntu root partition then use mount to find the mount location. This location will be used in place of /mnt/root in the following steps.
sudo mount --bind /dev /mnt/root/dev
sudo mount -t proc proc /mnt/root/proc
sudo mount -t sysfs sys /mnt/root/sys
sudo mount -t devpts devpts /mnt/root/dev/pts
sudo cp /etc/resolv.conf /mnt/root/etc/resolv.conf
5. Login into the installation
sudo chroot /mnt/root /bin/bash
6.Fetch most recent package lists
7. Remove GRUB2
apt-get purge grub2 grub-pc
rm -r /boot/grub
##The system will be unbootable until another bootloader is installed.
8. Install GRUB 0.97
apt-get install grub
grub-install /dev/mapper/xxx ##note please substitute your hdd in this line (mine would have been nvidia_cffbdeda)
9. At this point it may be a good idea to check the device.map
chmod 777 /boot/grub/device.map##For write access
Mine was incorrect and I changed it to:
(hd0) /dev/mapper/nvidia_cffbdeda ##was listed as /dev/sda which is incorrect
Afterwards use this to restore file permissions
chmod 744 /boot/grub/device.map
If changes were made then re-run grub-install
10. grub --no-curses ##you will now be at the grub prompt##
grub> device (hdx) /dev/mapper/xxx ##note please substitute your hdd in this line
grub> find /boot/grub/stage1 ##make a note of the output it is used in the next step
grub> root (hdx,y) ##(hdx,y) where x is the drive (most likely 0) and y is the partition (first partition would be 0 NOT 1)
update-grub ##When prompted to generate a menu.lst file say yes
13. Run these commands to keep it from upgrading automatically:
echo "grub hold" | sudo dpkg --set-selections
echo "grub-common hold" | sudo dpkg --set-selections
As much as I have tried to make this guide complete it seems to not work for some people and anyhelp I can get in making this guide complete is much appreciated. Namely Raid 1 issues.
Step 10 problems arise when you don't specify the correct device for (hd0)
BIOS boot order can also affect this step so make sure it's correct
In some extreme cases it's necessary to remove other hard drives from the sys as some cheap motherboards lack the understanding of fakeraid and tell grub IDE devices boot first. Thus effectively installing grub to the wrong disk in some cases.