Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...


Candidate for Deletion
This article may not be appropriate for this wiki, and may be deleted. More info...

This guide is for older, unsupported version of Ubuntu and is being kept for historical reference only.

Ubuntu 9.04 (Jaunty Jackalope)

Alternate CD Installation


Intrepid users and up can now install directly to SATA RAID with no additional setup or configuration required. The installer will prompt you to activate the RAID partitions, which will make them available to the partitioner and allow you to continue with the installation as normal.

After defragmenting your existing fakeRAID system and resizing the volume to free space, load the Alternate CD.

Install Options

When Ubuntu splash screen loads, choose the default choice Install Ubuntu.


Choose the default language for your installation.

Keyboard Layout

Select your keyboard layout.


  • -|Detecting Hardware|- watch the screen
  • -|Scanning CD - ROM|- or not
  • -|Loading additional components|-
  • -|Detecting network|-
  • -|configuring the network with DHCP|-


Enter a host name.

Time Zone

Select your time zone.

Disk Detection

  • -| Detecting disks and all other hardware |-
  • -| [!] Detect Disks |-

Warning /!\ If the following doesn't appear this method will likely fail to load the Linux fakeRAID support and this method is not for you!

"One or more drives containing Serial ATA RAID configurations have been found. Do you wish to activate these RAID devices?" Select yes.


  • -| [!!] Partition Disks |-

    Guided - resize serial ATA RAID isw_chihadihib_ARRAY3 (partition

    The following assumes you picked Manual
  • -| [!!] Partition Disks |-

    Guided partitioning

    serial ATA RAID isw_chihadihib_ARRAY3 () - 640.1 GB Linux device-m
     #1 primary 74.0 MB fat 16
     #2 primary 16.1 GB ntfs
     #3 primary 334.4 GN B ntfs
     pri/log 289.5 GB FREE SPACE
    the following assumes you pick the free space you emptied in Windows pri/log 289.5 GB FREE SPACE
  • -| [!!] Partition Disks |-

    Create a new partition

  • -| [!!] Partition Disks |- New partition size the total free space will be selected BUT change it to allow for a swap partition at least the size of your RAM. In this example 277.7 GB to allow for a 11G swap partition
  • -| [!!] Partition Disks |-


  • -| [!!] Partition Disks |-


  • -| [!!] Partition Disks |- strangely you chose "use as Ext3 journalling file system" if you want to change that option
  • -| [!!] Partition Disks |- Ext3 journalling file system chose Ext4 journalling file system if you prefer use as Ext4 journalling file system
  • -| [!!] Partition Disks |-
    • leave the mount point / chose Done setting up the partition
  • -| [!!] Partition Disks |- Guided partitioning
    serial ATA RAID isw_chihadihib_ARRAY3 () - 640.1 GB Linux device-m
    #1 primary 74.0 MB fat 16
    #2 primary 16.1 GB ntfs
    #3 primary 334.4 GN B ntfs
    #4 logical 277.7 GB f ext4 /
    logical 11.8 GB FREE SPACE
    Choose logical 11.8 GB FREE SPACE
  • -| [!!] Partition Disks |-

    Create a new partition

  • -| [!!] Partition Disks |- New partition size

    11.8 GB

  • -| [!!] Partition Disks |- again select use as Ext3 journalling file system to change it
  • -| [!!] Partition Disks |- tab to choose swap area
  • -| [!!] Partition Disks |- tab to chose done setting up the partition
  • -| [!!] Partition Disks |- Guided partitioning
     serial ATA RAID isw_chihadihib_ARRAY3 () - 640.1 GB Linux device-m
     #1 primary 74.0 MB fat 16
     #2 primary 16.1 GB ntfs
     #3 primary 334.4 GN B ntfs
     #4 logical 277.7 GB f ext4 /
     #5 logical 11.8 GB f swap swap 

Warning /!\ Remember the partition that has Windows on it. In this case the third one on the first disk, which would be (hd0,2) as disks and partition numbers start at 0.

  • Choose Finish Partitioning to write changes to disk.

  • -| [!!] Partition Disks |- Write the changes to disk? tab to choose <Yes>

  • -| Partitions formatting |-

Finish the Install

  1. -| Installing the base system |- watch the screen or not
  2. -| [!!} Setup users and passwords|- Full name of the new user enter your name
  3. -| [!} Setup users and passwords|- Username
  4. -| [!} Setup users and passwords|- Choose a password for the new user:
  5. -| [!} Setup users and passwords|- Reenter password to verify:
  6. -| [!} Setup users and passwords|- Encrypt home directory?


  7. -| Configuring apt |-
  8. -| [!] Configure the package manager |- HTTP proxy adjust or just hit enter
  9. -| Configuring apt |-
  10. -| Select and install software |- Retrieving file n of 863 Preparing x Configuring x ...
  11. -| Configuring Grub |-

    If everything is to plan you will get a message such as: The following other operating systems have been detected Windows Vista (loader) Install the GRUB boot loader to the master boot record


  12. . -| Finishing the installation |- Ejecting CD ROM
  13. . -| [!!] Finish the installation |- Installation complete


At this point on boot Grub will either give you an option to boot into Windows or Ubuntu or just Ubuntu. If the installer fails (it did on two occasions for me) to provide a Windows boot option you have to add it manually to /boot/grub/menu.lst. Before making changes, backup the current version. Recall the Windows partition from above, in this case (hd0,2).

sudo gedit /boot/grub/menu.lst

Add the following menu option.

title           Windows
rootnoverify (hd0,2)
chainloader +1

If you don’t remember which partition has Windows find the mounted partitions.

$ cd /dev/mapper/
$ ls

Note the name of the RAID volume or array. For example, something like isw_chihadihib_ARRAY.

$ sudo fdisk isw_chihadihib_ARRAY
Command (m for help): p

Disk isw_chihadihib_ARRAY: 640.1 GB, 640132714496 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb0000000

               Device Boot      Start         End      Blocks   Id  System
isw_chihadihib_ARRAY1               1           9       72261   de  Dell Utility
isw_chihadihib_ARRAY2              10        1968    15728640    7  HPFS/NTFS
isw_chihadihib_ARRAY3   *        1968       42628   326606844    7  HPFS/NTFS
isw_chihadihib_ARRAY4           42629       77825   282719902+   5  Extended
isw_chihadihib_ARRAY5           42629       76390   271193233+  83  Linux
isw_chihadihib_ARRAY6           76391       77825    11526606   82  Linux swap / Solaris

In this case Windows is on the third partition, (hd0,2).

Live CD Installation (Ubiquity graphical installer)


This Section shows you how to install Ubuntu using the Ubiquity graphical installer found on the Live CD.

  1. If you need more information about any given read any of the additional information below
  2. Boot the Live CD
  3. Open a terminal
  4. Enter the following commands
    • (skip the first one if you are doing RAID 0 or 1)
    1. $ sudo modprobe dm-raid4-5

    2. $ sudo apt-get install -y dmraid

    3. $ sudo swapoff -a

      • disables erroneous use of the backing swap partitions if you are reinstalling
    4. $ sudo dmraid -ay

  5. Now check that you can view the partitions in the raid array with this command
    1. $ ls -l /dev/mapper/

      • OUTPUT:
        control             isw_beeaakeeaa_five

        we will be using the array /dev/mapper/isw_beeaakeeaa_five in this example.

  6. Create partitions on your raid array with your preferred partition manager, or do so using the partitioning tool provided in ubiquity (partitioning with ubiquity installer have not been tested)
    1. $ sudo cfdisk /dev/mapper/isw_beeaakeeaa_five

  7. We used /dev/mapper/isw_beeaakeeaa_five5 partition as Ubuntu root partition in this example.

  8. Begin the install process
    1. If doing a guided install make sure you select the raid partition. if you are going to do a manual install make sure you do not create a partition on any of the disks that make up the raid partition.
    2. On the last step before installing, click the Advanced options and uncheck the install boot loader option. We will install grub (the boot loader later).

    3. After installer finishes, close ubiquity installer without rebooting the machine.
  9. Install dmraid and grub in your new Ubuntu installation:
    1. $ sudo mount /dev/mapper/isw_beeaakeeaa_five5 /target/

      • if this fails maybe the /target directory is already mounted if not then some debuging will be required. If any more information can be provided related to this issue place add your knowledge to this document

    2. $ sudo mount --bind /dev /target/dev/

    3. $ sudo mount -t proc proc /target/proc/

    4. $ sudo mount -t sysfs sys /target/sys/

    5. $ sudo cp /etc/resolv.conf /target/etc/resolv.conf 

    6. $ sudo chroot /target/

    7. # apt-get update 

    8. # apt-get install -y dmraid

    9. # apt-get install -y grub

    10. # mkdir /boot/grub

    11. # cp /usr/lib/grub/x86_64-pc/* /boot/grub/

    12. # grub --no-curses you will now be at the grub prompt grub>

      1.  grub> device (hd0) /dev/mapper/isw_beeaakeeaa_five

      2.  grub> find /boot/grub/stage1 

        • OUTPUT:
          find /boot/grub/stage1
        • make a note of the output from this command it will be needed later. in my case I have my linux partition as the first extended partition you most likely will have different results (remember that grub starts partition numbers in zero, so partition 5 for linux is partition 4 for grub).

      3.  grub> root (hd'x','x')

        • replace 'x' with the partition number from the previous step

      4. Install grub on your disk (or partition if you prefer boot your computer with another boot manager)
        1.  grub> setup (hd'x') 

          • replace 'x' with the values gathered in the previous step

          • grub> setup (hd'x','x') to install grub on the partition.


      5.  grub> quit

    13. # update-grub

      • say yes to creating a menu.lst
    14. now open the newly created menu list and make the following changes. Any editor can be used it is not required that you use nano # nano /boot/grub/menu.lst

      1. Change
        • # groot=(hd0,0) TO # groot=(hd0,'x')

          root option in the boot entries to root (hd0,'x') Replace the 'x' with the partition that was found earlier

      2. Add the Windows boot entry if need be.

          title                 Windows
          rootnoverify (hd0,0)   # use the correct partition for Windows, of course
          chainloader +1
      3. For all Ubuntu-related boot entries, such as

           title         Ubuntu ...
           root          (hd0,0)

        change (hd0,0) to (hd'x','x') (in my case, Linux partition was not the first one, and without these changes I would get grub "Error 17" after reboot). You can use the uuid of the mapped raid partition in a grub menu.lst uuid field instead of the root (hd'x','x') field; look in /dev/disk/by-uuid with 'ls -l'.

      4. Save and exit nano. or what ever text editor you are using.
    15. # update-grub

  10. make sure the new install of Ubuntu loads the raid module kernel
    1. # echo dm-raid4-5 >> /etc/initramfs-tools/modules

    2. # update-initramfs -u

    3. # nano /etc/modules

      • and add 'dm-raid4-5' if not exists
  11. Reboot and verify both Ubuntu and the existing Windows partition boot if Windows is installed.

Ubuntu 8.10 (Intrepid Ibex)

Alternate CD Installation


Ubuntu According to the latest FakeRAID spec, Intrepid users can now install directly to SATA RAID with no additional setup or configuration required. This is is not yet supported in the Ubiquity graphical installer so you must use the Alternate Install CD. The installer will prompt you to activate the RAID partitions, which will make them available to the partitioner and allow you to continue with the installation as normal.

Live CD Installation (Ubiquity graphical installer)


In Short

  • Boot the Ubuntu Live CD and select Start Ubuntu without changes to the computer

  • From a terminal, run sudo apt-get install dmraid

  • Check /dev/mapper to ensure the raid was correctly detected
  • Run the installer (ubiquity), install as normal. Deselect installing grub - it will just fail anyway (but it makes no real difference if you don't)
  • From a terminal, run sudo chroot /target

  • Install dmraid to the new installation by running sudo apt-get install dmraid from the chroot environment.

  • Install grub.

the following process has been successful on Nvidia and Intel fakeraid.

  1. Boot the Live CD
  2. Open a terminal
  3. Enter the following commands
    1. ubuntu@ubuntu:~$ sudo apt-get install -y dmraid

    2. ubuntu@ubuntu:~$ sudo modprobe dm-raid4-5

    3. ubuntu@ubuntu:~$ sudo dmraid -ay

      • NOTE: If an "ERROR" is reported at this stage due to RAID failure. From the system menu, select administration, then load the Synaptics Package Manager. In the search/locate field type dmraid. When it finds the three entries, mark all for complete removal, And Apply. When it is done, simply select them again, and re-install. Problem Solved!
    4. ubuntu@ubuntu:~$ cd /dev/mapper/

    5. ubuntu@ubuntu:/dev/mapper$ ls

      • OUTPUT:
        control           isw_cdccfaedhh_Vol
        Make a note of the raid partition for use later. in this example the raid partitions name is isw_cdccfaedhh_Vol
  4. begin the install process
    1. if doing a guided install make sure you select the raid partition. if you are going to do a manual install make sure you do not create a partition on any of the disks that make up the raid partition.
    2. on the last step before installing click the advanced options and uncheck the install boot loader option. we will install grub(the boot loader later)
  5. once the install has finished check to see what order you partition tables came out to be. By doing the following
    1. ubuntu@ubuntu:/dev/mapper$ sudo fdisk isw_cdccfaedhh_Vol

      • you will now be taken to a prompt for fdisk. (the prompt will be "Command (m for help):")
    2. Command (m for help): p

      • OUTPUT:
      Disk isw_cdccfaedhh_Vol: 1500.3 GB, 1500315648000 bytes
      255 heads, 63 sectors/track, 182402 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0x000f28d8
                   Device Boot      Start         End      Blocks   Id  System
      isw_cdccfaedhh_Vol1               1        2490    20000893+   b  W95 FAT32
      isw_cdccfaedhh_Vol2            2491      182402  1445143140    5  Extended
      isw_cdccfaedhh_Vol5            2491        3735    10000431   83  Linux
      isw_cdccfaedhh_Vol6            3736        4482     6000246   82  Linux swap / Solaris
      isw_cdccfaedhh_Vol7            4483      182402  1429142368+  83  Linux

isw_cdccfaedhh_Vol1 Root partition isw_cdccfaedhh_Vol5 Storage partition isw_cdccfaedhh_Vol6 will be my windows partition isw_cdccfaedhh_Vol7 Linux swap partition

  1. ubuntu@ubuntu:/dev/mapper$ sudo mount isw_cdccfaedhh_Vol1 /target/

    • if this fails because the /target directory is busy reboot to the live cd and repeat all parts of step 4 until this command works. Once you have access to /target then continue on

  2. ubuntu@ubuntu:/dev/mapper$ sudo mount --bind /dev /target/dev/

  3. ubuntu@ubuntu:/dev/mapper$ sudo mount -t proc proc /target/proc/

  4. ubuntu@ubuntu:/dev/mapper$ sudo mount -t sysfs sys /target/sys/

  5. ubuntu@ubuntu:/dev/mapper$ sudo cp /etc/resolv.conf /target/etc/resolv.conf

  6. ubuntu@ubuntu:/dev/mapper$ sudo chroot /target/

  7. root@ubuntu:/# apt-get update

  8. root@ubuntu:/# apt-get install -y dmraid

  9. root@ubuntu:/# apt-get install -y grub

  10. root@ubuntu:/# mkdir /boot/grub

  11. root@ubuntu:/# cp /usr/lib/grub/x86_64-pc/* /boot/grub/

  12. root@ubuntu:/# grub --no-curses

    • this command will present you with the grub prompt.

      if you get an error then check your syntax. Odds are you have typed something a little wrong so re-type or edit.

    1. grub> device (hd0) /dev/mapper/isw_cdccfaedhh_Vol OUTPUT:

      device (hd0) /dev/mapper/isw_cdccfaedhh_Vol
    2. grub> find /boot/grub/stage1 OUTPUT:

      find /boot/grub/stage1
      • make a note of this line you will need it later.
      • in my case I have my Linux partition as the first partition you most likely will have different results
    3. grub> root (hdx,x)

      • replace the x value with the values gathered in the previous step
    4. grub> setup (hdx)

      • replace x with the values gathered in the previous step
      setup (hd0)
      Checking if "/boot/grub/stage1" exists... yes
      Checking if "/boot/grub/stage2" exists... yes
      Checking if "/boot/grub/e2fs_stage1_5" exists... yes
      Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded. succeeded
      Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2/boot/grub/menu.lst"... succeeded
    5. grub> quit

  13. root@ubuntu:/# update-grub

    • say yes to creating a munu.lst
    • Searching for GRUB installation directory ... found: /boot/grub
      Searching for default file ... Generating /boot/grub/default file and setting the default boot   entry to 0
      Searching for GRUB installation directory ... found: /boot/grub
      Testing for an existing GRUB menu.lst file ... 
      Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) y
      Searching for splash image ... none found, skipping ...
      Found kernel: /boot/memtest86+.bin
      Found kernel: /boot/vmlinuz-2.6.27-7-generic
      Found kernel: /boot/memtest86+.bin
      Updating /boot/grub/menu.lst ... done
  14. root@ubuntu:/# nano /boot/grub/menu.lst

  15. Changed
    • # groot=(hd0,0)
    • # groot=(hd0,x)
    • replace the x with the partition you found earlier.
  16. Changed this in the boot entries also.
  17. Add the Windows boot entry. If needed use the correct drive and partition for your Windows install. Replace the x's with the correct values
    • title           Windows
      rootnoverify (hdx,x)
      chainloader +1
  18. Changed the delay to a value that makes since for you and comment the 'hiddenmenu' option.
    • Noted that savedefault was set to false.
  19. Save and exit nano.
  20. update-grub and kept the local file.

  21. Reboot and verify all operating system installations

Ubuntu 7.04 (Feisty Fawn)

Ubuntu This procedure has been tested with Ubuntu 7.04 (Feisty Fawn). Your results may vary with other versions.

Install dmraid


  • Boot the Ubuntu CD and select Start or Install Ubuntu

  • Go to System > Administration > Software Sources and add the universe software repository (not required for 8.10 Intrepid or later).

  • Go to System > Administration > Synaptic Package Manager and install the dmraid package.

  • Go to Applications > Accessories > Terminal and run

sudo dmraid -ay

Command Line

Install from command line:

sudo apt-get install dmraid

and run

sudo dmraid -ay

Warning /!\ If you get errors or "No RAID disks", you need to repair these before you continue.

Optional: Resize your Windows partition

If you want to dual-boot windows, you may need to resize your Windows partition to make space for Ubuntu. Most linux-based GUI tools won't properly work with fakeRAID devices, but the unix command-line combination of ntfsresize and fdisk is extremely reliable. Windows Vista users should use the Vista Partition Manager.

Partition the RAID Array

Before we can create file-systems (what Window users call "formatting"), we must slice the disk up into the partitions that hold those file-systems.

You can use GPartEd to create and delete partitions and file-systems if you like, but we do not recommend this because:

  1. at this time, it can not refresh the partition table after it modifies it, so you will need to change the partitions, then quit GPartEd, then run dmraid -ay from the command prompt to detect the new partitions, and then restart GPartEd before you can format the partitions.

  2. it generates a number of erroneous error messages that cause confusion and make it difficult to tell if the process was successful
  3. several people have become stuck at this point because of (a) and (b).

While it IS possible to use GPartEd (from the old releases) for this we recommend command-line utilities for partitioning (or a more recent GPartEd) and the creation of file-systems:

  • fdisk: partitioning (and creation of file-systems on some platforms)
  • parted: partitioning and creation of file-systems
  • mkfs: creation of file-systems

At a minimum, this should include a root partition and a swap partition (this configuration is recommended for new users). For a multi-user desktop, you may want root, swap, and home. In my case, I wanted to isolate my Windows and Linux files at the primary partition level, so I created an extended partition to hold several logical linux partitions. Also, I wanted a separate /boot partition as a security measure, so I created logical partitions for root, boot, and swap. Also, since you can only have four primary partitions on a DOS-labelled disk, using an extended partition gives me the flexibility to add more linux partitions later if I want them. If I decide to serve web apps or something, I might want logical partitions for boot, root, swap, tmp, var, usr, and home.








Boot partition




Swap partition



Rest of the disk

Root partition









Boot partition




Swap partition



















Rest of the disk

Root partition

Familiarize yourself with the tools by using the man pages (i.e., "man fdisk", "man parted", "man mkfs"). Work with partitions and file-systems as root (sudo) or the kernel may not be able to re-read the partition table until you reboot. Create the partitions (the actual commands will vary depending on your choice of tool(s)).

A good source of information: http://www.linuxplanet.com/linuxplanet/tutorials/3174/1/

View Raid disk

sudo dmraid -ay

The result of my configuration

RAID set "sil_aiaedgdcafah" already active

NOTE: In the following examples change /dev/mapper/via_hfciifae to your device e.g. /dev/mapper/sil_aiaedgdcafah

Viewing the Current Partition Layout

Type p to display your disk's current partition configuration

sudo fdisk /dev/mapper/via_hfciifae
Command (m for help): p

Removing Partitions

WARNING: Only remove partitions you don't want kept!

We will first remove all existing partitions from the disk. Type d to delete a partition. For instance, to delete an existing /dev/mapper/via_hfciifae

Command (m for help): d
Partition number (1-4): 1

The partition has been scheduled for deletion. It will no longer show up if you type p, but it will not be erased until your changes have been saved. If you made a mistake and want to abort without saving your changes, type q immediately and hit enter and your partition will not be deleted.

Now, assuming that you do indeed want to wipe out all the partitions on your system, repeatedly type p to print out a partition listing and then type d and the number of the partition to delete it. Eventually, you'll end up with a partition table with nothing in it:

Disk /dev/mapper/via_hfciifae: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot    Start       End    Blocks   Id  System

Command (m for help):

Now that the in-memory partition table is empty, we're ready to create the partitions. We will use a default partitioning scheme as discussed previously. Of course, don't follow these instructions to the letter if you don't want the same partitioning scheme!

Creating the Boot Partition

We first create a small boot partition. Type n to create a new partition, then p to select a primary partition, followed by 1 to select the first primary partition. When prompted for the first cylinder, hit enter. When prompted for the last cylinder, type +32M to create a partition 32 Mbyte in size:

Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-3876, default 1): (Hit Enter)
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): +32M

