summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/modules/bootloader33
-rw-r--r--backend/modules/install_configure36
-rw-r--r--debian/changelog42
-rw-r--r--debian/kanotix-enable-persistent-live.install2
-rwxr-xr-xkanotix/9000-enable-persistent16
-rw-r--r--kanotix/enable_persistent_live.bash25
6 files changed, 141 insertions, 13 deletions
diff --git a/backend/modules/bootloader b/backend/modules/bootloader
index 629f9b5..4fd4df9 100644
--- a/backend/modules/bootloader
+++ b/backend/modules/bootloader
@@ -54,6 +54,11 @@ function list_bootloaders()
grub) echo "GRUB - GRand Unified Bootloader";;
esac
done
+ if [ -d /sys/firmware/efi ]; then
+ if [ -x /usr/sbin/refind-install ]; then
+ echo "rEFInd - Refind Bootmanager"
+ fi
+ fi
}
function send_bootloaders()
@@ -75,6 +80,9 @@ function install_bootmanager_to_target()
burg)
install_burg
;;
+ refind)
+ install_refind
+ ;;
esac
}
@@ -163,6 +171,27 @@ function install_burg()
return 0
}
+function install_refind()
+{
+ rm -f $TARGET/boot/vmlinuz $TARGET/boot/System.map $TARGET/boot/initrd.img
+
+ apple=0
+ dmidecode -s system-manufacturer | grep -q "Apple Inc." && apple=1
+
+ # install refind
+ if [ -d /sys/firmware/efi ]; then
+ if is_removeable "$cfg_bootloader_target" || [ "$apple" = 1 ]; then
+ refind-install --usedefault "$cfg_bootloader_target" --alldrivers &>/dev/null
+ else
+ refind-install --root $TARGET &>/dev/null
+ fi
+ fi
+
+ write_kernel_img_conf
+
+ return 0
+}
+
function write_kernel_img_conf()
{
rm -f $TARGET/etc/kernel-img.conf
@@ -170,13 +199,9 @@ cat << EOT > $TARGET/etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
-relative_links = yes
do_bootloader = no
-do_bootfloppy = no
do_initrd = yes
link_in_boot = no
-postinst_hook = update-$cfg_bootloader
-postrm_hook = update-$cfg_bootloader
EOT
}
diff --git a/backend/modules/install_configure b/backend/modules/install_configure
index be1eb0d..c0eb95b 100644
--- a/backend/modules/install_configure
+++ b/backend/modules/install_configure
@@ -55,6 +55,14 @@ EOF
rm -f $TARGET/tmp 2>/dev/null
mkdir -p $TARGET/tmp
chmod 1777 $TARGET/tmp
+
+ # create file to mount efivars (needed since bullseye)
+ cat <<EOF >$TARGET/tmp/fixmount
+#!/bin/sh
+modprobe efivarfs
+mount -t efivarfs efivarfs /sys/firmware/efi/efivars
+EOF
+ chmod ugo+x $TARGET/tmp/fixmount
# create /etc/mtab as a regular file
rm -f $TARGET/etc/mtab
@@ -102,7 +110,12 @@ EOF
# remove live-repo from sources.list and delete key
sed -i -e '/^# Live Media$/{N;\|\ndeb file:/live/image/debian |{N;/\n$/d}}' $TARGET/etc/apt/sources.list
sed -i -e '/^# Live Media$/{N;\|\ndeb file:/run/live/medium/debian |{N;/\n$/d}}' $TARGET/etc/apt/sources.list
- rm -f $TARGET/etc/apt/trusted.gpg.d/live-media.asc
+ sed -i -e '/^# Live Media$/{N;\|\ndeb \[signed-by=\/usr\/share\/keyrings\/live-media.gpg\] file:/run/live/medium/debian |{N;/\n$/d}}' $TARGET/etc/apt/sources.list
+ rm -f $TARGET/etc/apt/trusted.gpg.d/live-media.asc $TARGET/usr/share/keyrings/live-media.gpg
+ # remove acritoxinstaller-qt4 repo
+ sed -i '/[Aa]critoxinstaller-qt4/d' $TARGET/etc/apt/sources.list
+ # remove double empty lines
+ sed -i 'N;/^\n$/D;P;D;'g $TARGET/etc/apt/sources.list
}
# Synopsis: configure_target_purge_live_only_stuff
@@ -117,6 +130,8 @@ function configure_target_purge_live_only_stuff()
acritoxinstaller-icons \
acritoxinstaller-kanotix \
kanotix-enable-persistent-live \
+ calamares \
+ calamares-settings-kanotix \
live-boot-initramfs-tools \
live-boot \
live-initramfs \
@@ -139,7 +154,12 @@ function configure_target_purge_live_only_stuff()
zram &> /dev/null
# remove unused stuff
- chroot_it apt-get autoremove --purge --yes
+ chroot_it apt-get autoremove --purge --yes &> /dev/null
+
+ # execute above configured fix for efi (new since bullseye)
+ if [ -d /sys/firmware/efi/efivars ]; then
+ chroot_it /tmp/fixmount
+ fi
# remove kde-config-touchpad if no touchpad is available
[ "$(su "$FLL_LIVE_USER" -c "qdbus org.kde.synaptiks /modules/synaptiks org.kde.Synaptiks.isTouchpadAvailable")" = true ] && \
@@ -162,10 +182,22 @@ function configure_target_purge_live_only_stuff()
# remove kdm live shutdown hack
rm -f "$TARGET/home/$cfg_username/.kde/shutdown/kdm-force-shutdown-hack"
+ # remove with live-boot created powermanagementprofilesrc ,will be automatically recreated at plasma5 session-startup
+ rm -f "$TARGET/home/$cfg_username/.config/powermanagementprofilesrc"
+
# remove live-only hooks
rm -rf $TARGET/lib/live
rm -f $TARGET/etc/profile.d/zz-live.sh
rm -f $TARGET/usr/local/bin/enable_persistent_live.bash
rm -f "$TARGET/home/$cfg_username/Desktop/enable_persistent.desktop"
+
+ #remove appimage desktop files
+ if [ -e /run/live/medium/appimages ]; then
+ for appimages in /run/live/medium/appimages/*
+ do
+ appimage=$(basename $appimages)
+ rm -f "$TARGET/home/$cfg_username/Desktop/$appimage.desktop"
+ done
+ fi
}
diff --git a/debian/changelog b/debian/changelog
index 226c416..d5c5240 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,45 @@
+acritoxinstaller (0.2.55) unstable; urgency=medium
+
+ * Remove installer repo in installation.
+ * Buildsystem bullseye.
+
+ -- Holger Paradies <retabell@gmx.de> Fri, 15 Mar 2024 16:27:39 +0100
+
+acritoxinstaller (0.2.54) unstable; urgency=medium
+
+ * Remove debpool stuff
+
+ -- Holger Paradies <retabell@gmx.de> Tue, 12 Mar 2024 19:24:19 +0100
+
+acritoxinstaller (0.2.53) unstable; urgency=medium
+
+ * Cleanup kernel-img.conf still TODO
+ * Remove .config/powermanagementprofilesrc
+
+ -- Holger Paradies <retabell@gmx.de> Mon, 27 Nov 2023 18:38:51 +0100
+
+acritoxinstaller (0.2.52) unstable; urgency=medium
+
+ * Add support for refind bootmanager
+
+ -- Holger Paradies <retabell@gmx.de> Sun, 12 Nov 2023 12:41:28 +0100
+
+acritoxinstaller (0.2.50) unstable; urgency=medium
+
+ * Fix uefi boot
+ * Cleanup appimages
+ * Install grub-efi from debpool
+ * Remove calamares if installed
+
+ -- Holger Paradies <retabell@gmx.de> Tue, 31 Oct 2023 13:29:14 +0100
+
+acritoxinstaller (0.2.45) unstable; urgency=medium
+
+ * add some cleanups for debpool
+ * prepare packages
+
+ -- Holger Paradies <retabell@gmx.de> Sat, 21 Oct 2023 16:47:19 +0200
+
acritoxinstaller (0.2.44) silverfire; urgency=medium
* remarks for UEFI at intro screen
diff --git a/debian/kanotix-enable-persistent-live.install b/debian/kanotix-enable-persistent-live.install
index 57a0fef..aefdc50 100644
--- a/debian/kanotix-enable-persistent-live.install
+++ b/debian/kanotix-enable-persistent-live.install
@@ -1,2 +1,2 @@
-kanotix/enable_persistent_live /usr/local/bin
+kanotix/enable_persistent_live.bash /usr/local/bin
kanotix/9000-enable-persistent /lib/live/config
diff --git a/kanotix/9000-enable-persistent b/kanotix/9000-enable-persistent
index efd21e3..c8f0b31 100755
--- a/kanotix/9000-enable-persistent
+++ b/kanotix/9000-enable-persistent
@@ -20,13 +20,17 @@ then
return
fi
-case "$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"||$2=="/run/live/medium"){print $1;}}' /proc/mounts)" in
+HAVE_PERS_CMDLINE="$(grep -F persistence /proc/cmdline)"
+if [ -n "$HAVE_PERS_CMDLINE" ]; then
+ HAVE_PERS_CMDLINE="persistence"
+fi
+
+ISO_DEVICE="$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"||$2=="/run/live/medium"){print $1;}}' /proc/mounts)"
+
+case "$ISO_DEVICE" in
/dev/sd*)
- if [ -d "/run/live/persistence" ]; then
- rm -f /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop
- fi
- case "$( ls /grub.cmdline 2>/dev/null)" in
- /grub.cmdline)
+ case "$HAVE_PERS_CMDLINE" in
+ persistence)
rm -f /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop
;;
*)
diff --git a/kanotix/enable_persistent_live.bash b/kanotix/enable_persistent_live.bash
index 0d29e00..395f3de 100644
--- a/kanotix/enable_persistent_live.bash
+++ b/kanotix/enable_persistent_live.bash
@@ -4,6 +4,7 @@
# Written by Andreas Loibl <andreas@andreas-loibl.de>
KDIALOG="$(which kdialog)" || KDIALOG="/usr/bin/kdialog"
ZENITY="$(which zenity)" || ZENITY="/usr/bin/zenity"
+YAD="$(which yad)" || YAD="/usr/bin/yad"
partition=3
filesystem=ext4
@@ -20,6 +21,8 @@ if [ -x "$KDIALOG" ]; then
$KDIALOG --error "Persistent mode seems to be enabled already!" --title "Persistent Live-USB-Stick"
elif [ -x "$ZENITY" ]; then
$ZENITY --error --text "Persistent mode seems to be enabled already!" --title "Persistent Live-USB-Stick"
+elif [ -x "$YAD" ]; then
+ $YAD --center --error --text "Persistent mode seems to be enabled already!" --title "Persistent Live-USB-Stick"
fi
exit 1
;;
@@ -30,6 +33,8 @@ if [ -x "$KDIALOG" ]; then
$KDIALOG --error "Persistent mode seems to be enabled already!" --title "Persistent Live-USB-Stick"
elif [ -x "$ZENITY" ]; then
$ZENITY --error --text "Persistent mode seems to be enabled already!" --title "Persistent Live-USB-Stick"
+elif [ -x "$YAD" ]; then
+ $YAD --center --error --text "Persistent mode seems to be enabled already!" --title "Persistent Live-USB-Stick"
fi
exit 1
fi
@@ -39,6 +44,8 @@ if [ -x "$KDIALOG" ]; then
$KDIALOG --error "This script can only be used from a Live USB-Stick!" --title "Persistent Live-USB-Stick"
elif [ -x "$ZENITY" ]; then
$ZENITY --error --text "This script can only be used from a Live USB-Stick!" --title "Persistent Live-USB-Stick"
+elif [ -x "$YAD" ]; then
+ $YAD --center --error --text "This script can only be used from a Live USB-Stick!" --title "Persistent Live-USB-Stick"
fi
exit 1
fi
@@ -73,6 +80,22 @@ CURRENT CHANGES ARE NOT STORED, YOU HAVE TO REBOOT TO ENABLE PERSISTENCE!
Press \"Continue\" when you are ready to start.
" --title "Persistent Live-USB-Stick" || exit 0
+elif [ -x "$YAD" ]; then
+
+$YAD --center --question --text "This script automatically configures your Live-USB-Stick to be persistent:
+
+* it adds a new partition into the unused space of your stick
+* formats the partition with $filesystem filesystem
+* writes config files to the new partition
+
+===============================================================
+CURRENT CHANGES ARE NOT STORED, YOU HAVE TO REBOOT TO ENABLE PERSISTENCE!
+===============================================================
+
+Press \"Continue\" when you are ready to start.
+
+" --title "Persistent Live-USB-Stick" || exit 0
+
fi
cp "$0" "/tmp/$(basename "$0")"
chmod +x "/tmp/$(basename "$0")"
@@ -81,6 +104,8 @@ $KDIALOG --progressbar "Please wait..." --title "Persistent Live-USB-Stick" 0
sudo "/tmp/$(basename "$0")" "$@"
elif [ -x "$ZENITY" ]; then
sudo "/tmp/$(basename "$0")" "$@" | $ZENITY --progress --pulsate --text "Please wait..." --title "Persistent Live-USB-Stick" 0
+elif [ -x "$YAD" ]; then
+sudo "/tmp/$(basename "$0")" "$@" | $YAD --center --progress --pulsate --text "Please wait..." --title "Persistent Live-USB-Stick" 0
fi
exit $?