[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#297201: partman: Support leaving unused space after partitioning



Hallo,

I have reported bug #627064 "partman-auto: Function create_primary_partitions() 
creates whole-disk partition even if smaller requested" and I think my report 
should be merged together with this report.

The problem is same. The last partition uses rest of the disk. But I want to 
keep it. As I have written in my bugreport, in the lenny debian-installer it 
has worked.

I have preseed with

d-i partman-auto/expert_recipe string rootsystem :: 10240 10240 10240 ext3 
$primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } 
filesystem{ ext3 } mountpoint{ / } .



This works in lenny and creates on 10GB partition and the rest of the disk is 
free.


I have explained already the problem in my bugreport, but I will explain once 
more.


The function create_primary_partitions() creates primary partitions and the 
function create_partitions() creates logical partitions.

The create_primary_partitions() takes one primary partition from schema and 
keeps the rest-partitions in scheme_rest. Then comes the problem:

If there is one more primary partition, it creates the current primary 
partition using

open_dialog NEW_PARTITION primary $4 $free_space beginning ${1}000001

which will create partition at the begging of the disk with the specified size.

Otherwise, if there are no partition left, it creates partition using

open_dialog NEW_PARTITION primary $4 $free_space full ${1}000001

and this will ignore size of partition and creates partition on whole free 
space.


The same code is in create_partition() function, only difference is it checks 
if the partition is last.

Therefore it is not possible to leave free space on the disk. These functions 
allocate everytime the whole disk.

I wanted to create second small partition and keep the rest free (I thought it 
checks scheme_rest only once), but this does not work.

IMHO it should be possible to create only so much space, how much is written in 
receip. Maybe there could be values of -1 -1 -1 for min max and factor to tell 
partman to create automatically the partition on the whole disk.



Regards,

Robert Wolf.



Reply to: