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

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

Share this page:

2 Comment(s)

Add comment

Comments

From: at: 2007-03-26 12:29:41

I've followed this guide for an installation on edgy eft (6.10) (kubuntu desktop) for a RAID 1 (mirror) setup with the following changes:

I used the dmraid backport package http://tormod.freeshell.org/linux/dmraid/dmraid_1.0.0.rc13-2ubuntu2tormod~edgy_i386.deb

I used the package ubuntu-standard rather than ubuntu-base since this and ubuntu-minimal  (which is already installed by this point) obsoletes it.

I used the package linux-generic rather than linux-$SETUP_CPU_UBUNTU since this obsoletes most of the linux kernel installs.

 [I chose not to install envy].

Also starting X without rebooting seemed to be a bad idea; The X system hung and on reboot I could not get a desktop and had to use the 'safe' environment . This turned out to be because a lot of related files it created in my home directory where owned by root rather than myself.  Some of the base related files where also in the same state.  Taking ownership (including group) of all files in my home directory fixed this problem.

My user also needed adding to group audio for sound to work.

 

Hardware:

Abit AM2 KN9 Ultra

AMD AM2 Dual-Core 4400

From: at: 2007-05-06 11:50:00

A few experiences with Feisty...

1.: 

 During grub install the line

cp /lib/grub/$SETUP_CPU_GRUB/* /boot/grub/

fails because now the stage files are put in /usr/lib/grub/$SETUP_CPU_GRUB

An easy way of finding out where the stage files are is "dpkg -L grub" 

2.:

 On boot I got errors like "no block device found".

I had to add "dodmraid" to the kernel line in grub. I.e. when booting press e to edit the boot parameters, press e on the kernel line and add "dodmraid". This got the boot process going. You may need to remove the "silent" and "splash" keywords also.

3.:

During boot everything froze. This was because of this bug:

 https://launchpad.net/ubuntu/+source/initramfs-tools/+bug/83231

 The solution was to add the line "/sbin/udevsettle --timeout 10" to _the end of_ the file

/usr/share/initramfs-tools/scripts/init-premount/udev. Then do "update-initramfs -u" to recreate the ramdisk image.

 

Fixing these things got the base install up and running.

In addition my tty screens (pressing Ctrl-Alt-F1 to F6) didnt work. They gave a blank screen. Haven't found the solution for this yet.

 All in all, not as smooth as I would have liked... But still, the NIC and sound of my Nvidia-based hw was correctly detected and configured. No problems there, and I now have KDE running without any obvious problems (other than the ttys ;).