Skip to content
Snippets Groups Projects
Unverified Commit 489f5a32 authored by Caleb Connolly's avatar Caleb Connolly :recycle:
Browse files

postmarketos-initramfs: better wait_[br]oot_partition


Rework the messages and avoid re-spawning the splash on every check.
Additionally, add a call to check_keys, this lets users drop to a debug
shell or export logs to triage this failure (particularly useful for
hard-to-reproduce issues).

Finally, add a (liberal) 30 second timeout and dump logs at the end. If
we're just waiting for a device to show up and it doesn't after 30
seconds then it's probably never going to...

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent 35906f8f
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ sha512sums="
0fed7dfdf940f5de15ca2fa636214d44ee8549afe5001b81beb0e337e865eb737916e158bc0ed7a7803adc81176386ae8edfc21150de62bb136fdfcdcb888b8b 00-initramfs-base.files
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
42ff1c71326ce8ad1f023031b3aa3d96e2b6ab5daf035a363f59a9c17255a348d59adbe808d44f6c31cb03a1c4a0278111c8b7842b7cf1854c1693db3836b7a9 init.sh
cf5b0beaffff0aa17196af39ac7e84d890ee5c9487920e12af7079728c713dc3bb170f3045797f09be436885d02d2ba5dea98c0a3ab08e3aad3bbf66aecb711d init_functions.sh
428ba0fa6497a253d480d010bce40b68811433309b3319d45363932dc3e3c23a2bf13467a9d4caf0c081c9884d77637fc3cf8447827a236483123bf257216166 init_functions.sh
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
"
......@@ -361,23 +361,41 @@ extract_initramfs_extra() {
}
wait_boot_partition() {
while [ -z "$(find_boot_partition)" ]; do
show_splash "ERROR: boot partition not found, retrying...\\nhttps://postmarketos.org/troubleshooting"
echo "Could not find the boot partition."
echo "If your install is on a removable disk, maybe you need to insert it?"
echo "Trying again..."
if [ -n "$PMOS_BOOT" ]; then
return
fi
show_splash "Waiting for boot partition...\\nhttps://postmarketos.org/troubleshooting"
for _ in $(seq 1 30); do
if [ -n "$(find_boot_partition)" ]; then
return
fi
echo "Waiting for boot partition..."
sleep 1
check_keys ""
done
show_splash "ERROR: Boot partition not found!\\nhttps://postmarketos.org/troubleshooting"
fail_halt_boot
}
wait_root_partition() {
while [ -z "$(find_root_partition)" ]; do
show_splash "ERROR: root partition not found, retrying...\\nhttps://postmarketos.org/troubleshooting"
echo "Could not find the rootfs."
echo "If your install is on a removable disk, maybe you need to insert it?"
echo "Trying again..."
if [ -n "$PMOS_ROOT" ]; then
return
fi
show_splash "Waiting for root partition...\\nhttps://postmarketos.org/troubleshooting"
for _ in $(seq 1 30); do
if [ -n "$(find_root_partition)" ]; then
return
fi
echo "Waiting for root partition..."
sleep 1
check_keys ""
done
show_splash "ERROR: Root partition not found!\\nhttps://postmarketos.org/troubleshooting"
fail_halt_boot
}
delete_old_install_partition() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment