diff options
author | Sebastian Dziallas <sebastian@when.com> | 2009-05-28 12:39:29 (GMT) |
---|---|---|
committer | Sebastian Dziallas <sebastian@when.com> | 2009-05-28 12:39:29 (GMT) |
commit | 29a49236be0f29b1654ea95e82e6ced67555c4dc (patch) | |
tree | 5e3f6aaef363411218aeaa1a2743e82c4911841b /boot-helper-creator.sh | |
parent | 468590cab0dcf0a26c2fafff094fef58348c911d (diff) |
add helper scripts to git
Diffstat (limited to 'boot-helper-creator.sh')
-rwxr-xr-x | boot-helper-creator.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/boot-helper-creator.sh b/boot-helper-creator.sh new file mode 100755 index 0000000..27e50ad --- /dev/null +++ b/boot-helper-creator.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +cleanup() { + [ -d "$ISOMNT" ] && umount $ISOMNT && rmdir $ISOMNT +} + +exitclean() { + echo "Cleaning up to exit..." + cleanup + exit 1 +} + +ISO=$(readlink -f "$1") + +ISOMNT=$(mktemp -d /media/isotmp.XXXXXX) +mount -o loop,ro "$ISO" $ISOMNT || exitclean + +cp -r $ISOMNT/isolinux ./ +cd ./isolinux +rm -f isolinux.cfg + +cat > ./isolinux.cfg << EOF +default vesamenu.c32 +timeout 10 + +menu background splash.jpg +menu title Welcome to soas-boot! +menu color border 0 #ffffffff #00000000 +menu color sel 7 #ffffffff #ff000000 +menu color title 0 #ffffffff #00000000 +menu color tabmsg 0 #ffffffff #00000000 +menu color unsel 0 #ffffffff #00000000 +menu color hotsel 0 #ff000000 #ffffffff +menu color hotkey 7 #ffffffff #ff000000 +menu color timeout_msg 0 #ffffffff #00000000 +menu color timeout 0 #ffffffff #00000000 +menu color cmdline 0 #ffffffff #00000000 +menu hidden +menu hiddenrow 5 +label linux0 + menu label Boot + kernel vmlinuz0 + append initrd=initrd0.img root=LABEL=FEDORA rootfstype=vfat rw liveimg overlay=LABEL=FEDORA quiet rhgb +menu default +label check0 + menu label Verify and Boot + kernel vmlinuz0 + append initrd=initrd0.img root=LABEL=FEDORA rootfstype=vfat rw liveimg overlay=LABEL=FEDORA quiet rhgb check +label memtest + menu label Memory Test + kernel memtest +label local + menu label Boot from local drive + localboot 0xffff +EOF + +cd ../ +mkisofs -o soas-boot.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ./isolinux +rm -rf ./isolinux + +trap exitclean SIGINT SIGTERM + +echo "Done." +cleanup |