Anyhow, Common.pm tries real hard to do the right thing. Only if it sees a physical partition end at the end of the disk does it assign it a size of "*" which the autoinstall script then uses to plug in the actual size of the disk at partition time when it executes on the target machine. This behacior in Common.pm can be seen in the like of code, which occurs in two places, one for parted use and the other for sfdisk use:
if ($endMB == $end_of_last_partition_on_disk) {
$size = "*";
}The only problem is cases such as mine where someone has manually modified the partition table and broken the ordering of things this will not work. Remember, my last physical partition on the disk happens to be sda1 and sda2 and sda3 are actually placed before sda1. So in my opionion the simple fix is to extend the logic of the 'if statement' to also test that this is the highest numbered partition on the disk as well. This will need to be handled in both save_partition_information() and _turn_sfdisk_output_into_generic_partitionschemes_file(), but it should be pretty easy to do.
If one wanted to get fancier, one could even print out a warning that since the last physical parition on the disk is not the highest numbered one, installing this image on a system with smaller disks may not fit and will not fill the disks of a larger system.
Another possibility is to add a switch to 'prepareclient', which it could then pass to the appropriate routines that tells them to NEVER use "*" for a partition size. Personally I think that may have merit as I've tried to image a system on which boot was on a disk all by itself and so was expanded to fill the disk on the target, preventing me from using the rest of the disk for anything else! ...but that probably IS a lot of work and I'm not sure how important that really is.
More work, but also useful would be more documentation on how disk partitions are recreated along with suggestions of how one can make and/or edit their own configuration files so a single image could be installed with different disk sizes.
gee, there's no limit to how much time one could sink into this one topic... 8-)
But to restate, I think one cannot simply assign a size of "*" to the last physical partition on the disk without insuring it also has the highest minor number as well.
-mark
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Sisuite-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sisuite-users
