Advertisement: Linux VPS from $4/month - contact support for custom offer.
+ Post New Thread
Results 1 to 1 of 1

Thread: Migrating/switching from Manjaro (XFCE) to Debian (KDE)

  1. #1
    Administrator
    Join Date
    Mar 2013
    Posts
    2,725

    Migrating/switching from Manjaro (XFCE) to Debian (KDE)

    I have decided to install Debian stable to a different drive than my current Manjaro one so i can return back if something went wrong.
    This page can tell you which issues to expect and how to migrate (on your own risk).

    Which distribution, which DE?
    Most popular in 2021 is claimed to be Ubuntu, Mint, Slack, Debian
    Most popular DE: KDE; Most popular filemanager: Dolphin
    Suggestion was to use default DE of the distribution. KDE more traditional look & more lightweight and customizable. Gnome is more simple little less apps, less configurable & is on gitlab

    I was considering Ubuntu, Debian and PCLinuxOS as alternatives. I wanted newest software, large helpful active community, large software repository, user friendly.

    Ubuntu has quite low rating on Distrowatch site and new issues not have so much activity on their forums so i was comparing Debian and PCLinuxOS:
    Debian MYWOT rating 4.8/5 https://www.mywot.com/scorecard/debian.org
    PCLxOS MYWOT rating 4.7/5 https://www.mywot.com/scorecard/pclinuxos.com
    Debian Distrowatch rating: 8.77/10 https://distrowatch.com/table.php?distribution=debian
    PCLxOS Distrowatch rating: 8.47/10 https://distrowatch.com/table.php?distribution=pclinuxos
    Activity on the forums seems to be more warm on https://www.pclinuxos.com/forum/index.php than on https://forums.debian.net
    Debian is much more popular and PCLinuxOS looks rather like one man show or little group managed - does not support BTRFS,ZFS kern. modules
    PCLOS seems to have more recent software in its stable release than Debian stable?: https://distrowatch.com/dwres.php?firstlist=debian&secondlist=pclinuxos&fi rstversions=1&resource=compare-packages&secondversions=1
    Debian: systemd & apt/deb; PCLxOS: SysV & apt/rpm

    I have selected Debian stable

    Preparing migration on Manjaro:
    - Run backup of the /home/user directory to external drive (Back in Time tool for example), backup /etc /var too as it contains some important configurations that may be wanted) - obviously if you are reinstalling on same drive, you should likely backup whole drive to an image located on other ext. drive.
    - If you are using VPN service, then make sure you carry wg0.conf, .ovpn files handy on USB drive or such (i had these in /etc/wireguard ...)
    - Copy this tutorial to internet (protectedtext.com ?) and note the address so on new PC one can follow tutorial / use phone to make photos of following new system install instructions

    Download Debian & make bootable USB:
    https://www.debian.org/releases/stable/debian-installer/
    After placing the .iso image to a Ventoy (https://www.ventoy.net/) created USB drive, reboot, if running Windows currently, make sure in BIOS is disabled secure boot in order Linux works. Booted from USB selected Debian and follow the steps.
    Installation/Encryption/Filesystem:
    I have used Guided installation but some people suggest advanced CLI. Selected default partitioning, except i was later unhappy about too small SWAP. Regarding swap some people rather recommend not to create swap partition and later create swap file https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#With_suspend-to-disk_support
    Be careful if it prompt reagarding UEFI. If you have new computer it may fail to boot if UEFI is not used. I guess safer is to use UEFI.

    After finished, maybe it will not boot from drive, maybe you will need to change boot order in BIOS or such settings.

    If selected encryption, then it will accept passphrase. Make sure to enable num lock and using right keymap (y/z) etc. After submitting password by Enter key, it can take a minute or so for it to do something.

    KDE desktop environment failed to load on AMD Ryzen
    computer because possibly Debian failed to ask during installation whether to install AMD firmware.
    Install firmware (AMDGPU, Realtek network driver etc..):
    If stuck on boot screen or stuck in GUI mode, you can switch to CLI using: Ctrl+Alt+F5
    And then: apt install isenkram && isenkram-autoinstall-firmware # Suggest packages to install when inserting new hardware https://packages.debian.org/buster/isenkram
    reboot

    System is stable so far. I quite more liked XFCE system bar/panel because for example managing Plasma panel widgets is a bit confusing, removal....

    Default apps i have in KDE seems highly insufficient, like audio and video player. I would expect MPV, VLC, Rhythmbox, Clementine or some such advanced players well known. Gwenview image viewer and basic editor (replacement for Xnview) needs configuring, its toolbar to contain all important actions handy + it does not seem to support paint or obfuscating parts of the image.

    After backing up current /home/user i have restored my Manjaro /home/user folder NOT overwriting current files and then changed user owner of the files/folders since usernames was different: sudo chown -R user:user /home/user/

    I am using ZFS filesystem on my external drive and one installation command failed with error:
    E: The value 'buster-backports' is invalid for APT::Default-Release as such a release is not available in the sources
    but following wroked:
    codename=$(lsb_release -cs);echo "deb http://deb.debian.org/debian $codename-backports main contrib non-free"|sudo tee -a /etc/apt/sources.list && sudo apt update
    apt install linux-headers-amd64 linux-image-amd64;apt install -t bullseye-backports zfsutils-linux
    (previous command installs virtual/meta packages that should also allow updating kernel - https://forums.debian.net/viewtopic.php?p=772460#p772460)

    I am using Wireguard VPN, i had some issue installing it using "apt reinstall wireguard*":
    Error! The /var/lib/dkms/wireguard/1.0.20210219/5.10.0-11-amd64/x86_64/dkms.conf for module wireguard includes a BUILD_EXCLUSIVE directive which
    does not match this kernel/arch. This indicates that it should not be built.
    Skipped.
    It may be caused by OS already having wireguard kernel module installed and so trying to install the package may be unnecessary or bad idea. Try: modprobe wireguard;modinfo wireguard
    This worked, but may be bad idea as mentioned:
    sudo apt install wireguard openresolv
    https://wiki.debian.org/WireGuard#Installation

    V2RAY install:
    sudo apt install v2ray
    systemctl enable v2ray && systemctl start v2ray
    systemctl status v2ray
    systemd[1]: v2ray.service: Scheduled restart job, restart counter is at 5.
    systemd[1]: Stopped V2Ray Service.
    systemd[1]: v2ray.service: Start request repeated too quickly.
    systemd[1]: v2ray.service: Failed with result 'exit-code'.
    systemd[1]: Failed to start V2Ray Service.
    =problem
    -> solution: switch to different server. Somehow in Konqueror browser socks5 proxy 127.0.0.1:1080 not worked, in Firefox it worked though.

    VPN KILLSWITCH: (if using VPN): detail and here how to save iptables rules after: sudo apt install iptables-persistent && sudo iptables-save > /etc/iptables/rules.v4 && sudo iptables-save > /etc/iptables/rules.v6

    Firefox issue:
    There was no Firefox on Debian 11, KDE. Clicking bottom panel tray icon caused: Launching Firefox (failed) Could not find the program '/usr/lib/firefox/firefox'
    There was firefox-esr (even not found via menu search), launched via command line, loaded new profile, not one i have placed into /home/user/.mozilla/firefox
    Opening new tab and address: about:profiles
    i could try to set different profile as default, restart Firefox-esr but then it said: Using an older version of Firefox can corrupt bookmarks and browsing history.
    A) one can switch back to previous profile, but since Firefox is too stupid to offer it, i had to edit /home/user/.mozilla/firefox/profiles.initial (after bakcing it up), guessing correct [Install.....] segment. replacing my big profile name by *-esr profile name. It then launched again -ESR profile.
    B) one can launch Firefox anyway using newer profile. I did it after backing up the profile folder in mentioned path. Prefix line "LastVersion=..." by # character (commenting out) in file /home/user/.mozilla/firefox/mybigprofile.default-release/compatibility.ini
    My Bookmarks, history, etc. seems to be working.

    Minor issues:
    Failed to transfer my crontab that is claimed to be located in /var/spool/cron/crontabs
    Was missing custom /etc/fstab network mountpoint

    Some other SW installation:
    sudo apt install falkon keepassxc thunderbird backintime bpytop htop ca-certificates cron debian-archive-keyring deja-dup dmidecode dnsutils gsmartcontrol keepassxc macchanger meld mpv mtr nano nload nmap nmon openssh-server peek qpdfview rhythmbox shellcheck speedtest-cli sshfs sysstat thunderbird tor torbrowser-launcher traceroute
    flatpak install nicotine
    pip install ps_mem

    I am unable to find AppImage launcher app. Flatpak does not work after installing it via apt (one have to use sudo), here is how i have used it to install qbittorrent since package in repo is heavily outdated and i had an issue with it - It launched 4.2.5 while on Manjaro i had 4.3.9. No torrents, RSS was being added only. After a while i have found it is using different path which i had to delete and symlink:
    rm -rf /home/$(whoami)/.local/share/data/qBittorrent/
    ln -s /home/$(whoami)/.local/share/qBittorrent/ /home/$(whoami)/.local/share/data/
    Then qbt loaded torrents, yet seems like it skipped loading metadata ones. So i have installed newer qbittorrent using flatpak:
    sudo apt install flatpak && sudo flatpak search qbittorrent
    sudo flatpak install org.qbittorrent.qBittorrent && mkdir /home/$(whoami)/.local/share/flatpak/repo/objects" 2>/dev/null
    # Remove default empty dir. and symlink existing one to deleted location so Flatpak qbt adopt my data:
    rm -rf /home/$(whoami)/.var/app/org.qbittorrent.qBittorrent/data/qBittorrent/
    ln -s /home/$(whoami)/.local/share/qBittorrent/ /home/$(whoami)/.var/app/org.qbittorrent.qBittorrent/data/
    # Run
    flatpak run org.qbittorrent.qBittorrent
    Setting compressed swap (zram) to increase memory space by compressing RAM - in case system has low memory: https://wiki.debian.org/ZRam#zram-tools

    Fopnu (P2P) install: apt install gconf2
    cd /tmp;wget https://download2.fopnu.com/download/fopnu_1.57-1_amd64.deb && sudo dpkg -i fopnu_1.57-1_amd64.deb && sudo apt install -f;whereis fopnu

    DarkMX (P2P) install on Debian:
    cd /tmp;wget https://download.darkmx.app/darkmx-1.23-linux64.deb -O darkmx.deb && sudo dpkg -i darkmx.deb && sudo apt install -f;whereis darkmx

    Tribler (P2P) install:
    flatpak install tribler
    or .deb similar way like other apps on this page.

    MuWire issue:
    sudo apt install openjdk-11-jdk

    Enable video thumbnails in Dolphin file manager:
    sudo apt install ffmpegthumbs
    sed -i "s|Plugins=|Plugins=ffmpegthumbs,|g" ~/.config/dolphinrc

    Amule fix:
    sudo apt install amule
    sed -i "s|oldusername/|newusername/|g" ~/.aMule/amule.conf

    Installing additional SW: (use only sw you need)
    sudo apt install winetricks qbittorrent transmission-gtk transmission-remote-gtk transmission-cli amule whois keepassxc clementine featherpad dolphin dolphin-plugins konsole kdialog filezilla gsmartcontrol gnome-disk-utility* glances bpytop gnome-system-monitor* hardinfo sysstat dstat mtr netdata nmap netcat dnsutils traceroute recode torbrowser-launcher wireguard-tools baobab fdupes macchanger grsync deja-dup backintime* openttd* gdb cmake handbrake shotcut qstardict stardict* grub-customizer jpegoptim optipng speedtest-cli mpv vlc rhythmbox clementine shellcheck openssh-server

    systemctl start netdata;systemctl enable netdata

    Enable "mpv" player AB segment looping / multiloop:
    Then Shift+M to enable loop dashboard, Shift+1 & Shift+2 to set loop points (or just 1 & 2 on english keyboard)

    Akonadi used significant amount of memory and since i am not using kmail and other services, i did: akonadictl stop;sudo apt-get remove --purge kmail akonadi-server

    Baloo file indexer of the KDE was utilizing disk per "iotop" the top process was baloo_file. Since i am using fsearch for file name search, i have disabled baloo:
    balooctl status
    balooctl suspend;balooctl disable;ps aux|grep baloo
    sudo kill -9 baloopidhere # kill baloo PID returned by ps aux

    Adjust logrotate to rotate monthly, once, compress rotated file and make sure files older 60 days are removed:
    $ sudo grep -v "#" /etc/logrotate.conf|grep .
    monthly
    rotate 1
    shred
    dateext
    compress
    include /etc/logrotate.d
    lastaction
    find /var/log -type f -mtime +60 -delete
    find /var/crash/ -type f ! -name kexec_cmd ! -name kdump_lock -delete
    endscript
    Stopped cron logging:
    $ sudo nano /etc/rsyslog.conf
    turn line:
    *.*;auth,authpriv -/var/log/syslog
    into:
    turn line "*.*;auth,authpriv,cron.none -/var/log/syslog"
    $ systemctl restart rsyslog

    If having low disk space on system drive, reduce usage by journal logs inside /etc/systemd/journald.conf changing SystemMaxUse= to lets say 100M.

    LOGROTATE: had to edit included file /etc/logrotate.d/rsyslog to delete/shred daily (or monthly etc.):
    rotate 0
    weekly
    maxsize 5M
    maxage 30
    missingok
    notifempty
    shred
    Found in journal: [system] Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
    tried to disable the service i am not using: sudo systemctl stop bluetooth.service

    $ nano /etc/smartd.conf
    at line:
    DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
    removed "-n standby " per suggestion https://github.com/deajan/smartmontools-win/issues/17#issuecomment-1251008022
    It may cause smartd to awake sleeping & standby mode drives.

    Downloaded and made executable yt-dlp (Youtube downloader for Linux): https://github.com/yt-dlp/yt-dlp#release-files
    Made alias for it: alias {youtube-dl,ytdl,ytd}='$HOME/apps/yt-dlp -U;$HOME/apps/yt-dlp --merge-output-format=mp4 --format="best[height<1025]"'

    TODO:

    https://averagelinuxuser.com/debian-10-after-install/#2-switch-to-the-fastest-repository-mirror
    https://averagelinuxuser.com/debian-10-after-install/#3-add-contrib-and-non-free-repositories
    https://averagelinuxuser.com/debian-10-after-install/#8-install-build-essential


    Check Manjaro setup tutorial https://internetlifeforum.com/beginners/16139-how-i-migrated-windows-10-linux-manjaro-vpn-setup-p2p-apps/ and make notes about progress.


    --------


    Resources:
    https://jotbe.io/blog/2019/03/how-to-clone-a-luks-encrypted-hhd-to-a-larger-ssd/
    https://internetlifeforum.com/beginners/16139-how-i-migrated-windows-10-linux-manjaro-vpn-setup-p2p-apps/
    Last edited by Fli; 03-20-2024 at 08:38 AM.

+ Post New Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam