Package: partman-auto
Version: 166
Tags: d-i

Dear maintainers,

Partition size limits in partman-auto recipes have issues:
- some limits are too low for current needs and should be raised;
- some limits are inconsistent across atomic, home and multi recipes;
- some priorities prevent the size from growing beyond the minimum.

I will take the example of amd64/efi recipes which are also used with most other EFI architectures. Sizes are in MB (decimal, not MiB). The recipe format is described in /usr/share/doc/debian-installer/devel/partman-auto-recipe.txt.gz from package debian-installer.

* recipes-amd64-efi/atomic
 538   538 1075 free iflabel=gpt method=efi
 512   512  768 ext2 $defaultignore /boot
 900 10000   -1 default_fs $lvmok /
100%   512 200% linux-swap $lvmok

* recipes-amd64-efi/home
 538   538  1075 free iflabel=gpt method=efi
 512   512   768 ext2 $defaultignore /boot
1500  6000 30000 default_fs $lvmok /
100%   512  200% linux-swap $lvmok
1000 10000    -1 default_fs $lvmok /home

* recipes-amd64-efi/multi
 538   538  1075 free iflabel=gpt method=efi
 512   512   768 ext2 $defaultignore /boot
2000  3500 25000 default_fs $lvmok /
1000  1500 10000 default_fs $lvmok /var
100%   512  200% linux-swap $lvmok
 256   400  2000 default_fs $lvmok /tmp
4000 10000    -1 default_fs $lvmok /home

(Limits for /boot have just been changed to "768 800 1024" in the source repository to accommodate initramfs growth.
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076823>
<https://salsa.debian.org/installer-team/partman-auto/-/merge_requests/13>)

In addition to some MIN and MAX limits being obviously too low for current needs, we can see that:

- The EFI partition has MIN=PRIORITY (538) so its size is always MIN despite a higher MAX limit (1075).

- The MIN for / in atomic (900) is lower than the MIN in home (1500) which is lower than the MIN in multi (2000). It should be the opposite.

- The MIN for /home is lower in home (1000) than in multi (4000). Why ?

- If RAM size >= 512 MB then the swap partition has PRIORITY (512) <= MIN (100% RAM size), so its size is capped to MIN instead of MAX (200% RAM size). By default the RAM size is also capped to 1 GB so the maximum swap size is 1 GB, which prevents hibernation in many cases; but this is another story, see <https://salsa.debian.org/installer-team/partman-auto/-/merge_requests/12>.

- The EFI partition is not created if the disk label is MSDOS even though it is supported by EFI boot. This can be an issue when using the largest available space.

Related unanswered bug report with patch raising / and /var MIN sizes:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929322>

I am filing this bug report to start a discussion about setting new limits which are more consistent and fit current and possibly future needs better. Of course this will increase the minimum disk size requirements for guided partitioning.

Poll: What should be the MIN, MAX and minimum disk size to reach MAX for
- EFI partition (similar requirements as /boot for systemd-boot ?)
- /boot
- swap
- / in atomic recipe
- / in home recipe
- /home in home recipe
- / in multi recipe
- /var in multi recipe
- /tmp in multi recipe (or should tmpfs be used ?)
- /home in multi recipe
- other platform-specific partitions you know about ?

Reply via email to