slitaz-tools rev 135

bootfloppybox: add grub
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 09 19:50:17 2008 +0000 (2008-04-09)
parents 7c2e8f71cfda
children 490925fcedbe
files tinyutils/bootfloppybox
line diff
     1.1 --- a/tinyutils/bootfloppybox	Wed Apr 09 18:54:43 2008 +0000
     1.2 +++ b/tinyutils/bootfloppybox	Wed Apr 09 19:50:17 2008 +0000
     1.3 @@ -30,7 +30,7 @@
     1.4      <text wrap="false" width-chars="44" use-markup="true">
     1.5        <label>
     1.6  "
     1.7 -Create a floppy to boot LiveCD, PXE or Memtest tool. 
     1.8 +Create a floppy to boot a LiveCD, in a PXE network...
     1.9  Need a floppy disk in drive. Erase the whole floppy disk.
    1.10  "
    1.11        </label>
    1.12 @@ -52,7 +52,7 @@
    1.13          </button>
    1.14        </hbox>
    1.15      </frame>
    1.16 -    <notebook labels="LiveCD|PXE Network|Memory Test">
    1.17 +    <notebook labels="LiveCD|PXE Network|Memory Test|Expert">
    1.18  '  
    1.19  while read name file pkg desc; do
    1.20      tmp="<frame $name>
    1.21 @@ -72,7 +72,24 @@
    1.22      *.gz)   action="zcat";;
    1.23      *)      action="cat";;
    1.24      esac
    1.25 -    tmp="$tmp
    1.26 +    if [ "$pkg" = "grub" ]; then
    1.27 +      tmp="$tmp
    1.28 +      <hbox>
    1.29 +      <button>
    1.30 +        <label>Write floppy</label>
    1.31 +        <input file icon=\"forward\"></input>
    1.32 +	<action>mke2fs \$DEVICE</action>
    1.33 +	<action>mkdir /media/floppy ; mount \$DEVICE /media/floppy</action>
    1.34 +	<action>mkdir -p /media/floppy/boot/grub</action>
    1.35 +	<action>cp /usr/lib/grub/i386-pc/stage? /media/floppy/boot/grub</action>
    1.36 +	<action>umount \$DEVICE</action>
    1.37 +	<action>echo -e \"root (\${DEVICE#/dev/})\\nsetup (\${DEVICE#/dev/})\\nquit\" | grub --batch </action>
    1.38 +      </button>
    1.39 +      </hbox>
    1.40 +    </frame>
    1.41 +"
    1.42 +    else
    1.43 +      tmp="$tmp
    1.44        <hbox>
    1.45        <button>
    1.46          <label>Write floppy</label>
    1.47 @@ -82,6 +99,7 @@
    1.48        </hbox>
    1.49      </frame>
    1.50  "
    1.51 +    fi
    1.52    else
    1.53      tmp="$tmp
    1.54        <hbox>
    1.55 @@ -99,6 +117,7 @@
    1.56  SmartBtmgr /usr/share/boot/btmgr btmgr This OS independent Smart Boot Manager can boot any          partition or ATAPI CD-ROM.
    1.57  Etherboot /usr/share/boot/etherboot etherboot This network bootloader provides a replacement for proprietary PXE or NBI ROMs.
    1.58  Memtest86+ /usr/share/boot/memtest.lzma memtest Memory failures detection tool.
    1.59 +Grub /usr/sbin/grub grub General purpose boot loader with command shell
    1.60  EOT
    1.61  tmp='
    1.62      </notebook>