Not sure why there isn’t a whole lot of information on doing this, but I wanted to install Ubuntu 9.04 using the Alternate CD on my EeePC using a USB drive, so here’s a little guide for preparing the installation USB drive. Hopefully someone out there will also find it useful. Don’t hesitate to ask if you have any question about installing Ubuntu this way.
What you need:
- The hd-media image for Jaunty
- The Ubuntu Alternate CD ISO Image (x86 or AMD64)
- A USB drive that will be completely erased, so back it up first
- A computer running Ubuntu (or other GNU/Linux distro)
The Process:
I’m assuming the person following this guide is fairly comfortable with the command line and knows how to determine which device your USB drive is detected as. If you don’t know how to do this, Google is your friend. I’ll only warn about this once, but if you don’t get the right device name, there is a possibility that you will screw up one of your other partitions, possibly hosing your whole system, or at least wiping the wrong partition. On my system the USB drive is detected as /dev/sdb so I will use this in my example, obviously substitute whatever you USB drive is detected as. CONTINUE AT YOUR OWN RISK!
We’re going to do this as root, so be careful!
sudo su # enter your password
Then we’ll setup a temporary location to do our thing in.
mkdir /tmp/altinst && cd /tmp/altinst
Now we’ll download the required files, the hd-media image and the Alternate CD image.
wget http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/hd-media/boot.img.gz
wget http://mirror.csclub.uwaterloo.ca/ubuntu-releases/9.04/ubuntu-9.04-alternate-i386.iso
Note that I’m using a Canadian mirror, feel free to choose another mirror closer to you if you want. They are listed on this page.
The next thing is to erase and prepare the USB drive. This isn’t really necessary if your USB drive already has a single FAT partition that is empty.
Start by blowing away any existing partition table on the disk.
dd if=/dev/zero of=/dev/sdb bs=1M count=1
I’m using cfdisk here to do the partitioning, but use whatever program you want (ex, fdisk, sfdisk, etc).
Using the cfdisk program, create a single primary partition and set its type to 0c (FAT32 LBA). After the partition is created we’ll format it.
Ok, so now that we have a nice clean USB drive with a single FAT partition, we’ll copy the hd-media image onto the USB drive.
zcat boot.img.gz >/dev/sdb1
Now we’re almost done, we just need to copy the Alternate CD image onto the drive. First we’ll mount the partition.
Then we’ll copy the image to the USB drive.
cp ubuntu-9.04-alternate-i386.iso /mnt/
That’s it! You now have USB drive that you can use to install the Ubuntu Alternate CD without a CDROM drive.
You can now delete our working directory: