¿Cómo se utiliza el método "mantener" en partman-auto?

¿Cómo se utiliza el método "mantener" en partman-auto?

Tengo una configuración preestablecida con requisitos específicos para el diseño del disco, incluidos los tamaños de partición. partman-auto no respeta el tamaño máximo de partición para la última partición del disco.https://wikitech.wikimedia.org/wiki/PartMan/Autoexplica esto junto con una supuesta solución alternativa:

5. LIMITATIONS
--------------

Due to limitation of the algorithms in partman-auto, there must be at
least one partition with high maximal size so that the whole free
space can be used.  Usually you can give the partition containing
/home a maximal size 1000000000 which is high enough for the present
storage devices. If the large /home is not an option for you, you can
also define in the recipe one additional partition with size
1000000000, method "keep" and leave it unmounted.  When the
installation completes you can remove it.

Do not use higher than 1000000000 numbers because the shell arithmetic
is limited to 31 bits (on i386).

Desafortunadamente, en ninguna parte de la documentación se explica lo que realmente se entiende por "definir en la receta una partición adicional con tamaño 1000000000, método "conservar" y dejarla desmontada".

He intentado agregar

1 1000000000 1000000000 ext4 \
    method { keep } \
.

hasta el final de mi receta de partición, pero esto no hace absolutamente nada (también probé "none" y "linux" en lugar de "ext4", tampoco tuvo ningún efecto) y no sé cómo continuar.

Respuesta1

La siguiente partmanreceta funcionó para mí. Lo probé con una instalación de Ubuntu 20.04.

d-i partman-auto/expert_recipe string \
        efi-boot-root :: \
              256 256 256 fat32 \
                      method{ efi } \
                      format{ } \
              . \
              1024 1024 1024 ext4 \
                      $bootable{ } \
                      method{ format } \
                      format{ } \
                      use_filesystem{ } \
                      filesystem{ ext4 } \
                      mountpoint{ /boot } \
              . \
              8192 1024 8192 ext4 \
                      method{ format } \
                      format{ } \
                      use_filesystem{ } \
                      filesystem{ ext4 } \
                      mountpoint{ / } \
              . \
              8192 1024 1000000000 ext2 \
                      method{ keep } \
              .

También tuve que agregar esta configuración para evitar unno se especifica ningún sistema de archivos para la particiónmensaje sobre la partición final.

d-i partman-basicmethods/method_only boolean false

Esta es la partición del disco después de la instalación. La partición "mantener" llenó el espacio restante en el disco.

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  256MB   255MB   fat32        EFI System Partition  boot, esp
 2      256MB   1280MB  1024MB  ext4
 3      1280MB  9473MB  8193MB  ext4
 4      9473MB  21.5GB  12.0GB

información relacionada