ffe825113e
Currently, calling the troubleshoot function in a ramdisk script doesn't work as expected on dracut ramdisks. This adds an alternate troubleshoot implementation that will behave as intended. I did not make it conditional on a kernel param as was done in the original because dracut can behave strangely if you allow it to continue after an error. Always dropping to a shell immediately should be less confusing. Change-Id: I98000f4ac6d7890b1f44fe4d10394ac0ea332fcb
17 lines
543 B
Bash
Executable File
17 lines
543 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# NOTE(bnemec): Dracut doesn't like it if we enable these
|
|
# dib-lint: disable=setu sete setpipefail dibdebugtrace
|
|
|
|
# We never let Dracut boot off the specified root anyway, so all
|
|
# we need is a value it will accept.
|
|
root=/dev/zero
|
|
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
|
|
mount -n --bind -o ro /run/cmdline /proc/cmdline
|
|
# Force Dracut to re-read the cmdline args
|
|
CMDLINE=
|