Skip to content

Conversation

@fintelia
Copy link
Contributor

This adds a storage.rawCosi option which makes trident directly copy the COSI partitions (including ESP) onto the target disk and skips steps that would mess too much with the written image.

Example HC:

image:
  url: http://NETLAUNCH_HOST_ADDRESS/files/ubuntu.cosi
  sha384: ignored
trident:
  disable: true
storage:
  rawCosi: true
  disks:
    - id: os
      device: /dev/sda
      partitionTableType: gpt
      partitions:
        - id: esp
          size: 128M
          type: esp
        - id: boot
          size: 512M
        - id: root
          size: 48G
          type: root
  filesystems:
    - deviceId: esp
      mountPoint:
        path: /boot/efi
        options: umask=0077
    - deviceId: boot
      mountPoint: /boot
    - deviceId: root
      mountPoint: /
os:
  selinux:
    mode: disabled
scripts:
  postConfigure:
    - content: |
        sed -i "s/PARTUUID=[a-f0-9-]*/LABEL=cloudimg-rootfs/g" /etc/fstab
        sed -i "s/PARTUUID=[a-f0-9-]*/LABEL=cloudimg-rootfs/g" /boot/grub/grub.cfg
        sed -i "s/initrdfail=2/initrdfail=1/g" /boot/grub/grub.cfg
        sed -i '1s/^/set initrdfail=1\n/' /boot/grub/grub.cfg
      name: root-uuid
      runOn: [clean-install]

OPENSSL_INCLUDE_DIR=/usr/include/openssl \
TRIDENT_VERSION="$(TRIDENT_CARGO_VERSION)-dev.$(GIT_COMMIT)" \
cargo build --release --features dangerous-options
cargo build --release --features dangerous-options --target x86_64-unknown-linux-musl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, the servicing env is azl3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *-unknown-linux-musl part makes it produce a statically linked binary that can run on any Linux distribution without having to worry about glibc version conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants