Making the commitment to partition your precious laptop’s hard disk in order to install the Ubuntu Linux operating system is not always an easy thing to do. This tutorial will describe in detail how to install Kubuntu on a removable 4GB USB flash drive, and configure the bootloader to boot Linux whenever the drive is connected.
Lately I have been fooling around with Kubuntu on a desktop computer and I really wanted to use it on my laptop. However, I was
hesitant to partition my hard drive because I have a lot of documents and pictures and software that I would hate to lose in the event something went wrong. Additionally, I don’t have a tremendous amount of free space on my hard drive to devote to another operating system. So I decided to try to install Kubuntu on a USB flash drive.
I found some posts in the Ubuntu forums that helped
figure out how to make installing Kubuntu to a USB drive possible; this one was the
It’s very thorough and the thread covers many issues that arise
with different hardware configurations. My experience was slightly
different than what the post describes so I will detail the steps I
took to install Kubuntu on a USB drive.
First off, my laptop is a Dell E1405, and the USB drive I used is the SanDisk Cruzer 4Gb
which periodically goes on sale for a little less than 40 bucks. I
think the write speed is slow but it has a nice orange light which will
dazzle you while you wait. The 2 Gb version will work, but I had to do
a lot of software removal to make it happen (I will be testing Xubuntu
on the 2Gb drive in the near future). I highly recommend just using 4Gb
Secondly, I’m still relatively new to Linux. This certainly isn’t the be-all-end-all tutorial, and I can’t guarantee that these steps will work on hardware other than Dell’s E1405 with an Intel Pro
wireless card, or the San Disk Cruzer USB drive.
####Preparing the USB Drive####
Before you do any thing else. Uninstall **ALL** of the software that
comes pre-installed on the USB drive. When you plug in the USB drive
SanDisk U3 software automatically loads. Use the icon in the system
tray to find the uninstall feature. It is a bit hidden and I don’t
remember exactly what tab it is under. It might require a right click.
After I uninstalled U3 I also re-formatted the drive, not sure if it is
Head over to the Kubuntu download page and download the Feisty Fawn 7.04 Live CD and the Alternate install CD. There is a Ubuntu Documentation page that will tell you how to burn the files on to a CD to make a bootable .ISO image using the Infra Recorder
software. (The Live CD is not part of the actual install process but it
is helpful in determining what you computer calls the devices that we
will be installing Kubuntu on. It is also nice to have around for
After your CDs are burned make sure to take them out of the CD drive.
You should then restart your computer and enter the BIOS Setup page as
your computer restarts. Verify that your computer will boot in the
order of CD, USB, then Hard Drive.
####Finding Your USB (Device Node) Name####
Insert the Live CD and exit the BIOS. The live CD takes a little while
to load. Once you are on the Kubuntu Desktop, plug in your USB device.
You can find the device node by putting the mouse pointer over the
device icon or by using the system menu icon, the second icon from the
left on the bottom panel menu, and select “Storage Media.” In the Storage
Media expanded menu you can see the internal drive and the USB drive.
Write down the name. On my Dell E1405 the USB drive is listed as
`/dev/sdb` and the hard drive as `/dev/sda` with the various drive
partitions numbered like `/dev/sda2`. So I know that I will be doing all of
my installing to sdb and NOT my internal drive sda. Other computers use
device nodes like hda or hdb.
When you are ready to install, log out and get the Live CD out of the
tray. When you restart the computer, enter the BIOS and insert the
Alternate Install CD. Exit the BIOS. The Install Menu screen be present
The “Install in Text Mode” is the first option. Select it for a normal
install. I’ll just walk through my notes here and what I remember the
installer asking and the choices I made. IMPORTANT: Be careful not to
install GRUB Loader to the Master Boot Record! This step comes after the
timezone and username selections.
+ **Choose your Language and Country.**
+ **Detect keyboard layout.** For US keyboards select “No” then select Origin–>U.S. English and Layout –>U.S. English.
+ **Network configuration.** If you are not connected to a network you
can hit “Cancel” or if a network is not present select “Configure
+ **Hostname.** Choose a name for your computer.
+ **Partition Disks.** Select “Guided – use entire disk.” Select your USB drive. It should show a description of your USB drive and include the device node that you found earlier (e.g. `sdb`). *Do NOT* choose your internal drive!
+ **Finish Partitions and write changes.** Write to disk–> yes
+ **Choose Timezone**
+ **Choose Username, Username Account, and Password.**
your hard drive.
+ **Write in your USB device node.** Once again, mine was: `/dev/sdb`. (The text says you could use (`sdb`) instead of `/dev/sdb` but the installer didn’t like when I tried it that way.)
####Configuring the GRUB Bootloader####
Your installation should now be complete. Be sure to eject the disk before you shut down your computer.
When you start up again you will have to do some editing in the GRUB
menu. GRUB is looking at the wrong drive to boot so we need to tell it
to look at the correct drive. This editing is temporary for this start
When the GRUB menu appears, use an arrow key to move the line selection
so that the automatic start up timer stops. If you missed the timer the
system will try to boot and will give you some sort of Error 17 message
about invalid partitions or something. The ESC key should bring you
back to the GRUB menu.
Select the first line in the grub menu “Ubuntu Kernel….”
Type ‘e’ to edit.
In the next menu select the first line `Root (hd1,0)`.
Type ‘e’ to edit.
Use the arrows and back space to edit the line
`grub edit> root (hd1,0)` to read `grub edit> root (hd0,0)`
Hit the ENTER key to make the change and you will be directed back to the previous menu.
Now hit “b” to boot Kubuntu!
You can make this boot change permanent by entering the terminal
from Kmenu-> System-> Konsole(Terminal Program)
**Editing GRUB menu.lst**
On my first attempt at installing Kubuntu on a USB I edited the `menu.lst` to make the
permanent change. It works fine until you do a kernel update. In my latest attempt I have not permanently edited the file and I have not done a kernel update.
To edit type:
sudo nano /boot/grub/menu.lst
Use the arrow keys to navigate down until you see this just past the line that reads
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
change `root (hd1,0)` to `(hd0,0)`
make this change for the recovery mode “title Ubuntu, kernel
2.6.20-15-generic (recovery mode)” and memtest “title Ubuntu,
memtest86+” too. Both are the right underneath the first group that you
The tutorial mentions making changes to
`## default grub root device`
`## e.g. groot=(hd0,0)`
so that `# groot=(hd1,0)` also is changed to `(hd1,0)`. One user posted
a comment about the kernel update reading the line with only one `#` to
determine the location of the Boot Loader. As I mentioned previously, I
have not made these permanent edits yet and do not know if they work. I
bricked my USB Kubuntu after a kernel update and had to start over
again. I’ll try making these edits in the near future and post my
findings when I can. In the meantime I edit the GRUB every time I
start up … I think it’s kinda fun.
If your hardware differs from mine or something is not working,
check out the tutorial I mentioned above. This tutorial makes many
edits in the terminal which I found my with hardware configuration or
Kubuntu version to be unnecessary.
The only major glitch I had with hardware was my screen resolution. The
`intel i810` driver didn’t want to give me the native 1280×800
resolution. There was a quick fix found here.
Once again there are several steps listed, but for some reason all I had to do was go to the Terminal and type:
sudo apt-get install 915resolution
After logging out and back in, my resolution worked. Again if you have
troubles or different hardware that link is a good place to start and
you may need to follow the additional steps to get your screen
The other nice thing is that you can mount your internal hard drive so
that you can read (and possibly write) files. This is great when you
need to access something from your hard drive and you don’t want to
shutdown your computer and restart without the USB.
That’s all for now. Hope this helps.