首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu22.04自动安装存储部分,“自动安装配置没有创建所需的引导加载程序分区”

Ubuntu22.04自动安装存储部分,“自动安装配置没有创建所需的引导加载程序分区”
EN

Ask Ubuntu用户
提问于 2022-06-23 06:39:22
回答 4查看 2.2K关注 0票数 1

我尝试自定义用户数据中的存储布局,以便自动安装-这里是我的用户数据的一部分。

代码语言:javascript
复制
  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没有创建所需的引导加载程序分区“

我对这个“自动记录仪”很失望..。

EN

回答 4

Ask Ubuntu用户

发布于 2022-10-12 12:46:04

尝试为磁盘本身设置grub_device: false。另外,fstype: fat32实际上是允许的吗?我认为这应该是vfat

但是,您可以使storage成为一个交互式部分(这将使您的存储部分无效),运行系统设置为UEFI的安装程序(JFTR:启用安全引导很好),并比较您在/var/log/installer/中找到的用户数据文件和您的文件。

票数 1
EN

Ask Ubuntu用户

发布于 2022-11-12 19:56:43

当我在这里提到的同一个问题(以及其他问题)中运行时,我遵循@dleidert建议运行交互式,并查看结果配置。

对我来说,修复方法是将grub_device: true添加到disk中,而不是分区。wipe: superblockpreserve: false也被添加到生成的配置中的所有内容中。实际上非常类似于docs中的示例:https://curtin.readthedocs.io/en/latest/topics/storage.html#basic-layout

而且,grub_boot分区似乎是必需的,如果没有它,grub-install就会失败。以下是两个相关部分:

更新:比这更复杂,但合乎逻辑:D

MBR/BIOS:grub_device: true必须在disk级别。

代码语言:javascript
复制
    config:
      - type: disk
        id: disk-vda
        ptable: gpt
        path: /dev/vda
        wipe: superblock-recursive
        preserve: false
        grub_device: true

bios_grub分区:

代码语言:javascript
复制
      - type: partition
        id: grub-partition
        device: disk-vda
        size: 1M
        flag: bios_grub
        partition_type: EF02
        wipe: superblock
        preserve: false

GPT/UEFI:grub_device: true必须位于efi分区上。不需要bios_grub分区。但是您应该添加reorder_uefi: false

代码语言:javascript
复制
    grub:
      reorder_uefi: false
    config:
      - type: disk
        id: disk-vda
        ptable: gpt
        path: /dev/vda
        wipe: superblock-recursive
        preserve: false

efi分区:

代码语言:javascript
复制
      - type: partition
        id: boot-partition
        device: disk0
        size: 512M
        flag: boot
        partition_type: EF00
        wipe: superblock
        preserve: false
        grub_device: true
票数 1
EN

Ask Ubuntu用户

发布于 2022-06-23 16:35:40

不能使用largest作为分区大小。它只在match块中使用。

从你的user-data

代码语言:javascript
复制
      - type: partition
        number: 3
        id: root-partition
        device: ssd0
        size: largest
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1415360

复制
相关文章

相似问题

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