
パーティション サイズを含むディスク レイアウトの特定の要件を持つ preseed 構成があります。partman-auto は、ディスク上の最後のパーティションの最大パーティション サイズを尊重しません。https://wikitech.wikimedia.org/wiki/PartMan/Autoこれについて、想定される回避策とともに説明します。
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).
残念ながら、ドキュメントのどこにも「レシピでサイズ 1000000000 のパーティションを 1 つ追加し、メソッドを「keep」にしてマウント解除したままにする」とは実際に何を意味するのか説明されていません。
追加してみました
1 1000000000 1000000000 ext4 \
method { keep } \
.
パーティション レシピの最後まで進みましたが、まったく何も起こりません (「ext4」の代わりに「none」や「linux」も試しましたが、効果はありませんでした)。どうすればいいのかわかりません。
答え1
以下のpartman
レシピは私の場合はうまくいきました。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 } \
.
また、この設定を追加して、パーティションにファイルシステムが指定されていません最終パーティションについてのプロンプトを表示します。
d-i partman-basicmethods/method_only boolean false
これはインストール後のディスクのパーティション分割です。「keep」パーティションがディスクの残りのスペースを埋めました。
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