Skip to content

Archlinux Image

Download

Archlinux can be downloaded from here:

Build with ZFS

Customizing an ArchImage is quiet easy: Inspired by John Ramsden

Packages

sudo pacman -S archiso

Workdir

cp -r /usr/share/archiso/configs/releng/* ~/archiso

Add Repository

echo -e '[archzfs]\nSigLevel = Optional TrustAll\nServer = http://archzfs.com/$repo/x86_64' >> ~/archiso/pacman.conf

Add Packages for ZFS

echo -e 'linux-headers\narchzfs-dkms\nzfs-utils' >> ~/archiso/packages.x86_64

Build the Image

mkarchiso -v -w /tmp/archiso-tmp/ -o ~/Downloads/ ~/archiso/

Build With Ansible

archiso.yaml
---

- hosts: localhost
  become: false
  tasks:
    - name: install archiso
      package: name=archiso
      become: true
    - name: "{{ lookup('env', 'HOME') }}/archiso/"
      copy: src=/usr/share/archiso/configs/releng/ dest={{ lookup('env', 'HOME') }}/archiso/
    - name: ~/archiso/out/
      file: path={{ lookup('env', 'HOME') }}/archiso/out/ state=directory
    - name: "{{ lookup('env', 'HOME') }}/archiso/pacman.conf"
      ini_file: path={{ lookup('env', 'HOME') }}/archiso/pacman.conf section=archzfs option={{ item.option }} value={{ item.value }}
      with_items:
        - { option: 'SigLevel', value: 'Optional TrustAll' }
        - { option: 'Server', value: 'http://archzfs.com/$repo/x86_64' }
    - name: "{{ lookup('env', 'HOME') }}/archiso/packages.x86_64"
      lineinfile: path={{ lookup('env', 'HOME') }}/archiso/packages.x86_64 line={{ item }}
      with_items: [ 'linux-headers', 'archzfs-dkms', 'zfs-utils' ]
    - name: "mkarchiso -v -w /tmp/archiso-tmp -o {{ lookup('env', 'HOME') }}/Downloads {{ lookup('env', 'HOME') }}/archiso/"
      command: "mkarchiso -v -w /tmp/archiso-tmp -o {{ lookup('env', 'HOME') }}/Downloads {{ lookup('env', 'HOME') }}/archiso/"
      become: true
      register: rv
    - debug: msg={{ rv.stdout+rv.stderr }}

ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -K archiso.yaml

Resize live system

mount -o remount,size=4G /run/archiso/cowspace


Last update: August 2, 2021

Comments