summaryrefslogtreecommitdiffstats
path: root/rescue/make_flash_rescue
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-07-05 14:28:43 +0000
committerOlivier Blin <oblin@mandriva.com>2007-07-05 14:28:43 +0000
commit73c2266c0b5ca3e3fd40edfdabe0975a2b2933ac (patch)
tree9a6822a945c0ec5256fd5cf2cf54e5025944f248 /rescue/make_flash_rescue
parent71f70eb47bffc79c9569ef5a7ea756f6bea76a3d (diff)
downloaddrakx-73c2266c0b5ca3e3fd40edfdabe0975a2b2933ac.tar
drakx-73c2266c0b5ca3e3fd40edfdabe0975a2b2933ac.tar.gz
drakx-73c2266c0b5ca3e3fd40edfdabe0975a2b2933ac.tar.bz2
drakx-73c2266c0b5ca3e3fd40edfdabe0975a2b2933ac.tar.xz
drakx-73c2266c0b5ca3e3fd40edfdabe0975a2b2933ac.zip
add Flash rescue build script
Diffstat (limited to 'rescue/make_flash_rescue')
-rwxr-xr-xrescue/make_flash_rescue60
1 files changed, 60 insertions, 0 deletions
diff --git a/rescue/make_flash_rescue b/rescue/make_flash_rescue
new file mode 100755
index 000000000..3af98727f
--- /dev/null
+++ b/rescue/make_flash_rescue
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+NAME=Flash-rescue
+DESCR="Mandriva Flash rescue"
+FLASH_VERSIONS="1.00 1.05 2.00"
+DEFAULT_VERSION=200
+UPGRADE=$1
+
+rm -rf .tmp
+mkdir -p .tmp/isolinux
+cp -f /usr/lib/syslinux/isolinux.bin Flash/isolinux/alt0/* .tmp/isolinux
+[ -n "$UPGRADE" ] && cp -al Flash/upgrade .tmp/
+
+DISTRIB_DESCR=$DESCR RESCUE_FLASH=1 ./make_rescue_img || exit 1
+mkdir -p .tmp/i586/install/stage2
+cp -f rescue.sqfs .tmp/i586/install/stage2
+
+flash_param="fastboot splash=silent vga=788"
+rescue_param="splash=verbose quiet automatic=method:cdrom rescue"
+
+[ -n "$UPGRADE" ] && DEFAULT="upgrade" || DEFAULT=Flash$DEFAULT_VERSION
+
+cat <<EOF > .tmp/isolinux/isolinux.cfg
+default $DEFAULT
+prompt 1
+timeout 150
+display help.msg
+
+label rescue
+ kernel vmlinuz
+ append initrd=all.rdz $rescue_param flash=rescue
+
+EOF
+
+if [ -n "$UPGRADE" ]; then
+ cat <<EOF >> .tmp/isolinux/isolinux.cfg
+label upgrade
+ kernel vmlinuz
+ append initrd=all.rdz $rescue_param flash=upgrade keepmounted
+
+EOF
+fi
+
+for VERSION in $FLASH_VERSIONS; do
+ SVERSION=`echo $VERSION | sed -e 's/\.//'`
+ cat <<EOF >> .tmp/isolinux/isolinux.cfg
+label Flash$SVERSION
+ kernel vmlinuz$SVERSION
+ append initrd=initrd$SVERSION.gz $flash_param
+
+EOF
+done
+
+ISO_NAME=$NAME-$DEFAULT_VERSION
+[ -n "$UPGRADE" ] && ISO_NAME=$ISO_NAME-upgrade
+
+genisoimage -f -o $ISO_NAME.iso -r -J -l -input-charset ISO-8859-1 -hide-rr-moved -nobak -cache-inodes -publisher Mandriva -V "$DESCR" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .tmp
+mkcd --addmd5 $ISO_NAME.iso
+
+rm -rf .tmp