Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

The Debian "Lite" system I have created

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
ShaunTheSalvo
Posts: 7
Joined: 2022-03-05 03:54
Has thanked: 1 time
Been thanked: 1 time

The Debian "Lite" system I have created

#1 Post by ShaunTheSalvo »

G'day from Australia!

This is my first post here, so I appreciate your patience/tolerance/whatever else you feel is required. :)

I have been using Linux in various forms since about 2008, and have settled on Debian as my OS of choice. I love it for its flexibility and particularly the fact it is so eas to customise. Unfortunately, I have no programming experience (C etc.) but so far, I have not needed it.

So, I have created a custom "lite" build of Debian Bullseye (with KDE desktop), with these goals in mind:
  • Only install what is necessary
  • Keep the installation as small as possible
  • Easy to configure, customise and adjust as required
The reason I'm posting this here, is I primarily wanted to let the community know about it. At present, I am using Systemback as a simple way to create a bootable ISO with a live system, and a simple yet comprehensive GUI for installation to hard drive. I have been using this system as my daily OS now for just over a year (with a couple of revisions here and there!). I'm open to any feedback or ideas.

In a nutshell, my process for creating the distro is as follows:
  1. I use the mini.iso to start installing a very basic system. I'm using Bullseye (stable), but the process works just as well with Testing or Unstable.On During install, I do not select any desktop environment during the tasksel section, thus creating a minimal system with terminal prompt only.
  2. Once the installation is complete, I boot into the new system, giving me a terminal prompt.
  3. I then install only the bare-bones requirements for my system, using apt install. The trick is to use --no-install-recommends for all package installation as much as possible. This example command installs a bare-bones KDE environment; you may like to adapt it if you prefer something else like GNOME or whatever. Of course, you may need to also install any drivers for graphics cards or other hardware you may have.

    Code: Select all

    sudo apt install --no-install-recommends kde-plasma-desktop sddm plasma-nm kde-config-sddm kde-config-gtk-style* kde-config-screenlocker qml-module-org-kde-newstuff kwin-x11 systemsettings plasma-discover featherpad powerdevil kscreen kmix
    sudo apt remove konqueror kwrite
  4. Then reboot, and it should boot into a minimal (but still quite adequate and comfortable) KDE desktop. At this point, I usually install Systemback and create a live ISO and snapshot of the system, which provides a very quick and easy way to start over if something goes wrong while getting the machine all set up. By the way, I use Featherpad instead of Kwrite as my text editor, as it plays nice with editing as root, and removing Konqueror as I personally do not use it (no offence to the devs who create/maintain these programs!).
I then proceed to install whatever software (web browsers etc.) I want - again using --no-install-recommends wherever possible, to keep the install size to a minimum. Then, take some time to set up the system to my liking. Finally, another Systemback ISO and snapshot ... and the job is done.

The result is a lean and fast KDE desktop, Discover is on hand to keep the system up to date, and I keep the snapshots and ISO backups up to date (once a week or so) so no great loss if things do go wrong. I realise Systemback may not be the most common tool used in the Debian world for backup, but I do find it very easy to use, flexible, and well-suited to this project.

Anyway, I hope this may be helpful for anyone who wants to run a slimmed-down and efficient system. Any comments, suggestions or questions are welcome. I can upload a copy of the bare-bones system as a Systemback ISO if anyone would like to look at it.

Cheers!

Cyborg
Posts: 38
Joined: 2016-12-01 19:07
Has thanked: 1 time
Been thanked: 2 times

Re: The Debian "Lite" system I have created

#2 Post by Cyborg »

Thanks. I've been thinking about installing a minimal KDE system and this will come in handy.

ShaunTheSalvo
Posts: 7
Joined: 2022-03-05 03:54
Has thanked: 1 time
Been thanked: 1 time

Re: The Debian "Lite" system I have created PLUS HOW TO INSTALL SYSTEMBACK

#3 Post by ShaunTheSalvo »

Cyborg wrote: 2022-03-06 22:30 Thanks. I've been thinking about installing a minimal KDE system and this will come in handy.
You're very welcome. Let me know how you fare, or if you run in to any issues - happy to try to help.

By the way, I noted I forgot to include instructions on how to install Systemback. Let's do it the easy way, from a Debian repo:

Code: Select all

#!/bin/bash/
sudo sh -c 'echo "deb [arch=amd64] http://mirrors.bwbot.org/ stable main" > /etc/apt/sources.list.d/systemback.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 50B2C005A67B264F
sudo apt update && sudo apt install --no-install-recommends systemback 
If it complains about missing packages after the install, just run