Now, when you type p, you should see the following partition printout:

Command (m for help): p

Disk /dev/mapper/via_hfciifae: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot    Start       End    Blocks   Id  System
/dev/?          1        14    105808+  83  Linux

We need to make this partition bootable. Type a to toggle the bootable flag on a partition and select 1. If you press p again, you will notice that an * is placed in the "Boot" column.

Creating the Swap Partition

Let's now create the swap partition. To do this, type n to create a new partition, then p to tell fdisk that you want a primary partition. Then type 2 to create the second primary partition, /dev/hda2 in our case. When prompted for the first cylinder, hit enter. When prompted for the last cylinder, type +512M to create a partition 512MB in size. After you've done this, type t to set the partition type, 2 to select the partition you just created and then type in 82 to set the partition type to "Linux Swap". After completing these steps, typing p should display a partition table that looks similar to this:

Command (m for help): p

Disk /dev/mapper/via_hfciifae: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot    Start       End    Blocks   Id  System
/dev/? *           1        14    105808+  83  Linux
/dev/?            15        81    506520   82  Linux swap

Creating the Root Partition

Finally, let's create the root partition. To do this, type n to create a new partition, then p to tell fdisk that you want a primary partition. Then type 3 to create the third primary partition, /dev/hda3 in our case. When prompted for the first cylinder, hit enter. When prompted for the last cylinder, hit enter to create a partition that takes up the rest of the remaining space on your disk. After completing these steps, typing p should display a partition table that looks similar to this:

