|
|
[PHP]# Remount the root filesystem read-write.
#state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
#[ "$state" != "rw" ] && \
action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw /
# Mount /proc (done here so volume labels can work with fsck)
action $"Mounting proc filesystem: " mount -n -t proc /proc /proc
action $"Mounting sysfs filesystem: " mount -n -t sysfs /sys /sys
###################################################################
#加设备驱动程序
#modprobe sata_promise
#modprobe sata_sx4
#/modules-init-tools/insmod /lib/modules/2.6.11.11/kernel/drivers/scsi/sata_promise.ko
###################################################################
SOLID="/solid"
SOLIDFS="ext2"
MAX_BLOCK=500000
MIN_BLOCK=60000
echo " robing system partition..."
while [ 1=1 ]; do
SYSTEM_PARTITION=`awk '$3<MAX && $3>MIN {print "/dev/" $4}' MAX="$MAX_BLOCK" MIN="$MIN_BLOCK" /proc/partitions`
if [ -z "$SYSTEM_PARTITION" ]; then
echo "not found system partition ......"
sleep 1
else
echo "system is: $SYSTEM_PARTITION"
break
fi
done
# mount system_partition
# link /etc to hard disk
#
action $"Mounting system disk" mount -t $SOLIDFS $SYSTEM_PARTITION $SOLID -o noatime,sync
if [ -d $SOLID/etc ]; then
mv /etc /.etc.Orig
ln -sf $SOLID/etc /etc
>/etc/mtab
echo `date` > /etc/CURRENT
else
echo `date` > $SOLID/ERROR
echo "*** Mounting system_partition maybe failed, "
sleep 1
fi
#
# Append to /etc/fstab file every start
# echo "/dev/ram0 / ext2 defaults 0 0" > /etc/fstab
#
#echo "Appending fstab file... "
#cp -dpR /etc/fstab.base /etc/fstab
#echo "$SYSTEM_PARTITION $SOLID $SOLIDFS noauto 0 0" >> /etc/fstab
####
# Mounting the partition for saving configuration files
# and log files. This partition is on hardisk or DOC/DOM,
# so we can restore the data after reboot.
# Otherwise, all files are located on ram disk,
# files gone away after restart the system.
#
# Remount the root filesystem read-write.
#state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
#[ "$state" != "rw" ] && \
action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw /
#action $"Activating swap partitions: " swapon -a -e -p0
>/etc/mtab[/PHP]
为什么我的LFS中提示找不到这个"action"命令?
我想让我的lfs 在启动这前先挂载第一个分区,然后把这个分区上的一个etc ln -sf 到统中用!
请问我该怎么做?
这事很急,请高手勿必回答一下! |
|