Code: Select all

sudo apt -f install
afterward.

I've found it to be absolutely magical when it comes to creating live ISO backups. As a suggestion, always run

Code: Select all

sudo apt clean
before you create the backup; it clears out the downloaded .deb files and can result in a smaller ISO. Systemback is very easy to figure out, but if you get stuck, let me know.

A few more little tidbits to make your life easier:

As I use the terminal quite a lot, I have made a few simple aliases to make using apt easier (saving quite a bit of typing!). Add this onto your ~/.bash_aliases file:

Code: Select all

alias aptf='sudo apt install --no-install-recommends' # install package(s) with no install recommends ("frugal" install)
alias apti='sudo apt install' # install package(s) WITH install recommends
alias apt='sudo apt' # use just "apt" for any other apt commands, eg apt clean, apt download, apt upgrade etc.
alias aptu='sudo apt update && sudo apt full-upgrade' # refresh your repo list and perform a system update/upgrade
alias edit='featherpad' # edit text files with a nice comfy GUI
alias sedit='sudo featherpad' # edit text files AS ROOT with a nice comfy GUI
alias wipe='history -c && clear' # clear your terminal screen and erase history of entered commands
alias swipe='history -c && clear && sudo apt clean' # as above, but also clear your apt cache
Have fun and good luck!

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: The Debian "Lite" system I have created

#4 Post by canci »

Nice post! You should ask the mods to move it to the Howto section.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

barlafuss
Posts: 24
Joined: 2007-11-11 17:49
Location: Milan

Re: The Debian "Lite" system I have created

#5 Post by barlafuss »

following, thanks !

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2029
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 139 times
Been thanked: 206 times

Re: The Debian "Lite" system I have created

#6 Post by Hallvor »

Good post!

Systemback looks like an Ubuntu package, is that correct?
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: The Debian "Lite" system I have created

#7 Post by sunrat »

canci wrote: 2022-03-07 07:13 Nice post! You should ask the mods to move it to the Howto section.
OP could post in the Howto section. Only the system setup bit though, the systemback and tidbits are a different subject.

Does Systemback work correctly with UEFI now? I ask because AVLinux (Debian-based) used Systemback to create its ISO images for distribution until a few years ago but the 2019 version had serious issues with UEFI iirc. In fact I wasn't able to install it at all.
AVLinux has since moved from a pure Debian base to an MX Linux base and uses their own image creation tools, and is now AVL-MXE ie. AVLinux-MX Edition.

Hallvor wrote: 2022-03-07 17:48 Systemback looks like an Ubuntu package, is that correct?
It appears to be a third party repo. keyserver.ubuntu is commonly used for many third party repo keys, it doesn't necessarily infer it's a ubuntu package.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: The Debian "Lite" system I have created

#8 Post by kedaha »

Hallvor wrote: 2022-03-07 17:48Systemback looks like an Ubuntu package, is that correct?
Whatever its merits, it's a third-party package from here which isn't supported by Debian so the usual caveats of using such software at your own risk apply. Better to use an official Debian package like timeshift.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: The Debian "Lite" system I have created

#9 Post by sunrat »

kedaha wrote: 2022-03-07 22:13Better to use an official Debian package like timeshift.
Timeshift is a backup utility whereas Systemback creates a bootable ISO image.
Personally I use fsarchiver for system backups and rsync for regular data backups, but a bootable .iso is a whole different ballgame.

There are several alternatives to create bootable images, the live-build system is quite involved but useful and configurable. Also Refractasnapshot and simple-cdd are easier methods.
MX Linux has done a lot of great work in their mx-snapshot, create-live-usb and remaster tools. One can create a custom live bootable image with persistence so changes can be saved any time.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2029
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 139 times
Been thanked: 206 times

Re: The Debian "Lite" system I have created

#10 Post by Hallvor »

There are plenty of native tools: https://wiki.debian.org/BackupAndRecovery

More relevant here: KDE also has a backup tool in Systemsettings (Kup).

Image
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: The Debian "Lite" system I have created

#11 Post by kedaha »

