3 --------------HOW TO CREATE A NEW USB KEY (CHANGE DISTRIB)----------------
6 mount -o loop distrib.iso /tmp/distrib
10 mount -o loop -t squashfs /tmp/distrib/casper/filesystem.squashfs /tmp/squash
13 rsync -avx -P /tmp/squash/. sqfs/.
16 ####################################carefull execute this in the chroot
19 mount -t sysfs none /sys/
20 mount -t proc none /proc/
23 nano /etc/apt/sources.list ###include universe multiverse
25 cat >/etc/resolv.conf <<EOF
27 nameserver 192.168.68.254
28 nameserver 208.67.222.222
29 nameserver 208.67.220.220
34 apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep language-pack | egrep -v '\-en'`
36 apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep openoffice\.org-`
38 apt-get remove --purge amarok dictionaries-common
42 apt-get install lvm2 qemu mdadm mbr xfsprogs jfsutils hfsplus hfsutils\
43 gparted xdialog dialog reiserfsprogs reiser4progs ntfsprogs ntfs-3g e2fsprogs dosfstools
45 apt-get install bind9-host dnsutils linux-generic linux-headers-generic linux-image-generic ssl-cert
48 apt-get install sshfs gedit lsscsi m4 mtx nfs-common nfs-kernel-server patch \
49 squashfs-tools strace sg3-utils screen scsiadd system-tools-backends telnet dpkg \
50 traceroute usbutils whois autofs busybox chkrootkit clamav dmidecode unrar
52 apt-get install flashplugin-nonfree aircrack-ng g++ nvidia-glx-180 gfxboot syslinux mtools
54 apt-get install openssh-server subversion gftp firefox sg3-utils
56 apt-get remove linux-headers-2.6.28-11 linux-headers-2.6.28-11-generic \
57 linux-image-2.6.28-11-generic linux-restricted-modules-2.6.28-11-generic \
58 linux-restricted-modules-2.6.28-11-generic ###change kernel version
62 dpkg-query -W --showformat='${Package} ${Version}\n' >filesystem.manifest
65 rm -f /etc/hosts /etc/resolv.conf
72 ###reboot if proc didn't unmount
73 cp sqfs/boot/vmlinuz-blabla vmlinuz
74 cp sqfs/boot/initrd-img-blabla initrd-img (or gz)
75 cp sqfs/filesystem.manifest .
76 rm sqfs/filesystem.manifest
77 mksquashfs sqfs filesystem.squashfs
79 apt-get install isomaster ## if you don't have it
81 --point it to your distrib.iso
86 mv syslinux/isolinux.cfg syslinux/syslinux.cfg ## you can edit it to set a lower timeout (30)
88 --edit syslinux/text.cfg so it looks like
92 menu label ^Bacula-rescue
93 kernel /casper/vmlinuz
94 append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/xubuntu.seed boot=casper initrd=/casper/initrd.img quiet nosplash --
97 --note that the important bit is
99 cdrom-detect/try-usb=true persistent
101 --and that the initrd have the good extension
103 --and if your cd doesnt have casper but live change accordingly
107 --in isomaster delete the isolinux dir
108 --put in your new syslinux dir
110 --in isomaster delete everything in casper and replace with your own vmlinuz initrd filesystem.squashfs
111 and filesystem.manifest
113 --save your work as bs-rescue-bla-bla.iso
115 --change the copy_bacula_to usb_stick script so it points to your iso