#!/bin/sh
mount -t proc proc /proc
+echo "************************************************************" >&2
+cat /proc/cmdline >&2
+echo "************************************************************" >&2
+if grep -qw rescue /proc/cmdline ; then
+ cat <<EOF >&2
+ ____ _____ ____ ____ _ _ _____ ____ ___ ___ _____
+| _ \| ____/ ___| / ___| | | | ____| | __ ) / _ \ / _ \_ _|
+| |_) | _| \___ \| | | | | | _| | _ \| | | | | | || |
+| _ <| |___ ___) | |___| |_| | |___ | |_) | |_| | |_| || |
+|_| \_\_____|____/ \____|\___/|_____| |____/ \___/ \___/ |_|
+***************************************************************
+EOF
+else
+ umount /proc
+ exec /init.FS
+fi
+
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
mkdir /dev/pts
mount -t devpts devpts /dev/pts
-
-#MODULES=" \
-#scsi_mod sd_mod ata_piix \
-#crc32c ext4 \
-#nls_ascii nls_cp437 vfat fat \
-#"
-#for m in $MODULES ; do modprobe $m ; done
-
-cat <<EOF | /bin/sh > udev.log 2>&1
-udevd -d -D
-udevadm trigger -c add -v
-EOF
-
-cat message.txt
-
+udevd -d -c 500 --resolve-names=never
+udevadm trigger -c add
+udevadm settle
+cat message.txt >&2
exec setsid cttyhack sh