hybrid-mbr: cleanup test, wait for udev after paritioning

This commit is contained in:
lassulus 2024-02-17 05:02:53 +01:00 committed by mergify[bot]
parent 810eccbad2
commit c13d481b78
2 changed files with 4 additions and 2 deletions

View file

@ -1,9 +1,9 @@
{disks ? ["/dev/sda"], ...}: { {
disko.devices = { disko.devices = {
disk = { disk = {
main = { main = {
type = "disk"; type = "disk";
device = builtins.elemAt disks 0; device = "/dev/sdb";
content = { content = {
type = "gpt"; type = "gpt";
efiGptPartitionFirst = false; efiGptPartitionFirst = false;

View file

@ -99,6 +99,8 @@ in
default = '' default = ''
${lib.optionalString (hp.config.mbrPartitionType != null) '' ${lib.optionalString (hp.config.mbrPartitionType != null) ''
sfdisk --label-nested dos --part-type ${parent.device} ${(toString partition.config._index)} ${hp.config.mbrPartitionType} sfdisk --label-nested dos --part-type ${parent.device} ${(toString partition.config._index)} ${hp.config.mbrPartitionType}
udevadm trigger --subsystem-match=block
udevadm settle
''} ''}
${lib.optionalString hp.config.mbrBootableFlag '' ${lib.optionalString hp.config.mbrBootableFlag ''
sfdisk --label-nested dos --activate ${parent.device} ${(toString partition.config._index)} sfdisk --label-nested dos --activate ${parent.device} ${(toString partition.config._index)}