output everything to /dev/kmesg and add dmesg for the emergency_shell

This commit is contained in:
Harald Hoyer 2009-07-03 11:09:33 +02:00
parent f601799e94
commit 83701d66f6
2 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,8 @@
emergency_shell() emergency_shell()
{ {
exec >/dev/console 2>&1 </dev/console
getarg rdinitdebug || dmesg
source_all emergency source_all emergency
echo ; echo 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!"
@ -64,7 +66,12 @@ if [ ! -c /dev/ptmx ]; then
fi fi
fi fi
getarg rdinitdebug && set -x if getarg rdinitdebug; then
set -x
else
exec >/dev/kmsg 2>&1
fi
mkdir /dev/shm mkdir /dev/shm
mkdir /dev/pts mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1 mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
dracut_install mount mknod mkdir modprobe pidof sleep chroot sed ls flock cp mv dracut_install mount mknod mkdir modprobe pidof sleep chroot sed ls flock cp mv dmesg
if [ ! -e "${initdir}/bin/sh" ]; then if [ ! -e "${initdir}/bin/sh" ]; then
dracut_install bash dracut_install bash
(ln -s bash "${initdir}/bin/sh" || :) (ln -s bash "${initdir}/bin/sh" || :)