]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/usb/README.usb
Update
[bacula/rescue] / rescue / linux / usb / README.usb
1
2 This directory is used to build a USB key containing a Kubuntu 8.04 LiveCD
3 with persistent OS files and persistent /home files.
4
5
6 Start by editing the "config" file. Be sure to get your USB_DEV
7 definition correct.  The scripts you need to partition the key and 
8 to write the boot image to it are all in this (usb) directory. 
9
10 After editing the config file, run:
11
12   ./partition_usb_key
13
14 Note, this script will destroy *all* data on the key, and assumes
15 that you have a 3GB or bigger key.  It may work for a 2GB key,
16 but you might want to reduce the size of the second partition.
17
18 ====
19 If you ever want to put the key back to its prior state, *before*
20 running the partition_usb_key, you might consider doing a:
21
22   sfdisk -d /dev/key-device >save_me  
23
24 where key-device is the key device name (e.g. sda).  The
25 output file can be fed back into sfdisk to recreate the original
26 with:
27
28  sfdisk /dev/key-device <save_me
29 ====
30
31 The partition_usb_key script creates three partitions:
32
33  1. kubuntu8  -- USB boot partition containing the OS
34  2. casper-rw -- A writable ext3 partition for saving OS changes
35  3. home-rw   -- A writable ext3 partition for saving /home
36
37 When the key is booted, assuming you choose the first option 
38 (LiveCD), you will be running as user "ubuntu" the password is
39 "bacula", and you will be in /home/ubuntu.  
40
41
42
43 ====
44
45 The directory "remaster" contains the scripts that allow picking
46 apart a Kubuntu Hardy ISO and then updating and recombining the
47 parts into a USB boot image.  The information below is somewhat
48 low level and should not be needed unless you want to do your
49 own remastering either starting from the Kubuntu release or from
50 the Bacula remastered release.
51
52 Note, the sqfs.tar.gz is the whole squashfs unsquashed.  
53
54 The kernel image (vmlinuz) is a copy of the most recent kernel i.e.
55
56   sqfs/boot/vmlinuz-2.6.24-22-generic
57
58 and initrd.gz is a copy of the most recent initrd.img i.e
59
60   sqfs/boot/initrd.img-2.6.24-22-generic
61
62 they are renamed and put in the kubuntu8 partition in:
63
64   casper/vmlinuz
65 and
66   casper/initrd.gz
67
68 respectively.
69
70 Note, initrd.gz is made after fixing the bug in
71 /usr/share/initramfs-tools/scripts/casper 
72 see note 2. in bugs with Kubuntu boot process below.
73
74 When updating the USB root partition (changing something), I 
75 strongly recommend that you work with the disk image then
76 repack it (pack_disk_image) and then run load_disk_image.
77
78
79 Packages needed:
80 apt-get install syslinux mbr
81
82
83 Kubuntu boot tricks:
84 1. Booting with persistence added to the kernel options will permit
85    mounting of a USB casper-rw and home-rw partitions on the USB key.
86    casper-rw is used to store changed OS files, and home-rw is the
87    home directory.
88
89 Bugs with Kubuntu boot process:
90 1. The initrd.gz image must be opened, fixed and the repacked.
91 2. The fix involves removing the ,mode=755 from the mount line for
92    the persistent OS partition (casper-rw) or /cow
93 3. I have removed /etc/rc0.d/S89casper and /etc/rc6.d/S89casper
94    because they are related to a CDROM boot and create false 
95    errors when booting from a USB key.