#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+strstr() { [ "${1#*$2*}" != "$1" ]; }
+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
+plymouth --quit
exec >/dev/console 2>&1
echo "dracut-root-block-success" >/dev/sda1
export TERM=linux
export PS1='initramfs-test:\w\$ '
-[ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab
+[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
+[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab
stty sane
-echo "made it to the rootfs! Powering down."
+echo "made it to the rootfs!"
+strstr "$CMDLINE" "rd.shell" && sh -i
+echo "Powering down."
mount -n -o remount,ro /
poweroff -f
KVERSION=${KVERSION-$(uname -r)}
# Uncomment this to debug failures
-#DEBUGFAIL="rd.shell"
+#DEBUGFAIL="rd.break rd.shell"
test_run() {
$testdir/run-qemu -hda root.ext2 -m 256M -nographic \
find_binary plymouth >/dev/null && dracut_install plymouth
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
+ mkdir $initdir/run
sudo ldconfig -r "$initdir"
)
udevadm settle
sfdisk -g /dev/mapper/isw*Test0
# save a partition at the beginning for future flagging purposes
-sfdisk -C 1280 -H 2 -S 32 -L /dev/mapper/isw*Test0 <<EOF
+sfdisk -C 2560 -H 2 -S 32 -L /dev/mapper/isw*Test0 <<EOF
,1
-,300
-,300
-,300
+,600
+,600
+,600
EOF
udevadm settle
#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+strstr() { [ "${1#*$2*}" != "$1" ]; }
+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
+plymouth --quit
exec >/dev/console 2>&1
echo "dracut-root-block-success" >/dev/sda
export TERM=linux
cat /proc/mdstat
[ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab
stty sane
-echo "made it to the rootfs! Powering down."
+echo "made it to the rootfs!"
+strstr "$CMDLINE" "rd.shell" && sh -i
+echo "Powering down."
mount -n -o remount,ro /
poweroff -f
KVERSION=${KVERSION-$(uname -r)}
# Uncomment this to debug failures
-DEBUGFAIL="rd.shell"
+#DEBUGFAIL="rd.shell rd.break"
#DEBUGFAIL="$DEBUGFAIL udev.log-priority=debug"
client_run() {
test_setup() {
# Create the blank file to use as a root filesystem
dd if=/dev/zero of=root.ext2 bs=1M count=1
- dd if=/dev/zero of=disk1 bs=1M count=40
- dd if=/dev/zero of=disk2 bs=1M count=40
+ dd if=/dev/zero of=disk1 bs=1M count=80
+ dd if=/dev/zero of=disk2 bs=1M count=80
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
find_binary plymouth >/dev/null && dracut_install plymouth
(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
+ mkdir $initdir/run
sudo ldconfig -r "$initdir"
)