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

Re: [Preseed] Partman expert recipe Error



claude juif wrote:
> I'm stuck with partman expert_recipe for 3 days now and it's driving me
> crazy.

The partman part of the installer is one of the more obtuse parts.

> I've a 250GB hard drive and i try to use the following partition layout :
> 
> primary partition
> 512M /boot
> 4096M swap
> 
> LVM
> 10G /usr
> 20G /var
> 10G /
> left free space to /home
> 
> so i use this recipe :

I reformatted it to make it easier for me to analyze.

> d-i       partman-auto/expert_recipe string boot-root ::
>   512 513 512 ext3
>   $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ '/boot' } .
>   1024 1025 4096 linux-swap $primary{ } method{ swap } format{ } .
>   1 10 -1 ext3 $primary{ } method{ lvm } vg_name { debian } .
>   10240 10241 10240 ext4 $defaultignore{ } lv_name{ lv_usr } in_vg{ debian } method{ lvm } format{ } $lvmok{ } use_filesystem{ } filesystem{ ext4 } options/noatime{ noatime } mountpoint{ '/usr' } .
>   20480 20481 20480 ext4 $defaultignore{ } lv_name{ lv_var } in_vg{ debian } method{ lvm } format{ } $lvmok{ } use_filesystem{ } filesystem{ ext4 } options/noatime{ noatime } mountpoint{ '/var' } .
>   10240 10241 10240 ext4 $defaultignore{ } lv_name{ lv_root } in_vg{ debian } method{ lvm } format{ } $lvmok{ } use_filesystem{ } filesystem{ ext4 } options/noatime{ noatime } mountpoint{ '/' } .
>   1 10 -1 ext4 $defaultignore{ } lv_name{ lv_home } in_vg{ debian } method{ lvm } format{ } $lvmok{ } use_filesystem{ } filesystem{ ext4 } options/noatime{ noatime } mountpoint{ '/home' }

You have -1 in several entries and I didn't think that was a valid
value there.

> The only things i get is "Available disk space (250059) is too small for
> expert recipe (15400000000).
> 
> This number 15400000000 is so huge. I think about a signed / unsigned error
> in partman. I try to follow the size allocation formula to see if something
> goes wrong but everything looks fine.

I didn't try your recipe but it was missing line continuing
backslashes and the -1 sizes seemed problematic.  Instead here is a
copy of what works for me.

> If someone can give me a hand on this, it would be greatly appreciated.

Try this recipe.

d-i partman-auto/expert_recipe string \
  lvm-multi :: \
    512 512 512 ext2 $primary{ } label{ boot } method{ format } format{ } use_filesystem{ } filesystem{ ext2 } mountpoint{ /boot } . \
    4096 4096 4096 linux-swap $lvmok{ } method{ swap } format{ } . \
    20480 20480 20480 ext4  $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . \
    20480 20480 20480 ext4  $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /var } . \
    64 64 64 ext4  $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /home } .

Since having a separate /usr isn't supported anymore I didn't include
it.  Feel free to modify this to do so however.

I prefer to allocate a fixed size to /home and to keep other space
available in reserve for allocation to other partitions if needed.
With lvm this space may be allocated on the fly.  Here is an example.

d-i partman-auto/expert_recipe string \
  lvm-multi :: \
    512 512 512 ext2 $primary{ } label{ boot } method{ format } format{ } use_filesystem{ } filesystem{ ext2 } mountpoint{ /boot } . \
    4096 4096 4096 linux-swap $lvmok{ } method{ swap } format{ } . \
    20480 20480 20480 ext4  $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . \
    20480 20480 20480 ext4  $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /var } . \
    40960 40960 40960 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /home } .
    64 64 64 ext4  $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /dummy } .

Then after the creation later I unmount /dummy and lvremove the
partition putting that disk space back into the free list.  That space
would then be available later to increase the size of any partition
you wish.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: