X-Git-Url: https://git.sur5r.net/?p=bacula%2Frescue;a=blobdiff_plain;f=rescue%2Flinux%2Foldusb%2Fremaster%2Fwrite_sqfs_to_disk_image;fp=rescue%2Flinux%2Foldusb%2Fremaster%2Fwrite_sqfs_to_disk_image;h=c0c8597d74f696c1af4ea09e537e0541819dfc2e;hp=0000000000000000000000000000000000000000;hb=fb21b5066e01a80263767f2406829a10dfa58303;hpb=0a3515b92eb06f0fee16cee0f189ae5aa83b4414 diff --git a/rescue/linux/oldusb/remaster/write_sqfs_to_disk_image b/rescue/linux/oldusb/remaster/write_sqfs_to_disk_image new file mode 100755 index 0000000..c0c8597 --- /dev/null +++ b/rescue/linux/oldusb/remaster/write_sqfs_to_disk_image @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Put a new squashfs on the disk image +# + +. ../config + + +if [ ! -d ${DISK_IMAGE}/casper ] ; then + echo "Cannot find ${DISK_IMAGE}/casper directory -- possibly not detarred" + exit 1 +fi + +if [ ! -f filesystem.squashfs ] ; then + echo "Cannot find filesystem.squashfs ..." + exit 1 +fi + +echo "Removing old squashfs" +rm -f ${DISK_IMAGE}/casper/filesystem.squashfs ${DISK_IMAGE}/casper/filesystem.manifest +rm -f ${DISK_IMAGE}/casper/filesystem.manifest-desktop + +echo "Moving new squashfs to ${DISK_IMAGE}" +cp filesystem.manifest ${DISK_IMAGE}/casper/ +cp filesystem.manifest ${DISK_IMAGE}/casper/filesystem.manifest-desktop +mv filesystem.squashfs ${DISK_IMAGE}/casper/ + +echo "Removing old initrd and kernel image" +rm -f ${DISK_IMAGE}/casper/initrd.gz +rm -f ${DISK_IMAGE}/casper/vmlinuz + +echo "Copying new initrd and kernel image" +cp sqfs/initrd.img ${DISK_IMAGE}/casper/initrd.gz +cp sqfs/vmlinuz ${DISK_IMAGE}/casper/vmlinuz +sync + +echo "Now you just need to tar up ${DISK_IMAGE}"