Kaydet (Commit) 06777d2f authored tarafından sulincix's avatar sulincix

live boot search algorithm improveremnt

üst cc0f1027
......@@ -20,7 +20,7 @@ if [ "$skipglibc" != "true" ] && [ "$skipudev" != "true" ] ; then
done
touch ${WORKDIR}/etc/modprobe.d/modprobe.conf
#copy binaries
copy_binary udevadm udevd
copy_binary udevadm udevd tmpfiles vgscan vschange
else
warn "udev will not install"
fi
......@@ -4,14 +4,18 @@ ls /lib/modules/*/fs/ | sed "s/^/modprobe /g" | sed "s/$/ &/g" > /fs
sh /fs &>/dev/null
if [ -x /xbin/udevd -a -x /xbin/udevadm ] && [ "$noudev" != "true" ]; then
msg "Triggering udev"
mdev -s
/xbin/udevd --daemon
/xbin/udevadm trigger --action=add
/xbin/udevadm settle --timeout=10
/xbin/udevadm trigger --action=add --type=subsystems
/xbin/udevadm trigger --action=add --type=devices
/xbin/udevadm trigger --action=change --type=devices
/xbin/udevadm settle
vgscan --mknodes --ignorelockingfailure >/dev/null 2>&1
vgchange --sysinit --activate y >/dev/null 2>&1
else
debug "Listing kernel modules"
find /lib/modules/ | sed "s/.*\///g" | grep "\.ko" | sed "s/.ko.*/ &/g" | sed "s/^/modprobe /g"> /load_modules.sh
msg "Trying to load kernel modules"
sh /load_modules.sh &>/dev/null
fi
msg "Waiting for kernel modules"
sleep 2
......@@ -63,10 +63,11 @@ live_config(){
}
live_boot(){
[ "$sfs" == "" ] && sfs="/main.sfs"
if [ "$root" == "" ] ; then
while [ "$root" == "" ] ; do
list=$(ls /sys/class/block/ | grep ".*[0-9]$" | grep -v loop | grep -v ram | grep -v nbd | sed "s|^|/dev/|g")
for part in $list
do
sleep 0.1
debug "Looking for" "$part"
if is_file_avaiable "$part" "${sfs}"
then
......@@ -74,9 +75,7 @@ live_boot(){
export root=$part
fi
done
else
msg "Force setting root" "$root"
fi
done
debug "Mounting live media"
mkdir /output
mkdir /source
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment