[PATCH 26/50] Make init less noisy and load fs modules for all mounted filesystems
parent
213c781797
commit
bc6b0dec9e
5
dracut
5
dracut
|
@ -115,6 +115,11 @@ for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
|
||||||
|
|
||||||
instmods $modules
|
instmods $modules
|
||||||
|
|
||||||
|
# Grab modules for all filesystem types we currently know about
|
||||||
|
while read d mp t rest; do
|
||||||
|
instmods "$t"
|
||||||
|
done </proc/mounts
|
||||||
|
|
||||||
/sbin/depmod -a -b "$initdir" $kernel || {
|
/sbin/depmod -a -b "$initdir" $kernel || {
|
||||||
error "\"/sbin/depmod -a $kernel\" failed."
|
error "\"/sbin/depmod -a $kernel\" failed."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
9
init
9
init
|
@ -41,6 +41,7 @@ mkdir /dev/pts
|
||||||
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
|
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
|
||||||
mknod /dev/tty0 c 4 0
|
mknod /dev/tty0 c 4 0
|
||||||
mknod /dev/tty1 c 4 1
|
mknod /dev/tty1 c 4 1
|
||||||
|
mknod /dev/null c 1 3
|
||||||
|
|
||||||
# start plymouth if it's available
|
# start plymouth if it's available
|
||||||
# arguably we need some of udev run first for fbmods and above devnodes :/
|
# arguably we need some of udev run first for fbmods and above devnodes :/
|
||||||
|
@ -50,7 +51,7 @@ mknod /dev/tty1 c 4 1
|
||||||
|
|
||||||
# start up udev and trigger cold plugs
|
# start up udev and trigger cold plugs
|
||||||
udevd --daemon
|
udevd --daemon
|
||||||
udevadm trigger
|
udevadm trigger >/dev/null 2>&1
|
||||||
|
|
||||||
# mount the rootfs
|
# mount the rootfs
|
||||||
NEWROOT="/sysroot"
|
NEWROOT="/sysroot"
|
||||||
|
@ -59,7 +60,7 @@ NEWROOT="/sysroot"
|
||||||
# it'd be nice if we had a udev rule that just did all of the bits for
|
# it'd be nice if we had a udev rule that just did all of the bits for
|
||||||
# figuring out what the specified root is and linking it /dev/root
|
# figuring out what the specified root is and linking it /dev/root
|
||||||
root=$(getarg 'root=*'); root=${root#root=}
|
root=$(getarg 'root=*'); root=${root#root=}
|
||||||
echo -n "Going to mount rootfs ($root)"
|
plymouth --update "Going to mount rootfs ($root)"
|
||||||
case $root in
|
case $root in
|
||||||
LABEL=*) root=${root#LABEL=}
|
LABEL=*) root=${root#LABEL=}
|
||||||
root=${root//\//\\x2f}
|
root=${root//\//\\x2f}
|
||||||
|
@ -71,12 +72,12 @@ esac
|
||||||
|
|
||||||
# should we have a timeout?
|
# should we have a timeout?
|
||||||
tries=0
|
tries=0
|
||||||
|
plymouth --update "Waiting up to 30 seconds for $root to become available"
|
||||||
until [[ -e $root ]]; do
|
until [[ -e $root ]]; do
|
||||||
echo -n "."
|
|
||||||
sleep 1
|
sleep 1
|
||||||
((tries++ > 30)) && emergency_shell
|
((tries++ > 30)) && emergency_shell
|
||||||
done
|
done
|
||||||
echo -e "\n\nMounting rootfs after $tries seconds"
|
plymouth --update "Mounting rootfs after $tries seconds"
|
||||||
ln -s "$root" /dev/root
|
ln -s "$root" /dev/root
|
||||||
mount -o ro /dev/root $NEWROOT || emergency_shell
|
mount -o ro /dev/root $NEWROOT || emergency_shell
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue