Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv20702/scripts/scripts
Modified Files:
install-on-usb
Log Message:
- install-usb now uses fat file system and the plain bootcd.iso file
- ISO can now be in ZISOFS format (optional)
- compile our own static syslinux-nomtools
Index: install-on-usb
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/install-on-usb,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- install-on-usb 31 Oct 2003 18:11:45 -0000 1.8
+++ install-on-usb 8 Nov 2003 04:04:51 -0000 1.9
@@ -10,7 +10,8 @@
#
#
-BOOTLOADER="grub"
+BOOTLOADER="syslinux"
+#BOOTLOADER="grub"
#BOOTLOADER="lilo"
FDISK="fdisk"
@@ -131,7 +132,7 @@
mkdir -p ./tmp/mnt{1,2} || return 1
# echo "Available USB storage devices: "
-# for device in $(allAttachedScsiUsb)
+# for device in $(allAttachedScsiUsb)
# do
# echo -n "$(scsiDevFromScsiUsb $device) "
# done
@@ -157,9 +158,9 @@
echo
echo "Please make sure the partition type is 'Linux' (83) "
echo
-
+
$FDISK -l $DEVICE
-
+
echo;echo -n "Do you want to partition the media ? "
ask_yes_no && $FDISK $DEVICE
@@ -172,18 +173,41 @@
echo;echo -n "Last chance, do you really want to continue ? "
ask_yes_no || return 0
- mkfs.ext2 $PARTITION || return 1
- tune2fs -c 0 $PARTITION
+ if [ "$BOOTLOADER" = "syslinux" ]; then
+ mkfs.msdos $PARTITION || return 1
- mount -o loop -t iso9660 bootcd.iso ./tmp/mnt1 || return 1
- mount -t auto $PARTITION ./tmp/mnt2 || return 1
+ mount -o loop -t iso9660 bootcd.iso ./tmp/mnt1 || return 1
- echo copying files...
- nice -n19 cp -dpR ./tmp/mnt1/* ./tmp/mnt2/ || return 1
- nice -n19 cp -dpR etc.tar.bz2 ./tmp/mnt2/ || return 1
+ echo installing MBR
+ SIZE=$(du -b ./tmp/mnt1/boot/syslinux/mbr.bin | cut -f 1 )
+ dd if=./tmp/mnt1/boot/syslinux/mbr.bin of=/dev/sda count=$SIZE || return 1
+ echo installing SysLinux boot sector
+ ./tmp/mnt1/boot/syslinux/syslinux-nomtools /dev/sda1 || return 1
- [ "$BOOTLOADER" = "grub" ] && install_grub $DEVICE $GRUBPART
- [ "$BOOTLOADER" = "lilo" ] && install_lilo $DEVICE
+ mount -t auto $PARTITION ./tmp/mnt2 || return 1
+
+ echo copying files
+ cp ./tmp/mnt1/boot/* ./tmp/mnt2/ &> /dev/null
+ cp ./tmp/mnt1/{DEVIL-LINUX,LICENSE} ./tmp/mnt2/ &> /dev/null
+ cat ./tmp/mnt1/isolinux.cfg | sed -e s%"/boot/"%""% > ./tmp/mnt2/syslinux.cfg || return 1
+ cat ./tmp/mnt1/boot/message | sed -e s%"/boot/"%""% > ./tmp/mnt2/message || return 1
+ cp bootcd.iso ./tmp/mnt2/ || return 1
+ fi
+
+ if [ "$BOOTLOADER" = "grub" ] || [ "$BOOTLOADER" = "lilo" ]; then
+ mkfs.ext2 $PARTITION || return 1
+ tune2fs -c 0 $PARTITION
+
+ mount -o loop -t iso9660 bootcd.iso ./tmp/mnt1 || return 1
+ mount -t auto $PARTITION ./tmp/mnt2 || return 1
+
+ echo copying files...
+ nice -n19 cp -dpR ./tmp/mnt1/* ./tmp/mnt2/ || return 1
+ nice -n19 cp -dpR etc.tar.bz2 ./tmp/mnt2/ || return 1
+
+ [ "$BOOTLOADER" = "grub" ] && install_grub $DEVICE $GRUBPART
+ [ "$BOOTLOADER" = "lilo" ] && install_lilo $DEVICE
+ fi
}
install
|