sunrat wrote: 2022-03-08 01:53
kedaha wrote: 2022-03-07 22:13Better to use an official Debian package like timeshift.
Timeshift is a backup utility whereas Systemback creates a bootable ISO image.
I'm not familiar with systemback but with timeshift, snapshots can be restored while running a live CD or USB. I don't see much point in making a bootable ISO image unless one plans to install on multiple computers. But I just stick to my stable mate desktop and, apart from routinely backing up my files just in case, I never need to reinstall or restore the system but I see that such a utility could come in handy for folks running sid or testing.
Since I don't do KDE and my system is pretty lean & mean anyway I don't need to make a reinstallable, lite version of it. :mrgreen:
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

barlafuss
Posts: 24
Joined: 2007-11-11 17:49
Location: Milan

Re: The Debian "Lite" system I have created

#12 Post by barlafuss »

My Company laptop runs Windows, but at home I use it via a Linux Live usb.
I love MX Linux for the following: I run the "official" (live) iso, I install a set of needed software, I set up wifi, bash aliases, all the quick basic customizations and then with MX snapshot I create the "Live iso" for the following usage.
And, if I need more, I can add and do a new snapshot. Very useful (for my need), better than any "persistent" ...
I do not like MX Linux as my main driver (I use Debian testing on my own desktop), but as "live" linux is wonderful .
Just my user case ...

LE_746F6D617A7A69
Posts: 932
Joined: 2020-05-03 14:16
Has thanked: 7 times
Been thanked: 65 times

Re: The Debian "Lite" system I have created

#13 Post by LE_746F6D617A7A69 »

kedaha wrote: 2022-03-08 09:58 (...) But I just stick to my stable mate desktop and, apart from routinely backing up my files just in case, I never need to reinstall or restore the system but I see that such a utility could come in handy for folks running sid or testing.
Since I don't do KDE and my system is pretty lean & mean anyway I don't need to make a reinstallable, lite version of it. :mrgreen:
It's not My intention to be harsh, but actually I can't see any sense in writing "how to" use well-documented option for apt ;)

Definitely, the missing part is, that with --no-install-recommends many applications will loose some of its functionalities.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: The Debian "Lite" system I have created

#14 Post by sunrat »

barlafuss wrote: 2022-03-08 16:55And, if I need more, I can add and do a new snapshot. Very useful (for my need), better than any "persistent" ...
MX-snapshot is optionally persistent ie. it can save any changes at shutdown.
LE_746F6D617A7A69 wrote: 2022-03-08 21:22It's not My intention to be harsh, but actually I can't see any sense in writing "how to" use well-documented option for apt ;)
You are being harsh. :mrgreen:
Definitely, the missing part is, that with --no-install-recommends many applications will loose some of its functionalities.
I absolutely agree with this. I would never use --no-install-recommends. Been bitten several times by a lack of functionality when using it in the past when that functionality was provided by a recommend. Any saving of disk space is usually insignificant.
BTW, s/loose/lose/ they have totally different meanings but it's a common mistake. :wink:

My personal way of a "Lite" Debian is:
1 - install netinstall with no DE
2 - install kde-plasma-desktop which is the smallest useful KDE metapackage.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

LE_746F6D617A7A69
Posts: 932
Joined: 2020-05-03 14:16
Has thanked: 7 times
Been thanked: 65 times

Re: The Debian "Lite" system I have created

#15 Post by LE_746F6D617A7A69 »

sunrat wrote: 2022-03-08 22:13 BTW, s/loose/lose/ they have totally different meanings but it's a common mistake. :wink:
May the SED be with You! :mrgreen:

Thanks.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed

ShaunTheSalvo
Posts: 7
Joined: 2022-03-05 03:54
Has thanked: 1 time
Been thanked: 1 time

Re: The Debian "Lite" system I have created

#16 Post by ShaunTheSalvo »

Hey guys - OP here - sorry I've been tied up with that really inconvenient thing called Daily Life lately :D. A few comments:

USING --NO-INSTALL-RECOMMENDS
With regard to using --no-install-recommends, I concede it's not the most advisable way to install most packages. I use it specifically for installing my base system, as it keeps the base system as small as possible.

If you find a certain package you've installed this way isn't giving you all the functionality you need, reinstalling it without --no-install-recommends generally works. I just do:

Code: Select all

sudo apt autoremove [packagename]
sudo apt install [packagename]
Generally seems to do the trick. The beauty of this "modular" install method of building your system is removing and reinstalling apps through apt is generally pretty clean. Innocently attempting to apt remove "application X" just removes it and dependencies, rather than pulling the rug out from under you by removing some other part of the system you didn't realise was being removed.


SYSTEMBACK

Systemback doesn't seem to be specifically an Ubuntu package; it runs beautifully under Debian. The bwbot repo seems to work fine.

