7 if [ ! `whoami` = "root" ] ; then
9 echo "You need to be root to run this shell script"
13 if [ ! -f ${BOOT_IMAGE} ] ; then
14 echo "Could not find boot image: ${BOOT_IMAGE}"
18 umount ${USB_DEV}1 2>/dev/null 1>/dev/null
20 echo "Reformat USB boot partition"
21 mkfs.vfat -F 16 -n kubuntu8 ${USB_DEV}1
22 if [ ! -d ${MOUNT_POINT}/kubuntu8 ] ; then
23 mkdir -p ${MOUNT_POINT}/kubuntu8
26 mount ${USB_DEV}1 ${MOUNT_POINT}/kubuntu8
27 if [ $? -ne 0 ] ; then
28 echo "Mount of USB boot partition failed."
31 cd ${MOUNT_POINT}/kubuntu8
32 if [ $? -ne 0 ] ; then
33 echo "Could not cd to USB boot partition"
37 echo "Detaring boot image ..."
41 syslinux -sf ${USB_DEV}1
42 install-mbr -p1 ${USB_DEV}
46 umount ${MOUNT_POINT}/kubuntu8
47 if [ "x$created" = "xyes" ] ; then
48 rmdir ${MOUNT_POINT}/kubuntu8