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

commit 3c774c22498da96e8fdd0cacdd4a17f142bc3b3d
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Wed Nov 25 14:47:24 2009 +0000

create_usblive.sh
*use liveusbkey
*removed trailing spaces
*added var $PKG for add some packages
*use hardwareclock hosting
*fixed usb fstab
*delete mtab hosting
*delete useless root=UUID from extlinux.conf

diff --git a/create_usblive.sh b/create_usblive.sh
index 6f41690..618895c 100755
--- a/create_usblive.sh
+++ b/create_usblive.sh
@@ -16,7 +16,7 @@ DIRTEMP=/tmp/init/
. $HOMESOURCE/default.sh
. $HOMESOURCE/create_functions.sh
. $HOMESOURCE/create_static.sh
-. /etc/sysconfig/usbkey.config.sh
+. /etc/sysconfig/liveusbkey

#####################################################################
#check if root user
@@ -33,7 +33,7 @@ mkdir -p $MNTTMP
#####################################################################
#where is the usb key ? (/dev/sdXX)
#####################################################################
-if [ "$USBDEVICE" == "" ]; then
+if [ "$USBDEVICE" == "" ]; then
bad_msg "You should define USBDEVICE into /etc/sysconfig/usbkey.config"
exit 0
fi
@@ -70,7 +70,7 @@ mount $USBDEVICE $MNTTMP
sleep 10
#wait the time to mount it
LigneMtab=$(grep $USBDEVICE /etc/mtab)
-if [ "$LigneMtab" == "" ]; then
+if [ "$LigneMtab" == "" ]; then
bad_msg "Couldn't mount $MNTTMP"
exit 0
fi
@@ -78,23 +78,23 @@ fi
#####################################################################
#install the base
#####################################################################
-pacman-g2 -Sy core base -r $MNTTMP --noconfirm
+pacman-g2 -Sy core base $PKG -r $MNTTMP --noconfirm

#####################################################################
#configure the chroot
#####################################################################
mkdir -p $MNTTMP/etc
-cp -f /etc/fstab $MNTTMP/etc/
+cp -f /etc/fstab $MNTTMP/etc/fstab
cp -f /etc/mtab $MNTTMP/etc/
cp -f /etc/resolv.conf $MNTTMP/etc/

-
#####################################################################
#Some env variable
#####################################################################
cp -f /etc/profile.d/lang.sh $MNTTMP/etc/profile.d/lang.sh
chmod +x $MNTTMP/etc/profile.d/lang.sh
cp -f /etc/sysconfig/keymap $MNTTMP/etc/sysconfig/keymap
+cp -f /etc/hardwareclock $MNTTMP/etc/hardwareclock

#####################################################################
#create initrd
@@ -109,7 +109,7 @@ cp ${DIRTEMP}work/initramfs.igz $MNTTMP/boot/initramfs.igz
#####################################################################
cp -f $HOMESOURCE/fstab.usbkey $MNTTMP/etc/fstab
DDUID=` blkid | grep ${USBDEVICE} | cut -d \" -f 2`
-echo "${DDUID}       /       ext2     defaults        1 1 "  
>> $MNTTMP/etc/fstab
+echo "UUID=${DDUID}            /         ext3       defaults         0   0">> 
$MNTTMP/etc/fstab

#####################################################################
#change password root
@@ -117,6 +117,11 @@ echo "${DDUID}       /       ext2    
 defaults        1 1 "  >>
chroot $MNTTMP passwd

#####################################################################
+#update modules
+#####################################################################
+chroot $MNTTMP depmod -a
+
+#####################################################################
#this file is detected by initramfs for determine /
#####################################################################
date > $MNTTMP/FrugalMove
@@ -128,12 +133,13 @@ date > $MNTTMP/FrugalMove
Build_Syslinux
mkdir -p $MNTTMP/boot/extlinux
cp $HOMESOURCE/extlinux.conf $MNTTMP/boot/extlinux.conf
-echo "append initrd=/boot/initramfs.igz ro root=UUID=${DDUID}  quiet 
CONSOLE=/dev/tty1 bootusb" >> $MNTTMP/boot/extlinux.conf
+echo "append initrd=/boot/initramfs.igz ro quiet CONSOLE=/dev/tty1 bootusb" >> 
$MNTTMP/boot/extlinux.conf

#install extlinux
$HOMESOURCE/static/syslinux/sbin/extlinux -i $MNTTMP/boot

#umount filesystem
+rm -f $MNTTMP/etc/mtab
umount $MNTTMP

#install mbr
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to