3 # write the disk info from the current system to the USB
4 # stick. We write it in the home-rw partition
8 if [ ! `whoami` = "root" ] ; then
10 echo "You need to be root to run this shell script"
16 echo "This script will write your current system information to the USB"
17 echo "stick in the home-rw partition (/home/ubuntu)"
19 if [ ! -d ${MOUNT_POINT}/home-rw ] ; then
20 mount ${USB_DEV}3 ${MOUNT_POINT}/home-rw
22 if [ ! -d ${MOUNT_POINT}/home-rw ] ; then
23 echo "Mount of home-rw USB partition failed."
24 echo "Please pre-mount the USB stick and run this script again."
27 cd ${MOUNT_POINT}/home-rw
28 if [ $? -ne 0 ] ; then
29 echo "Could not cd to home-rw USB partition"
34 chown 1000:1000 ubuntu
38 cp -f ${CWD}/write_disk_info_to_usb .