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

Calamares
Calamares aims to be easy, usable, beautiful, pragmatic, inclusive and distribution-agnostic
カスタマイズしたCalamaresを組み込んだライブISOイメージで起動し、Arch Linuxをインストールして、Arch Linuxが起動しました。
環境
パッケージ
- calamares-git 3.3.14
https://github.com/calamares/calamares - ckbcomp 1.234-1
https://aur.archlinux.org/packages/ckbcomp
Calamaresの主なインストールディレクトリ、ファイル
- /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
構築
ckbcompパッケージの作成
https://aur.archlinux.org/packages/ckbcomp
PKGBUILD内のソースURLが無効なので修正してパッケージを作成します。paru -G ckbcomp
cd ckbcompPKGBUILD # 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 -esudo pacman -U ckbcomp-1.234-1-any.pkg.tar.zst
cp ckbcomp-1.234-1-any.pkg.tar.zst /opt/custom-repo/x86_64/
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: falseinitramfsは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 wrongshowSupportUrl, 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 : -1versionedNameを変更
pastbinへの貼り付けを無効化
TODO
対応済
- Wayland対応
./airootfs/etc/gdm/custom.conf #WaylandEnable=false
WaylandEnable=true
WaylandOnByDefault=true - Nvidiaドライバ組み込み
これから
- 動作確認
- VirtualBox : OK
- Gnome Boxes (qemu/KVM/livirt) ; OK
- VMWare : not tested
- 物理環境 : not tested
- インストール後の後始末
- liveuserの削除
- 追加ユーザにはreflector-simpleとcalamaresのPIN止めは不要
- 環境によってDash to Panelの初回設定が反映されない場合がある
- ブランディングとスライドショー
- パッケージ削減(現在、15分でビルド、2.6GB)
多分やらない
- archinstall含める?
- xorgの削除
- package chooserモジュール