mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-29 03:25:33 +03:00
output everything to /dev/kmesg and add dmesg for the emergency_shell
This commit is contained in:
parent
f601799e94
commit
83701d66f6
@ -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
|
||||||
|
@ -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" || :)
|
||||||
|
Loading…
Reference in New Issue
Block a user