3 # Partition the USB stick -- the stick is assumed to be at least 3GB in size
5 # First delete all existing partitions
9 if [ ! `whoami` = "root" ] ; then
11 echo "You need to be root to run this shell script"
15 if [ "x$USB_DEV" = "x" ] ; then
16 if [ "x$1" = "x" ] ; then
17 echo "You must supply the USB device name on the command line or in USB_DEV"
23 echo "This script will distroy everything on $dev"
26 echo "Answer yes to continue "
28 if [ "$a" != "yes" ] ; then
29 echo "Device $USB_DEV unchanged"
32 sfdisk -l $USB_DEV >original-partitioning.txt
65 mkfs.vfat -F 16 -n kubuntu8 ${USB_DEV}1
67 mkfs.ext3 -j -b 4096 -L casper-rw ${USB_DEV}2
68 # Do fs checking every 100 mounts or 360 days
69 tune2fs -c 100 -i 360 ${USB_DEV}2
71 mkfs.ext3 -j -b 4096 -L home-rw ${USB_DEV}3
72 tune2fs -c 100 -i 360 ${USB_DEV}3
75 echo "New partitioning is:"