From 2140694397c262c79ede4b6e3bb08bc2e5f82865 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Sat, 20 Nov 2010 22:19:06 +0000 Subject: convert to UUID; make panic-reboot-time a flag; prevent automatic fsck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit note: uuid.patch currently still panics ☹ Signed-off-by: Thorsten Glaser --- scripts/install.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'scripts/install.sh') diff --git a/scripts/install.sh b/scripts/install.sh index c7ab63eaa..7ade75c68 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -73,22 +73,28 @@ cfgfs=1 quiet=0 serial=0 speed=115200 +panicreboot=10 function usage { cat >&2 < 5 )); then print -u2 "$me: -c $OPTARG out of bounds" exit 1 fi ;; (h) usage 0 ;; + (p) if (( (panicreboot = OPTARG) < 0 || panicreboot > 300 )); then + print -u2 "$me: -p $OPTARG out of bounds" + exit 1 + fi ;; (q) quiet=1 ;; (+q) quiet=0 ;; (s) if [[ $OPTARG != @(96|192|384|576|1152)00 ]]; then @@ -281,7 +287,8 @@ dd if="$T/firsttrack" of="$tgt" q= (( quiet )) && q=-q mke2fs $q "$part" -#partuuid=$(tune2fs -l /dev/sd0i | sed -n '/^Filesystem UUID:[ ]*/s///p') +partuuid=$(tune2fs -l "$part" | sed -n '/^Filesystem UUID:[ ]*/s///p') +tune2fs -c 0 -i 0 "$part" (( quiet )) || print Extracting installation archive... mount_ext2fs "$part" "$T" @@ -311,8 +318,9 @@ mkdir -p boot/grub fi print print 'menuentry "GNU/Linux (OpenADK)" {' -# print "\tlinux /boot/vmlinuz-adk root=UUID=$partuuid $consargs panic=10" - print "\tlinux /boot/vmlinuz-adk $consargs panic=10" + linuxargs="root=UUID=$partuuid $consargs" + (( panicreboot )) && linuxargs="$linuxargs panic=$panicreboot" + print "\tlinux /boot/vmlinuz-adk $linuxargs" print '}' ) >boot/grub/grub.cfg set -A grubfiles -- cgit v1.2.3