From 7e59740468468c0be0a5c957a9a760cde61be347 Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 4 Jul 2023 20:15:59 +0000 Subject: [PATCH] update calamares configs --- Budgie/build.sh | 1 + Cinnamon/build.sh | 1 + Gnome/build.sh | 1 + Kde/build.sh | 1 + Lxqt/build.sh | 1 + Lxqt32/build.sh | 1 + Mate/build.sh | 1 + Xfce/build.sh | 1 + Xfce32/build.sh | 1 + .../calamares/modules/bootloader.conf | 4 +- acorinstaller/calamares/modules/fstab.conf | 38 +++++++++++++++---- acorinstaller/calamares/modules/mount.conf | 34 +++++++++-------- .../calamares/modules/openrcdmcryptcfg.conf | 7 ++++ .../calamares/modules/partition.conf | 6 ++- acorinstaller/calamares/modules/users.conf | 8 +++- acorinstaller/calamares/modules/welcome.conf | 6 +-- acorinstaller/install-debian | 26 +++++++++++++ 17 files changed, 107 insertions(+), 31 deletions(-) create mode 100644 acorinstaller/calamares/modules/openrcdmcryptcfg.conf create mode 100755 acorinstaller/install-debian diff --git a/Budgie/build.sh b/Budgie/build.sh index 9f2d909..6ad3ef6 100755 --- a/Budgie/build.sh +++ b/Budgie/build.sh @@ -230,6 +230,7 @@ cp $acorbuild/acorlightdm/* $acorbuild/build/config/includes.chroot/etc/lightdm cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Cinnamon/build.sh b/Cinnamon/build.sh index 71a879a..7cb083f 100755 --- a/Cinnamon/build.sh +++ b/Cinnamon/build.sh @@ -221,6 +221,7 @@ cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorconfigs/.face $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Gnome/build.sh b/Gnome/build.sh index 626a62b..ab6a757 100755 --- a/Gnome/build.sh +++ b/Gnome/build.sh @@ -212,6 +212,7 @@ cp $acorbuild/acorlightdm/* $acorbuild/build/config/includes.chroot/etc/lightdm cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Kde/build.sh b/Kde/build.sh index 1da506a..5c6689d 100755 --- a/Kde/build.sh +++ b/Kde/build.sh @@ -233,6 +233,7 @@ cp $acorbuild/acorconfigs/.face $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorconfigs/kde/.gtkrc-2.0 $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Lxqt/build.sh b/Lxqt/build.sh index 98e6c53..79eec87 100755 --- a/Lxqt/build.sh +++ b/Lxqt/build.sh @@ -222,6 +222,7 @@ cp $acorbuild/acorlightdm/* $acorbuild/build/config/includes.chroot/etc/lightdm cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorconfigs/.face $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorconfigs/.gtkrc-2.0 $acorbuild/build/config/includes.chroot/etc/skel diff --git a/Lxqt32/build.sh b/Lxqt32/build.sh index cbeb02f..70dd85f 100755 --- a/Lxqt32/build.sh +++ b/Lxqt32/build.sh @@ -222,6 +222,7 @@ cp $acorbuild/acorconfigs/.face $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorconfigs/.gtkrc-2.0 $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorinstaller/bootloader-config-32/* $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Mate/build.sh b/Mate/build.sh index 87df9a4..1a618c6 100755 --- a/Mate/build.sh +++ b/Mate/build.sh @@ -228,6 +228,7 @@ cp $acorbuild/acorlightdm/* $acorbuild/build/config/includes.chroot/etc/lightdm cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Xfce/build.sh b/Xfce/build.sh index ef06e20..183a845 100755 --- a/Xfce/build.sh +++ b/Xfce/build.sh @@ -222,6 +222,7 @@ cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorconfigs/.face $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorinstaller/bootloader-config $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/Xfce32/build.sh b/Xfce32/build.sh index b9e46cf..ddca12c 100755 --- a/Xfce32/build.sh +++ b/Xfce32/build.sh @@ -219,6 +219,7 @@ cp $acorbuild/acorgrub/grub $acorbuild/build/config/includes.chroot/etc/default cp $acorbuild/acorconfigs/.face $acorbuild/build/config/includes.chroot/etc/skel cp $acorbuild/acorinstaller/bootloader-config-32/* $acorbuild/build/config/includes.chroot/usr/sbin cp $acorbuild/acorinstaller/add-calamares-desktop-icon $acorbuild/build/config/includes.chroot/usr/bin +cp $acorbuild/acorinstaller/install-debian $acorbuild/build/config/includes.chroot/usr/bin cp $acorbuild/acorinstaller/sources-final $acorbuild/build/config/includes.chroot/usr/sbin cp -r $acorbuild/acorbootloaders/* $acorbuild/build/config/includes.binary diff --git a/acorinstaller/calamares/modules/bootloader.conf b/acorinstaller/calamares/modules/bootloader.conf index b6d8448..a456869 100644 --- a/acorinstaller/calamares/modules/bootloader.conf +++ b/acorinstaller/calamares/modules/bootloader.conf @@ -43,7 +43,7 @@ efiBootMgr: "efibootmgr" # setting the option here, keep in mind that the name is sanitized # (problematic characters, see above, are replaced). # -# efiBootloaderId: "dirname" +efiBootloaderId: "acoros" # Optionally install a copy of the GRUB EFI bootloader as the EFI # fallback loader (either bootia32.efi or bootx64.efi depending on @@ -51,4 +51,4 @@ efiBootMgr: "efibootmgr" # seems to be the only one). If you set this to false, take care # to add another module to optionally install the fallback on those # boards that need it. -installEFIFallback: false +installEFIFallback: true diff --git a/acorinstaller/calamares/modules/fstab.conf b/acorinstaller/calamares/modules/fstab.conf index 2990717..b2db8e7 100644 --- a/acorinstaller/calamares/modules/fstab.conf +++ b/acorinstaller/calamares/modules/fstab.conf @@ -1,11 +1,33 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configure fstab options +# --- mountOptions: - default: defaults,noatime - btrfs: defaults,noatime,space_cache,autodefrag -ssdExtraMountOptions: - ext4: discard - jfs: discard - xfs: discard - swap: discard - btrfs: discard,compress=lzo + default: defaults,noatime,discard + btrfs: defaults,noatime,noautodefrag,discard + btrfs_swap: defaults + swap: defaults + crypttabOptions: luks,keyscript=/bin/cat + +efiMountOptions: umask=0077 + +ssdExtraMountOptions: + btrfs: ssd + +tmpOptions: + default: + tmpfs: false + options: "" + ssd: + tmpfs: true + options: "defaults,noatime,mode=1777" + +- name: swap + fstype: swap + mountpoint: swap + size: 4G + create: true + diff --git a/acorinstaller/calamares/modules/mount.conf b/acorinstaller/calamares/modules/mount.conf index bb28eed..b22676f 100644 --- a/acorinstaller/calamares/modules/mount.conf +++ b/acorinstaller/calamares/modules/mount.conf @@ -1,18 +1,10 @@ -# Mount filesystems in the target (generally, before treating the -# target as a usable chroot / "live" system). Filesystems are -# automatically mounted from the partitioning module. Filesystems -# listed here are **extra**. The filesystems listed in *extraMounts* -# are mounted in all target systems. The filesystems listed in -# *extraMountsEfi* are mounted in the target system **only** if -# the host machine uses UEFI. ---- -# Extra filesystems to mount. The key's value is a list of entries; each -# entry has four keys: -# - device The device node to mount -# - fs The filesystem type to use -# - mountPoint Where to mount the filesystem -# - options (optional) Extra options to pass to mount(8) +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 # +# Mount filesystems in the target (generally, before treating the +# target as a usable chroot / "live" system). +--- + extraMounts: - device: proc fs: proc @@ -29,8 +21,18 @@ extraMounts: - device: /run/udev mountPoint: /run/udev options: bind - -extraMountsEfi: - device: efivarfs fs: efivarfs mountPoint: /sys/firmware/efi/efivars + +btrfsSwapSubvol: /@swap + +btrfsSubvolumes: + - mountPoint: / + subvolume: /@ + - mountPoint: /home + subvolume: /@home + - mountPoint: /var/cache + subvolume: /@cache + - mountPoint: /var/log + subvolume: /@log diff --git a/acorinstaller/calamares/modules/openrcdmcryptcfg.conf b/acorinstaller/calamares/modules/openrcdmcryptcfg.conf new file mode 100644 index 0000000..0dbd078 --- /dev/null +++ b/acorinstaller/calamares/modules/openrcdmcryptcfg.conf @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration file for opendmcryptcfg module +# +--- +configFilePath: /etc/conf.d/dmcrypt diff --git a/acorinstaller/calamares/modules/partition.conf b/acorinstaller/calamares/modules/partition.conf index e4ca53e..d7cb865 100644 --- a/acorinstaller/calamares/modules/partition.conf +++ b/acorinstaller/calamares/modules/partition.conf @@ -1,13 +1,17 @@ efiSystemPartition: "/boot/efi" +efiSystemPartitionSize: 600M +efiSystemPartitionName: EFI userSwapChoices: - none # Create no swap, use no swap - small # Up to 4GB - suspend # At least main memory size - file # To swap file instead of partition +swapPartitionName: SWAP +drawNestedPartitions: false alwaysShowPartitionLabels: true +allowManualPartitioning: true initialPartitioningChoice: erase initialSwapChoice: none -drawNestedPartitions: true defaultFileSystemType: "ext4" availableFileSystemTypes: ["ext4","btrfs", "f2fs","xfs"] diff --git a/acorinstaller/calamares/modules/users.conf b/acorinstaller/calamares/modules/users.conf index 0f2082a..37c0a68 100644 --- a/acorinstaller/calamares/modules/users.conf +++ b/acorinstaller/calamares/modules/users.conf @@ -12,6 +12,12 @@ defaultGroups: - lpadmin - scanner - bluetooth + - sambashare autologinGroup: autologin +doAutologin: false sudoersGroup: sudo -setRootPassword: false +setRootPassword: true +doReusePassword: true +allowWeakPasswords: true +allowWeakPasswordsDefault: true +userShell: /bin/bash diff --git a/acorinstaller/calamares/modules/welcome.conf b/acorinstaller/calamares/modules/welcome.conf index dcc76b2..be58da0 100644 --- a/acorinstaller/calamares/modules/welcome.conf +++ b/acorinstaller/calamares/modules/welcome.conf @@ -1,7 +1,7 @@ --- -showSupportUrl: true -showKnownIssuesUrl: true -showReleaseNotesUrl: true +showSupportUrl: false +showKnownIssuesUrl: false +showReleaseNotesUrl: false requirements: requiredStorage: 10 diff --git a/acorinstaller/install-debian b/acorinstaller/install-debian new file mode 100755 index 0000000..a9a8190 --- /dev/null +++ b/acorinstaller/install-debian @@ -0,0 +1,26 @@ +#!/bin/sh +### +# Wrapper for running calamares on Debian live media +### + +# Stale file left behind by live-build that messes with partitioning +sudo mv /etc/fstab /etc/fstab.orig.calamares + +# Allow Calamares to scale the window for hidpi displays +# This is fixed in the Calamares 3.3.0 series, so we can remove this +# once we switch to that +# Upstream commit that will make this obsolete: +# https://github.com/calamares/calamares/commit/e9f011b686a0982fb7828e8ac02a8e0784d3b11f +# Upstream bug: +# https://github.com/calamares/calamares/issues/1945 +# Debian bug: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992162 +export QT_AUTO_SCREEN_SCALE_FACTOR=1 + +# Access control to run calamares as root for xwayland +xhost +si:localuser:root +pkexec calamares -d +xhost -si:localuser:root + +# Restore stale fstab, for what it's worth +sudo mv /etc/fstab.orig.calamares /etc/fstab