ad new calamares configs, scripts and modules
|
@ -76,13 +76,16 @@ sequence:
|
||||||
- bootloader-config
|
- bootloader-config
|
||||||
- grubcfg
|
- grubcfg
|
||||||
- bootloader
|
- bootloader
|
||||||
- packages
|
|
||||||
- luksbootkeyfile
|
- luksbootkeyfile
|
||||||
|
- luksopenswaphookcfg
|
||||||
- plymouthcfg
|
- plymouthcfg
|
||||||
- initramfscfg
|
- initramfscfg
|
||||||
- initramfs
|
- initramfs
|
||||||
- sources-media-unmount
|
- sources-media-unmount
|
||||||
- sources-final
|
- sources-final
|
||||||
|
- update-system
|
||||||
|
- grub-defaults
|
||||||
|
- shellprocess
|
||||||
- umount
|
- umount
|
||||||
|
|
||||||
# Phase 3 - postinstall.
|
# Phase 3 - postinstall.
|
||||||
|
|
|
@ -91,11 +91,15 @@ sequence:
|
||||||
- bootloader
|
- bootloader
|
||||||
- packages
|
- packages
|
||||||
- luksbootkeyfile
|
- luksbootkeyfile
|
||||||
|
- luksopenswaphookcfg
|
||||||
- plymouthcfg
|
- plymouthcfg
|
||||||
- initramfscfg
|
- initramfscfg
|
||||||
- initramfs
|
- initramfs
|
||||||
- sources-media-unmount
|
- sources-media-unmount
|
||||||
- sources-final
|
- sources-final
|
||||||
|
- update-system
|
||||||
|
- grub-defaults
|
||||||
|
- shellprocess
|
||||||
- umount
|
- umount
|
||||||
|
|
||||||
# Phase 3 - postinstall.
|
# Phase 3 - postinstall.
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
type: "job"
|
||||||
|
name: "grub-defaults"
|
||||||
|
interface: "process"
|
||||||
|
command: "/usr/sbin/grub-defaults"
|
||||||
|
timeout: 600
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
type: "job"
|
||||||
|
name: "update-system"
|
||||||
|
interface: "process"
|
||||||
|
command: "/usr/sbin/update-system"
|
||||||
|
timeout: 600
|
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Define CHROOT
|
||||||
|
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
|
||||||
|
|
||||||
|
# Sets GRUB configuration.
|
||||||
|
# Writes the configuration to the /etc/default/grub file.
|
||||||
|
# Updates the bootloader.
|
||||||
|
|
||||||
|
# Check if CHROOT is set
|
||||||
|
if [ -z "$CHROOT" ]; then
|
||||||
|
echo "CHROOT not set. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="$CHROOT/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot $CHROOT update-grub
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Apply updates to the system
|
||||||
|
|
||||||
|
# Function to update the system
|
||||||
|
function update_system() {
|
||||||
|
# Define CHROOT
|
||||||
|
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
|
||||||
|
|
||||||
|
# Verifying CHROOT
|
||||||
|
if [ -z "$CHROOT" ]; then
|
||||||
|
echo "Error: CHROOT is not set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Updating the system..."
|
||||||
|
|
||||||
|
# Update the package list
|
||||||
|
chroot $CHROOT /usr/bin/apt update
|
||||||
|
|
||||||
|
# Update installed packages
|
||||||
|
chroot $CHROOT /usr/bin/apt upgrade -y
|
||||||
|
|
||||||
|
# Remove unnecessary packages
|
||||||
|
chroot $CHROOT /usr/bin/apt autoremove -y
|
||||||
|
|
||||||
|
# Clean the APT cache
|
||||||
|
chroot $CHROOT /usr/bin/apt clean
|
||||||
|
|
||||||
|
echo "System successfully updated!"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run the function to update the system
|
||||||
|
update_system
|
||||||
|
|
|
@ -17,6 +17,7 @@ GRUB_DISTRIBUTOR="My-distro"
|
||||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
GRUB_CMDLINE_LINUX=""
|
GRUB_CMDLINE_LINUX=""
|
||||||
GRUB_GFXMODE=1440x900
|
GRUB_GFXMODE=1440x900
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
GRUB_DISABLE_OS_PROBER=false
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
# GRUB configuration file path
|
# GRUB configuration file path
|
||||||
|
@ -29,6 +30,12 @@ sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CO
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
# Run update-grub after modifying the file
|
# Run update-grub after modifying the file
|
||||||
|
|
|
@ -17,6 +17,7 @@ GRUB_DISTRIBUTOR="My-distro"
|
||||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
GRUB_CMDLINE_LINUX=""
|
GRUB_CMDLINE_LINUX=""
|
||||||
GRUB_GFXMODE=1440x900
|
GRUB_GFXMODE=1440x900
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
GRUB_DISABLE_OS_PROBER=false
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
# GRUB configuration file path
|
# GRUB configuration file path
|
||||||
|
@ -29,6 +30,12 @@ sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CO
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
# Run update-grub after modifying the file
|
# Run update-grub after modifying the file
|
||||||
|
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 818 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 977 B After Width: | Height: | Size: 977 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 772 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 464 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 979 B After Width: | Height: | Size: 979 B |
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 454 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 735 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 864 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 958 B After Width: | Height: | Size: 958 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 893 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 976 B After Width: | Height: | Size: 976 B |
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 963 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 963 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |