Skip to content

Instantly share code, notes, and snippets.

@mekb-turtle
Last active June 17, 2022 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mekb-turtle/aac3479e350f6248c6ddf426d2a61ac7 to your computer and use it in GitHub Desktop.
Save mekb-turtle/aac3479e350f6248c6ddf426d2a61ac7 to your computer and use it in GitHub Desktop.
lfs initramfs init.in for rootwait
--- init.in.a
+++ init.in.b
@@ -40,10 +40,16 @@
"" ) echo "No root device specified." ; problem ;;
esac
- while [ ! -b "$device" ] ; do
- no_device $device
- problem
- done
+ if [ -z "$rootwait" ] ; then
+ while [ ! -b "$device" ] ; do
+ no_device $device
+ problem
+ done
+ else
+ until [ -b "$device" ] ; do
+ sleep 0.005
+ done
+ fi
if ! mount -n -t "$rootfstype" -o "$rootflags" "$device" /.root ; then
no_mount $device
@@ -93,6 +99,7 @@
rootflags=* ) rootflags=${param#rootflags=} ;;
resume=* ) resume=${param#resume=} ;;
noresume ) noresume=true ;;
+ rootwait ) rootwait=true ;;
ro ) ro="ro" ;;
rw ) ro="rw" ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment