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

Activating the New System

"Activate" the new, virtual installation:

chroot /install
mount -t proc proc /proc
mount -t sysfs sysfs /sys

Create a replacement apt software package source file to install everything from a DVD disc, but to avoid downloading updates:

cp /etc/apt/sources.list /etc/apt/sources.list.full
echo "# `date`" > /etc/apt/sources.list
echo "deb file:/cdrom $SETUP_UBUNTU_VER main restricted" >> /etc/apt/sources.list
echo "deb $SETUP_UBUNTU_VER main restricted" >> /etc/apt/sources.list

The file:/cdrom entry instead of apt-cdrom add is used in sources.list to avoid re-mounting problems.


# Sun Jan 28 11:21:48 UTC 2007
deb file:/cdrom dapper main restricted
deb dapper main restricted

Request that system software package manager, apt, refreshes its list of available packages:

apt-get update

Setup a default locale and a local time zone:

locale-gen $SETUP_LOCALE

We will need the Feisty Fawn RAID subsystem in our new installation as well, so re-install dmraid from a locally downloaded deb archive, using dpkg:

apt-get install wget
dpkg -i ./dmraid_1.0.0.rc13-2ubuntu2tormod~dapper_i386.deb
rm ./dmraid_1.0.0.rc13-2ubuntu2tormod~dapper_i386.deb

Setup fstab, a file describing our filesystems, used by the operating system itself, apt, and other user applications:

echo "# `date`" > /etc/fstab
echo "proc /proc proc defaults 0 0" >> /etc/fstab
echo "sys /sys sysfs defaults 0 0" >> /etc/fstab
echo "$SETUP_DEV_SWAP none swap sw 0 0" >> /etc/fstab
echo "$SETUP_DEV_ROOT / reiserfs defaults 0 1" >> /etc/fstab
echo "$SETUP_DEV_BOOT /boot ext3 defaults 0 2" >> /etc/fstab
echo "/dev/cdrw /cdrom iso9660,udf noauto,owner,ro 0 0" >> /etc/fstab


# Sun Jan 28 06:23:56 EST 2007
proc /proc proc defaults 0 0
sys /sys sysfs defaults 0 0
/dev/mapper/isw_eaaicdchgi_Volume06 none swap sw 0 0
/dev/mapper/isw_eaaicdchgi_Volume07 / reiserfs defaults 0 1
/dev/mapper/isw_eaaicdchgi_Volume05 /boot ext3 defaults 0 2
/dev/cdrw /cdrom iso9660,udf noauto,owner,ro 0 0

Instruct the kernel installer how to create image files and image links. Using relative symlinks will ensure that your system will boot without problems across kernel upgrades:

echo "# `date`" > /etc/kernel-img.conf
echo "image_in_boot = 1" >> /etc/kernel-img.conf
echo "do_symlinks = 1" >> /etc/kernel-img.conf
echo "relative_links = 1" >> /etc/kernel-img.conf
echo "warn_initrd = 0" >> /etc/kernel-img.conf

Install a kernel and an Ubuntu base distribution:

apt-get install ubuntu-base
apt-get install linux-$SETUP_CPU_UBUNTU

Synchronize the system clock with an NTP (Network Time Protocol) server over the Internet:

apt-get install ntp ntpdate

Create a new system user and allow it to execute commands as root:

useradd -m -s /bin/bash $SETUP_USER
passwd $SETUP_USER
echo "$SETUP_USER ALL=(ALL) ALL" >> /etc/sudoers

Disable root login altogether for security reasons:

passwd -l root

Install GRUB, a boot loader, and setup its basic file structure:

apt-get install grub
mkdir /boot/grub
cp /lib/grub/$SETUP_CPU_GRUB/* /boot/grub/

Assemble a GRUB batch file and instruct GRUB to install itself on your hard disk. We use perl to extract a boot partition number and subtract 1 from it, in order to change it into a boot partition index that GRUB expects:

export SETUP_GRUB_ROOT=`perl -e "print substr(\"$SETUP_DEV_BOOT\",length(\"$SETUP_DEV_HDD\"), length(\"$SETUP_DEV_BOOT\")-length(\"$SETUP_DEV_HDD\")) - 1"`
echo "device (hd0) $SETUP_DEV_HDD" > /boot/grub/grub.batch
echo "root (hd0,$SETUP_GRUB_ROOT)" >> /boot/grub/grub.batch
echo "setup (hd0)" >> /boot/grub/grub.batch


device (hd0) /dev/mapper/isw_eaaicdchgi_Volume0
root (hd0,4)
setup (hd0)

cat /boot/grub/grub.batch | grub --batch

Assemble a GRUB boot menu control file:

echo "# `date`" > /boot/grub/menu.lst
echo "default 0" >> /boot/grub/menu.lst
echo "timeout 8" >> /boot/grub/menu.lst
echo "### BEGIN AUTOMAGIC KERNELS LIST" >> /boot/grub/menu.lst
echo "title Ubuntu Linux" >> /boot/grub/menu.lst
echo "root (hd0,$SETUP_GRUB_ROOT)" >> /boot/grub/menu.lst
echo "kernel /vmlinuz root=$SETUP_DEV_ROOT ro quiet splash" >> /boot/grub/menu.lst
echo "initrd /initrd.img" >> /boot/grub/menu.lst
echo "### END DEBIAN AUTOMAGIC KERNELS LIST" >> /boot/grub/menu.lst

If you use Windows, add it as a boot option as well (recall the SETUP_GRUB_WIN environment variable you have created earlier?):

export SETUP_GRUB_ROOT=`perl -e "print substr(\"$SETUP_DEV_WIN\",length(\"$SETUP_DEV_HDD\"), length(\"$SETUP_DEV_WIN\")-length(\"$SETUP_DEV_HDD\")) - 1"`
echo "title Windows" >> /boot/grub/menu.lst
echo "rootnoverify (hd0,$SETUP_GRUB_WIN)" >> /boot/grub/menu.lst
echo "chainloader +1" >> /boot/grub/menu.lst


# Sun Jan 28 06:28:23 EST 2007
default 0
timeout 8
title Ubuntu Linux
root (hd0,4)
kernel /vmlinuz root=/dev/mapper/isw_eaaicdchgi_Volume07 ro quiet splash
initrd /initrd.img
title Windows
rootnoverify (hd0,0)
chainloader +1

Users of the latest ATI and NVIDIA graphics cards (such as GeForce 8800, ...) might want at this point to install envy, an automated vendor driver installer:

dpkg -i ./envy_0.8.1-0ubuntu3_all.deb
rm ./envy_0.8.1-0ubuntu3_all.deb

The Moment of Truth: Booting

Reboot into the new installation:

shutdown -r now

Once booted, login as the user created previously, re-acquire root privileges, and re-mount the DVD disc:

sudo -s
apt-cdrom add

If you run into mount errors, replace /dev/cdrw (a burner drive) with /dev/cdrom (a read-only drive) in your fstab file, using sed, and retry:

sed -i -e 's/^\/dev\/cdrw/\/dev\/cdrom/g' /etc/fstab
apt-cdrom add

Request that system software package manager, apt, refreshes its list of available packages:

apt-get update

Choose a graphical desktop environment, ubuntu for GNOME, kubuntu for KDE:

export SETUP_DESKTOP_ENV=kubuntu

Install your desktop environment, make sure to select a preferred or a native LCD resolution when asked to Select the video modes... by the installer.

apt-get install fontconfig
apt-get install $SETUP_DESKTOP_ENV-desktop

Restore the full apt package source list, request that system software package manager, apt, refreshes its list of available packages, and upgrade the entire system:

mv /etc/apt/sources.list.full /etc/apt/sources.list
apt-get update
apt-get dist-upgrade

Users of the latest ATI and NVIDIA graphics cards (such as GeForce 8800) might want at this point to launch envy, an automated vendor driver installer:


Start the desktop:


Optional: a Graphical Boot Loader

Replace the not-so-hot textual GRUB with a graphical boot menu screen.

Start a web browser and visit this thread in Ubuntu Forums. Choose a theme file, download it, and save it to your home directory. I chose the red theme.

Unpack the theme file and move it to your boot partition:

tar xvf
mv /boot/
rm ./

Download GRUB-GfxBoot using a web browser and save it to your home directory. Uninstall the textual GRUB and install the graphical version:

apt-get remove grub
dpkg -i ./grub-gfxboot_0.97-5_i386.deb
rm ./grub-gfxboot_0.97-5_i386.deb

Re-setup your environment variables:

export SETUP_DEV_HDD=/dev/mapper/isw_eaaicdchgi_Volume0
export SETUP_DEV_BOOT=/dev/mapper/isw_eaaicdchgi_Volume05
export SETUP_GRUB_ROOT=`perl -e "print substr(\"$SETUP_DEV_BOOT\",length(\"$SETUP_DEV_HDD\"), length(\"$SETUP_DEV_BOOT\")-length(\"$SETUP_DEV_HDD\")) - 1"`
export SETUP_CPU_GRUB=i386-pc

Re-copy GRUB library files to your GRUB staging directory on the boot partition:

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

Re-initiate GRUB:

cat /boot/grub/grub.batch | grub --batch

Insert a gfxmenu keyword on top of GRUB's menu control file:

sed -i -e "1igfxmenu (hd0,$SETUP_GRUB_ROOT)/" /boot/grub/menu.lst


Enjoy your new Ubuntu installation!

Share this page:

Suggested articles

2 Comment(s)

Add comment



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

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.



Abit AM2 KN9 Ultra

AMD AM2 Dual-Core 4400


A few experiences with Feisty...


 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" 


 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.


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

 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 ;).