wok annotate syslinux/stuff/iso2exe/init @ rev 13733

Add xdigger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 25 16:40:45 2012 +0100 (2012-12-25)
parents 9d2380009b81
children b5ea41033c21
rev   line source
pascal@13691 1 #!/bin/sh
pascal@13691 2
pascal@13691 3 DIALOG=dialog
pascal@13691 4
pascal@13691 5 get()
pascal@13691 6 {
pascal@13713 7 od -j $1 -N ${3:-2} -t u${3:-2} -An $2 2> /dev/null ||
pascal@13713 8 dd if=$2 bs=1 skip=$1 count=${3:-2} 2> /dev/null | \
pascal@13713 9 hexdump -e "\"\" 1/${3:-2} \"%d\""
pascal@13691 10 }
pascal@13691 11
pascal@13691 12 getarg()
pascal@13691 13 {
pascal@13691 14 sed "/$1=/!d;s/.*$1=\\([^ ]*\\).*/\\1/" /proc/cmdline
pascal@13691 15 }
pascal@13691 16
pascal@13691 17 gettazboot()
pascal@13691 18 {
paul@13692 19 echo "Creating $(basename $1) ..."
pascal@13699 20 O=$(($(get 34 /mnt/$ISO) - 0xE0))
pascal@13699 21 L=$((0x8000 - $(get 28 /mnt/$ISO) - $O))
pascal@13691 22 S=$((32+$L))
pascal@13691 23 P=$((($S+511)/512))
pascal@13691 24 E=$((4096-(32*$P)))
pascal@13691 25 for i in 0x5A4D $(($S%512)) $P 0 2 $E -1 $((${2:-0}-16)) \
pascal@13691 26 -2 0 256 -16 28 0x6C53 0x5469 0x7A61; do
pascal@13691 27 printf '\\\\x%02X\\\\x%02X' $(($i&255)) $((($i>>8)&255)) | \
pascal@13691 28 xargs echo -en
pascal@13691 29 done > $1
pascal@13691 30 dd bs=1 count=$L skip=$(echo $O) if=/mnt/$ISO >> $1 2> /dev/null
pascal@13691 31 }
pascal@13691 32
pascal@13691 33 checkmagic()
pascal@13691 34 {
pascal@13699 35 [ -s $1 ] && [ $(getarg magic) == $(get 28 $1 4) ]
pascal@13691 36 }
pascal@13691 37
pascal@13691 38 getiso()
pascal@13691 39 {
pascal@13713 40 mkdir -p /media/cdrom
pascal@13691 41 blkid | while read dev info ; do
pascal@13713 42 mount ${dev%:} /mnt
pascal@13713 43 if checkmagic /mnt/$ISO; then
pascal@13713 44 mount -o loop,ro /mnt/$ISO /media/cdrom
pascal@13713 45 echo "Found $ISO on ${dev%:}"
pascal@13713 46 break
pascal@13713 47 fi
pascal@13713 48 umount /mnt
pascal@13691 49 done
pascal@13691 50 }
pascal@13691 51
pascal@13691 52 uncpio()
pascal@13691 53 {
pascal@13691 54 echo "Extracting $(basename $1) ..."
pascal@13699 55 case $(get 0 $1) in
pascal@13691 56 *35615) zcat $1 ;;
pascal@13691 57 *\ 93) unlzma -c $1 ;;
pascal@13691 58 *) cat $1 ;;
pascal@13691 59 esac | ( cd ${2:-/} ; cpio -idmu > /dev/null 2>&1 )
pascal@13691 60 }
pascal@13691 61
pascal@13691 62 getuuid()
pascal@13691 63 {
pascal@13691 64 dev=$(mount | sed '/ \/mnt /!d;s/ .*//;s|/dev/||;q')
pascal@13691 65 blkid | sed "/$dev:/!d;s/.*UUID=.\\([^ ]*\\)\".*/\\1/"
pascal@13691 66 }
pascal@13691 67
pascal@13691 68 mkinitrd()
pascal@13691 69 {
paul@13692 70 echo "Creating $(basename $1) ..."
pascal@13691 71 for i in bin lib dev proc tmp mnt etc ; do
pascal@13691 72 mkdir -p /tmp/fs/$i
pascal@13691 73 done
pascal@13691 74 for i in /dev/console /dev/null /dev/tty /dev/tty1 /dev/fuse \
pascal@13691 75 /dev/hd* /dev/sd* ; do
pascal@13691 76 cp -a $i /tmp/fs$i
pascal@13691 77 done
pascal@13713 78 for i in /bin/busybox $(which mount.posixovl) $(which blkid); do
pascal@13691 79 cp $(LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $i | \
pascal@13691 80 sed 's|.*=> \(.*/lib/l[^ ]*\).*|\1|;/^\//!d') /tmp/fs/lib
pascal@13691 81 cp $i /tmp/fs/bin
pascal@13691 82 done
pascal@13691 83 cp -a /lib/ld-* /tmp/fs/lib
pascal@13691 84 for i in $(busybox | sed '/Current/,$!d'); do
pascal@13691 85 ln -s busybox /tmp/fs/bin/${i%,}
pascal@13691 86 done
pascal@13691 87 ln -s /proc/mounts /tmp/fs/etc/mtab
pascal@13691 88 cat > /tmp/fs/init <<EOT
pascal@13691 89 #!/bin/sh
pascal@13691 90
pascal@13691 91 arg()
pascal@13691 92 {
pascal@13691 93 grep -q \$1 /proc/cmdline &&
pascal@13691 94 val="\$(sed "s/.*\$1=\\([^ ]*\\).*/\\1/" < /proc/cmdline)" &&
pascal@13691 95 echo "\$2 \$val"
pascal@13691 96 }
pascal@13691 97
pascal@13691 98 mount -t proc /proc /proc
pascal@13691 99 arg mount "Mount device"
pascal@13691 100 mount \$( (blkid /dev/?d* || blkid) | grep \$val | sed 's/:.*//;q') /mnt
pascal@13691 101 arg subroot "Change root to directory"
pascal@13691 102 mount.posixovl /mnt/\$val
pascal@13691 103 mount --bind /mnt /mnt/\$val/mnt/dos
pascal@13691 104 LDSO=\$(ls /mnt/\$val/lib/ld-* | sed q)
pascal@13691 105 umount /proc
pascal@13691 106 export LD_LIBRARY_PATH=\$val/lib:\$val/usr/lib:/lib
pascal@13691 107 exec /bin/switch_root /mnt \${LDSO#/mnt/} \$val/usr/sbin/chroot \$val /sbin/init
pascal@13691 108 EOT
pascal@13691 109 chmod +x /tmp/fs/init
pascal@13691 110 ( cd /tmp/fs ; find * | cpio -o -H newc ) | lzma e $1 -si 2> /dev/null
pascal@13691 111 rm -rf /tmp/fs
pascal@13691 112 }
pascal@13691 113
pascal@13713 114 is_loram()
pascal@13713 115 {
pascal@13713 116 [ -s /lib/squashfs.ko* ]
pascal@13713 117 }
pascal@13713 118
pascal@13691 119 doinstall()
pascal@13691 120 {
pascal@13691 121 mkdir /mnt/slitaz
pascal@13691 122 mount.posixovl /mnt/slitaz || return
pascal@13691 123 mkdir -p /mnt/slitaz/boot /mnt/slitaz/mnt/dos
pascal@13713 124 if [ -d /media/cdrom/fs ]; then
pascal@13713 125 cp -a /media/cdrom/fs/. /mnt/slitaz
pascal@13713 126 elif is_loram ; then
pascal@13713 127 for i in /media/cdrom/boot/rootfs?.* ; do
pascal@13713 128 [ -s $(basename $i) ] && continue
pascal@13713 129 cpio -i $i
pascal@13713 130 done
pascal@13713 131 for i in $(ls -r /media/cdrom/boot/rootfs*); do
pascal@13713 132 mount -o loop,ro $i /sqfs/mnt
pascal@13713 133 cp -a /sqfs/mnt/. /mnt/slitaz
pascal@13713 134 umount -d /sqfs/mnt
pascal@13713 135 done
pascal@13713 136 else
pascal@13713 137 for i in $(ls -r /media/cdrom/boot/rootfs*); do
pascal@13713 138 uncpio $i /mnt/slitaz
pascal@13713 139 done
pascal@13713 140 fi
pascal@13691 141 for i in /media/cdrom/boot/bzImage /media/cdrom/boot/*pxe* \
pascal@13691 142 /media/cdrom/boot/isolinux/he* /media/cdrom/boot/isolinux/opt* \
pascal@13691 143 /media/cdrom/README /media/cdrom/boot/memtest* ; do
pascal@13691 144 [ -s $i ] && cp $i /mnt/slitaz/boot
pascal@13691 145 done
pascal@13691 146 umount -d /media/cdrom
pascal@13691 147 gettazboot /mnt/slitaz/boot/tazboot.exe
pascal@13691 148 mkinitrd /mnt/slitaz/boot/initrd
pascal@13691 149 cat > /mnt/slitaz/boot/tazboot.cmd <<EOT
pascal@13691 150 kernel=\\slitaz\\boot\\bzimage
pascal@13691 151 initrd=\\slitaz\\boot\\initrd
pascal@13691 152 rw root=/dev/null mount=$(getuuid) subroot=slitaz autologin
pascal@13691 153 EOT
pascal@13691 154 unix2dos /mnt/slitaz/boot/he* /mnt/slitaz/boot/opt* \
pascal@13691 155 /mnt/slitaz/boot/README /mnt/slitaz/boot/tazboot.cmd
pascal@13691 156 [ -x /mnt/slitaz/usr/sbin/mount.posixovl ] ||
pascal@13713 157 cp $(which mount.posixovl) /mnt/slitaz/usr/sbin
pascal@13691 158 ! grep -qs tazboot /mnt/boot.ini && cat >> /mnt/boot.ini <<EOT
pascal@13691 159 C:\\slitaz\\boot\\tazboot.exe="SliTaz"
pascal@13691 160 EOT
pascal@13691 161 grep -qs menuitem /mnt/config.sys && !grep -q tazboot /mnt/config.sys &&
pascal@13691 162 sed -i 's/menudefault=/menuitem=slitaz,SliTaz\n&/' /mnt/config.sys &&
pascal@13691 163 cat >> /mnt/config.sys <<EOT
pascal@13691 164 [slitaz]
pascal@13691 165 device=\\slitaz\\boot\\tazboot.exe
pascal@13691 166 EOT
pascal@13691 167 }
pascal@13691 168
pascal@13691 169 install()
pascal@13691 170 {
pascal@13691 171 $DIALOG --clear \
pascal@13691 172 --title " SliTaz UMSDOS like installation " \
pascal@13691 173 --yes-label "Install" --yesno \
pascal@13691 174 "\nSliTaz will be installed in the subdirectory \\slitaz of the current
pascal@13691 175 DOS/Windows partition. You will see your files from /mnt/dos.\n\n
paul@13692 176 You can start SliTaz with \\slitaz\\boot\\tazboot.exe\n\n
pascal@13691 177 To uninstall SliTaz, you have only to remove this directory.
pascal@13691 178 The file \\boot.ini or \\config.sys may be modified too.\n\n
pascal@13697 179 To do a traditional installation with disk partitioning,
pascal@13691 180 start SliTaz Live with 'SliTaz RAM boot' menu.\n
pascal@13691 181 " 16 70
pascal@13713 182 [ $? -eq 0 -a -n "$(which mount.posixovl)" ] || return
pascal@13691 183 doinstall
pascal@13691 184 umount /proc
pascal@13691 185 exec chroot /mnt/slitaz /sbin/init
pascal@13691 186 }
pascal@13691 187
pascal@13691 188 tazboot()
pascal@13691 189 {
pascal@13691 190 $DIALOG --clear \
pascal@13691 191 --title " SliTaz bootloader for DOS " \
pascal@13691 192 --yes-label "Install" --yesno \
paul@13692 193 "\nThe file TAZBOOT.EXE will be created in the top directory. It supports
pascal@13697 194 a bzImage linux kernel, multiple initramfs, a kernel command line and
paul@13692 195 an ISO image file loopback (retrieves files from an ISO file).\n\n
pascal@13691 196 Usage: tazboot.exe [[@commands]|[kernel=<bzimage>]
pascal@13691 197 [initrd=<rootfs>[,<rootfs2>...]] [iso=<isofile>] cmdline args ...]\n\n
paul@13692 198 Defaults: tazboot @tazboot.cmd or tazboot kernel=bzImage auto\n\n\
pascal@13691 199 Examples for tazboot.cmd:\n\n\
pascal@13691 200 iso=\\isos\\slitaz-4.0.iso\n\
pascal@13691 201 kernel=boot/bzImage\n\
pascal@13691 202 initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz\n\
pascal@13691 203 rw root=/dev/null autologin\n\n\
pascal@13691 204 kernel=\\slitaz\\vmlinuz root=/dev/sda5 ro\n\n
pascal@13691 205 Unlike GRUB4DOS, it doesn't require unfragmented ISO image files.\n
pascal@13691 206 " 24 78
pascal@13691 207 [ $? -eq 0 ] || return
pascal@13691 208 gettazboot /mnt/tazboot.exe
pascal@13691 209 }
pascal@13691 210
pascal@13697 211 md5()
pascal@13697 212 {
pascal@13713 213 echo "Checking files..."
pascal@13713 214 ( cd /media/cdrom ; md5sum -c md5sum ) > /tmp/data
pascal@13697 215 $DIALOG --clear \
pascal@13697 216 --title " Checked files " \
pascal@13697 217 --textbox /tmp/data 24 78
pascal@13697 218 rm -f /tmp/data
pascal@13697 219 }
pascal@13697 220
pascal@13697 221 readme()
pascal@13697 222 {
pascal@13697 223 $DIALOG --clear \
pascal@13697 224 --title " Readme " \
pascal@13697 225 --textbox /media/cdrom/README 24 78
pascal@13697 226 }
pascal@13697 227
pascal@13697 228 bootlog()
pascal@13697 229 {
pascal@13697 230 $DIALOG --clear \
pascal@13697 231 --title " Linux boot messages " \
pascal@13697 232 --textbox /tmp/dmesg 24 78
pascal@13697 233 }
pascal@13697 234
pascal@13697 235 memtest()
pascal@13697 236 {
pascal@13697 237 $DIALOG --clear \
pascal@13697 238 --title " Memtest86 " \
pascal@13697 239 --yes-label "Install" --yesno \
pascal@13697 240 "\nMemtest86 is a thorough, stand alone memory test for x86 architecture
pascal@13697 241 computers. BIOS based memory tests are a quick, cursory check and often
pascal@13697 242 miss many of the failures that are detected by Memtest86.\n
pascal@13697 243 " 12 70
pascal@13697 244 [ $? -eq 0 ] || return
pascal@13697 245 cp /media/cdrom/boot/memtest /mnt
pascal@13697 246 }
pascal@13697 247
pascal@13697 248 fdmemtest()
pascal@13697 249 {
pascal@13697 250 $DIALOG --clear \
pascal@13697 251 --title " Create a Memtest86 boot floppy " \
pascal@13697 252 --yes-label "Create floppy" --yesno \
pascal@13697 253 "\nMemtest86 is a thorough, stand alone memory test for x86 architecture
pascal@13697 254 computers. BIOS based memory tests are a quick, cursory check and often
pascal@13697 255 miss many of the failures that are detected by Memtest86.\n\n
pascal@13697 256 Please insert a blank disk in floppy drive.\n
pascal@13697 257 " 12 70
pascal@13697 258 [ $? -eq 0 ] || return
pascal@13697 259 dd if=/media/cdrom/boot/memtest of=/dev/fd0
pascal@13697 260 }
pascal@13697 261
pascal@13697 262 gpxe()
pascal@13697 263 {
pascal@13697 264 $DIALOG --clear \
pascal@13697 265 --title " SliTaz Web boot " \
pascal@13697 266 --yes-label "Install" --yesno \
pascal@13697 267 "\nBoot your operating system from the internet and enjoy a full system
pascal@13697 268 working entirely in RAM with speed and stability in mind. The Linux Kernel
pascal@13697 269 and the complete SliTaz compressed root filesystem will be loaded into RAM
pascal@13697 270 from the Web using PXE and HTTP protocols.\n
pascal@13697 271 " 12 70
pascal@13697 272 [ $? -eq 0 ] || return
pascal@13697 273 cp /media/cdrom/boot/gpxe /mnt
pascal@13697 274 }
pascal@13697 275
pascal@13697 276 fdgpxe()
pascal@13697 277 {
pascal@13697 278 $DIALOG --clear \
pascal@13697 279 --title " Create a SliTaz Web boot floppy " \
pascal@13697 280 --yes-label "Create floppy" --yesno \
pascal@13697 281 "\nBoot your operating system from the internet and enjoy a full system
pascal@13697 282 working entirely in RAM with speed and stability in mind. The Linux Kernel
pascal@13697 283 and the complete SliTaz compressed root filesystem will be loaded into RAM
pascal@13697 284 from the Web using PXE and HTTP protocols.\n\n
pascal@13697 285 Please insert a blank disk in floppy drive.\n
pascal@13697 286 " 12 70
pascal@13697 287 [ $? -eq 0 ] || return
pascal@13697 288 dd if=/media/cdrom/boot/gpxe of=/dev/fd0
pascal@13697 289 }
pascal@13697 290
pascal@13697 291 cdfile()
pascal@13697 292 {
pascal@13697 293 [ -s /media/cdrom/$1 ] && echo -en "$2 ${3// /.}"
pascal@13697 294 }
pascal@13697 295
pascal@13697 296 usbkey()
pascal@13697 297 {
pascal@13697 298 $DIALOG --clear \
pascal@13697 299 --title " Create a SliTaz USB key " \
pascal@13697 300 --yes-label "Continue" --yesno \
pascal@13697 301 "\nUnlike a hard drive install, the filesystem is kept in a compressed
pascal@13697 302 rootfs.gz. The filesystem is loaded entirely into memory upon boot.
pascal@13697 303 This should increase responsiveness, protect the filesystem against
pascal@13697 304 accidental corruption and reduce read/writes to the USB drive.
pascal@13697 305 Once setup, the tazusb utility can rewrite the root filesystem
pascal@13697 306 with any changes you have made since booting up,
pascal@13697 307 giving the effective benefits of a hard drive install.\n\n
pascal@13697 308 /home is mounted on boot using the UUID of your particular flash drive.
pascal@13697 309 Unlike a device name, the UUID has the benefit of never changing from machine
pascal@13697 310 to machine.\n\n
pascal@13697 311 Please plug your USB stick in now.\n
pascal@13697 312 " 18 70
pascal@13697 313 [ $? -eq 0 ] || return
pascal@13699 314 sleep 5
pascal@13697 315 DEV="$(grep -l 1 /sys/block/*/removable | \
pascal@13697 316 sed 's|/sys/block/\(.*\)/removable|\1|')"
pascal@13697 317 [ -n "$DEV" ] || return
pascal@13697 318 exec 3>&1
pascal@13697 319 device=`$DIALOG --clear \
pascal@13697 320 --title " Select your USB key " \
paul@13698 321 --menu "\nPlease select the USB key according to its known size.\n\n" \
pascal@13697 322 14 70 4 \
pascal@13697 323 $(for i in $DEV ; do
pascal@13697 324 echo "/dev/$i $(( $(cat /sys/block/$i/size) / 1024 ))MB"
pascal@13697 325 done) \
pascal@13697 326 2>&1 1>&3`
pascal@13697 327 retval=$?
pascal@13697 328 exec 3>&-
pascal@13697 329 [ $retval -eq 0 ] || continue
pascal@13697 330 exec 3>&1
pascal@13697 331 format=`$DIALOG --clear \
pascal@13697 332 --title " Select the filesystem " \
pascal@13733 333 --radiolist "\nPlease select the filesystem type to create.\n\n\
paul@13698 334 The filesystem creation will erase all the data \
pascal@13699 335 in the USB key." 14 70 4 \
pascal@13733 336 "none" "Do not erase the USB key" on \
pascal@13733 337 "ext3" "Ext3 journaling filesystem" off \
pascal@13733 338 "ext2" "Ext2 filesystem" off \
pascal@13733 339 "fat32" "Windows FAT32 filesystem" off \
pascal@13697 340 2>&1 1>&3`
pascal@13697 341 retval=$?
pascal@13697 342 exec 3>&-
pascal@13697 343 [ $retval -eq 0 ] || continue
pascal@13697 344 [ "$format" != "none" ] && tazusb format $device "SliTaz" $format
pascal@13697 345 tazusb gen-iso2usb /mnt/$ISO $device
pascal@13697 346 }
pascal@13697 347
pascal@13713 348 mount_loram()
pascal@13713 349 {
pascal@13713 350 is_loram || return
pascal@13713 351 insmod /lib/squashfs.ko* 2> /dev/null
pascal@13713 352 if [ -d /media/cdrom/fs ]; then
pascal@13713 353 ln -s /media/cdrom/fs /sqfs
pascal@13713 354 else
pascal@13713 355 mkdir /sqfs
pascal@13713 356 mount -o loop,ro -t squashfs /rootfs*.gz /sqfs
pascal@13713 357 fi
pascal@13713 358 ln -s /sqfs/lib/* lib
pascal@13713 359 ln -s /sqfs/usr /sqfs/var /
pascal@13713 360 for i in dmesg basename tr od reboot poweroff getty sync ; do
pascal@13713 361 ln -s /sqfs/bin/busybox /bin/$i
pascal@13713 362 done
pascal@13713 363 }
pascal@13713 364
pascal@13713 365 umount_loram()
pascal@13713 366 {
pascal@13713 367 is_loram || return
pascal@13713 368 rm /var /usr
pascal@13713 369 umount -d /sqfs
pascal@13713 370 rmdir /sqfs
pascal@13713 371 }
pascal@13713 372
pascal@13691 373 text()
pascal@13691 374 {
pascal@13713 375 umount_loram
pascal@13691 376 umount -d /media/cdrom
pascal@13691 377 umount /mnt
pascal@13691 378 umount /proc
pascal@13691 379 exec /init
pascal@13691 380 }
pascal@13691 381
pascal@13691 382 live()
pascal@13691 383 {
pascal@13691 384 n=0
pascal@13691 385 for i in $(ls -r /media/cdrom/boot/rootfs*); do
pascal@13691 386 [ $((n++)) -eq 0 ] || uncpio $i
pascal@13691 387 done
pascal@13691 388 text
pascal@13691 389 }
pascal@13691 390
pascal@13713 391 restart()
pascal@13691 392 {
pascal@13713 393 sync
pascal@13713 394 [ ! -L /sqfs ] && umount -d /media/cdrom && umount /mnt
pascal@13713 395 reboot -f
pascal@13691 396 }
pascal@13691 397
pascal@13713 398 stop()
pascal@13691 399 {
pascal@13713 400 sync
pascal@13713 401 [ ! -L /sqfs ] && umount -d /media/cdrom && umount /mnt
pascal@13713 402 poweroff -f
pascal@13691 403 }
pascal@13691 404
pascal@13697 405 shell()
pascal@13697 406 {
pascal@13713 407 getty -n -l /bin/ash 38400 tty1 || sh
pascal@13697 408 }
pascal@13697 409
pascal@13691 410 [ -x /usr/sbin/mount.posixovl ] ||
pascal@13713 411 mv /bin/mount.posixovl.iso2exe /usr/sbin/mount.posixovl 2> /dev/null ||
pascal@13713 412 mv /bin/mount.posixovl.iso2exe /bin/mount.posixovl
pascal@13691 413 mount -t proc /proc /proc
pascal@13691 414 ISO="$(getarg iso | sed 's/.://;s|\\|/|g')"
pascal@13691 415 getiso
pascal@13713 416 mount_loram
pascal@13691 417 case "$(basename $ISO | tr [A-Z] [a-z])$(getarg mode)" in
pascal@13691 418 *install*) install ;;
pascal@13691 419 *live*) live ;;
pascal@13691 420 *text*) text ;;
pascal@13691 421 esac
pascal@13713 422 dmesg > /tmp/dmesg
pascal@13691 423
pascal@13691 424 while true; do
pascal@13691 425 exec 3>&1
pascal@13691 426 value=`$DIALOG --clear \
pascal@13691 427 --title " Welcome to SliTaz " \
pascal@13697 428 --menu "\nPlease select" 17 70 9 \
pascal@13697 429 "live" "SliTaz RAM boot" \
pascal@13697 430 "text" "SliTaz RAM boot (text mode only)" \
pascal@13697 431 $(cdfile README "readme" "Show the README file") \
pascal@13697 432 $(cdfile md5sum "md5" "Check ISO files") \
pascal@13697 433 "install" "Hard disk installation" \
pascal@13697 434 "usbkey" "USB key installation" \
pascal@13697 435 "tazboot" "Get tazboot.exe Linux loader" \
pascal@13697 436 $(cdfile Xboot/memtest "memtest" "Get Memtest86") \
pascal@13697 437 $(cdfile boot/memtest "fdmemtest" "Create a Memtest86 boot floppy") \
pascal@13697 438 $(cdfile Xboot/gpxe "gpxe" "Get SliTaz Web boot utility") \
pascal@13697 439 $(cdfile boot/gpxe "fdgpxe" "Create a SliTaz Web boot floppy") \
pascal@13713 440 "restart" "Restart the computer" \
pascal@13713 441 "stop" "Power off" \
pascal@13697 442 "bootlog" "Linux boot messages" \
pascal@13697 443 "shell" "Shell prompt" \
pascal@13691 444 2>&1 1>&3`
pascal@13691 445 retval=$?
pascal@13691 446 exec 3>&-
pascal@13691 447 [ $retval -eq 0 ] || continue
pascal@13691 448 $value
pascal@13691 449 done