Some debugging helpers
Install terminfo files so that less is useful. Also, timeout mounting the rootfs so that we can debug bettermaster
parent
7a18688c32
commit
ca9f625917
|
@ -33,6 +33,9 @@ for rule in /lib/udev/rules.d/40-redhat* /lib/udev/rules.d/60-persistent-storage
|
|||
cp -v $rule $tmpdir/lib/udev/rules.d
|
||||
done
|
||||
|
||||
# terminfo bits make things work better if you fall into interactive mode
|
||||
for f in $(find /lib/terminfo -type f) ; do cp -v --parents $f "$tmpdir" ; done
|
||||
|
||||
# install our files
|
||||
cp -v init $tmpdir/init
|
||||
cp -v switch_root $tmpdir/sbin/switch_root
|
||||
|
|
4
init
4
init
|
@ -7,6 +7,7 @@
|
|||
|
||||
emergency_shell()
|
||||
{
|
||||
echo ; echo
|
||||
echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
|
||||
echo
|
||||
bash
|
||||
|
@ -61,6 +62,9 @@ while [ ! -e $root ]; do
|
|||
echo -n "."
|
||||
sleep 1
|
||||
tries=$(($tries + 1))
|
||||
if [ $tries -gt 10 ]; then
|
||||
emergency_shell
|
||||
fi
|
||||
done
|
||||
echo -e "\n\nMounted rootfs after $tries seconds"
|
||||
ln -s "$root" /dev/root
|
||||
|
|
Loading…
Reference in New Issue