mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
init: Validate the real init after devtmpfs is mounted under the real root
Currently 'run-init -n' will fail if there's no static /dev/console on
the real root. We have to run it after udev's init-bottom script has
moved /dev to ${rootmnt}/dev.
Closes: #811479
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
280d461722
commit
4fa3fe4d7d
27
init
27
init
@ -236,6 +236,20 @@ if read_fstab_entry /usr; then
|
||||
log_end_msg
|
||||
fi
|
||||
|
||||
# Mount cleanup
|
||||
mount_bottom
|
||||
nfs_bottom
|
||||
local_bottom
|
||||
|
||||
maybe_break bottom
|
||||
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom"
|
||||
# We expect udev's init-bottom script to move /dev to ${rootmnt}/dev
|
||||
run_scripts /scripts/init-bottom
|
||||
[ "$quiet" != "y" ] && log_end_msg
|
||||
|
||||
# Move /run to the root
|
||||
mount -n -o move /run ${rootmnt}/run
|
||||
|
||||
validate_init() {
|
||||
run-init -n "${rootmnt}" "${1}"
|
||||
}
|
||||
@ -252,19 +266,6 @@ if ! validate_init "$init"; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Mount cleanup
|
||||
mount_bottom
|
||||
nfs_bottom
|
||||
local_bottom
|
||||
|
||||
maybe_break bottom
|
||||
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom"
|
||||
run_scripts /scripts/init-bottom
|
||||
[ "$quiet" != "y" ] && log_end_msg
|
||||
|
||||
# Move /run to the root
|
||||
mount -n -o move /run ${rootmnt}/run
|
||||
|
||||
# No init on rootmount
|
||||
if ! validate_init "${init}" ; then
|
||||
panic "No init found. Try passing init= bootarg."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user