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

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

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

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

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

Thank you very much for solution.


Robert Wolf.

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

-- System Information:
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

Reply to: