Browse Source
The last changes made the 00test module really awkward anyways, so just hack the test module into the initramfs in a slight more brutal fashion.master


5 changed files with 41 additions and 14 deletions
@ -1,5 +0,0 @@
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh |
||||
dracut_install sfdisk mke2fs poweroff cp umount e2mkdir |
||||
inst_hook pre-pivot 02 "$moddir/halt.sh" |
||||
inst_hook pre-pivot 01 "$moddir/copy-root.sh" |
||||
inst_hook pre-mount 01 "$moddir/create-root.sh" |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh |
||||
cp -a -t "$NEWROOT" /source/* |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh |
||||
sfdisk -C 640 -H 2 -S 32 -L /dev/sda <<EOF |
||||
,213 |
||||
,213 |
||||
,213 |
||||
; |
||||
EOF |
||||
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda1 /dev/sda2 /dev/sda3 |
||||
echo -n test >keyfile |
||||
cryptsetup -q luksFormat /dev/md0 /keyfile |
||||
echo "The passphrase is test" |
||||
cryptsetup luksOpen /dev/md0 dracut_crypt_test </keyfile |
||||
lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test |
||||
lvm vgcreate dracut /dev/mapper/dracut_crypt_test |
||||
lvm lvcreate -l 100%FREE -n root dracut |
||||
udevadm settle --timeout=4 |
||||
[ -b /dev/dracut/root ] || emergency_shell |
||||
mke2fs /dev/dracut/root |
||||
e2mkdir /dev/dracut/root:/proc |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh |
||||
umount "$NEWROOT" |
||||
lvm lvchange -a n /dev/dracut/root |
||||
cryptsetup luksClose /dev/mapper/dracut_crypt_test |
||||
poweroff -f |
Loading…
Reference in new issue