mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
types *: run udevadm settle after partprobe
This commit is contained in:
parent
38daf3c84a
commit
689873ae4f
5 changed files with 6 additions and 6 deletions
|
@ -43,9 +43,9 @@ let
|
|||
ln -sfn ${systemToInstall.config.system.build.etc}/etc/udev/rules.d /etc/udev/rules.d
|
||||
mkdir -p /dev/.mdadm
|
||||
${pkgs.systemdMinimal}/lib/systemd/systemd-udevd --daemon
|
||||
partprobe
|
||||
udevadm trigger --action=add
|
||||
udevadm settle
|
||||
partprobe
|
||||
|
||||
# populate nix db, so nixos-install doesn't complain
|
||||
export NIX_STATE_DIR=$TMPDIR/state
|
||||
|
|
|
@ -107,9 +107,9 @@ in
|
|||
--typecode=${toString partition._index}:${partition.type} \
|
||||
${config.device}
|
||||
# ensure /dev/disk/by-path/..-partN exists before continuing
|
||||
partprobe
|
||||
udevadm trigger --subsystem-match=block
|
||||
udevadm settle
|
||||
partprobe
|
||||
${lib.optionalString (partition.content != null) partition.content._create}
|
||||
'') sortedPartitions)}
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
--force \
|
||||
--homehost=any \
|
||||
"''${disk_devices[@]}"
|
||||
partprobe
|
||||
udevadm trigger --subsystem-match=block
|
||||
udevadm settle
|
||||
partprobe
|
||||
# for some reason mdadm devices spawn with an existing partition table, so we need to wipe it
|
||||
sgdisk --zap-all /dev/md/${config.name}
|
||||
${lib.optionalString (config.content != null) config.content._create}
|
||||
|
|
|
@ -91,9 +91,9 @@
|
|||
parted -s ${config.device} -- mkpart ${partition.part-type} ${diskoLib.maybeStr partition.fs-type} ${partition.start} ${partition.end}
|
||||
''}
|
||||
# ensure /dev/disk/by-path/..-partN exists before continuing
|
||||
partprobe
|
||||
udevadm trigger --subsystem-match=block
|
||||
udevadm settle
|
||||
partprobe
|
||||
${lib.optionalString partition.bootable ''
|
||||
parted -s ${config.device} -- set ${toString partition._index} boot on
|
||||
''}
|
||||
|
@ -101,9 +101,9 @@
|
|||
parted -s ${config.device} -- set ${toString partition._index} ${flag} on
|
||||
'') partition.flags}
|
||||
# ensure further operations can detect new partitions
|
||||
partprobe
|
||||
udevadm trigger --subsystem-match=block
|
||||
udevadm settle
|
||||
partprobe
|
||||
${lib.optionalString (partition.content != null) partition.content._create}
|
||||
'') config.partitions)}
|
||||
'';
|
||||
|
|
|
@ -50,9 +50,9 @@
|
|||
zfs create ${config._parent.name}/${config.name} \
|
||||
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \
|
||||
-V ${config.size}
|
||||
partprobe
|
||||
udevadm trigger --subsystem-match=block
|
||||
udevadm settle
|
||||
partprobe
|
||||
${lib.optionalString (config.content != null) config.content._create}
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue