From 4afca20b7c7b2c265c8c65ff81717723cf2181b2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 3 Jan 2009 16:56:13 +0000 Subject: [PATCH] Updates --- rescue/linux/usb/README.usb | 35 ++++++++++++++++++++++- rescue/linux/usb/remaster/pack_disk_image | 2 +- rescue/linux/usb/write_usb_boot_partition | 7 +++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/rescue/linux/usb/README.usb b/rescue/linux/usb/README.usb index 71d16f5..f2f914c 100644 --- a/rescue/linux/usb/README.usb +++ b/rescue/linux/usb/README.usb @@ -2,6 +2,40 @@ This directory is used to build a USB key containing a Kubuntu 8.04 LiveCD with persistent OS files and persistent /home files. + +Start by editing the "config" file. Be sure to get your USB_DEV +definition correct. The scripts you need to partition the key and +to write the boot image to it are all in this (usb) directory. + +After editing the config file, run: + + ./partition_usb_key + +Note, this script assumes that you have a 3GB or bigger key. It +may work for a 2GB key, but you might want to reduce the size of +the second partition. + +This script creates three partitions: + + 1. kubuntu8 -- USB boot partition containing the OS + 2. casper-rw -- A writable ext3 partition for saving OS changes + 3. home-rw -- A writable ext3 partition for saving /home + +When the key is booted, assuming you choose the first option +(LiveCD), you will be running as user "ubuntu" the password is +"bacula", and you will be in /home/ubuntu. + + + +==== + +The directory "remaster" contains the scripts that allow picking +apart a Kubuntu Hardy ISO and then updating and recombining the +parts into a USB boot image. The information below is somewhat +low level and should not be needed unless you want to do your +own remastering either starting from the Kubuntu release or from +the Bacula remastered release. + Note, the sqfs.tar.gz is the whole squashfs unsquashed. The kernel image (vmlinuz) is a copy of the most recent kernel i.e. @@ -39,7 +73,6 @@ Kubuntu boot tricks: casper-rw is used to store changed OS files, and home-rw is the home directory. - Bugs with Kubuntu boot process: 1. The initrd.gz image must be opened, fixed and the repacked. 2. The fix involves removing the ,mode=755 from the mount line for diff --git a/rescue/linux/usb/remaster/pack_disk_image b/rescue/linux/usb/remaster/pack_disk_image index f7767b0..56c010c 100755 --- a/rescue/linux/usb/remaster/pack_disk_image +++ b/rescue/linux/usb/remaster/pack_disk_image @@ -2,7 +2,7 @@ # # tar the disk image # -. ./config +. ../config rm -f kubuntu8.tar.gz cd $DISK_IMAGE diff --git a/rescue/linux/usb/write_usb_boot_partition b/rescue/linux/usb/write_usb_boot_partition index fe871b1..518a5cb 100755 --- a/rescue/linux/usb/write_usb_boot_partition +++ b/rescue/linux/usb/write_usb_boot_partition @@ -10,8 +10,13 @@ if [ ! `whoami` = "root" ] ; then echo "" exit 1 fi +if [ ! -f ${BOOT_IMAGE} ] ; then + echo "Could not find boot image: ${BOOT_IMAGE}" + exit 1 +fi umount ${USB_DEV}1 2>/dev/null 1>/dev/null + echo "Reformat USB boot partition" mkfs.vfat -F 16 -n kubuntu8 ${USB_DEV}1 mount ${USB_DEV}1 ${MOUNT_POINT}/kubuntu8 @@ -24,10 +29,12 @@ if [ $? -ne 0 ] ; then echo "Could not cd to USB boot partition" exit 1 fi + echo "Detaring boot image ..." tar xfz ${BOOT_IMAGE} cd ${CWD} ls -l ${MOUNT_POINT}/kubuntu8 + echo "syncing ..." sync umount ${MOUNT_POINT}/kubuntu8 -- 2.39.5