f528aa316e
We don't actually need a real value for the root kernel param, and requiring one causes problems for things like the discovery ramdisk that don't pass in a disk= parameter. Dracut seems to be happy to take /dev/zero as the value, so we can just always use that. Change-Id: Ia724f0214c26aa18c6f8f41f2c48d7f25b52ee6c
19 lines
651 B
Bash
Executable File
19 lines
651 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# NOTE(bnemec): Dracut doesn't like it if we enable these
|
|
# dib-lint: disable=setu sete setpipefail
|
|
|
|
# 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
|
|
# 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=
|