서버 자동 설치 및 파티션

서버 자동 설치 및 파티션

cloud-config-ish 자동 설치 도구에 대해 배우고 있습니다.잠재성자동 설치가 작동하는 문제가 계속 발생하지만 해당 storage:섹션에 대한 구성을 따르지 않습니다.

내 자동 설치 구성은 다음과 같습니다(사용자 이름, 호스트 이름, 비밀번호 해시 및 SSH 키 제외).

#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$<snip>
  ssh:
    install-server: true
    allow-pw: false
    authorized-keys:
      - ssh-rsa AAAA<snip>
  packages:
    - build-essential
    - git
    - python3-pip
    - tasksel
    - zfsutils-linux

섹션 에서 볼 수 있듯이 storage:몇 개의 파티션을 배치합니다(이 빌드에는 모두 GPT, MBR 없음!).

  • FAT32 UEFI 시스템 파티션/boot/efi
  • ext2 /boot파티션
  • 스왑 파티션
  • ZFS 의도 로그에 대한 자리 표시자 파티션(나중에 자동 설치 후 추가됨)
  • XFS 루트 파티션

Ubuntu 자동 설치 프로그램은 유효성 검사를 통과한 것 같습니다. 자동 설치 진행 예/아니요를 받고 실행되고 결국에는 ZFS와 모든 것이 설치된 부팅 가능한 시스템이 있기 때문입니다.그러나 내 파티션 구성표를 무시합니다.대신 FAT32 EFI 파티션과 Ext4 루트 파티션을 생성합니다. 누구든지 내가 뭘 잘못하고 있는지, 아니면 어떻게 추적할 수 있는지 말해 줄 수 있나요?유효성을 검사하고 있지만 내 storage:구성을 무시하고 있습니까?

답변1

자동 설치 파일에 대한 문서가 좋지 않습니다.

어느 하나:

layout: direct를 사용하여 자동으로 파티션 분할이 무엇인지 알아내거나 원하는 설정으로 config: 섹션을 수행하십시오.

스토리지 섹션에서 레이아웃과 구성을 모두 수행하면... 레이아웃만 사용하고 구성 섹션은 무시됩니다.

관련 정보