tazlito rev 126
Add command frugal-install|-fi to perform frugal installation
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Jan 22 17:02:03 2010 +0100 (2010-01-22) |
parents | f7f4b49a4889 |
children | ad976dc83619 |
files | tazlito |
line diff
1.1 --- a/tazlito Fri Jan 22 15:44:18 2010 +0100 1.2 +++ b/tazlito Fri Jan 22 17:02:03 2010 +0100 1.3 @@ -95,6 +95,7 @@ 1.4 writeiso Use running system to generate a bootable ISO (with /home). 1.5 merge Merge multiple rootfs into one iso. 1.6 repack Recompress rootfs into iso with maximum ratio. 1.7 + frugal-install Frugal install in /boot/frugal from a distro or ISO 1.8 emu-iso Emulate an ISO image with Qemu. 1.9 burn-iso Burn ISO image to a cdrom using Wodim.\n" 1.10 } 1.11 @@ -1739,8 +1740,39 @@ 1.12 1.13 echo "Generating $ISO" 1.14 create_iso $ISO $TMP_DIR/iso 1.15 - rm -rf $TMP_DIR 1.16 - ;; 1.17 + rm -rf $TMP_DIR ;; 1.18 + 1.19 + frugal-install|-fi) 1.20 + ISO_IMAGE="$2" 1.21 + echo "" 1.22 + mkdir -p /boot/frugal 1.23 + if [ -f "$ISO_IMAGE" ]; then 1.24 + echo "Using ISO image: $ISO_IMAGE" 1.25 + mkdir -p /tmp/iso && mount -o loop $ISO_IMAGE /tmp/iso 1.26 + echo "Installing the Kernel and rootfs..." 1.27 + cp -a /tmp/iso/boot/bzImage /boot/frugal 1.28 + cp -a /tmp/iso/boot/rootfs.gz /boot/frugal 1.29 + umount /tmp/iso 1.30 + else 1.31 + echo "Using distro: $DISTRO" 1.32 + cd $DISTRO 1.33 + echo "Installing the Kernel and rootfs..." 1.34 + cp -a $DISTRO/rootcd/boot/bzImage /boot/frugal 1.35 + cp -a $DISTRO/rootcd/boot/rootfs.gz /boot/frugal 1.36 + fi 1.37 + # Grub entry 1.38 + if ! grep -q "^kernel /boot/frugal/bzImage" /boot/grub/menu.lst; then 1.39 + echo "Configuring GRUB menu list..." 1.40 + cat >> /boot/grub/menu.lst << EOT 1.41 +title SliTaz GNU/Linux (frugal) 1.42 +root (hd0,0) 1.43 +kernel /boot/frugal/bzImage root=/dev/null 1.44 +initrd /boot/frugal/rootfs.gz 1.45 +EOT 1.46 + else 1.47 + echo "GRUB menu list is up-to-date." 1.48 + fi 1.49 + echo "" ;; 1.50 1.51 emu-iso) 1.52 # Emulate an ISO image with Qemu.