Command (m for help): p

Disk /dev/mapper/via_hfciifae: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot    Start       End    Blocks   Id  System
/dev/?    *        1        14    105808+  83  Linux
/dev/?            15        81    506520   82  Linux swap
/dev/?            82      3876  28690200   83  Linux

Saving the Partition Layout

To save the partition layout and exit fdisk, type w.

Now that your partitions are created, you can now continue with Creating File-systems.

Creating File-systems


The Linux kernel supports various file-systems. We'll explain ext2, ext3, ReiserFS, XFS and JFS as these are the most commonly used file-systems on Linux systems.

ext2 is the tried and true Linux file-system but doesn't have metadata journaling, which means that routine ext2 file-system checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled file-systems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled file-systems prevent long delays when you boot your system and your file-system happens to be in an inconsistent state.

ext3 is the journaled version of the ext2 file-system, providing metadata journaling for fast recovery in addition to other enhanced journaling modes like full data and ordered data journaling. ext3 is a very good and reliable file-system. It has an additional hashed b-tree indexing option that enables high performance in almost all situations. You can enable this indexing by adding -O dir_index to the mke2fs command. In short, ext3 is an excellent file-system.

ReiserFS is a B*-tree based file-system that has very good overall performance and greatly out-performs both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is solid and usable as both general-purpose file-system and for extreme cases such as the creation of large file-systems, the use of many small files, very large files and directories containing tens of thousands of files.

