ubuntu dual boot illustrated site ubuntu dual boot windows 7 maverick meerkat
Ubuntu RAID5 Installation
Edited Friday, December 31 2010  Document made with KompoZer

This web-page is part of a larger site
giving examples of how to install Windows+Ubuntu Linux operating systems 'dual boot' in a computer.  Illustrated Dual Boot HomePage

This webpage illustrates how to use the Ubuntu 'Alternate Installation' CD to install Ubuntu in a computer with four hard disks in a RAID5 configuration. You need a minimum of three disks for a proper RAID5 install.

The installation CD I used for this installation was made from ubuntu-10.10-alternate-i386.iso.
419ad8ee1bb76a49490f4a08b5be43f0  ubuntu-10.10-alternate-i386.iso - UbuntuHashes -

Hardware used for making this illustrated example installation is a Acer Aspire T-310 PC' with an Intel Pentium 4 3.00 GHz CPU with  1 GB of  RAM. I'm installing Ubuntu in one 40 GB hard disk drive plus three 20.0 GB IDE hard drives.

Prerequisites
You will need at least three discs of some kind, they don't all have to be hard disks and they don't necessarily need to all be IDE, or all SATA, or whatever, they can be a mixture. It's best ifthey're similar in size.
You will need a way to boot into your new installation because so far I have not been able to get GRUB2 to work for the first boot-up. GRUB2 worked for me after the first software updates were received. A support Ubuntu installation in a removable drive which boots with GRUB2 will be needed for the first boot, or a copy of Super Grub2 Disk, which is also available in Parted Magic LiveCD.

Partitioning
I deleted all the partitions that previously existed in the four hard disk drives with GParted in Parted Magic Live CD.
I created one partition in the smallest disk first, with the start of the partition aligned to the 1 MiB mark, (2048 sectors). I made it quite large, leaving some space in the disk for a small swap area after the partition.
Since that was the smallest hard disk, the other hard disks should all be able have a partition the same size.
Taking note of the exact size of that partition, I created identical sized partitions in the other three discs so I had four discs with a large / partition each and the remaining space after the / partition in each disk used for swap areas.
I made a 1GB partition in the first hard drive for /boot, that's the 40GB one, so there was a lot of spare room there for it.
When I have a chance to go shopping, I would like to buy some flash memory sticks and set them up as the /boot drives in RAID1, but for now all I have are these four old hard drives.

The length of time this install might take will depend on the speed of the hardware, it took me a long time to install Ubuntu with the hardware I'm using. 

To begin
, you need to place your Ubuntu Alternate CD in your CD-ROM drive and re-start your computer.
You should see something like the illustration below in your monitor.
        This is not an official Ubuntu website        
These three are  |  Ubuntu  |   Ubuntu Forums  |    Official Ubuntu Wiki
               
Here is a link to the Official Ubuntu Installation Guide's,
'How the Installer Works',  it explains all about the Debian installer.
You should read that first and look at the illustrations in this website after that.
                                  

Here is a link to the Official Ubuntu Installation Guide's,  
'Components Introduction'
too.
I recommend reading the official documentation as well as looking at the pictures below here. 
    


What Are the Benefits of Installing Ubuntu in a RAID5 Array?
Computer hardware is getting faster and more affordable, and most computers now have plenty of RAM and use very fast CPUs. Hard disks are getting ever larger and remain quite affordable, but they have not managed to increase hard disk read and write speeds over the years to keep pace with the capabilities of other components in newer PCs.
I lashed out and spent some of my hard earned money on an SSD drive a while ago and I really like the extra speed and responsiveness it gives the operating system. SSDs cost a lot of money so I can only afford one.
Another good way to make a computer faster is to use a number of hard disk drives in a RAID5 array.
I had some old hard disks lying around in a drawer doing nothing, and I got curious to find out how much faster I would be able to make my computer go with RAID5, even though I only have a bunch of old, slow hard disks.
The good thing is they didn't cost me a cent, and maybe some day when I have learned more and have more money to spend I'll try the same installation in some decent hardware. A nice matching set of new SATA 2 drives would be a lot better than these old IDEs, and an array of SSDs would be the ultimate.

