LiveUsbPendrivePersistent

Revision 1 as of 2006-06-16 21:29:07

Clear message

Describe LiveUsbPendrivePersistent here. Page under construction.

Introduction

It is possible to have Ubuntu on a USB pendrive with persistent mode. This means that you can boot from a USB pendrive and keep customisations such as keyboard layout, numlock, preferences, additional packages saved on the pendrive. This can be done using linux or windows. You will need a USB pendrive of 1 GB or more. This page is written after having tested the instructions on a Peak III 1 GB pendrive.

Installing Ubuntu on USB pendrive using Linux

Preparing the USB pendrive

Plug in the pendrive and check its device name :

sudo fdisk -l

We are going to suppose that its name is /dev/sda1. Please replace sda1 by the name you find for your pen drive. Double check it !

Now we are going to create 2 partitions : 1 partition of 700 MB with a fat32 filesystem and 1 partition with the rest of the pendrive space with volume name "casper-rw" and ext2 filesystem. The first partition will be made active.

Go in terminal and unmount the drive :

sudo umount /dev/sda

Fire up fdisk for the pendrive :

sudo fdisk /dev/sda1

This will give you the fdisk prompt. Look to what you have on the pendrive. Check if you have to backup the data you have on it. 'p' will print the content of /dev/sda. If you have partitions on it remove them ('d', 'partition number', 'w'). Make partition 1 : 'n' for new partition, 'p' to make it a primary partition, then just press enter to accept the proposed starting cylinder, '+700M' to make its size 700 MB. Then 'a' to make it the active partition. Make partition 2 : 'n' for new partition, 'p' to make it a primary partition, then just press enter to accept the proposed starting cylinder, then press enter to accept the proposed ending cylinder. Save and quit fdisk with 'w' to write the new settings. Check the result : sudo fdisk -l You should see the 2 partitions with the first marked with a * because it is active.

Then we will put a filesystem on the partitions and give them the name 'dapper' (or any other name you want) and 'casper-rw' (do not change this name) :

sudo mkfs.vfat -F 32 -n dapper /dev/sda1
sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sda2

Take out the pendrive and put it back. Ubuntu Dapper will mount the pendrive automatically.