XFS is a file-system with metadata journaling which comes with a robust feature-set and is optimized for scalability. We only recommend using this file-system on Linux systems with high-end SCSI and/or fibre channel storage and an uninterruptible power supply. Because XFS aggressively caches in-transit data in Ram, improperly designed programs (those that don't take proper precautions when writing files to disk and there are quite a few of them) can lose a good deal of data if the system goes down unexpectedly.

JFS is IBM's high-performance journaling file-system. It has recently become production-ready and there hasn't been a sufficient track record to comment positively nor negatively on its general stability at this point.

Applying a File-system to a Partition

To create a file-system on a partition or volume, there are tools available for each possible file-system:


Creation Command




mke2fs -j







On exiting fdisk, it may report that the partition table will not be re-read until after a reboot, you can get dmraid to re-read the partition table with

sudo dmraid -r

Create File-systems on the RAID Array

Now "format" each partition (create file-systems). In my case I used fdisk and ran a mk2fs on /dev/mapper/via_hfciifae5 and mkreiserfs on /dev/mapper/via_hfciifae7. You can also do this with parted. Or you can exit your partitioning tool and use mkfs (e.g., "mkfs.ext3" and "mkfs.reiserfs") to create the file-systems. Create swap with "mkswap /dev/mapper/etc." and "swapon /dev/mapper/etc.". (Use the man pages.) Be sure to repeat "mkfs" for all the new partitions!

mkfs -t ext3 /dev/mapper/via_hfciifae5
mkfs -t reiserfs /dev/mapper/via_hfciifae7

Activating the Swap Partition

mkswap is the command that is used to initialize swap partitions

mkswap /dev/mapper/etc

To activate the swap partition, use swapon

swapon /dev/mapper/etc

The command dmraid -r will show how the partitions have been mapped in RAID: In my case:

via_hfciifae  -- the raw raid volume
via_hfciifae1 -- the NTFS partition
via_hfciifae5 -- /boot
via_hfciifae6 -- swap
via_hfciifae7 -- /

Alternatively, with a RAID0 striped array you may see

sudo dmraid -r
/dev/sda: via, "via_eafhdaegfb", stripe, ok, 488397167 sectors, data@ 0
/dev/sdb: via, "via_eafhdaegfb", stripe, ok, 488397167 sectors, data@ 0

Also try sudo dmraid -s for information about you RAID set(s).

Mount the Temporary File Structure

Next, I created a temporary file structure to hold my new installation while I construct it, I and mounted two sets of directories to it:

  • a) Mounted the new partitions I had created for / and /boot (so could install packages to them). b) Mounted the currently running, /dev, /proc, and /sys filesystems, so I could use these to simulate a running system within my temporary file structure.

Use sudo or "sudo passwd" and su. If you use su, you do not need to prefix each line below with sudo. We will for consistency.

sudo mkdir /target
sudo mount -t reiserfs /dev/mapper/via_hfciifae7 /target
cd /target
sudo mkdir boot dev cdrom proc sys
sudo mount -t ext2 /dev/mapper/via_hfciifae5 /target/boot
sudo mount --bind /dev /target/dev
# added: mount the cdrom to install packages from ubuntu ISO
sudo mount --bind /cdrom /target/cdrom
sudo mount -t proc proc /target/proc
sudo mount -t sysfs sysfs /target/sys

Install the Base System

sudo apt-get install debootstrap

# install base system
sudo debootstrap feisty /target  # or breezy etc

# copy configuration files
sudo cp /etc/apt/sources.list /target/etc/apt
sudo cp /etc/resolv.conf /target/etc
sudo cp /etc/hosts /target/etc/hosts
sudo cp /etc/network/interfaces /target/etc/network

# run in the now installed system as a chroot
sudo chroot /target

# You are now superuser so do not need sudo

# Add packages from the ubuntu install CD/DVD
apt-cdrom -m add

# Update the apt repository
apt-get update

# replace en with the two-letter identifier for your language
apt-get install language-pack-en

# for other languages than english, you need to (replace sv_SE to what corresponds to your language):
export LANG=sv_SE.UTF-8

