Skip to content

Commit

Permalink
fix mount order once again
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Oct 7, 2023
1 parent 923a821 commit 213fadb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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::<Vec<_>>();

for (index, part) in &ordered {
let devname = partition_name(&disk.to_string_lossy(), *index);
Expand Down

0 comments on commit 213fadb

Please sign in to comment.