首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将EFI + LVM w/最小驱动器的AutoInstall分区定义为OS的目标

如何将EFI + LVM w/最小驱动器的AutoInstall分区定义为OS的目标
EN

Ask Ubuntu用户
提问于 2022-07-22 13:02:15
回答 1查看 572关注 0票数 1

目标:

在最小可用驱动器上安装操作系统,使用EFI,并使用LVM

问题:

由于没有创建所需的引导加载程序分区(

),

当前在分区验证中早期会出现致命错误。

我一直在仔细研究AutoInstall & Curtin的文档,也做了很多web搜索--例如,到目前为止,我还没有发现下面的分区能正常工作。

每次尝试时,由于错误消息,我都会在构建过程中出现早期致命故障:

错误消息:

自动安装配置没有创建所需的引导加载程序分区。

自动存储/Curtin分区代码

代码语言:javascript
复制
  storage:
    config:
      - type: disk                   # Always install OS on our smallest disk
        match:
          size: smallest
        id: os-drive
        ptable: gpt
        wipe: superblock-recursive
        preserve: false
        name: ''
        grub_device: false
      - type: partition             # EFI partition /boot/efi
        number: 1
        id: efi-partition
        device: os-drive
        size: 256M
        flag: boot
        grub_device: true
      - type: format                # EFI partition format rules
        id: efi-format
        volume: efi-partition
        fstype: fat32
        label: ESP
      - path: /boot/efi             # EFI partition mount rules
        device: efi-format
        type: mount
        id: mount-efi
      - type: partition             # BOOT partition /boot
        number: 2
        id: boot-partition
        device: os-drive
        size: 1G
        grub_device: false
      - type: format                # BOOT partition format rules  
        id: boot-format
        volume: boot-partition
        fstype: ext4
        label: BOOT
      - path: /boot                 # BOOT partition mount rules
        device: boot-format
        type: mount
        id: mount-boot
      - type: partition             # LVM partition (PV)
        number: 3
        id: lvm-partition
        device: os-drive
        size: -1
        grub_device: false
      - name: system                # LVM VG (system)
        devices:
        - lvm-partition
        preserve: false
        type: lvm_volgroup
        id: lvm_volgroup-0
      - name: root                  # LVM LV (root)
        volgroup: lvm_volgroup-0
        size: 16G
        wipe: superblock
        preserve: false
        type: lvm_partition
        id: lvm_partition-root
      - fstype: xfs                 # LVM LV root - format rules
        volume: lvm_partition-root
        preserve: false
        type: format
        id: format-root
      - path: /                     # LVM LV root - mount rules
        device: format-root
        type: mount
        id: mount-root
    swap:
      swap: 0
  version: 1
EN

回答 1

Ask Ubuntu用户

发布于 2022-08-07 04:17:20

如果其他人来到这里寻找解决这个问题的方法,它就在这里。

为了通过“需要引导程序分区”检查,您必须在用户数据存储部分中包含以下内容之一:

  • 使用grub_device的“磁盘”类型的存储定义: true

UEFI

  • 使用grub_device的“分区”类型的存储定义: true
  • 为上述定义定义的文件系统(通常为fat32)
  • 对上述定义的类型“装入”的定义,路径为'/boot/efi‘
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1419929

复制
相关文章

相似问题

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