我尝试自定义用户数据中的存储布局,以便自动安装-这里是我的用户数据的一部分。
storage:
#layout:
# name: direct
config:
- type: disk
match:
size: largest
#ssd: true
id: ssd0
ptable: gpt
wipe: superblock
- type: partition # create partitions on ssd0
number: 1
id: efi-partition
device: ssd0
size: 256M
flag: boot # uefi partition needs boot flag
grub_device: true # and must be the grub device?
- type: partition
number: 2
id: boot-partition
device: ssd0
size: 768M
- type: partition
number: 3
id: root-partition
device: ssd0
size: -1
- type: format # format partitions on ssd0
id: efi-format
volume: efi-partition
fstype: fat32 # ESP gets FAT32
label: ESP
- type: format
id: boot-format
volume: boot-partition
fstype: ext4
label: BOOT
- type: format
id: root-format
volume: root-partition
fstype: ext4 # / (root) gets ext4, xfs, btrfs
label: ROOT
- type: mount # mount formatted partitions on ssd0
id: root-mount # / (root) gets mounted first
device: root-format
path: /
- type: mount
id: boot-mount # /boot gets mounted next
device: boot-format
path: /boot
- type: mount
id: efi-mount # /boot/efi gets mounted next
device: efi-format
path: /boot/efi然后我在安装过程中得到了这个错误
"autoinstall config没有创建所需的引导加载程序分区“
我对这个“自动记录仪”很失望..。
发布于 2022-10-12 12:46:04
尝试为磁盘本身设置grub_device: false。另外,fstype: fat32实际上是允许的吗?我认为这应该是vfat。
但是,您可以使storage成为一个交互式部分(这将使您的存储部分无效),运行系统设置为UEFI的安装程序(JFTR:启用安全引导很好),并比较您在/var/log/installer/中找到的用户数据文件和您的文件。
发布于 2022-11-12 19:56:43
当我在这里提到的同一个问题(以及其他问题)中运行时,我遵循@dleidert建议运行交互式,并查看结果配置。
对我来说,修复方法是将grub_device: true添加到disk中,而不是分区。wipe: superblock和preserve: false也被添加到生成的配置中的所有内容中。实际上非常类似于docs中的示例:https://curtin.readthedocs.io/en/latest/topics/storage.html#basic-layout
而且,grub_boot分区似乎是必需的,如果没有它,grub-install就会失败。以下是两个相关部分:
更新:比这更复杂,但合乎逻辑:D
MBR/BIOS:grub_device: true必须在disk级别。
config:
- type: disk
id: disk-vda
ptable: gpt
path: /dev/vda
wipe: superblock-recursive
preserve: false
grub_device: truebios_grub分区:
- type: partition
id: grub-partition
device: disk-vda
size: 1M
flag: bios_grub
partition_type: EF02
wipe: superblock
preserve: falseGPT/UEFI:grub_device: true必须位于efi分区上。不需要bios_grub分区。但是您应该添加reorder_uefi: false。
grub:
reorder_uefi: false
config:
- type: disk
id: disk-vda
ptable: gpt
path: /dev/vda
wipe: superblock-recursive
preserve: falseefi分区:
- type: partition
id: boot-partition
device: disk0
size: 512M
flag: boot
partition_type: EF00
wipe: superblock
preserve: false
grub_device: true发布于 2022-06-23 16:35:40
不能使用largest作为分区大小。它只在match块中使用。
从你的user-data。
- type: partition
number: 3
id: root-partition
device: ssd0
size: largesthttps://askubuntu.com/questions/1415360
复制相似问题