INSTALLING UBUNTU 10.04 LTS ON A SOFTWARE RAID1 VOLUME
 

Installing Ubuntu to RAID1

Using 10.04.2 LTS Alternate Installation Disk

Required:
-Ubuntu 10.04.2 LTS Alternate Installation Disk (includes tools for installation to software RAID)
-2x Identical Installation Drives (2x500GB in this example) Formatted as Free Space

Initial Set-Up:
-Insert 10.04 LTS Installation Disk and boot server.

Language:
-Language Screen: Select your language
-Start-up Menu: Choose “Install Ubuntu”

(ASCII Menus begin)

Keyboard:
-Choose Language: Select your language
-Choose Language: Select your region
-Detect keyboard layout: No
-Origin of keyboard: Choose country of origin
-Keyboard Layout: Choose keyboard layout

Network:
-Primary Network Interface: Select the ethernet port connected to your internet connection
-Hostname: Enter the network name for your server (i.e. ubuntu-svr). Use Down-Arrow to highlight Continue.

Clock:
-If Timezone shown is correct, enter. If not use Down or Right Arrow to highlight No, enter. Select timezone, use Tab to highlight Go Back.

Partition Disks:
-Partition Disks: Highlight Manual.

You should now see your two disks: SDA and SDB

SCSI1 (0,1,0) sda
–pri/log [size]GB     FREE SPACE

SCSI1 (0,0,0) sdb
–pri/log [size]GB     FREE SPACE

Create Partions for SDA:
-Select the FREE SPACE partition on “sda”.
-Select “Automatically partition the free space”.

This will create Primary and Swap partitions on your SDA drive.

-Select the Primary partition.
-Select Use As, enter. Select “Physical Volume for RAID”.
-Select Bootable Flag, enter. This will set the partition as Bootable.
-Select “Done setting up the partition”
-Select the second, smaller Swap partition.
-Select Use As, enter. Select “Physical Volume for RAID”, enter. (Leave the bootable flag OFF)
-Select “Done setting up the partition”

Create Partions for SDB:
-Select the FREE SPACE partition on “sdb”.
-Select “Automatically partition the free space”.

This will create Primary and Swap partitions on your SDB drive.

-Select the Primary partition.
-Select Use As, enter. Select “Physical Volume for RAID”.
-Select Bootable Flag, enter. This will set the partition as Bootable.
-Select “Done setting up the partition”
-Select the second, smaller Swap partition.
-Select Use As, enter. Select “Physical Volume for RAID”, enter. (Leave the bootable flag OFF)
-Select “Done setting up the partition”

You should now have a set of identical drives each with primary and logical partitions that look like this:

SCSI1 (0,1,0) sda
#1 primary    [size]GB B K raid
#5 logical      [size]GB     K raid

SCSI1 (0,0,0) sdb
#1 primary    [size]GB B K raid
#5 logical      [size]GB     K raid

Create RAID1 (Primary Partition)
-Select “Configure Software RAID”.
-Write Changes to Storage Devices and configure RAID?: YES
-Select “Create MD device”.
-Software RAID Type: Select RAID1.
-Number of active devices for RAID1: 2, Continue.
-Number of spare devices for RAID1: 0, Continue.

Active Devices for RAID1 Array: Use Up and Down Arrow to highlight, Use Spacebar to Select.

-Select /dev/sda1
-Select /dev/sdb1

Use Tab to highlight Continue, enter.
Your Primary partitions are now ready to be formatted as RAID1.

Create RAID1 (Logical “Swap” Partition)
-Select “Configure Software RAID”.
-Write Changes to Storage Devices and configure RAID?: YES
-Select “Create MD device”, enter.
-Software RAID Type: Select RAID1.
-Number of active devices for RAID1: 2, Continue.
-Number of spare devices for RAID1: 0, Continue.

Active Devices for RAID1 Array: Use Up and Down Arrow to highlight, Use Space bar to Select.

-Select /dev/sda2
-Select /dev/sdb2

Use Tab to highlight Continue, enter.
Your Logical partitions are now ready to be formatted as RAID1.

NOTE: If for some reason, all of the partitions you create earlier are not available in the Active Devices selection window, delete the RAID1 set you’ve created so far, and use Go Back to get to the Partition Disks screen. Select, double-check, and save each partition over again. So, even if you were correct, and don’t have to change anything, recommitting the settings should make all of the partitions visible in the Active Devices window.

Once you’ve created your primary and logical RAID1 sets, Select Finish.

You should now be at the Partition Disks overview screen that looks like this:

RAID1 device #0 –   [size]GB Software RAID device
#1                            [size]GB
–                               [size]kB unuseable

RAID1 device #1 –   [size]GB Software RAID device
#1                               [size]GB
–                                  [size]kB unuseable

SCSI1 (0,1,0) sda
#1 primary              [size]GB B K raid
#5 logical                [size]GB     K raid

SCSI1 (0,0,0) sdb
#1 primary             [size]GB B K raid
#5 logical               [size]GB     K raid

Assign root (/) partion:
Select partition #1 of “RAID1 device #0”.
Use As: Ext4 Journal File System
Mount Point: / – the root file system
(leave other settings at their defaults)
Select: Done setting up the partition.

Assign swap partion:
Select partition #1 of “RAID1 device #1”.
Use As: swap area
Select: Done setting up the partition.
Scroll to the very bottom of the list:
Select: “Finish partitioning and write changes to disk”.
Enable Booting Degraded RAID
Select: YES

Note: Booting to a degraded RAID1 mirror is safe as long as you replace the failed disk and re-sync a new disk as soon as possible. Recovering a degraded Linux software RAID1 volume is covered in the Re-syncing Mirrored RAID volumes guide.

Write Changes to Disk: YES

Your RAID1 volumes and partitions will be created. Depending on your drives and hardware, this can take several minutes to a few hours as the drives sync. However, once sync is complete, any new data will be synced transparently in the background.

Postfix (Mail Server) Configuration
Select Continue.
Choose your mail server:
-No Configuration: If your machine is not intended to be a mail server.
-Local Only: Allows various services to deliver notifications (i.e. drive failure) internally to users on the server. Internet Site, Smarthost, and Satellite are outside the scope of this guide.

User Set-up
-Enter the full name for your first user: i.e., John Smith. However if you’d like to use a shortname, like “administrator” that is fine.

-Enter the user name (shortname) for your account. This will be the name used for your user folder. It must be all lower-case letter or number, with no spaces, like “administrator.

-Enter your password for this user. In Ubuntu, the first user created on any new installation also doubles as the root (superuser) user. It’s a good idea to use a strong password for this account as it will have the power to create, modify, or delete any setting or file on the machine.

-Verify the password for this user.

-Encrypt your home directory. This option encrypts your user folder and can be helpful, usually if you are using installing to a laptop or mobile device. It will help keep others from reading the contents of your user folder when your account is not logged in. However, an encrypted home directory is generally impossible to recover if you lose your password, or the OS crashes in a way that prohibits you from successfully log in anymore. If unsure, choose “No”.

Package Manager
If your company requires you to use a proxy server to access the internet, enter the proxy information. Otherwise, leave blank and Continue.

Configure GRUB
Install Grub to Master Boot Record: YES This will install Grub Bootloader on both drives using:

grub install /dev/sda /dev/sdb

That will allow either drive to boot the OS, even if one drive has failed.

 

Set System Clock
Set system clock to UTC:

Yes: Allows the bios clock to be set to Universal time. Each OS then uses the Time Zone in system preferences to display the correct time.

No: Allows the bios clock to stay at the local time, that is set in the time preferences of the OS. This can be preferable if the machine is not a mobile device, and especially if you intend to boot multiple OS’s. Some operating systems handle time differently, and this can cause the time that is displayed to vary wildly each time you boot to a different OS. To avoid this, choose No.

Installation Complete
If you’ve gotten this far, you should have a successful, RAID1 Ubuntu 10.04 Installation.

Remove your installation disk and select Continue to reboot and login to your new installation.