Ant*_*tho 2 debian uefi preseed
在 debian 的安装过程中,EFI 分区被格式化为 ext4。
我正在尝试预先安装 debian jessie 并且我无法让它工作,因为 UEFI 分区是在 ext4 中格式化的(通过 blkid 获取信息)。
我的分区预置如下:
d-i partman-auto/expert_recipe string \
boot-root :: \
1 1 1 free \
$gptonly{ } \
$primary{ } \
$bios_boot{ } \
method{ biosgrub } \
. \
512 100 512 vfat \
$gptonly{ } \
$primary{ } \
method{ efi } \
format{ } \
$lvmignore{ } \
mountpoint{ /boot/efi } \
. \
...
.
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:“无法在 /boot/efi 上挂载 vfat 文件系统”
当然,它是一个 ext4 fs...!
有人可以帮忙吗?
我现在正是在这一点上,记录从 PXE 网络引导到 UEFI VMWare 系统的手动安装,以提取preseed与debconf-get-selections --installer. 我在结果文件中看到的是:
partman-auto partman-auto/choose_recipe select /lib/partman/recipes-amd64-efi/30atomic
partman-base partman/default_filesystem string ext4
Run Code Online (Sandbox Code Playgroud)
其内容应该给您提示如何掌握收据:
partman-auto/text/atomic_scheme ::
538 538 1075 free
$iflabel{ gpt }
$reusemethod{ }
method{ efi }
format{ } .
128 512 256 ext2
$defaultignore{ }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext2 }
mountpoint{ /boot } .
500 10000 -1 $default_filesystem
$lvmok{ }
method{ format }
format{ }
use_filesystem{ }
$default_filesystem{ }
mountpoint{ / } .
100% 512 200% linux-swap
$lvmok{ }
$reusemethod{ }
method{ swap }
format{ } .
Run Code Online (Sandbox Code Playgroud)
基于此,当我使用partman/early_command为给定机器生成适当的布局时,我编写了脚本:
if [ -d "/sys/firmware/efi/" ]; then
debconf-set "partman-auto/expert_recipe" "$(
echo -n '600 600 1075 free $iflabel{ gpt } $reusemethod{ } method{ efi } format{ } . '
echo -n '128 512 256 ext2 $defaultignore{ } method{ format } format{ } use_filesystem{ } filesystem{ ext2 } mountpoint{ /boot } . '
echo -n '9216 2000 -1 $default_filesystem $lvmok{ } method{ format } format{ } use_filesystem{ } $default_filesystem{ } mountpoint{ / } .'
)"
fi
Run Code Online (Sandbox Code Playgroud)
结果自动得到:
# parted /dev/sda print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
17.4kB 1049kB 1031kB Free Space
1 1049kB 600MB 599MB fat32 boot, esp
2 600MB 10.7GB 10.1GB ext4
10.7GB 10.7GB 1032kB Free Space
Run Code Online (Sandbox Code Playgroud)