diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:35 +0000 |
commit | e6f2eaf47a177a8eca054d1d70a1b6287e8c3521 (patch) | |
tree | c5719e819a9e37df4b54affd61438f382ec38a8f /test/TEST-13-ENC-RAID-LVM/create-root.sh | |
parent | Adding upstream version 060+5. (diff) | |
download | dracut-e6f2eaf47a177a8eca054d1d70a1b6287e8c3521.tar.xz dracut-e6f2eaf47a177a8eca054d1d70a1b6287e8c3521.zip |
Adding upstream version 102.upstream/102
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/TEST-13-ENC-RAID-LVM/create-root.sh')
-rwxr-xr-x | test/TEST-13-ENC-RAID-LVM/create-root.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh index b681e6b..c51d027 100755 --- a/test/TEST-13-ENC-RAID-LVM/create-root.sh +++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh @@ -13,12 +13,12 @@ udevadm settle set -ex printf test > keyfile -cryptsetup -q luksFormat /dev/disk/by-id/ata-disk_disk1 /keyfile -cryptsetup -q luksFormat /dev/disk/by-id/ata-disk_disk2 /keyfile -cryptsetup -q luksFormat /dev/disk/by-id/ata-disk_disk3 /keyfile -cryptsetup luksOpen /dev/disk/by-id/ata-disk_disk1 dracut_disk1 < /keyfile -cryptsetup luksOpen /dev/disk/by-id/ata-disk_disk2 dracut_disk2 < /keyfile -cryptsetup luksOpen /dev/disk/by-id/ata-disk_disk3 dracut_disk3 < /keyfile +cryptsetup -q luksFormat /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk1 /keyfile +cryptsetup -q luksFormat /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk2 /keyfile +cryptsetup -q luksFormat /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk3 /keyfile +cryptsetup luksOpen /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk1 dracut_disk1 < /keyfile +cryptsetup luksOpen /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk2 dracut_disk2 < /keyfile +cryptsetup luksOpen /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk3 dracut_disk3 < /keyfile mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/mapper/dracut_disk1 /dev/mapper/dracut_disk2 /dev/mapper/dracut_disk3 # wait for the array to finish initializing, otherwise this sometimes fails # randomly. @@ -28,7 +28,7 @@ lvm vgcreate dracut /dev/md0 lvm lvcreate -l 100%FREE -n root dracut lvm vgchange -ay -mkfs.ext4 /dev/dracut/root +mkfs.ext4 -q /dev/dracut/root mkdir -p /sysroot mount -t ext4 /dev/dracut/root /sysroot cp -a -t /sysroot /source/* @@ -42,9 +42,9 @@ cryptsetup luksClose /dev/mapper/dracut_disk3 { echo "dracut-root-block-created" - for i in /dev/disk/by-id/ata-disk_disk[123]; do + for i in /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_disk[123]; do udevadm info --query=property --name="$i" | grep -F 'ID_FS_UUID=' done -} | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker +} | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none sync poweroff -f |