From 213fadb17d3c6995538ed1e12c5ef1b10580c4e7 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Sun, 8 Oct 2023 02:51:15 +0700 Subject: [PATCH] fix mount order once again --- src/config.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index b50ead1..fcfa034 100644 --- a/src/config.rs +++ b/src/config.rs @@ -216,6 +216,7 @@ impl PartitionLayout { ordered.insert(index, part.clone()); debug!(?index, "Index of partition"); + debug!(?part, "Partition"); } // now sort by mountpoint, least nested to most nested by counting the number of slashes @@ -232,7 +233,7 @@ impl PartitionLayout { // mount partitions to chroot // sort partitions by mountpoint - let ordered: Vec<_> = self.sort_partitions().into_iter().rev().collect(); + let ordered: Vec<_> = self.sort_partitions(); // Ok, so for some reason the partitions are swapped? for (index, part) in &ordered { @@ -256,7 +257,7 @@ impl PartitionLayout { // unmount partitions from chroot // sort partitions by mountpoint - let ordered = self.sort_partitions(); + let ordered = self.sort_partitions().into_iter().rev().collect::>(); for (index, part) in &ordered { let devname = partition_name(&disk.to_string_lossy(), *index);