Besides a speed boost, RAID5 is supposed to provide something called 'redundancy', where each drive contains a mirror image of the others. If one drive fails we're supposed to be able to replace it without data loss.

Thirdly it's a chance to learn more. RAID arrays are more in the realm of professional computer work and the ability to install and manage a RAID array will be a nice thing to be able to put in my resume.

The advantages of using the 'Alternate' install CD are that more choices are available for people who want to do something special with their install.

With the 'Alternate' Install CD you can,
  • install Ubuntu in a LUKS fully encrypted file system,
  • set up Ubuntu with LVM or software RAID,
  • perform an 'expert' install (for coping with machines with difficult hardware),
  • install ubuntu as a server, (without any 'GUI' (desktop),
  • the 'Alternate' CD's partitioner will work in a computer with 128 mb of memory and maybe less.
  • choose between GRUB and LILO boot loaders, or even install with no boot loader at all,
  • create pre-configured OEM systems,
  • set up automated deployments,
  • upgrade an older installation without network access
Language Selection 1-003_.png
1-003_.png Language Selection Screen





ubuntu languages.png by Elabra sanchez
ubuntu languages.png - credit to Elabra Sanchez - creative commons licence.

Ubuntu features language support for more languages than any other operating system.
Ubuntu language support link: Translations/ReleaseLanguages/9.10 - Ubuntu Wiki

Use the arrow keys on your keyboard to select the language you want to use for the installation and press enter.

If your CD didn't boot, enter your computer's CMOS (BIOS) and check to make sure your CD/DVD drive is set before the hard disk drives in the BIOS boot order. See this website's BIOS Page.
              
boot screen 1-004_.png
From here you can choose one of the following,

Install Ubuntu -
Press your 'Enter' key to begin installing  Ubuntu right away

Check the CD-ROM for defects
I recommend checking the CD for defects before the first time it's used.


Test Memory
This option starts memtest86+, here's a link about that, 
memtest86+
There are 8 tests, and it takes about 1/4 to 1/2 an hour to complete one cycle. It's designed to keep repeating the cycle so you can let it run all night. Press'Esc' to exit memory testing after you try it out.
Note: To ensure you are testing the RAM modules and not your CPU internal and external caches (L1 and L2), you can enter your computer's CMOS (BIOS) first, and temporarily disable caching. Do remember to re-enable those again when you are finished or your computer may perform slowly.

Boot from first hard disk
this re-boots the computer.

Rescue a broken system
(Rescue mode) useful to people who already have Ubuntu installed and want to carry out maintenance and repair tasks. 


F_ keys
Try taking a look through the menus from the F keys to see if there's anything in those you want.



I selected 'Install Ubuntu' from the menu illustrated above and I pressed 'Enter'.

1-006_.png Language Selection



1-006_.png
Language Selection
This menu is for choosing the language you want for the operating system you are installing.
We already chose English for the installation process, but we could be installing Ubuntu in a computer that will be used by a friend who speaks some other language.

You need to use your arrow keys to scroll up or down the menu to select the language for the new operating system.

I'm installing for myself today and for me it's English.

1-007_.png Country
1-007_.png  Country
You need to use your arrow keys to scroll up or down the menu to select your country.
1-008_.png Detect Keyboard

1-008_.png Detect Keyboard
I always choose 'No' here, it saves time.
Use your 'tab' key  if you want to select something else.
1-009_.png keyboad origin
1-009_.png  Keyboard Origin
We mostly use the USA type of keyboard, even in Australia.
1-010_.png Keyboard Layout
1-010_.png Keyboard Layout
If you have some special kind of keyboard you may scroll up and down this menu and look for it.
1-011_.png find cdrom drive
1-011_.png Detecting Hardware

The 'Detecting Hardware to find CD-ROM drives' step works fine when we're using a real CD or DVD as an installation media, but so far I have not been successful using the 'Alternate CD' when it has been copied into a USB drive. This thread in Ubuntu web forums looks as if it might contain the answer, Install 11.04 server from USB; fails, can't mount /cdrom , see post #3 by darkod.

1-012_.png scanning cdrom
1-012_.png Scanning CD-ROM
1-013.0_.png loading additional components
1-013.0_.png loading additional components
1-015_.png detect network hardware
1-015_.png detect network hardware
1-016_0.png Configure the Network with DHCP 1-016_0.png Configure the Network with DHCP
1-016_1.png Network Autoconfiguration Succeeded
1-016_1.png Network autoconfiguration has  succeeded
1-017_.png configure the network
1-017_.png Configure The Network

You can make up any name you like here for your operating system.
Just press your backspace key to move the cursor a few places to the left to erase the name  'ubuntu', and then type in the name you  want  your  new operating  system to be called.

 
1-017_1.png Setting up the clock
1-017_1.png Setting up the clock
1-017_2.png Configure the Clock
1-017_2.png Configure the Clock

If the installer guesses wrong here you just need to select <No> for a list of possible locations and scroll until you find a location in the same time zone you're in.

1-020_.png detecting disks and all other hardware
1-020_.png Detecting disks and all other hardware
1-021_.png load additional components
1-021_.png Loading additional components

This is the end of the first stage of the install. 



Start of the partitioning stage of the install

We are now about to begin the Partitioning and Mount Point Selection phase of the installation. Please refer to the above link to the official Ubuntu documentation for a  more detailed explanation of what can be done here.                                                  

1-022_.png starting up the partitioner 1-022_.png Starting Up The Partitioner
p3/3.001.png 3.001





 At this screen we need to scroll all the way down and choose  'manual'.

I  highlighted 'manual', and I pressed 'Enter'.
p3/3.002.png
p3/3.002.png














 Select the partition that will be the /boot partition

 NOTE:
So far this is the best way to install /boot that seems to be reliable enough for me.  I am aware that it's not such a great idea to have /boot on just one hard disk. The idea of a good RAID setup is to try to get 'redundancy' so if one hard drive fails the operating system remains usable. 
I'm already working on a sequel to this installation how-to which includes a 512 MiB partition for /boot in each of the four drives in a RAID1 configuration. RAID1 -wikipedia.
It's supposed to be possible according to Ubuntu Community Docs, see Partitioning the disk.
So far I don't have that working yet, it might be just because I'm using flaky old hardware though.  I will have to keep repeating all kinds of RAID installations and update this how-to as soon as ways to improve it seem reliable.

Some day I'll get myself a matching set of decent hard drives or SSDs too.

p3/3.003.png
p3/3.003.png

 Working on the /boot partition

 1.  Set the file system type to ext4
 Press enter while 'Use as: do not use' is highlighted, and 'Ext4 journaling file system' should be highlighted by default at the top of the list of possible file systems. Just press enter to select it.
You can choose some other file system than ext4 if you want. Reiserfs is a good candidate, most Linux users have their favorites and strong opinions when it comes to file systems.

2. Set the mount point to /boot
Scroll down to the line saying 'Mount point: none', and press enter.
In the next window, go down one line to select '/boot', and press enter.

 3. Set the label as 'boot'
Scroll down to the line 'Label:  none', it's for the file system label.
Press enter and you will see a window with a line where you can type in your own file system label.
You can type anything you like here, I'm just labelling mine: boot

  Your /boot partition should look like this now.

  4. When finished, choose 'Done setting up the partition' to go back to the partition overview screen.

 
p3/3.006.png
p3/3.006.png










 Now we're ready to configure the root partitions in each of our four hard disks into a RAID array.


 Notice that the details have changed in the line describing our /boot partition now.



 
p3/3.007.png
 This screen is pretty well self explanetary.







p3/3.007.png

2_007_partitions-formatting.png
p3/3.044.png
p3/3.014.png
p3/3.015.png
p3/3.015.png
p3/3.016.png
p3/3.016.png
p3/3.017.png
p3/3.017.png
p3/3.018.png




p3/3.018.png












 You use your down arrow to move the cursor down to each of the root partitiions
 Select each of the root partitions by pressing your space bar
 When an asterisk  has been placed in the brackets before each root  partition  click enter.

p3/3.0185.png 
p3/3.0185.png
p3/3.019.png
p3/3.019.png
p2/1-022_.png
1-022_.png Starting Up The Partitioner
p3/3.031.png
p3/3.030.png













 Notice there are now two new lines at top of the list of devices and the partition overview screen?

 Next we need to tell the installer how we want to use our new RAID5 array.


p3/3.032.png

  Working on the RAID5 root array

 Set the file system type to ext4
 1. Scroll up to highlight the line that says 'Use as: do not use', and press enter
 2.  'Ext4 journaling file system' should be highlighted by default at the top of the list of possible file systems.
      Just press enter to select it.
      You can choose some other file system than ext4 if you want. Reiserfs is a good candidate.
      Most Linux users have their favorites and strong opinions when it comes to file systems.

  Set the mount point to /
 1. Scroll down to the line saying 'Mount point: none', and press enter.
  2. In the next window, the line that says '/ - the root file system' should be at the top of the list, and it should be highlighted by default, just press enter.

 3. Set the label as 'root'
Scroll down to the line 'Label:  none' for the file system label.
Press enter and you will see a window with a line where you can type in your own file system label.
You can type anything you like here, I'm just labelling mine: root

  4. When finished, choose 'Done setting up the partition' to go back to the partition overview screen.


 



p3/3.032.png
p3/3.033.png
p3/3.033.png
p3/3.034.png
p3/3.034.png
2_007_partitions-formatting.png
2_007  Partitions  Formatting

End of the partitioning stage of the install


.....................................................................................................................................
Start of the final stage of the install



We are now about to begin the Setting up the System stage of the installation.
Please refer to the above link to the official Ubuntu documentation for more detailed advice about the questions you will be asked next.                                                  

3_.008 installing the base system
  3_.008 Installing The Base System 
This takes a little while ...
p2.3/3_.009.png users and passwords
3_.009.png users and passwords 
I just type in my first name and surname here. You are allowed to use capital letters.
Whatever you type here will be remembered by your new system and used for automatically configuring some things like parts of your email account. Make sure you don't type anything foolish here because your e-mail recipients might be reading this some day.
When ready, press enter or  tab to select '<Continue>', then enter.
              
p2.3/3_.010.png username
3_.010.png username
Your first name should automatically appear here as a default username. You can change it to a nickname if you want, and with numbers too if you like. (Check your numlock). Lower case letters only though, no capitals.
p2.3/3_.011.png password for new user
3_.011.png password for new user
password tip
Password Tip:
It's possible to pick just one, two or three letters on your keyboard and press them and the keys around them to make a shape.
For example if you want to start with the letter T, you could then press 6, 7, and then y and g.
Then if you press f, d, r, 5 ,6 and t again you would have pressed the keys around the t in the shape of a diamond.  You'd have an eleven character password that you can easily remember, but one that would be hard to crack. All you need to remember is 'Diamond T'.
See if you can think of your own password based on a shape and just one, two or three letters.

It is important to create a good, strong password for yourself in Ubuntu.
p2.3/3_.012.png re-enter to verify

3_.012.png enter to verify
p2.3/3_.013.png 3_.013.png encrypt the home directory
Advantages of having an encypted /home are that your personal files will be protected from being accessed by unauthorised people without the user needing to do anything special every time a confidential file is created. The operating system will still be fairly quick.
Disadvantages are it might be more complicated to carry out some regular maintenance and repair tasks or rescue files after an operating system disaster.

For the ultimate in security, consider Installing Ubuntu in a fully encryped LUKS file system, illustrated in a different page of this website, see Ubuntu Karmic Koala Encrypted Flash Memory Installation .
Disadvantages of a fully encrypted installation are that it runs a little slower, (detectable with benchtesting software), and it's a little more complicated to maintain and to rescue file from if things go badly wrong.

Without any encryption at all, maintenance and repair tasks will be simple, and I will still be able to use the seahorse program to encrypt certian individual files when I need to. See this website's Set up Seahorse.
I choose not to have an encrypted /home.
3_.014.png configuring apt 3_.014.png configuring apt
The apt system of package management is one of the great features Ubuntu inherits from Debian, which is the operating system Ubuntu is based on.

Packages are uploaded to certian internet repositories exclusively by registered programmers using the proper credentials. This is one reason why we're not bothered by malware in Ubuntu.
It is possible to enable  other repositories with varying degrees of support and security.
If you still can't find the software you want, it's also possible to add extra repositories at your own risk.
p2.3/3_.015.png http proxy settings
3_.015.png http proxy settings

Those who require these settings will know what to enter here.

I always just press enter to skip this question.


We are now about to begin the Installing the Base System and Installing Additional Software stages of the installation. Please refer to the above links to the official Ubuntu documentation for more detailed advice about what happens next.       

3_.016.png configue apt
3_.016.png configue apt
3_.020.png select and install software
3_.017.png select and install software

This process takes far more time than any other part of the installation.

Even in a fast computer a person would have time to go and do something else for a while.

3_.025.png install grub bootloader


p3/14.037.png
p3/14.037.png
3_.027.png finishing the installation
3_.027.png finishing the installation
Here is the link to what the official Ubuntu documentation has to say about Finishing the Installation and Miscellaneous.

Please refer to the above links for the correct details about what happens.                   

3_.031.png installation complete
3_.031.png installation complete

At this point, my CD drawer pops open automatically and I remove my CD from it and press 'Enter'.
Some computers might not have a CD drawer with a mechanism to open the CD-ROM drawer automatically. If this is the case, you should remove your CD manually.


3_.033.png finishing the installation
3_.033.png finishing the installation

NOTE: In some of my test installations, the new operating has booted up automatically right away without any problems.
If your computer does have a booting issue, at this point it might be necessary to insert your USB Ubuntu flash memory stick installation or your Super grub2 disk or whatever it is you want to use for a GRUB CLI interface.

grub> _

You'll need to use this link,  GRUB How To Boot From CLI Mode -  Rescue your System  

There's a twist though, booting Ubuntu in a RAID array requires a couple of differences in the commands used,
Here are the commands I used for mine on one or two ocassions,
insmod raid
linux    (hd1,1)/vmlinuz-2.6.35-22-generic /dev/md0
initrd   (hd1,1)/initrd.img
-2.6.35-22-generic
boot


NOTE: Even after the times the installation wasn't automatically bootable at first, after booting and recieving updates and then installing to MBR in each of the four hard disks,my RAID5 installation was bootable by GRUB2 just like any other Ubuntu installation.
3_.039.png new desktop hello world

3_.039.png new desktop - "Hello world!"

The next thing most Linux users want to do immediately after our new installation boots for the first time is to get updates and start configuring, customising and adding software.

This website has its own
Post-install Page  which you're welcome to make use of, especially if you're a new user and not familiar with Ubuntu yet.

To Do:
gksudo gedit /etc/fstab

------->   1.3 Swapping on RAID

There's not much reason to use RAID0 for swap performance reasons. The kernel itself can stripe swapping on several devices, if you just give them the same priority in the /etc/fstab file.

A nice /etc/fstab could look like:

 /dev/sda3       swap           swap    defaults,pri=1   0 0
/dev/sdb2 swap swap defaults,pri=1 0 0
/dev/sdc2 swap swap defaults,pri=1 0 0
/dev/sdd2 swap swap defaults,pri=1 0 0

Links:

The Software-RAID HOWTO - Jakob Østergaard

Linux Raid Wiki - kernel.org

RAID1 in My Ubuntu Installation - Martti Kuparinen

InstallationSoftwareRAID - Ubuntu Community Docs

Raid5? counrtyboy - Ubuntu Web Forums

Raid systems what are they good for?? - hockey97 - Ubuntu Web Forums

10.10 Server, Software Raid, Grub2 - TwiceOver - Ubuntu Web Forums
sudo apt-get install bonnie++

bonnie++