# exit, remount proc+sysfs, then chroot again
sudo mount -t proc proc /target/proc
sudo mount -t sysfs sysfs /target/sys
sudo chroot /target

apt-get install dmraid

Warning /!\ If dmraid returns errors, see the Trouble-Shooting Section at the end of this document

apt-get install grub # or other boot-loader

# if unsure of your kernel, run 'apt-cache search linux-'
apt-get install linux-386 # or k7, k8, k8-smp, etc

Warning /!\ The installer may ask you some questions:

  1. Q: Create a symbolic link? A: Yes = press Space
  2. Q: You need to configure your bootloader. A: ok = Tab, Space
  3. Q: Do you want to abort now? A: No = Tab, Space

apt-get install ubuntu-standard # or minimal or base (dapper)

# fix https://issues.rpath.com/browse/RPL-1297
killall acpid

# Optional: you can install this later if you like
apt-get install ubuntu-desktop  # or ubuntu-server, xubuntu-desktop, etc

# You MUST add a user
# (you can do this in a second window while waiting for apt-get
#  if you sudo chroot /target first)
useradd alice # your name instead of alice
passwd alice
mkdir /home/alice
chown alice /home/alice

# duplicate the root line except with your username instead of the word root to give your new user access to sudo

Note: If you are installing ubuntu-desktop, you will need to add your user to several groups in order to use sound, among other things. When you create a full administrator using the GUI, it places your user in the following groups: adm dialout cdrom floppy audio dip plugdev scanner admin

So, to add your created user to those groups:

usermod -a -G adm,dialout,cdrom,floppy,audio,dip,plugdev,scanner,admin alice  # following the previous conventions, put your user instead of alice

Also, the typical Ubuntu setup has the initial user in the "admin" group, and places the admin group in the sudoers file, not your user, like so:


# in the file that appears, place this at the bottom
%admin  ALL=(ALL) ALL

Set Up the Boot-loader for RAID

Now that you have the debian core, ubuntu-base, linux kernel, dmraid, grub, and ubuntu-desktop installed, you can proceed with the boot-loader. If you haven't completed these successfully, don't attempt to proceed, you will just exacerbate any problem you have at this point.

We will demonstrate the installation of Grub (Grand Unified Boot-loader), but there are several alternatives (e.g., LILO). The key information here is how the normal process for use of the boot-loader had to be modified to accomodate the RAID mappings, so this general process should be useful regardless of your choice of boot-loader.

Install the Boot-loader Package

Now you need to run the grub shell. In a non-RAID scenario, one might use grub-install, but we cannot because it cannot see the RAID device mappings and therefore cannot set up correct paths to our boot and root partitions. So we will install and configure grub manually as follows:

First, make a home for Grub and put the files there that it needs to get set up:

mkdir /boot/grub
cp /usr/lib/grub/<your-cpu-arch>-pc/stage1 /boot/grub/
cp /usr/lib/grub/<your-cpu-arch>-pc/stage2 /boot/grub/
cp /usr/lib/grub/<your-cpu-arch>-pc/<the staging file for your boot partition's filesystem> /boot/grub

The "staging files" look like: "e2fs_stage1_5" (for ext2 or 3); "reiserfs_stage1_5" (for reiserfs); "xfs_stage1_5" (and so on). It is safe to copy them all to your /boot/grub. Next, go into the grub shell:


You should now see the grub prompt. Then tell GRUB which device is the boot device:

device (hd0) /dev/mapper/via_hfciifae

In my case, it was the RAID array mapped as /dev/mapper/via_hfciifae. Next, tell Grub where all the stuff is that is needed for the boot process:

root (hd0,4)

Warning /!\ This is one of the most common sources of error, so we will explain this in excruciating detail. From GRUB's perspective, "root" is whatever partition holds the contents of /boot. For most people, this is simply your linux root (/) partition. E.g., if / is your 2nd partition on the RAID you indicated above as hd0, you would say "root (hd0,1)". Remember that Grub starts counting partitions at 0. The first partition is 0, the second is 1, and so on. In my case, however, I have a separate boot partition that GRUB mounts read-only for me at boot time (which helps keep it secure). It's my 5th partition, so I say "root (hd0,4)"

So, if I have a system where /dev/mapper/via_x array has been partitioned so that /dev/mapper/via_x1 is going to be / and /dev/mapper/via_x2 will be /boot I need to type the following because /boot is mounted on the second partition of array hd0

device (hd0) /dev/mapper/via_x
root (hd0,1)

If I only have one non-swap partition, /dev/mapper/via_x1 that is going to be / and no separate /boot, the /boot folder will be on this partition, so

device (hd0) /dev/mapper/via_x
root (hd0,0)

Hint: A way to find out the right disk + partition for your /boot is to type the following on the grub command line:

find /boot/grub/stage1

This should return something in the format of (hdX,Y)

Optional: IF Grub complains about bad cylinder numbers (i.e, if it did not complain, skip this part about fdisk and geometry): You may need to tell it about the device's geometry (cylinders, heads, and sectors per track. You can find this information out by using fdisk (quit Grub) with the command:

fdisk (fdisk -l /dev/mapper/via_hfciifae

...then re-enter the Grub shell and use the command:

geometry (hd0) 9001 255 63

Next, now that you've successfully established the "device" and "root", you can go ahead and instantiate GRUB on the boot device. This sets up the stage 1 boot-loader in the device's master boot record and the stage 2 boot loader and grub menu in your boot partition:

setup (hd0)

Configure the Boot-loader

Now run update-grub:


This adds your newly installed linux kernel, and the associated initial ram disk image, to the boot options menu that grub presents during start-up. You will find this menu in the boot/grub directory. We need to edit this menu.lst file as follows. (CAUTION: Get this right - this is a common source of error and mistakes result in kernel panic upon reboot, so no typos.):

a) "root=": Correct the path that points to the linux root (in several places). update-grub configures hda1 as root because, not being dmraid-aware, it can't find your current root-device. Put the correct device mapping for your linux root. So put your equivalent of:


