Install Kubuntu 8.04.1 to a Flash Drive using Linux

USB Kubuntu 8.04.1 Persistent Linux installation from Linux without using a CDROM. Some Linux users prefer Kubuntu over Ubuntu because it uses the KDE desktop environment instead of Gnome. In the following, we cover the process of installing Kubuntu 8.04.1 Hardy Heron to a USB flash drive from within Linux. The persistence feature is used to allow the user to save and restore changes on subsequent boots. If you already have a working Linux installation on your PC and do not wish to use or your system does not have a CD drive, this tutorial is for you.

Prerequisites for this Kubuntu 8.04.1 USB installation:

  • Working Linux environment (we used a local Kubuntu installation)
  • Established internet connection
  • 1GB or larger USB flash drive

How to install Kubuntu 8.04.1 to a USB flash drive via Linux:

  1. Insert a 1GB or larger USB flash drive (2GB+ recommended)
  2. Open a terminal and type sudo su
  3. As one line, type wget
  4. Type mount -o loop -tiso9660 kubuntu*.iso /cdrom
  5. Type fdisk -l to list available drives/partitions (note which device is your flash drive I.E. /dev/sdb). Throughout this tutorial, replace all instances of x with your flash drive letter. For example, if your flash drive is sdb, replace x with b.
  6. Type umount /dev/sdx1
  7. Type fdisk /dev/sdx
    • type p to show the existing partition and d to delete it
    • type p again to show any remaining partitions (if partitions exist, repeat the previous step)
    • type n to make a new partition
    • type p for primary partition
      • type 1 to make this the first partition
      • hit enter to use the default 1st cylinder
      • type +750M to set the partition size
      • type a to make this partition active
      • type 1 to select partition 1
      • type t to change the partition filesystem
      • type 6 to select the fat16 file system
    • type n to make another new partition
    • type p for primary partition
      • type 2 to make this the second partition
      • hit enter to use the default cylinder
      • hit enter again to use the default last cylinder
      • type w to write the new partition table
  8. Type umount /dev/sdx1 to unmount the partition
  9. Type mkfs.vfat -F 16 -n kubuntu8 /dev/sdx1 to format the first partition
  10. Type umount /dev/sdx2 to ensure the partition is unmounted
  11. Type mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2 to format the second partition
  12. Remove and re-insert your flash drive (if prompted that a new medium has been detected, select to open in a new window and click ok)
  13. Back at the terminal, type sudo apt-get install syslinux mtools
  14. Type syslinux -sf /dev/sdx1
  15. Type cd /cdrom
  16. Type cp -rfv casper dists install pics pool preseed .disk isolinux/* md5sum.txt README.diskdefines install/mt86plus /media/kubuntu8
  17. Type cd /media/kubuntu8
  18. Type wget
  19. Type cd casper
  20. Type rm initrd.gz
  21. Type wget
  22. Reboot your computer and set your system BIOS boot priority to boot from the USB stick.

If everything has gone as it should, you should be able to boot kubuntu 8.04 from the USB flash device and by default it should save your changes, restoring them on boot.

Notes: If your having trouble getting Ubuntu to boot, your memory stick may have a corrupted MBR. To repair the MBR of your USB device, at the terminal type sudo apt-get install lilo then type lilo -M /dev/sdx (replacing x with the letter of your flash device)

*Kubuntu is a product of Canonical Ltd