首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >服务器自动安装和分区

服务器自动安装和分区
EN

Ask Ubuntu用户
提问于 2021-10-03 14:19:59
回答 1查看 1.4K关注 0票数 0

我正在学习云配置-ish自动安装工具亚次性,我一直遇到一个自动安装工作的问题,但是它不会按照我的storage:部分的配置操作。

下面是我的自动安装配置(除了用户名、主机名、密码哈希和SSH键之外):

代码语言:javascript
复制
#cloud-config
autoinstall:
  version: 1
  locale: en_US.UTF-8
  refresh-installer: { update: yes } # Check for updated installer
  storage:
    # ESP + boot + swap + zil placeholder + root
    layout: { name: direct }
    config:
      - type: disk
        match:      # select largest ssd...
          size: largest
          ssd: true
        id: ssd0    # ...and call it ssd0
        ptable: gpt # use gpt partitions on ssd0
        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: swap-partition
        device: ssd0
        size: 128G
        flag: swap
      - type: partition
        number: 4
        id: zil-partition
        device: ssd0
        size: 128G
      - type: partition
        number: 5
        id: root-partition
        device: ssd0
        size: 256G
      - 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: swap-format
        volume: swap-partition
        fstype: swap # swap
        label: SWAP
        flag: swap
      - type: format
        id: root-format
        volume: root-partition
        fstype: xfs # / (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
  identity:
    hostname: foo
    username: bar
    password: $6$
  ssh:
    install-server: true
    allow-pw: false
    authorized-keys:
      - ssh-rsa AAAA
  packages:
    - build-essential
    - git
    - python3-pip
    - tasksel
    - zfsutils-linux

正如您可以从storage:部分看到的,我正在添加几个分区(都是GPT,在此构建中没有MBR!):

  • FAT32 UEFI系统在/boot/efi的分区
  • 一个ext2 /boot分区
  • 交换分区
  • ZFS意图日志的占位符分区(稍后将在自动安装后添加)
  • XFS根分区

Ubuntu自动安装程序似乎通过了验证,因为我得到了进行自动安装的是/否,它会运行,最后我有一个安装了ZFS和所有东西的可引导系统。However,它忽略了我的分区方案,而只是创建了一个FAT32 EFI分区和一个Ext4根分区。有人能告诉我我做错了什么吗,这里,或者我如何跟踪为什么它是有效的,但忽略了我的storage:配置?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2021-10-04 15:07:43

自动安装文件的文档不是很好

要么是:

使用布局:引导并让它自动尝试确定分区应该是什么,或者用所需的设置执行一个config:节

如果在存储部分同时执行布局和配置.它将只使用布局而忽略配置部分。

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

https://askubuntu.com/questions/1367170

复制
相关文章

相似问题

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