我对自动安装有问题。配置正确加载,但当尝试创建分区时,它将失败。我正在运行虚拟机中的所有东西,然后在实时系统上测试它。
我的配置如下所示:
#cloud-config
autoinstall:
version: 1
identity:
hostname: <redacted>
password: "<redacted>"
username: <redacted>
locale: <redacted>
keyboard:
layout: <redacted>
ssh:
install-server: true
authorized-keys:
- "<redacted>"
allow-pw: false
drivers:
install: true
timezone: <redacted>
storage:
swap:
size: 0
config:
- type: disk
match:
size: smallest
id: hdd0
ptable: gpt
grub_device: true
- type: partition
number: 1
id: boot-part
device: hdd0
size: 2G
flag: boot
- type: partition
number: 2
id: root-part
device: hdd0
size: -1
- type: format
id: boot-format
volume: boot-part
fstype: ext4
label: BOOT
- type: format
id: root-format
volume: root-part
fstype: ext4
label: ROOT
- type: mount
id: root-mount
device: root-format
path: /
- type: mount
id: boot-mount
device: boot-format
path: /boot
- type: disk
match:
size: largest
id: hdd1
ptable: gpt
- type: partition
number: 1
id: storage-part
device: hdd1
size: 100%
- type: format
id: storage-format
volume: storage-part
fstype: ext4
label: STORAGE
- type: mount
id: storage-mount
device: storage-format
path: /mnt/storage(这里有一个来自崩溃转储的屏幕截图(因为我不能从VM复制文本)。
为什么sgdisk在消息“从2048年到4196351年间无法创建分区1”时会失败?我的配置是坏的,或者是什么导致了它的不正常行为?
发布于 2023-04-27 10:17:18
正如我所理解的,如果希望分区填充磁盘的其余部分,则应该将大小设置为-1,而不是100%。在根磁盘中正确地这样做,但在存储部分分区中没有这样做。
但是,错误本身看起来就像您的HHD0大小甚至还不到2GB。
此外,通常在启动分区之前有一个bios_grub分区为1M。
https://serverfault.com/questions/1115165
复制相似问题