GUIインストーラCalamaresをカスタマイズしてみました。

Calamares
Calamares
Calamares aims to be easy, usable, beautiful, pragmatic, inclusive and distribution-agnostic

カスタマイズしたCalamaresを組み込んだライブISOイメージで起動し、Arch Linuxをインストールして、Arch Linuxが起動しました。

環境

パッケージ

主なインストールディレクトリ、ファイル

  • /usr/bin/calamares
  • /usr/lib/calamares/
  • /usr/lib/libcalamares.so
  • /usr/share/applications/calamares.desktop
  • /usr/share/calamares/
  • /usr/share/icons/hicolor/scalable/apps/calamares.svg

構築

  1. ckbcompパッケージの作成
    https://aur.archlinux.org/packages/ckbcomp
    PKGBUILD内のソースURLが無効なので修正してパッケージを作成します。

    paru -G ckbcomp
    cd ckbcomp
    PKGBUILD
    # source=("http://ftp.debian.org/debian/pool/main/c/console-setup/console-setup_${pkgver}.tar.xz")
    source=("https://salsa.debian.org/installer-team/console-setup/-/archive/$pkgver/console-setup-$pkgver.tar.gz")
    makepkg -o --skipchecksums
    makepkg -f -e
    cp ckbcomp-1.234-1-any.pkg.tar.zst /opt/custom-repo/x86_64/
  2. calamares-gitパッケージの作成

    paru -S calamares-git
    cp ~/.cache/paru/clone/calamares-git/calamares-git-3.3.14.r25.g95aa33f-1-x86_64.pkg.tar.zst /opt/custom-repo/x86_64/

設定

設定ディレクトリ

以下の優先度で設定ファイルが参照されるようです。

  • /etc/calamares/
  • /usr/share/calamares/

カスタマイズ

  • 設定ファイルのひな型をarchisoのプロジェクトにコピー

    cp -r /usr/share/calamares ./airootfs/etc/
  • calamaresの設定

    ./airootfs/etc/calamares/settings.conf
    ---
    sequence:
    - show:
    - welcome
    # - notesqml
    # - packagechooserq@licenseq
    - locale
    - keyboard
    - partition
    - users
    # - tracking
    - summary
    - exec:
    # - dummycpp
    # - dummyprocess
    # - dummypython
    - partition
    # - zfs
    - mount
    - unpackfs
    - machineid
    - locale
    - keyboard
    - localecfg
    # - luksbootkeyfile
    # - luksopenswaphookcfg
    # - dracutlukscfg
    - fstab
    # - plymouthcfg
    # - zfshostid
    - initcpiocfg
    - initcpio
    - users
    - displaymanager
    - networkcfg
    - hwclock
    - services-systemd
    # - dracut
    # - initramfs
    # - grubcfg
    - bootloader
    - umount
    - show:
    - finished

    branding: default
    prompt-install: false
    dont-chroot: false
    oem-setup: false
    quit-at-end: false

    initramfsはDebian用みたいなので無効化

  • ようこそ画面

    ./airootfs/etc/calamares/module/welcome.conf
    ---
    # showSupportUrl: true
    showSupportUrl: false
    # showKnownIssuesUrl: true
    showKnownIssuesUrl: false
    showReleaseNotesUrl: false
    # showDonateUrl: https://kde.org/community/donations/
    showDonateUrl: false

    requirements:
    requiredStorage: 5.5
    requiredRam: 1.0
    internetCheckUrl: http://example.com

    check:
    - storage
    - ram
    - power
    - internet
    - root
    - screen
    # - "false"
    # - slow-true
    # - snark

    required:
    # - storage
    - ram
    # - root

    geoip:
    style: "none"
    url: "https://geoip.kde.org/v1/ubiquity" # extended XML format
    selector: "CountryCode" # blank uses default, which is wrong

    showSupportUrl, showKnownIssuesUrl, showDonateUrlを無効化

    チェック(“false”, slow-true, snark)を無効化

  • usersモジュール

    ./airootfs/etc/calamares/modules/users.conf
    # allowWeakPasswords: false
    allowWeakPasswords: true
    # allowWeakPasswordsDefault: false
    allowWeakPasswordsDefault: true

    弱いパスワードを許容

  • unpackfsモジュール

    ./airootfs/etc/calamares/modules/unpackfs.conf
    unpack:
    # - source: ../CHANGES
    # sourcefs: file
    # destination: "/tmp/changes.txt"
    # weight: 1 # Single file
    # - source: src/qml/calamares/slideshow
    # sourcefs: file
    # destination: "/tmp/slideshow/"
    # exclude: [ "*.qmlc", "qmldir" ]
    # weight: 5 # Lots of files
    # # excludeFile: /etc/calamares/modules/unpackfs/exclude-list.txt
    - source: "/run/archiso/bootmnt/arch/x86_64/airootfs.sfs"
    sourcefs: "squashfs"
    destination: ""
    - source: "/run/archiso/bootmnt/arch/boot/x86_64/vmlinuz-linux"
    sourcefs: "file"
    destination: "/boot/vmlinuz-linux"
  • ブランド

    ./airootfs/etc/calamares/branding/branding.desc
    ---
    componentName: default
    welcomeStyleCalamares: false
    welcomeExpandingLogo: true
    windowExpanding: normal
    windowSize: 800px,520px
    windowPlacement: center
    sidebar: widget
    navigation: widget

    strings:
    productName: "${NAME}"
    # shortProductName: Generic
    shortProductName: Arch
    # version: 2023.3 LTS
    version: Rolling
    # shortVersion: 2023.3
    shortVersion: Rolling
    # versionedName: Fancy GNU/Linux 2023.3 LTS "Venomous Vole"
    # versionedName: ぼくのリナックス
    versionedName: Arch Linux Rolling
    # shortVersionedName: FancyGL 2023.3
    shortVersionedName: Arch rolling
    # bootloaderEntryName: FancyGL
    bootloaderEntryName: Arch
    # productUrl: https://calamares.io/
    # supportUrl: https://github.com/calamares/calamares/wiki
    # knownIssuesUrl: https://github.com/calamares/calamares/issues
    # releaseNotesUrl: https://calamares.io/news/
    # donateUrl: https://kde.org/community/donations/index.php

    images:
    # productBanner: "banner.png"
    productIcon: "squid.png"
    productLogo: "squid.png"
    # productWallpaper: "wallpaper.png"
    productWelcome: "languages.png"

    style:
    SidebarBackground: "#292F34"
    SidebarText: "#FFFFFF"
    SidebarTextCurrent: "#292F34"
    SidebarBackgroundCurrent: "#D35400"

    slideshow: "show.qml"
    slideshowAPI: 2

    uploadServer :
    # type : "fiche"
    type : "none"
    url : "http://termbin.com:9999"
    sizeLimit : -1

    versionedNameを変更

    pastbinへの貼り付けを無効化

TODO

  • Wayland対応

    ./airootfs/etc/gdm/custom.conf
    #WaylandEnable=false
    WaylandEnable=true
    WaylandOnByDefault=true

    X11、 Waylandともに動作した。xorgを削除してどうなるか確認したい。

  • Nvidiaドライバ有効化
    packages.x86_64にnvidia, nvidia-utils, nvidia-settingsを追加

  • waylandとnvidiaドライバを組み込んでビルド

    archlinux-2025.06.01-x86_64.iso, 2.6G, 23.57 mins

  • インストール後の後始末
    追加ユーザにはreflector-simpleとcalamaresのPIN止めは不要

  • 物理環境で動作確認