Skip to content

Instantly share code, notes, and snippets.

@exocode
Last active November 10, 2025 01:05
Show Gist options
  • Select an option

  • Save exocode/a7e12b063f23a1ef899b23bcbfc7d123 to your computer and use it in GitHub Desktop.

Select an option

Save exocode/a7e12b063f23a1ef899b23bcbfc7d123 to your computer and use it in GitHub Desktop.

Revisions

  1. exocode revised this gist Mar 29, 2018. No changes.
  2. exocode renamed this gist Mar 29, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. exocode created this gist Mar 29, 2018.
    32 changes: 32 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #cloud-config
    resize_rootfs: false

    disk_setup:
    /dev/sda:
    table_type: 'mbr'
    layout:
    - 25
    - 75
    overwrite: true

    fs_setup:
    - label: root_fs
    filesystem: 'ext4'
    device: /dev/sda
    partition: sda1
    overwrite: true
    - label: data_disk
    filesystem: 'xfs'
    device: /dev/sda
    partition: sda2
    overwrite: true

    runcmd:
    - [ partx, --update, /dev/sda ]
    - [ mkfs.xfs, /dev/sda2 ]
    - [ partprobe ]
    - parted /dev/sda set 1 boot on p

    mounts:
    - ["/dev/sda1", "/"]
    - ["/dev/sda2", "/data_disk"]