every place you see "root=" (only where you see root and the equal sign). This goes in all the places where update-grub defaulted to root=/dev/hda1 or just left it blank like root= .

Make sure you change this in the Automagic defaults section as well as in each of the multiple alternatives sections that follow. (Important: the Automagic defaults section is nested and therefore uses ## to indicate comments and # to indicate the actual defaults that is uses. So don't "un-comment" the default lines when you edit them. In other words, leave the #). When you update your kernel later on, update-grub will use these defaults so it won't ignorantly "assume hda1" and send your system into a kernel panic when you boot. This ought to end up looking something like:

#kopt=root=/dev/mapper/via_hfciifae7 ro

b) "groot": If necessary, correct the grub root. In places, you will see other lines that also refer to "root" (or "groot") but use syntax such as root (hd0,1) instead of a path. As described earlier, these refer to the "root" for grub's purposes, which is actually your /boot. Also, remember grub's syntax uses partition numbering beginning with zero. So, if you have a separate /boot partition, these lines should instead show something like:

root (hd0,4)

(The same information we used while working with grub interactively earlier.) Change this both for the Automagic defaults as well as for each alternative, including the memtest option.

c) An additional edit is required IF you are using a separate /boot partition. The path pointing to the linux root must be RELATIVE to the grub "root" (your /boot). So if you are using a separate boot partition, the paths in grub's menu.lst file that help grub locate the linux kernel and initrd will not begin with "/boot", and you should delete that portion of the path. For example, update-grub initially spat out this:

title           Ubuntu, kernel 2.6.15-29-amd64-k8
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.15-29-amd64-k8 root= ro quiet splash
initrd          /boot/initrd.img-2.6.15-29-amd64-k8

... and because I have a separate boot partition and opted not to use a grub splash image (which you can learn about elsewhere), my editing looked like this...

title           Ubuntu, kernel 2.6.15-29-amd64-k8
root            (hd0,4)
kernel          /vmlinuz-2.6.15-29-amd64-k8 root=/dev/mapper/via_hfciifae7 ro quiet
initrd          /initrd.img-2.6.15-29-amd64-k8

Warning /!\ Note that I removed "savedefault". If you leave this in, you will get a "file not found" error when you try to boot (you also can't set use default=saved up top as it shows in the menu.lst file's example). Every time you run update-grub you need to manually remove savedefault. Again, if you are not using a separate boot partition, you can leave /boot in the paths. The "boot" command you would issue at the grub prompt is implied, so you can leave it out of the menu file.

d) To add a static boot stanza for Windows, you can use and change the example in the menu.lst file or the following:

title Windows XP
  rootnoverify (hd0,0)
  chainloader +1

Put it at the bottom, below where it says ### END DEBIAN AUTOMAGIC KERNELS LIST. Or if for some unforgivable reason you want your computer to boot Windows by default, you can put it up front above where it says {{{### BEGIN DEBIAN AUTOMAGIC KERNELS LIST }}}

e) Close the gaping security hole! First, set a password where the example shows it. Users who cannot provide this password will be prevented from using any locked menu entries, prevented from editing the bootlines, and prevented from dropping to a command prompt. To do this, in the console type:


When it prompts you "Password:", it's asking what you want to be the GRUB password (not your user password, the root password, or anything else). You will be prompted to enter it twice, then it will spit out the MD5 hash that you need to paste into menu.lst. This line should end up looking something like the following (obviously, the MD5 hash of YOUR password goes where "$1$gLhU0/$aW78kHK1QfV3P2b2znUoe/" is shown):

password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/

Then, to keep your "recovery mode" boot alternative(s) locked each time update-grub runs, set


Unless you do this, anybody will be able to seize root simply by rebooting your computer (e.g., cutting power to it) and selecting your "recovery mode" menu entry when it reboots, or editing the normal bootline to include 'single' mode.

You can also add "lock" to any static menu alternatives you have created (insert it on a line just below the title, so it locks the entire set of options described).

f) Test automagic kernels settings (also completes the locking of alternatives). It is better to find errors now than a month from now when you've forgotten all this stuff and the kernel gets updated. - first, make a backup of menu.lst - then run update-grub again - watch for errors and re-examine menu.lst for discrepancies - correct as needed.

Preconfigure the New System

Ubuntu This section applies to all Ubuntu versions.

