Rescuecd: Difference between revisions
From DWIKI
(New page: *[http://www.sysresccd.org/Main_Page SystemRescueCd]) |
mNo edit summary |
||
Line 1: | Line 1: | ||
*[http://www.sysresccd.org/Main_Page SystemRescueCd] | *[http://www.sysresccd.org/Main_Page SystemRescueCd] | ||
#!/bin/bash | |||
#install syresccd on usb stick | |||
MOUNT=/mnt/usb | |||
STICK=/dev/sdb | |||
#mount -o loop ~/sysresscd-1.x.iso /mnt/loop | |||
ISO=/mnt/loop | |||
#gentoo | |||
MBR=/usr/share/syslinux/mbr.bin | |||
#MBR=/usr/lib/syslinux/mbr.bin | |||
test -e $MOUNT || mkdir $MOUNT | |||
mount -t vfat ${STICK}1 $MOUNT | |||
if [ ! -e $MBR ];then | |||
echo "$MBR not found" | |||
exit 1 | |||
fi | |||
dd if=$MBR of=$STICK | |||
cp -aruv $ISO/* $MOUNT | |||
rm -rf $MOUNT/syslinux | |||
mv -v $MOUNT/isolinux/isolinux.cfg $MOUNT/isolinux/syslinux.cfg || exit 2 | |||
mv -v $MOUNT/isolinux $MOUNT/syslinux || exit 3 | |||
umount $MOUNT | |||
syslinux ${STICK}1 | |||
sync | |||
echo "DONE!" |
Latest revision as of 17:44, 1 March 2009
#!/bin/bash #install syresccd on usb stick MOUNT=/mnt/usb STICK=/dev/sdb #mount -o loop ~/sysresscd-1.x.iso /mnt/loop ISO=/mnt/loop
#gentoo MBR=/usr/share/syslinux/mbr.bin #MBR=/usr/lib/syslinux/mbr.bin
test -e $MOUNT || mkdir $MOUNT mount -t vfat ${STICK}1 $MOUNT if [ ! -e $MBR ];then echo "$MBR not found" exit 1 fi dd if=$MBR of=$STICK cp -aruv $ISO/* $MOUNT rm -rf $MOUNT/syslinux mv -v $MOUNT/isolinux/isolinux.cfg $MOUNT/isolinux/syslinux.cfg || exit 2 mv -v $MOUNT/isolinux $MOUNT/syslinux || exit 3 umount $MOUNT syslinux ${STICK}1 sync echo "DONE!"