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
|
cp -v $rule $tmpdir/lib/udev/rules.d
|
||||||
done
|
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
|
# install our files
|
||||||
cp -v init $tmpdir/init
|
cp -v init $tmpdir/init
|
||||||
cp -v switch_root $tmpdir/sbin/switch_root
|
cp -v switch_root $tmpdir/sbin/switch_root
|
||||||
|
|
4
init
4
init
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
emergency_shell()
|
emergency_shell()
|
||||||
{
|
{
|
||||||
|
echo ; echo
|
||||||
echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
|
echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
|
||||||
echo
|
echo
|
||||||
bash
|
bash
|
||||||
|
@ -61,6 +62,9 @@ while [ ! -e $root ]; do
|
||||||
echo -n "."
|
echo -n "."
|
||||||
sleep 1
|
sleep 1
|
||||||
tries=$(($tries + 1))
|
tries=$(($tries + 1))
|
||||||
|
if [ $tries -gt 10 ]; then
|
||||||
|
emergency_shell
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
echo -e "\n\nMounted rootfs after $tries seconds"
|
echo -e "\n\nMounted rootfs after $tries seconds"
|
||||||
ln -s "$root" /dev/root
|
ln -s "$root" /dev/root
|
||||||
|
|
Loading…
Reference in New Issue