-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Due to parallel probing of the linux kernel `/dev/sd*` can't be used to reliably address a hard disk. This can be seen by the many spurious failures of the dracut CI, where `mdadm` failed with error 524 or tests failed due to the success marker message written to the wrong disk. * don't rely on `/dev/sd*` but use disk ids and `/dev/disk/by-id/ata-disk_<name>` * specify the exact qemu machine architecture `-M q35` needed for the disk ids. A later patch will move this to `run-qemu`, when all tests are converted * due to `-M q35` the interface names have changed from `ens2` -> `enp0s1` and `ens3` -> `enp0s2`
- Loading branch information
Showing
81 changed files
with
918 additions
and
840 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
#!/bin/sh | ||
|
||
trap 'poweroff -f' EXIT | ||
|
||
# don't let udev and this script step on eachother's toes | ||
for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do | ||
: > "/etc/udev/rules.d/$x" | ||
done | ||
rm -f -- /etc/lvm/lvm.conf | ||
udevadm control --reload | ||
set -e | ||
# save a partition at the beginning for future flagging purposes | ||
sfdisk /dev/sda << EOF | ||
,1M | ||
, | ||
EOF | ||
|
||
udevadm settle | ||
mkfs.ext3 -L ' rdinit=/bin/sh' /dev/sda2 | ||
|
||
set -ex | ||
|
||
mkfs.ext3 -L ' rdinit=/bin/sh' /dev/disk/by-id/ata-disk_root | ||
mkdir -p /root | ||
mount /dev/sda2 /root | ||
mount /dev/disk/by-id/ata-disk_root /root | ||
cp -a -t /root /source/* | ||
mkdir -p /root/run | ||
umount /root | ||
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1 | ||
sync | ||
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker | ||
poweroff -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
#!/bin/sh | ||
|
||
trap 'poweroff -f' EXIT | ||
|
||
# don't let udev and this script step on eachother's toes | ||
for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do | ||
: > "/etc/udev/rules.d/$x" | ||
done | ||
rm -f -- /etc/lvm/lvm.conf | ||
udevadm control --reload | ||
set -e | ||
# save a partition at the beginning for future flagging purposes | ||
sfdisk /dev/sda << EOF | ||
,1M | ||
, | ||
EOF | ||
|
||
udevadm settle | ||
mkfs.ext3 -L dracut /dev/sda2 | ||
mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root | ||
mkdir -p /root | ||
mount /dev/sda2 /root | ||
mount /dev/disk/by-id/ata-disk_root /root | ||
cp -a -t /root /source/* | ||
mkdir -p /root/run | ||
umount /root | ||
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1 | ||
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker | ||
poweroff -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,33 @@ | ||
#!/bin/sh | ||
|
||
trap 'poweroff -f' EXIT | ||
|
||
# don't let udev and this script step on eachother's toes | ||
set -x | ||
for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do | ||
: > "/etc/udev/rules.d/$x" | ||
done | ||
rm -f -- /etc/lvm/lvm.conf | ||
udevadm control --reload | ||
udevadm settle | ||
set -e | ||
# save a partition at the beginning for future flagging purposes | ||
sfdisk /dev/sda << EOF | ||
,1M | ||
, | ||
EOF | ||
|
||
sfdisk /dev/sdb << EOF | ||
,1M | ||
, | ||
EOF | ||
|
||
udevadm settle | ||
modprobe btrfs | ||
mkfs.btrfs -L dracut /dev/sda2 | ||
mkfs.btrfs -L dracutusr /dev/sdb2 | ||
btrfs device scan /dev/sda2 | ||
btrfs device scan /dev/sdb2 | ||
mkfs.btrfs -L dracut /dev/disk/by-id/ata-disk_root | ||
mkfs.btrfs -L dracutusr /dev/disk/by-id/ata-disk_usr | ||
btrfs device scan /dev/disk/by-id/ata-disk_root | ||
btrfs device scan /dev/disk/by-id/ata-disk_usr | ||
mkdir -p /root | ||
mount -t btrfs /dev/sda2 /root | ||
mount -t btrfs /dev/disk/by-id/ata-disk_root /root | ||
[ -d /root/usr ] || mkdir -p /root/usr | ||
mount -t btrfs /dev/sdb2 /root/usr | ||
mount -t btrfs /dev/disk/by-id/ata-disk_usr /root/usr | ||
btrfs subvolume create /root/usr/usr | ||
umount /root/usr | ||
mount -t btrfs -o subvol=usr /dev/sdb2 /root/usr | ||
mount -t btrfs -o subvol=usr /dev/disk/by-id/ata-disk_usr /root/usr | ||
cp -a -t /root /source/* | ||
mkdir -p /root/run | ||
btrfs filesystem sync /root/usr | ||
btrfs filesystem sync /root | ||
umount /root/usr | ||
umount /root | ||
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1 | ||
udevadm settle | ||
sync | ||
echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker | ||
poweroff -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/dev/sda2 / btrfs defaults 0 0 | ||
/dev/sdb2 /usr btrfs subvol=usr,ro 0 0 | ||
/dev/disk/by-id/ata-disk_root / btrfs defaults 0 0 | ||
/dev/disk/by-id/ata-disk_usr /usr btrfs subvol=usr,ro 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.