Ensure that you are still operating as root within the new (temporary) system (i.e., your prompt will be root@ubuntu#. If not, chroot /target again:

sudo chroot /target

(The process from here forward is the same as any bootstrap / network installation, and there are other sources to refer to for more detail.)

Ubuntu 6.06 - 7.10: base-config is deprecated in Dapper Drake, so we have to manually configure the new base system. Ubuntu 5.10: Enter the command base-config new to configure system defaults.

The following steps have been pulled from http://doc.ubuntu.com/ubuntu/install/i386/apds03.html. I've only included the steps we haven't covered above.

Configure Keyboard

apt-get install console-data #or "dpkg-reconfigure console-data" if console-data is already installed.

Note that the keyboard cannot be set while in the chroot, but will be configured for the next reboot.

Configure Networking

To configure networking, edit /etc/network/interfaces, /etc/resolv.conf, and /etc/hostname.

nano /etc/network/interfaces

Here are some simple examples from /usr/share/doc/ifupdown/examples;:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# See the interfaces(5) manpage for information on what options are
# available.

# We always want the loopback interface.
auto lo
iface lo inet loopback

# To use dhcp:
# auto eth0
# iface eth0 inet dhcp

# An example static IP setup: (broadcast and gateway are optional)
# auto eth0
# iface eth0 inet static
#     address
#     network
#     netmask
#     broadcast
#     gateway

Enter your nameserver(s) and search directives in /etc/resolv.conf:

nano /etc/resolv.conf

A simple /etc/resolv.conf:

search hqdom.local\000

Enter your system's host name (2 to 63 characters):

echo UbuntuHostName > /etc/hostname

Change "UbuntuHostName" to whatever you'd like it to be. If you have multiple network cards, you should arrange the names of driver modules in the /etc/modules file into the desired order. Then during boot, each card will be associated with the interface name (eth0, eth1, etc.) that you expect.

Configure Locales

To configure your locale settings to use a language other than English, install the locales support package and configure it:

apt-get install locales
dpkg-reconfigure locales

NOTE: Before using locales with character sets other than ASCII or latin1, please consult the appropriate localization HOWTO.

Mount your FileSystems

It will be helpful to configure your fstab file at this point. One easy way to do this is:

cat /etc/mtab

(select and copy everything)

nano /etc/fstab

(paste everything)

Then delete everything except the proc line, and the lines that refer to your RAID partitions. It might end up something like this (yours will vary - people asked for examples):

#FileSystem                     MountPoint      Type       Options      Dump/Pass

proc                            /proc           proc       rw              0 0
/dev/mapper/via_hfciifae5       /boot           ext3       defaults        0 2
/dev/mapper/via_hfciifae7       /               reiserfs   notail,noatime  0 1
/dev/mapper/via_hfciifae6       none            swap       sw              0 0


#[fs                       ]  [fs_mount][fs_type][ fs_opts ][dmp][pass]
/dev/mapper/nvidia_bggfdgec2    /boot     ext3    defaults    0    1
/dev/mapper/nvidia_bggfdgec3    none      swap    sw          0    0
proc                            /proc     proc    rw          0    0

Finally you are ready to reboot. This first time, select the "recovery mode" option. When it asks, you want to "perform maintenance". Set the root password:


(more is needed here, or a reference to whatever replaces the howto that describes a general debootstrap install)

Ubuntu 7.04 (Feisty Fawn)

The Desktop CD installer still had poor support for fakeraids, or even no support at all. Upgrading from an existing Edgy installation is no problem, just remember to edit /boot/grub/menu.lst and remove the "savedefault" entries again when the upgrade has finished.

You can try to use the installer though. Here is a description how to do that


Ubuntu 6.10 (Edgy Eft)

The fakeraid support in the Desktop (live) installer is disabled due to different problems. Use the "Alternate" install cd. See bug #54246 for some issues and workarounds. The original Edgy version of dmraid is broken for many people. A newer version has been released in Feisty, and this package has been reported to work fine in Edgy (and Dapper) as well.

See also FakeRaidEdgy for a happy-ending story that might help you.

Ubuntu 6.06 (Dapper Drake) by Up-grading

The dmraid package in Ubuntu 6.06 has the necessary scripts included (under /usr). After upgrading the dmraid package, you can therefore delete the old scripts that you've made (under /etc). To be sure the package scripts are baked into the initrd, update the initrd again by reconfiguring dmraid:

sudo rm /etc/mkinitramfs/hooks/dmraid
sudo rm /etc/mkinitramfs/scripts/local-top/dmraid
sudo dpkg-reconfigure dmraid

Ubuntu 5.10

Reconfigure Initramfs for RAID

Warning /!\ This chapter is only required for Ubuntu 5.10. Otherwise it should be skipped.

In recent years there has been a trend to try and pull a bunch of code out of the kernel and into EarlyUserspace. This includes stuff like nfsroot configuration, md software RAID, lvm, conventional partition/disklabel support, and so on. Early user space is set up in the form of an initramfs which the boot loader loads with the kernel, and this contains user mode utilities to detect and configure the hardware, mount the correct root device, and boot the rest of the system.

Hardware fakeRAID falls into this category of operation. A device driver in the kernel called device mapper is configured by user mode utilities to access software RAIDs and partitions. If you want to be able to use a fakeRAID for your root filesystem, your initramfs must be configured to detect the fakeRAID and configure the kernel mapper to access it.

So we need to add dmraid to the initramfs. Debian and Ubuntu supports this by way of a set of shell scripts and configuration files placed in /etc/mkinitramfs/. We must tailor these to include dmraid by plugging in two simple scripts and adding a one-line entry to a configuration file. The only real challenge here is to make sure you don't inadvertently screw up the syntax with a typo.

Note that in Ubuntu 6.06, this is taken care of by the dmraid package itself.

Configure mkinitramfs

First, create a new file as /etc/mkinitramfs/scripts/local-top/dmraid.

(If you are lazy or don't like to keyboard, you can open this how-to in the browser and copy the text.)

Warning /!\ the line: PREREQ="udev" gave me circular-dependency issues so I replaced it with PREREQ="" and my issue was resolved


        echo "$PREREQ"

case $1 in
# get pre-requisites
        exit 0

modprobe -q sata_nv
modprobe -q dm-mod

# Uncomment next line if you are using RAID-1 (mirror)
# modprobe -q dm-mirror

/sbin/dmraid -ay

Second, create another new file as /etc/mkinitramfs/hooks/dmraid.

(Again for the lazy, you can copy it from your browser. Also, it's only slightly different, so if you are manually typing it for some reason, you may want to start with a copy of the first script.)


        echo "$PREREQ"

case $1 in
# get pre-requisites
        exit 0

. /usr/share/initramfs-tools/hook-functions

copy_exec /sbin/dmraid /sbin

exit 0

Third, mark both of these new initramfs scripts as executable:

chmod +x /etc/mkinitramfs/hooks/dmraid
chmod +x /etc/mkinitramfs/scripts/local-top/dmraid

Last, add the line dm-mod to the file /etc/mkinitramfs/modules. Make sure the file ends with a newline. If you use a RAID-1 (mirror), include dm-mirror as well.

Update the initrd

Now the big moment -- use initramfs to update the initrd file. Below, I show the kernel I installed at that time, but stuff following "img-" and following "-c -k " must reflect the version YOU are using (e.g., "2.6.15-29-amd64-k8-smp" or whatever).

Two commands

rm /boot/initrd.img-2.6.12-9-k7
update-initramfs -c -k 2.6.12-9-k7

FakeRaidHowto/Historical (last edited 2017-09-08 03:12:55 by ckimes)