2 # Makefile for building a Bacula Rescue CDROM or remastering
3 # a CDROM or ISO image adding the Bacula files.
12 #-------------------------------------------------------------------------
14 # Make an iso boot image
17 mkisofs -A "Bacula Rescue Disk" -V "Bacula Rescue Disk" \
18 -J -R -T -o bootcd.iso \
19 -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
20 -no-emul-boot -boot-load-size 4 -boot-info-table cdtree
24 mkisofs -A "Bacula Rescue Disk" -V "Bacula Rescue Disk" \
25 -J -R -T -o bootcd.iso \
26 -b isolinux/isolinux.bin -c isolinux/boot.cat \
27 -no-emul-boot -boot-load-size 4 -boot-info-table cdimage
30 makecdimage --type=@type@ --where=@where@
33 # try booting it with qemu emulator
35 qemu -cdrom bootcd.iso
47 @(cd bacula; make copy-static-fd)
53 cp -a bacula/ cdimage/
55 all: kernel binaries bacula initrd iso
57 copy-static-fd: kernel binaries static-bacula initrd iso
60 # This needs to be customized for your burner.
62 cdrecord dev=ATA:@CDSTL@ gracetime=2 fs=4096k driveropts=burnfree -v \
63 -useinfo speed=48 -dao -eject -pad -data "bootcd.iso"
65 # Blank the CDROM assuming it is +rw
67 cdrecord dev=ATA:@CDSTL@ gracetime=2 -v blank=fast -useinfo speed=48
75 # Clean out files that are rebuilt
80 @rm -rf roottree/bin roottree/proc roottree/boot
81 @rm -rf roottree/lib roottree/sbin roottree/dev
82 @rm -rf roottree/dev roottree/sys roottree/sysroot
84 @rm -rf roottree/initrd roottree/cdrom roottree/mnt
85 @rm -rf roottree/tmp roottree/var
86 @rm -f roottree/etc/services roottree/etc/exports
87 @rm -f roottree/etc/gshadow roottree/etc/shadow
88 @rm -f roottree/etc/passwd roottree/etc/group
89 @rm -f roottree/etc/hosts roottree/etc/bashrc
90 @rm -f roottree/etc/filesystems roottree/etc/fstab
91 @rm -f roottree/etc/protocols roottree/etc/localtime
92 @rm -f roottree/etc/ld.so.cache
93 @rm -f roottree/etc/modules.conf roottree/etc/syslog.conf
94 @rm -rf roottree/etc/pam.d roottree/etc/ssh
95 @rm -rf roottree/etc/security roottree/etc/init.d
96 @rm -rf roottree/etc/udev roottree/etc/modprobe.conf
97 @rm -rf roottree/bacula-*
98 @rm -f cdtree/boot/isolinux/initrd.img
99 @rm -f cdtree/boot/isolinux/isolinux.cfg
100 @rm -f cdtree/boot/isolinux/vmlinuz
101 @rm -f cdtree/boot/isolinux/map
102 @(cd bacula; make distclean)