Skip to content

Commit b5090e2

Browse files
committed
Add Calamares installer extension
Add new Calamares-based installer extension with configuration for automated Armbian installations, including partition, unpackfs, displaymanager, and shellprocess modules. Signed-off-by: Igor Pecovnik <igor@armbian.com>
1 parent aaad48e commit b5090e2

File tree

9 files changed

+107
-0
lines changed

9 files changed

+107
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Armbian Generic Calamares Installer Extension
3+
4+
function post_repo_customize_image__install_calamares() {
5+
display_alert "Adding calamares package to the image."
6+
do_with_retries 3 chroot_sdcard_apt_get_update
7+
do_with_retries 3 chroot_sdcard_apt_get_install calamares
8+
display_alert "Configuring Calamares for any Desktop Environment..."
9+
run_host_command_logged "cp -vr \"${SRC}/extensions/calamares-installer/config/\"* \"$SDCARD/\""
10+
chroot_sdcard "chmod +x /usr/libexec/armbian-finalize.sh"
11+
display_alert "Calamares configuration complete."
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
modules:
2+
- name: welcome
3+
- name: partition
4+
- name: fstab
5+
- name: unpackfs
6+
- name: machineid
7+
- name: users
8+
- name: displaymanager
9+
- name: packages
10+
- name: grubcfg
11+
- name: bootloader
12+
- name: shellprocess
13+
- name: finished
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Generic Display Manager Configuration for Calamares
2+
# This file works for XFCE (LightDM), GNOME (GDM3), and KDE (SDDM).
3+
4+
# By leaving the list empty, Calamares will auto-detect the display manager
5+
# based on the packages installed in the image.
6+
displaymanagers: []
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
partitionFileSystemType: "ext4"
2+
defaultFileSystemType: "ext4"
3+
# This tells Calamares to create a separate /boot partition
4+
efiSystemPartition: "/boot"
5+
userSwapChoices:
6+
- none
7+
- file
8+
ensureSuspendToDisk: false
9+
allowZfs: false
10+
allowLuksAutomatedPartitioning: false
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dontChroot: false
2+
timeout: 300
3+
script:
4+
- "/usr/libexec/armbian-finalize.sh"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# userpatches/extensions/calamares-installer/config/etc/calamares/modules/unpackfs.conf
2+
3+
# This configuration is for Armbian's live image structure,
4+
# which has a separate /boot (FAT) and / (ext4) partition.
5+
unpack:
6+
# 1. Copy the entire live root filesystem to the target root partition.
7+
- source: "/"
8+
destination: ""
9+
10+
# 2. Copy the live boot partition to the target boot partition.
11+
- source: "/boot"
12+
destination: "/boot"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
modules-search: [ local ]
2+
instances:
3+
- id: partition
4+
module: partition
5+
config: partition.conf
6+
- id: fstab
7+
module: fstab
8+
- id: unpackfs
9+
module: unpackfs
10+
config: unpackfs.conf
11+
- id: machineid
12+
module: machineid
13+
- id: users
14+
module: users
15+
- id: displaymanager
16+
module: displaymanager
17+
config: displaymanager.conf
18+
- id: packages
19+
module: packages
20+
- id: grubcfg
21+
module: grubcfg
22+
- id: bootloader
23+
module: bootloader
24+
- id: shellprocess_final
25+
module: shellprocess
26+
config: shellprocess_final.conf
27+
- id: finished
28+
module: finished
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
echo "--- Running Armbian Finalization Script ---"
3+
4+
if [ -f /usr/lib/armbian/armbian-install ]; then
5+
echo "Executing armbian-install to configure the bootloader..."
6+
/usr/lib/armbian/armbian-install
7+
else
8+
echo "ERROR: /usr/lib/armbian/armbian-install not found!"
9+
exit 1
10+
fi
11+
12+
echo "--- Armbian Finalization Complete ---"
13+
exit 0
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Install Armbian
4+
Comment=Install this system permanently to your disk
5+
Exec=pkexec /usr/bin/calamares
6+
Icon=system-software-install
7+
Terminal=false
8+
Categories=System;
9+
StartupNotify=true

0 commit comments

Comments
 (0)