首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >创建分区时Ubuntu自动安装失败

创建分区时Ubuntu自动安装失败
EN

Server Fault用户
提问于 2022-11-08 19:59:12
回答 1查看 399关注 0票数 0

我对自动安装有问题。配置正确加载,但当尝试创建分区时,它将失败。我正在运行虚拟机中的所有东西,然后在实时系统上测试它。

我的配置如下所示:

代码语言:javascript
复制
#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”时会失败?我的配置是坏的,或者是什么导致了它的不正常行为?

EN

回答 1

Server Fault用户

发布于 2023-04-27 10:17:18

正如我所理解的,如果希望分区填充磁盘的其余部分,则应该将大小设置为-1,而不是100%。在根磁盘中正确地这样做,但在存储部分分区中没有这样做。

但是,错误本身看起来就像您的HHD0大小甚至还不到2GB。

此外,通常在启动分区之前有一个bios_grub分区为1M。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1115165

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档