#!/bin/sh if [ x"$1" == x ]; then echo "usage: grml-live-remaster destination.iso" echo " destination.iso should point to a path that is on a hard disk," echo " you might want to mount some swap partitions or swap files" echo " first, because grml-live-remaster will need a lot ot RAM." exit -1 fi set -e if [ ! -d /remaster ]; then mkdir -p /remaster/chroot /remaster/tmp /remaster/cdrom mount -t tmpfs tmpfs /remaster/tmp echo "#:# edit the following two lines to change the boot message" \ >/remaster/msg echo "#:#" >>/remaster/msg sed 1,2d /live/image/boot/isolinux/boot.msg >>/remaster/msg fi mount -t squashfs /live/image/live/grml.squashfs /remaster/cdrom -o ro,loop mount -t aufs aufs /remaster/chroot -o br:/remaster/tmp=rw:/remaster/cdrom=rr for i in dev proc root sys tmp; do mount --bind /$i /remaster/chroot/$i done echo "Now edit the contents of the live CD in this chrooted shell:" chroot /remaster/chroot for i in dev proc root sys tmp; do umount /remaster/chroot/$i done $EDITOR /remaster/msg mkdir /remaster/iso for i in /live/image/*; do if [ ! $i == /live/image/live ]; then cp -R $i /remaster/iso fi done rm /remaster/iso/boot/isolinux/boot.msg sed 3,4d /live/image/boot/isolinux/boot.msg \ >/remaster/iso/boot/isolinux/boot.msg sed 1,2d /remaster/msg >>/remaster/iso/boot/isolinux/boot.msg mkdir /remaster/iso/live mksquashfs /remaster/chroot /remaster/iso/live/grml.squashfs umount /remaster/chroot /remaster/cdrom mkisofs -b boot/isolinux/isolinux.bin -no-emul-boot -c boot/isolinux/boot.cat \ -boot-info-table -o "$1" /remaster/iso rm -R /remaster/iso echo "" echo "ISO generation complete:" ls --color -l "$1" echo "If you want to customize your ISO, just call grml-live-remaster again."