Bug#627064: partman-auto: Function create_primary_partitions() creates whole-disk partition even if smaller requested

May 17th, 2011 - 08:30 am ET by Robert Wolf | Report spam
Package: partman-auto
Version: 96
Severity: normal


Dear Sirs,

I have created preseed file for lenny installation and I wanted to reuse it
for preseed installation of squeeze. But I have problem with automatic
partitioning.

In the preseed file there is a configuration:

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

I would like to create single primary bootable 10GB partition and install
system on this partition.

But the autopartitioning tool creates still one partition on whole disk.

I did some debuging and found following.

To create primary partition, the function create_primary_partitions() of
lib/partman/lib/auto-shared.sh is called.

This function calls other function pull_primary() of
lib/partman/lib/recipes.sh. Function pull_primary() operates with variable
$scheme_rest.

After return from pull_primary() back to create_primary_partitions() the
script creates partition depending of variable $scheme_rest.

If the variable $scheme_rest is empty, it creates new partition using command:
open_dialog NEW_PARTITION primary $4 $free_space full ${1}000001

Otherwise it creates partition using command:
open_dialog NEW_PARTITION primary $4 $free_space beginning ${1}000001


If you look in the code of parted_server.c of package partman-base_147 in the
function command_new_partition() then you find that using value "full" of
"position" variable makes parted_server to ignore "length" variable and create
partition from the "first" to the "last" sector.

I am not sure if this problem is problem of partman-auto or partman-base
package, but the lenny version of function create_primary_partitions() of file
lib/partman/lib/auto-shared.sh uses only following code to create new
partition independent to content of $scheme_rest variable:

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


Can someone check this and tell me, what is correct? I can hack initrd and
overwrite the incorrect code with correct code on run-time until this is fixed
in official package, but I need to now what is the correct solution.

Or is the problem in the expert_recipe definition? How should I correct define
only one primary 10GB partition? I have read the partman-auto-recipe.txt file
of debian-installer package, but I cannot find there some other options to
solve my problem.


Sorry if this is duplicated report but I could not find any report for this
problem.


Thank you very much for solution.


Regards,

Robert Wolf.


BTW: The system Information is not related to this problem, I use this system
only to report this "bug".



Debian Release: 5.0.8
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/4 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Robert Wolf
May 30th, 2011 - 04:10 am ET | Report spam
Hallo,

does anyone have some information for this entry? Is it really bug in
recipe-processing or is it correct?

I would be glad, if you can make a statement at least.

Either it is a bug and you can provide info, how the code should work correctly
(I can patch it myself).

Or it is a correct feature, then please, provide an example of recipe how to
define single 10GB primary partition on the 100GB disk with leaving the rest
90GB unallocated.


Thank you very much.


Regards,

Robert Wolf.



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics