Installing Ubuntu or Kubuntu, 6.06.1 LTS "Dapper Drake", on a Single/Multi -Boot RAID System - Page 2

Want to support HowtoForge? Become a subscriber!
 
Submitted by gniemcew (Contact Author) (Forums) on Wed, 2007-02-07 17:40. ::

Partitioning Your Hard Disk

You need to create the following:

  1. A Linux "boot partition", used to hold system boot files, ~75MB.
  2. A Linux "swap partition", used for virtual memory, equal in size to your amount of RAM, or ~2GB, whichever is greater.
  3. A Linux "root partition", used to hold all other files, ~10GB.

Remember that you cannot have more than four primary partitions on a single hard disk, so if you already have Windows installed, you will first need to create an extended partition across the entire free hard disk space, followed by at least three logical disks inside the extended partition.

Use fdisk to partition your system:

fdisk $SETUP_DEV_HDD

Sample fdisk run (an extended partition, a 75MB boot logical drive, 2GB swap logical drive, 3GB root logical drive), with printouts of the partition table, as it is expanded:

Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/isw_eaaicdchgi_Volume01               1         123      987966    7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume02             124         246      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume03             247         369      987997+   7  HPFS/NTFS
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Selected partition 4
First cylinder (370-1044, default 370):
Using default value 370
Last cylinder or +size or +sizeM or +sizeK (370-1044, default 1044):
Using default value 1044
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/isw_eaaicdchgi_Volume01               1         123      987966    7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume02             124         246      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume03             247         369      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume04             370        1044     5421937+   5  Extended
Command (m for help): n
First cylinder (370-1044, default 370):
Using default value 370
Last cylinder or +size or +sizeM or +sizeK (370-1044, default 1044): +75M
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/isw_eaaicdchgi_Volume01               1         123      987966    7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume02             124         246      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume03             247         369      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume04             370        1044     5421937+   5  Extended
/dev/mapper/isw_eaaicdchgi_Volume05             370         379       80293+  83  Linux
Command (m for help): n
First cylinder (380-1044, default 380):
Using default value 380
Last cylinder or +size or +sizeM or +sizeK (380-1044, default 1044): +2G
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/isw_eaaicdchgi_Volume01               1         123      987966    7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume02             124         246      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume03             247         369      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume04             370        1044     5421937+   5  Extended
/dev/mapper/isw_eaaicdchgi_Volume05             370         379       80293+  83  Linux
/dev/mapper/isw_eaaicdchgi_Volume06             380         623     1959898+  83  Linux
Command (m for help): n
First cylinder (624-1044, default 624):
Using default value 624
Last cylinder or +size or +sizeM or +sizeK (624-1044, default 1044): +3G
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/isw_eaaicdchgi_Volume01               1         123      987966    7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume02             124         246      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume03             247         369      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume04             370        1044     5421937+   5  Extended
/dev/mapper/isw_eaaicdchgi_Volume05             370         379       80293+  83  Linux
/dev/mapper/isw_eaaicdchgi_Volume06             380         623     1959898+  83  Linux
/dev/mapper/isw_eaaicdchgi_Volume07             624         989     2939863+  83  Linux
Command (m for help): t
Partition number (1-7): 6
Hex code (type L to list codes): 82
Changed system type of partition 6 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/mapper/isw_eaaicdchgi_Volume01               1         123      987966    7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume02             124         246      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume03             247         369      987997+   7  HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume04             370        1044     5421937+   5  Extended
/dev/mapper/isw_eaaicdchgi_Volume05             370         379       80293+  83  Linux
/dev/mapper/isw_eaaicdchgi_Volume06             380         623     1959898+  82  Linux swap / Solaris
/dev/mapper/isw_eaaicdchgi_Volume07             624         989     2939863+  83  Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

Do not forget to assign appropriate partition types, 0x83 for boot and root, 0x82 for swap. Once your partitioning run is complete, instruct the RAID subsystem to refresh its partition information:

dmraid -ay

However, to be on the safe side, you might want to reboot, instead:

shutdown -r now

Examine your hard disk again:

fdisk -lu $SETUP_DEV_HDD

/dev/mapper/isw_eaaicdchgi_Volume0p1 * 63 83891429 41945683+ 7 HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume0p2 83891430 167782859 41945715 7 HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume0p3 167782860 209728574 20972857+ 7 HPFS/NTFS
/dev/mapper/isw_eaaicdchgi_Volume0p4 209728575 290439134 40355280 f W95 Ext'd (LBA)
/dev/mapper/isw_eaaicdchgi_Volume0p5 209728638 209873159 72261 83 Linux
/dev/mapper/isw_eaaicdchgi_Volume0p6 209873223 214082189 2104483+ 82 Linux swap / Solaris
/dev/mapper/isw_eaaicdchgi_Volume0p7 214082253 235063079 10490413+ 83 Linux

This is the most important step in the entire installation: match up your device file names with environment variables representing boot, swap, and root partitions:

export SETUP_DEV_BOOT=/dev/mapper/isw_eaaicdchgi_Volume05
export SETUP_DEV_SWAP=/dev/mapper/isw_eaaicdchgi_Volume06
export SETUP_DEV_ROOT=/dev/mapper/isw_eaaicdchgi_Volume07

Do not make a mistake when defining the three environment variables above. If you do, quite likely your system is history.

We ignore the /dev/mapper/isw_eaaicdchgi_Volume04 partition, since it is an extended partition, serving only as a container for logical disks.

If you plan to dual-boot with Windows, also define an environment variable for the partition which has been marked by Windows with an asterisk ("*", Boot, above).

export SETUP_DEV_WIN=/dev/mapper/isw_eaaicdchgi_Volume01

Configuring the Installation

Choose the Ubuntu version to install:

export SETUP_UBUNTU_VER=dapper

Choose a default locale:

export SETUP_LOCALE=en_US.UTF-8

Choose a CPU architecture for an operating system kernel and GRUB, a boot loader. Use 386 when unsure, 686 for PPro/Celeron/PII/PIII/PIV, or 686-smp for dual-core and quad-core systems. For other options, consult Ubuntu Package List.

export SETUP_CPU_UBUNTU=686-smp
export SETUP_CPU_GRUB=i386-pc

Choose a name for a new user of the system:

export SETUP_USER=frankie-bronx

Assembling a New System Inside of a Live-DVD System

Initialize (format) your new filesystems (do not try reiserfs on a boot partition):

mkfs.ext3 $SETUP_DEV_BOOT
mkswap $SETUP_DEV_SWAP
swapon $SETUP_DEV_SWAP
mkfs.reiserfs $SETUP_DEV_ROOT

Create a temporary file structure to hold the new installation while we construct it:

mkdir /install
mount -t reiserfs $SETUP_DEV_ROOT /install
mkdir /install/boot
mount -t ext3 $SETUP_DEV_BOOT /install/boot
mkdir /install/dev
mount --bind /dev /install/dev

Install a base system:

apt-get install debootstrap
debootstrap $SETUP_UBUNTU_VER /install

Copy a few critical system configuration files from your Live-DVD system to the new installation system:

cp /etc/resolv.conf /install/etc/
cp /etc/hosts /install/etc/
cp /etc/hostname /install/etc/
cp /etc/apt/sources.list /install/etc/apt/
cp /etc/network/interfaces /install/etc/network/

Share the DVD disc:

mkdir /install/cdrom
mount --bind /cdrom /install/cdrom


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.