summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/modules/bootloader42
-rw-r--r--backend/modules/install_configure41
-rw-r--r--backend/modules/partitions9
-rw-r--r--backend/modules/partmgr5
-rw-r--r--debian/changelog66
-rw-r--r--debian/control2
-rw-r--r--debian/kanotix-enable-persistent-live.install2
-rwxr-xr-xkanotix/9000-enable-persistent17
-rw-r--r--[-rwxr-xr-x]kanotix/enable_persistent_live.bash (renamed from kanotix/enable_persistent_live)51
-rw-r--r--kanotix/html/welcome.html4
-rw-r--r--kanotix/html/willkommen.html4
-rw-r--r--lxdesupport.cpp3
12 files changed, 224 insertions, 22 deletions
diff --git a/backend/modules/bootloader b/backend/modules/bootloader
index c4f366c..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
}
@@ -82,6 +90,15 @@ function install_grub()
{
rm -f $TARGET/boot/vmlinuz $TARGET/boot/System.map $TARGET/boot/initrd.img
+ # special handling for installs with crypttab - option was changed in some grub versions
+ if grep -q -v -e ^\s*$ -e ^# $TARGET/etc/crypttab; then
+ if grep -q GRUB_CRYPTODISK_ENABLE $TARGET/usr/sbin/grub-install; then
+ echo GRUB_CRYPTODISK_ENABLE=y | tee -a /etc/default/grub >> $TARGET/etc/default/grub
+ elif grep -q GRUB_ENABLE_CRYPTODISK $TARGET/usr/sbin/grub-install; then
+ echo GRUB_ENABLE_CRYPTODISK=y | tee -a /etc/default/grub >> $TARGET/etc/default/grub
+ fi
+ fi
+
apple=0
dmidecode -s system-manufacturer | grep -q "Apple Inc." && apple=1
@@ -154,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
@@ -161,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 719a9c8..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
@@ -99,8 +107,15 @@ EOF
[ -n "$KEYTABLE" ] && chroot_it install-keymap "$KEYTABLE" 2>/dev/null
- # remove live-repo from sources.list
+ # 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
+ 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
@@ -111,10 +126,12 @@ function configure_target_purge_live_only_stuff()
send install_step configure_target_purge_live_only_stuff
# remove live-only-packages
chroot_it dpkg --purge \
- busybox \
acritoxinstaller \
+ acritoxinstaller-icons \
acritoxinstaller-kanotix \
kanotix-enable-persistent-live \
+ calamares \
+ calamares-settings-kanotix \
live-boot-initramfs-tools \
live-boot \
live-initramfs \
@@ -136,6 +153,14 @@ function configure_target_purge_live_only_stuff()
gfxoverlay \
zram &> /dev/null
+ # remove unused stuff
+ 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 ] && \
chroot_it dpkg --purge kde-config-touchpad
@@ -157,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/backend/modules/partitions b/backend/modules/partitions
index 52c8e73..4c033c7 100644
--- a/backend/modules/partitions
+++ b/backend/modules/partitions
@@ -7,7 +7,10 @@
# /dev/sda
function strip_live_media()
{
- grep -ve '^$' $(awk '{if(($2=="/live/image" || $2=="/lib/live/mount/medium") && $3=="iso9660"){gsub(/[0-9]*$/,"",$1); print "-e ^"$1; exit 0;}}' < /proc/mounts)
+ VENTOY_DEV=$(dmsetup deps ventoy -o devname 2>/dev/null|awk -F['()'] '{print "/dev/"$2}'|sed 's/[0-9]\+//')
+ VENTOY_GREP=
+ [ "$VENTOY_DEV" ] && VENTOY_GREP="-e $VENTOY_DEV"
+ grep -ve '^$' $(awk '{if(($2=="/live/image" || $2=="/lib/live/mount/medium" || $2=="/run/live/medium") && $3=="iso9660"){gsub(/[0-9]*$/,"",$1); print "-e ^"$1; exit 0;}}' < /proc/mounts) $VENTOY_GREP
}
# Synopsis: list_all_disks
@@ -19,7 +22,7 @@ function strip_live_media()
function list_all_disks()
{
(
- awk -vli="$(awk '{if($2=="sd"||$2=="md"||$2=="mmc"||$2=="nvme") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if(($1==list[i]&&$2%16==0)||($1==list[i]&&$2==126||($1==list[i]+8&&$2%16==0))) print "/dev/"$4;}' /proc/partitions
+ awk -vli="$(awk '{if($2=="sd"||$2=="md"||$2=="mmc"||$2=="blkext") print $1;}' /proc/devices)" 'BEGIN{m=split(li,list," ")}{for(i=1;i<=m;i++) if(($1==list[i]&&$2%16==0)||($1==list[i]&&$1==9)) print "/dev/"$4;}' /proc/partitions
) | strip_live_media
}
@@ -63,7 +66,7 @@ function list_all_partitions()
# /dev/mapper/cryptoroot
function list_dm_partitions()
{
- ls /dev/mapper/* 2>/dev/null | fmt -w1 | grep -v "/control$"
+ ls /dev/mapper/* 2>/dev/null | fmt -w1 | grep -v "/control$" -e "/ventoy$" -e "/vtoy_persistent"
}
# Synopsis: (e.g.) list_all_partitions | partitions_usage_details
diff --git a/backend/modules/partmgr b/backend/modules/partmgr
index 281667d..942f6cd 100644
--- a/backend/modules/partmgr
+++ b/backend/modules/partmgr
@@ -7,9 +7,8 @@ function run_partmgr()
get_root
TERM=xterm /sbin/"$1" "$2"
;;
- gparted|qtparted)
- get_root X
- "$1" "$2"
+ gparted)
+ "/usr/sbin/$1" "$2"
;;
esac
}
diff --git a/debian/changelog b/debian/changelog
index dba2832..d5c5240 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,69 @@
+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
+ * Add new live mount point
+ * Use own icon theme
+ * crypttab install
+ * fix nvme
+ * filter ventoy
+ * fix startup gparted
+
+ -- Holger Paradies <retabell@gmx.de> Wed, 30 Dec 2020 13:46:21 +0100
+
+acritoxinstaller (0.2.43) steelfire; urgency=medium
+
+ * do not remove busybox
+ * add mmc partitions
+ * fix: nofail fstab option only for /media mountpoints
+ * add device name for swap partitions
+ * add new package kanotix-enable-persistent-live
+ * added listing of NVME partitions/disks
+ * copy .dmrc and vdr files
+
+ -- Holger Paradies <retabell@gmx.de> Tue, 30 May 2017 12:51:02 +0200
+
acritoxinstaller (0.2.42) spitfire; urgency=low
* fix grub-install --removable typo
diff --git a/debian/control b/debian/control
index 0b77cfc..dae5e7b 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Description: AcritoxInstaller
Package: acritoxinstaller-kanotix
Architecture: all
-Depends: acritoxinstaller (= ${source:Version})
+Depends: acritoxinstaller (= ${source:Version}), acritoxinstaller-icons
Description: AcritoxInstaller for KANOTIX
Package: kanotix-enable-persistent-live
diff --git a/debian/kanotix-enable-persistent-live.install b/debian/kanotix-enable-persistent-live.install
index 78c1759..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/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 734af95..c8f0b31 100755
--- a/kanotix/9000-enable-persistent
+++ b/kanotix/9000-enable-persistent
@@ -14,16 +14,23 @@ Configure_Persistent
Configure_Persistent ()
{
-if ! [ -x /usr/bin/enable_persistent_live ]
+if ! [ -x /usr/local/bin/enable_persistent_live.bash ]
then
touch /var/lib/live/config/enable-persistent
return
fi
-case "$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/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*)
- 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
;;
*)
@@ -31,7 +38,7 @@ case "$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"){print $1;}}' /
[Desktop Entry]
Comment[de]=Diesen Live-USB-Stick persistent machen, d.h. alle Änderungen werden auf dem Stick gespeichert.
Comment=Make this Live-USB-Stick persistent, i.e. all changes will be saved to the stick.
-Exec=/usr/bin/enable_persistent_live
+Exec=/usr/local/bin/enable_persistent_live.bash
Icon=acritoxinstaller
MimeType=
Name[de]=»persistent« aktivieren
diff --git a/kanotix/enable_persistent_live b/kanotix/enable_persistent_live.bash
index a28bdc0..395f3de 100755..100644
--- a/kanotix/enable_persistent_live
+++ b/kanotix/enable_persistent_live.bash
@@ -4,12 +4,13 @@
# 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
. /etc/default/distro
-isodev="$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"){print $1;}}' /proc/mounts)"
+isodev="$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"||$2=="/run/live/medium"){print $1;}}' /proc/mounts)"
case $isodev in
/dev/sd*) ;;
*) isodev= ;;
@@ -20,16 +21,31 @@ 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
;;
esac
+if [ -d "/run/live/persistence" ]; then
+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
+
if [ "$FLL_DISTRO_MODE" != "live" -o -z "$isodev" ]; then
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
@@ -64,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")"
@@ -72,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 $?
@@ -98,6 +132,18 @@ if [ ! -e "$isodisk"$partition ]; then
mkfs.$filesystem -L "persistence" "$isodisk"$partition
fi
+if [ -d /run/live/medium ]; then
+ mkdir -p /run/live/persistence
+ mount "$isodisk"$partition /run/live/persistence
+ set -- $(cat /proc/cmdline)
+ shift
+ echo "set persistence_cmdline='$@ persistence'" > /run/live/persistence/grub.cmdline
+ echo "/ union" > /run/live/persistence/persistence.conf
+ umount /run/live/persistence
+ rmdir /run/live/persistence
+
+else
+
if [ -d /lib/live/mount ]; then
mkdir -p /lib/live/mount/persistence
mount "$isodisk"$partition /lib/live/mount/persistence
@@ -117,7 +163,8 @@ elif [ -d /live ]; then
umount /live/persistence
rmdir /live/persistence
fi
-
+fi
#killall -9 kdialog
kill $(ps ax | grep kdialog | grep Live-USB | cut -c2-5)
+killall -9 kdialog_progress_helper
exit 0
diff --git a/kanotix/html/welcome.html b/kanotix/html/welcome.html
index 2ddd0bd..a1534c3 100644
--- a/kanotix/html/welcome.html
+++ b/kanotix/html/welcome.html
@@ -19,6 +19,10 @@
<li><a href="http://kanotix.acritox.com">http://kanotix.acritox.com</a></li>
<li><a href="irc://irc.freenode.net/kanotix">irc: irc.freenode.net #kanotix</a></li>
</ul>
+<p style="color:red;">Pay attention with UEFI Installation...</p>
+<ul>
+<li><a href="http://kanotix.com/index.php?module=pnWikka&tag=UEFIornotUEFIEN">Help with UEFI</a></li>
+</ul>
<p>Click Next to continue, or Cancel to exit the installer.</p>
</td>
</tr>
diff --git a/kanotix/html/willkommen.html b/kanotix/html/willkommen.html
index a8919e2..2b94374 100644
--- a/kanotix/html/willkommen.html
+++ b/kanotix/html/willkommen.html
@@ -19,6 +19,10 @@
<li><a href="http://kanotix.acritox.com">http://kanotix.acritox.com</a></li>
<li><a href="irc://irc.freenode.net/kanotix">irc: irc.freenode.net #kanotix</a></li>
</ul>
+<p style="color:red;">Besonderheiten bei UEFI Installation beachten...</p>
+<ul>
+<li><a href="http://kanotix.com/index.php?module=pnWikka&tag=UEFIornotUEFIEN">Hilfe UEFI</a></li>
+</ul>
<p>Drücken Sie Weiter um fortzufahren oder Abbrechen um den Installer zu beenden.</p>
</td>
</tr>
diff --git a/lxdesupport.cpp b/lxdesupport.cpp
index 4a1c825..4ac4576 100644
--- a/lxdesupport.cpp
+++ b/lxdesupport.cpp
@@ -25,12 +25,13 @@
void LXDESupport::load()
{
+ QIcon::setThemeName("acritoxinstaller"); // use kanotix theme
if(qgetenv("XDG_CURRENT_DESKTOP") != "LXDE")
return;
QSettings lxde_settings("lxsession/LXDE", "desktop");
QString themeName = lxde_settings.value("GTK/sNet/IconThemeName").toString();
if(!themeName.isEmpty())
- QIcon::setThemeName(themeName);
+ QIcon::setThemeName("acritoxinstaller"); // also use kanotix theme for LXDE
}