1
0
mirror of synced 2026-01-19 17:18:39 +00:00

Mount partitions by "shortest mountpoint" order.

Partitions were mounted in config file order, so you could not see
all mounted partitions.

This (at least temporarily) fixes it.
This commit is contained in:
Stéphane Jourdois 2010-10-30 16:37:03 +02:00 committed by Axel Beckert
parent 0a7f7e3982
commit a79d89ad33
2 changed files with 16 additions and 1 deletions

View File

@ -11,3 +11,18 @@ Bugs to fix before a 4.3 release
http://xen-tools.org/pipermail/xen-tools-discuss/2010-May/000757.html
* xen-delete-image ignores extension setting
* partitions were mounted in config file order, not in mountpoint order.
That implies that if you specified :
/boot
/
in that order, / was mounted _over_ /boot, and you would not _see_ /boot.
Xen-Tools would then install boot on your / partition, and your boot device
was just empty and unbootable.
Workaround for 4.2 is to write your partition file such as mounts overlap
correctly when mounted in specified order.
Current (unreleased) fix is to sort by mountpoint length.
Fix would be to reproduce what mount does with mount -a.

View File

@ -3451,7 +3451,7 @@ sub mountImage
#
$MOUNT_POINT = tempdir( CLEANUP => 1 );
foreach my $partition (@PARTITIONS)
foreach my $partition (sort { length($a->{'mountpoint'}) <=> length($b->{'mountpoint'}) } @PARTITIONS)
{
if ( $partition->{ 'type' } ne 'swap' )
{