diff --git a/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh b/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh index fe3f9c4a..6582fe16 100755 --- a/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh +++ b/elements/dracut-ramdisk/extra-data.d/scripts/module/deploy-cmdline.sh @@ -11,8 +11,6 @@ rootok=1 # Dracut doesn't correctly parse the ip argument passed to us. # Override /proc/cmdline to rewrite it in a way dracut can grok. sed 's/\(ip=\S\+\)/\1:::off/' /proc/cmdline > /run/cmdline -# Map the existing "troubleshoot" kernel param to the Dracut equivalent. -sed -i 's/troubleshoot=/rd.shell=/' /run/cmdline mount -n --bind -o ro /run/cmdline /proc/cmdline # Force Dracut to re-read the cmdline args CMDLINE= diff --git a/elements/dracut-ramdisk/init.d/00-override-troubleshoot b/elements/dracut-ramdisk/init.d/00-override-troubleshoot new file mode 100644 index 00000000..5a8c5a95 --- /dev/null +++ b/elements/dracut-ramdisk/init.d/00-override-troubleshoot @@ -0,0 +1,7 @@ +# NOTE(bnemec): Dracut provides its own emergency shell, and it doesn't +# seem to allow directly starting bash as the existing troubleshoot function +# does. +function troubleshoot() { + echo "Starting troubleshooting shell." + emergency_shell +}