Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fw-initramfs.git;a=commitdiff;h=4e6acb709883e050fd41853c86e1a2b620de862e

commit 4e6acb709883e050fd41853c86e1a2b620de862e
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Thu Nov 19 23:37:05 2009 +0100

create_usblive.sh
*some corrections
*use extlinux

diff --git a/create_usblive.sh b/create_usblive.sh
index c336b38..4fc3e8c 100755
--- a/create_usblive.sh
+++ b/create_usblive.sh
@@ -13,10 +13,11 @@ HOMESOURCE=/usr/share/fw-initramfs/
MNTTMP=/tmp/usbkey/
DIRTEMP=/tmp/init/

+. $HOMESOURCE/default.sh
. $HOMESOURCE/create_functions.sh
+. $HOMESOURCE/create_static.sh
. /etc/sysconfig/usbkey.config.sh

-
#####################################################################
#check if root user
#####################################################################
@@ -57,7 +58,7 @@ fi
umount -f $USBDEVICE

#####################################################################
-#format
+#format as vfat for be use by all
#####################################################################
mke2fs -j -I 128 $USBDEVICE
tune2fs -c 0 -i 0 $USBDEVICE
@@ -80,7 +81,7 @@ fi
pacman-g2 -Sy core base -r $MNTTMP --noconfirm

#####################################################################
-#configure the chroot and install grub
+#configure the chroot
#####################################################################
mount -t proc none $MNTTMP/proc
mount -t sysfs none $MNTTMP/sys
@@ -91,11 +92,6 @@ cp -f /etc/resolv.conf $MNTTMP/etc/


#####################################################################
-#copy menu.lst for grub (add bootusb to kernel parameters)
-#####################################################################
-cp -f menu.lst.usbkey $MNTTMP/boot/grub/menu.lst
-
-#####################################################################
#Some env variable
#####################################################################
cp -f /etc/profile.d/lang.sh $MNTTMP/etc/profile.d/lang.sh
@@ -113,13 +109,20 @@ cp ${DIRTEMP}work/initramfs.igz $MNTTMP/boot/
#copy fstab for usbkey
#####################################################################
cp -f fstab.usbkey $MNTTMP/etc/fstab
-DDUID=` blkid | grep /dev/sdb1 | cut -d \" -f 2`
+DDUID=` blkid | grep ${USBDEVICE} | cut -d \" -f 2`
echo "${DDUID}       /       ext3     defaults        1 1 "  >> 
$MNTTMP/etc/fstab

#####################################################################
#grub install
#####################################################################
-chroot $MNTTMP grub-install --no-floppy ${USBDEVICE:0:8}
+
+Build_Syslinux
+mkdir -p $MNTTMP/boot
+$HOMESOURCE/static/syslinux/sbin/extlinux -i $MNTTMP/boot
+cp $HOMESOURCE/extlinux.conf $MNTTMP/boot/extlinux.conf
+echo "append /boot/vmlinuz ro root=UUID=${DDUID}  quiet CONSOLE=/dev/tty1 
bootusb" >> $MNTTMP/extlinux.conf
+#install the mbr
+cat $HOMESOURCE/static/syslinux/usr/share/syslinux/mbr.bin > ${USBDEVICE:0:8}
umount $MNTTMP/proc
umount $MNTTMP/sys
umount $MNTTMP/dev
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to