diff options
Diffstat (limited to 'backend/modules')
-rw-r--r-- | backend/modules/bootloader | 33 | ||||
-rw-r--r-- | backend/modules/install_configure | 36 |
2 files changed, 63 insertions, 6 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 } |