diff options
author | Michael Ferrari <nekkodroid404@gmail.com> | 2024-10-03 14:02:12 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-10-03 21:55:06 +0200 |
commit | f106fd2dbdbd9debfc2d2ed4d96ae3108a29c79b (patch) | |
tree | 649f2a049e429e5e75fe37d83b0ddff0e5b71832 /src/partition | |
parent | homectl: fix inverted table footer condition (diff) | |
download | systemd-f106fd2dbdbd9debfc2d2ed4d96ae3108a29c79b.tar.xz systemd-f106fd2dbdbd9debfc2d2ed4d96ae3108a29c79b.zip |
repart: open target devices before UUID creation
This is to ensure that the UUIDs from the CopyBlocks= devices are copied
to the corresponding new partition instead of creating a new UUID for
it. With this verity partitions can be copied, keeping their UUIDs to
ensure that they still match up with what is specified in roothash=.
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/repart.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 37d263196c..090fe27672 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -9023,11 +9023,6 @@ static int run(int argc, char *argv[]) { return r; } - /* Make sure each partition has a unique UUID and unique label */ - r = context_acquire_partition_uuids_and_labels(context); - if (r < 0) - return r; - /* Open all files to copy blocks from now, since we want to take their size into consideration */ r = context_open_copy_block_paths( context, @@ -9037,6 +9032,11 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; + /* Make sure each partition has a unique UUID and unique label */ + r = context_acquire_partition_uuids_and_labels(context); + if (r < 0) + return r; + r = context_fstab(context); if (r < 0) return r; |