]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/oldusb/remaster/write_sqfs_to_disk_image
Move usb to oldusb
[bacula/rescue] / rescue / linux / oldusb / remaster / write_sqfs_to_disk_image
1 #!/bin/sh
2 #
3 #  Put a new squashfs on the disk image
4 #
5
6 . ../config
7
8
9 if [ ! -d ${DISK_IMAGE}/casper ] ; then
10   echo "Cannot find ${DISK_IMAGE}/casper directory -- possibly not detarred"
11   exit 1
12 fi
13
14 if [ ! -f filesystem.squashfs ] ; then
15   echo "Cannot find filesystem.squashfs ..."
16   exit 1
17 fi
18
19 echo "Removing old squashfs"
20 rm -f ${DISK_IMAGE}/casper/filesystem.squashfs ${DISK_IMAGE}/casper/filesystem.manifest 
21 rm -f ${DISK_IMAGE}/casper/filesystem.manifest-desktop
22
23 echo "Moving new squashfs to ${DISK_IMAGE}"
24 cp filesystem.manifest ${DISK_IMAGE}/casper/
25 cp filesystem.manifest ${DISK_IMAGE}/casper/filesystem.manifest-desktop
26 mv filesystem.squashfs ${DISK_IMAGE}/casper/
27
28 echo "Removing old initrd and kernel image"
29 rm -f ${DISK_IMAGE}/casper/initrd.gz
30 rm -f ${DISK_IMAGE}/casper/vmlinuz
31
32 echo "Copying new initrd and kernel image"
33 cp sqfs/initrd.img ${DISK_IMAGE}/casper/initrd.gz
34 cp sqfs/vmlinuz ${DISK_IMAGE}/casper/vmlinuz
35 sync
36
37 echo "Now you just need to tar up ${DISK_IMAGE}"