As far as UEFI is concerned, I'm not sure - but I think Systemback does support it. I've shied away from UEFI personally, as I can't see any real benefit or advantage to using it compared to traditional DOS-style hard drive formatting.

Personally, I find having a live USB of my system is very handy. Systemback's installer is ridiculously easy to use - you can partition the drive, assign your mountpoints and install the system very quickly. My live USB has saved my bacon a few times when my persistent tinkering with the system has gone horribly wrong.

And yes, handy for deploying the system to multiple PC's (in my case, I also install my same system on my wife's laptop; it took about 10 minutes to get her laptop up and running).

Systemback's snapshot system is pretty neat too. Very easy to use, and restoring snapshots is super quick.

ShaunTheSalvo
Posts: 7
Joined: 2022-03-05 03:54
Has thanked: 1 time
Been thanked: 1 time

Re: The Debian "Lite" system I have created

#17 Post by ShaunTheSalvo »

Hey everyone - just a quick update on this project:

For those who don't like Systemback for whatever reason, there's a relatively new project called Penguin's Eggs - https://penguins-eggs.net. This allows you to create a live ISO of a running system - much like Systemback does - but uses standard Debian tools, including Calamares installer. So the result is a more "native" installer.

Personally, I still prefer Systemback, as it's ridiculously easy to use and the installer it provides is , but Penguin's Eggs does offer an alternative - it's sort of an update to tools like Remastersys.

lindi
Debian Developer
Debian Developer
Posts: 412
Joined: 2022-07-12 14:10
Has thanked: 1 time
Been thanked: 77 times

Re: The Debian "Lite" system I have created

#18 Post by lindi »

You can have "lite" in many flavours I guess :) Here's my recipe. I mostly want to cut down memory and CPU usage and don't really care about disk usage. I also want to keep the Gnome desktop and make minimal changes overall:

Code: Select all

#!/bin/bash
# Tune Debian 10 desktop for older machines

# System services
sudo systemctl mask ModemManager.service
sudo systemctl mask anacron.service
sudo systemctl mask avahi-daemon.service
sudo systemctl mask unattended-upgrades.service
sudo systemctl mask fwupd.service
sudo systemctl mask bolt.service
sudo systemctl mask colord.service
sudo systemctl mask geoclue.service
sudo systemctl mask packagekit.service

# User services
systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
systemctl --user mask evolution-addressbook-factory.service evolution-calendar-factory.service evolution-source-registry.service
systemctl --user mask gvfs-daemon.service gvfs-afc-volume-monitor.service gvfs-afc-volume-monitor.service gvfs-goa-volume-monitor.service gvfs-udisks2-volume-monitor.service gvfs-gphoto2-volume-monitor.service gvfs-mtp-volume-monitor.service
systemctl --user mask ssh-agent.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Software.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Documents.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Calendar.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.seahorse.Application.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.OnlineAccounts.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /usr/share/dbus-1/services/org.gnome.Characters.service
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/gnome-software-service.desktop
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/org.gnome.SettingsDaemon.Wacom.desktop
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop 
sudo sed -i "s@Exec=.*@Exec=/bin/true@" /etc/xdg/autostart/org.gnome.SettingsDaemon.Smartcard.desktop
sudo sed -i "s@^use-ssh-agent@#use-ssh-agent@" /etc/X11/Xsession.options
I think I have Debian 11 version somewhere as well but couldn't find it right away.

ShaunTheSalvo
Posts: 7
Joined: 2022-03-05 03:54
Has thanked: 1 time
Been thanked: 1 time

Re: The Debian "Lite" system I have created

#19 Post by ShaunTheSalvo »

Hi lindi,

Hmmm - a little different to what I'm doing, but ... could be an interesting addition! My approach is building a "lite" system from the ground up. Only the necessary components of Debian are installed - so it avoids a lot of the bloatware altogether. A lot of the unnecessary services and programs simply don't get installed in the first place.

I might try this as an addition to my system. Do you know if masking through systemctl is permanent - ie it will remain as is after a reboot?

pwzhangzz
Posts: 420
Joined: 2020-11-11 17:42
Has thanked: 9 times
Been thanked: 26 times

Re: The Debian "Lite" system I have created

#20 Post by pwzhangzz »

lindi wrote: 2022-08-09 08:20I mostly want to cut down memory and CPU usage
Have you thought about using "systemctl disable" instead of "systemctl mask"? Pros and cons? Thanks.

Post Reply