Creating a Kubuntu 9.04 USB Key.

As of this wrinting I'm unaware of a USB image for Kubuntu 9.04 so in order for me to install it on my CD Driveless Apire One, my options were to either get a USB DVD Drive or make my own USB memory stick installer. I chose the second option, and here's what I did to make it.

Summary

  • Obtain a USB Key with at least 700M free space.
  • Mount the drive
  • Copy the contents of the Kubuntu i386 CD to the drive.
  • Install the GRUB bootloader onto the USB Key.

These instructions are based on the user having access to a running Kubuntu desktop.

First we need something to copy to the USB key. This can come from either a CD image or a physical CD. If your using a CD image, go straight to Step 1b.

Step 1a. - Do this if using a physical CD.

If your using a physical CD, insert in into you machine, and navigate to its contents with Dolphin.

 

Make sure that show hidden files is ticked.

You should see 13 Items on the CD.

You must have “Show hidden files” selected so that we copy the entire contents of the CD.

Select all the items and select "Copy"

Now onto Step 2.

Step 1b. - Do this if using a CD image.

Mounting a CD image to a folder.

There's two parts to mounting a CD image to a folder, one is the CD image, and the other is the folder to mount in to.

First, make a folder to mount the CD image to in your home directory.

Now we need to open a Konsole to execute a mount command. It has the following format.

sudo mount -o loop location-of-image-file folder-to-mount-to

For my system the command was

sudo mount -o loop kubuntu-9.04-desktop-i386.iso cd

 

Launch a Konsole session.

Execute the mount command.

Now that the image is mounted, you can navigate into the folder you mounted it to and copy the files from it as if you had inserted a physical CD into a CD drive.

Make sure that "Show Hidden files" is selected or you will miss files that are needed.

Select all the files, right click one, and select "Copy"
 

Now onto step 2.

Step 2 – Insert USB memory key and copy the files onto it.

Insert the USB key and navigate to it with Dolphin.

 

Right click a blank area and select "Paste 13 items"
 

If your copying to a FAT32 formatted USB key you'll see this pop up. Click "AutoSkip"

This will take a while. If you're copying to a USB key that's formatted to FAT32, then you'll see an error about creating symlinks. You can just press “AutoSkip” as these symlinks aren't required and the procedure will succeed without them.

Step 3 – Install GRUB onto the USB key.

Now we need to install GRUB onto the memory key which is done with the grub-install command. Before we install GRUB, we have to find out two things from the system and they are:

  1. The system device that represents the USB key, and
  2. The folder that the USB key is mounted to.

We'll need a command console to find these things out so launch one.

Finding the system device that represents the USB key.

For this we use the dmesg command which should output something similar to this. From this example output we can see that in this case the device has been called sdd and because devices live in the /dev directory the full device name would be /dev/sdd. Your system may call your USB key something other than sdd.

From this we can see that the USB key is device /dev/sdd

Finding the folder that the USB key is mounted to.

To do this we use the mount command.

mount<Enter>

 

From this we can see the device is mounted on the /media/USB-Key directory.

So now we know the device is called /dev/sdd and it's mounted on /media/USB-Key so the command to install GRUB onto it would look like:

sudo grub-install –root-directory=/media/USB-Key /dev/sdd

 

The output of the grub-install command.

Once the grub-install command is finished, there should be a boot folder in the USB key.

There should now be a boot folder created by grub-installer.

Navigate to the grub folder that's inside the boot folder with Dolphin and follow these steps.

Create a text file

Call the text file menu.lst

Note: That's menu.lst as in list, not menu.1st as in first!!!!

Click the empty text file and kate should start.

The Kate text editor showing blank content.

Copy and paste the following text into the file and save it.

# menu.lst - Customized for Kubuntu Live Desktop 6.06
# MJW 8 Jul 2006

default 0
timeout 3
color white/blue yellow/blue

title Kubuntu Live Desktop (Persistent)
root (hd0,0)
kernel /casper/vmlinuz boot=casper persistent ramdisk_size=1048576 root=/dev/ram rw quiet splash--
initrd /casper/initrd.gz
boot

title Kubuntu Live Desktop
root (hd0,0)
kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw quiet splash--
initrd /casper/initrd.gz
boot

title Kubuntu Live Desktop (Safe Graphics Mode, Verbose Startup)
root (hd0,0)
kernel /casper/vmlinuz boot=casper xforcevesa ramdisk_size=1048576 root=/dev/ram rw --
initrd /casper/initrd.gz
boot

title Memory Test
root (hd0,0)
kernel /install/mt86plus
boot

 

Save the file.

Safely remove the USB key and try to boot from it.

And that's all there is to it. Happy Kubunting.

Copyright (c) 2009 Greg Newsome all rights reserved.