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

 

 

 

[HowTo] Install and configure Debian bookworm

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

[HowTo] Install and configure Debian bookworm

#1 Post by Hallvor »

Table of contents

1. Who is this for?
2. Advantages and drawbacks of Debian
3. Installation
3.1 Checksum
3.2 Make a bootable USB-stick
3.3 Disk encryption
3.4 Desktop environments
3.5 Fix boot to black screen
4. Post install
4.1 Getting a functional system
4.1.1 Sources.list
4.1.2 Autoinstall firmware
4.1.3 Graphics
4.1.4 Install software
4.1.5 Containerized applications
4.2 Various tweaks
4.2.1 Add more users
4.2.2 Add a user to sudo
4.2.3 SSD optimization
4.2.4 Enable TRIM
4.2.5 Font Rendering
4.2.6 Improve your laptop’s battery life
4.2.7 Night Colors
4.2.8 Fix non-working plasmoids
4.2.9 Use Bluetooth loudspeakers with PulseAudio
4.3 Web browsing
4.3.1 Add GPU acceleration in Firefox
4.3.2 Addons
4.4 Add a printer
4.5 Advanced system tweaks
4.5.1 Swappiness
4.5.2 Cache Pressure
4.5.3 ZRam
4.5.4 Change GRUB timeout
4.5.5 Check for other operating systems
4.6 Security
4.6.1 Updates
4.6.2 Firewall
4.7 Backup
4.8 Upgrade to trixie
5. Useful external resources


1. Who is this for?
This guide is primarily intended for beginners, although it does assume some basic familiarity with GNU/Linux. You don't need prior experience with Debian to follow along. Additionally, this guide includes valuable tips for more experienced users who want to quickly configure a functional desktop environment.

My aim is for each step to benefit the majority of users in the intended audience. Please note that this guide is designed for Debian bookworm, and it may not be compatible with other Debian versions.


2. Advantages and drawbacks of Debian

Debian is an exceptional operating system, though not without its trade-offs.

Advantages
1. Debian is the second-oldest surviving distro, boasting a strong developer base, ensuring ongoing support and improvements.
2. Debian It supports all major desktop environments, giving users freedom in customizing their experience.
3. Debian's software is tested, stable, and backed by a vast repository, ideal for production systems.
4. Debian has a dedicated security team that actively monitors and addresses security vulnerabilities.
5. Debian excels in smooth, hassle-free upgrades between stable versions, reducing maintenance time.


Drawbacks (may) include

1. Debian prioritizes stability over the latest features, potentially disappointing users seeking cutting-edge software.
2. Debian's commitment to FOSS principles and systemd usage may not align with everyone's preferences.
3. The release cycle is relatively slow compared to many other GNU/Linux distributions.
4. Debian may have a steeper learning curve compared to some other distributions.

Note: Debian bookworm's installation images includes non-free firmware by default, addressing some of the limitations related to non-free software in previous versions. There is more info on this subject here: https://wiki.debian.org/Firmware

So is Debian for you? Debian is what you install if you just want your computer to work flawlessly for years and don't mind your software to be a couple of versions behind..

https://wiki.debian.org/WhyDebian

Why not just install Debian testing, you say? Debian testing is, well, you probably guessed it, the testing branch. It is not a rolling release version of Debian, but a testing environment meant to support the next stable release.


3. Installation
A Debian installation on incompatible hardware is a nightmare, while running it on compatible hardware is a breeze, so you may want to check it your system is compatible by running a LiveDVD from here: https://get.debian.org/images/release/c ... so-hybrid/

Generally, I have never had a problem with all-Intel hardware that is at least a couple of years old.

If everything works, I prefer to use the netinstall: https://cdimage.debian.org/debian-cd/cu ... 64/iso-cd/ This image should work for the vast majority of computers.

3.1 Checksum
Make sure that the checksum for your downloaded image is correct. If not, you may encounter issues during installation.

In order to check a downloaded iso from the command line interface, one can issue the following command (as regular user):

Code: Select all

sha512sum debian-12.1.0-amd64-netinst.iso
Then compare it to the correct entry in the SHA512SUMS-file here: https://cdimage.debian.org/debian-cd/cu ... SHA512SUMS

3.2 Make a bootable USB-stick
If you have a USB stick with enough space and a previous GNU/Linux-install, you can plug the USB stick into your computer and type the following command (as root or sudo) to list your devices:

Code: Select all

fdisk -l
Now check the size and the file system.

Code: Select all

Disk /dev/sdb: 7.5 GiB, 8053063680 bytes, 15728640 sectors
Disk model: ProductCode
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000

Device     Boot  Start      End  Sectors  Size  Id Type
/dev/sdb1         2048  15726591  15724544  7.5G   7 HPFS/NTFS/exFAT
As we can see, /deb/sdb matches the size of the USB stick. My USB-stick is also of a different type than the others, being HPFS/NTFS/exFAT.

In order to make a bootable iso, I can just copy the iso to the unit:

Code: Select all

root@debian:/home/hallvor# cp debian-12.1.0-amd64-netinst.iso /dev/sdb
Make sure that all data has been transferred:

Code: Select all

root@debian:/home/hallvor# sync
This page has lots of useful information, including how to install Debian from Windows: https://wiki.debian.org/DebianInstall

Bookworm's comprehensive installation guide can be found here: https://www.debian.org/releases/stable/installmanual

Here is a video of an actual installation: https://www.youtube.com/watch?v=rf3EN7e-34g

3.3 Disk encryption
For any portable device, I strongly recommend selecting LUKS disk encryption in the installer. Overwriting the entire disk can be skipped. This will allow for a faster installation and reduced wear on storage media. However, it may also leave remnants of previous data on the drive, potentially introducing security and privacy risks.

3.4 Desktop environments
It is a good idea to do a little research before deciding for a desktop environment. Here is a comparison from 2023: https://itsfoss.com/best-linux-desktop-environments/

If you want a solid desktop environment for an older computer, the Trinity Desktop Environment (TDE) is a good option: https://wiki.trinitydesktop.org/Debian_ ... structions

3.5 Fix boot to black screen
When the installation is finished, you may be unfortunate enough to boot to a black screen, you may want to pass the nomodeset option on the kernel command line to boot into "fallback graphics" mode.

Once in the GRUB menu, use the arrow keys to select the Debian entry you want to boot into. (Do not press enter.)

Press the "e" key to edit the GRUB command line, and then look for a line start starts with "linux" or "linuxefi". The line will usually end with "quiet" and "splash", like this

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Type "nomodeset" just before "quiet" and "splash", like this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet splash"
Then press Ctrl+x or F10 to boot with this parameter.

You should now be able to boot into your desktop and install a graphics driver. Please note that this is a temporary way to boot to the desktop and not a permanent solution.

If you for some reason need to use nomodeset on a permanent basis, just

Code: Select all

# nano /etc/default/grub
Add the nomodeset parameter. As above, press Ctrl+x to exit and save your changes.

Finally update GRUB with the following command:

Code: Select all

# update-grub

4. Post install
Please don't blindly copy and paste the commands below. It is probably a good idea to think twice.

The commands are divided in two categories:

$ means that the command should be issued as regular user

# means that the command should be issued as root or with sudo. (If you created a root password during install, sudo will not work out of the box.)

You switch from your regular user to root with su -:

Code: Select all

su -
You switch from root to regular user with su - username, for instance # su - hallvor. Or just type "exit" or Ctrl-D.

4.1 Getting a functional system
Debian's main source of software is determined by sources.list. It is a configuration file determining what and from where software can be fetched. Non-free firmware should be included for your hardware when needed, so not all steps below may be necessary.

4.1.1 Sources.list
You can edit sources.list by issuing the following command:

Code: Select all

# nano /etc/apt/sources.list
Then remove or comment out the CD-rom line with a #, if it is present:

Code: Select all

#deb cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23] bookworm Release
My sources.list looks like this: I added contrib and non-free because some packages are not found in main or non-free-firmware.

Code: Select all

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware

deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
The deb-src can be commented out unless you want to build something from source. This will save data traffic.

Save and exit with Ctrl-x, and then y to confirm.

Update your sources.list and apply updates

Code: Select all

# apt update && apt upgrade

4.1.2 Autoinstall firmware
Firmware should be automatically loaded for your system, but if you suspect anything is missing when you run

Code: Select all

# dmesg | grep -i firmware
You can try the isenkram-cli package in case of errors:

Code: Select all

# apt install isenkram-cli
Then run it as root or sudo

Code: Select all

# isenkram-autoinstall-firmware

4.1.3 Graphics
Intel GPUs don't need any extras to work, but Nvidia and AMD/ATI may need some extra firmware. This may already be installed on your computer automatically during install.

NVIDIA
For support of GeForce 600 series and newer GPUs (supported devices). For older devices, you must use nouveau, which should be already installed and in use.

Code: Select all

# apt install linux-headers-amd64 && apt install nvidia-driver firmware-misc-nonfree
https://wiki.debian.org/NvidiaGraphicsD ... ookworm.22

AMD/ATI
AMD/ATI is generally easier to deal with than Nvidia. Please read this: https://wiki.debian.org/AtiHowTo


4.1.4 Install additional applications
No package manager is needed to install applications. You can easily search for and install applications using apt.

Code: Select all

# apt search nameofpackage
Then

Code: Select all

# apt install nameofpackage
To see GNU/Linux alternatives for Windows applications, see here: https://www.linuxalt.com/
You can also install package managers like Discover (KDE) or Synaptic, if they are not already installed.


4.1.5 Packages from outside the repository
A word of caution. Never ever install packages from distros like Ubuntu or its PPAs. Never ever install packages from Debian Testing or Debian Sid. You will probably end up breaking your install:https://wiki.debian.org/DontBreakDebian

If you need more recent software, use backports (but keep in mind that this is not as well tested as the software in the respository): https://backports.debian.org/Instructions/

If it is not found in backports, you can try containerized applications. If you still can't find what you are looking for, ask in the forum for a solution. A little word of advice: Your question may have been answered before, so please use a search engine and use the forum search before asking.

If you are new to GNU/Linux and would like to find native counterparts to your trusty Windows-applications, you may want to read this: https://www.linuxalt.com/

4.1.5 Containerized applications
Flatpaks, Appimages and Snaps and are containerized applications, which means that they are bundled with all the necessary dependencies, libraries, and runtime environments needed to run the application. This helps in avoiding compatibility issues and conflicts with system libraries. The tradeoff is increased disk space usage, higher CPU and RAM usage and less tested software. For these reasons I suggest only using these as a last resort.


AppImages
Setting up and using AppImages is very straightforward. Just download the AppImage, make it executable and click on it.

Get AppImages here: https://www.appimagehub.com/

Once you have downloaded an AppImage, make it executable with chmod, for instance

Code: Select all

$ chmod +x Firefox.AppImage
And it's ready to use.


Flatpaks

Code: Select all

# apt install flatpak

Gnome users can install flatpak support with a plugin

Code: Select all

# apt install gnome-software-plugin-flatpak

Add the Flatpak repository

Code: Select all

# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Reboot the system

You can install flatpaks through the command line interface or through a web browser.

To install a newer version of Gimp, you can issue the following command:

Code: Select all

# flatpak install org.gimp.GIMP
Or just go to https://flathub.org/ and click the "Install" button.

To update all flatpaks on your system

Code: Select all

# flatpak update

List all flatpaks on your system

Code: Select all

# flatpak list

To remove a flatpak, for instance

Code: Select all

# flatpak remove org.gimp.GIMP

Snap

Install Snap

Code: Select all

# apt install snapd
Enable and start the Snap service:

Code: Select all

# systemctl enable snapd && systemctl start snapd
You may have to log out and log back in at this point.

Check that Snap is running and working

Code: Select all

# snap version
If you can see information about the version and core version, it is working.

To search for snaps, type for instance:

Code: Select all

# snap find vlc
To install the found application from the command line interface, for instance type:

Code: Select all

# snap install vlc
You can also visit https://snapcraft.io/ and just click "Install".

To list your Snaps:

Code: Select all

# snap list
To remove a Snap package, for instance

Code: Select all

# snap remove vlc

4.2 Various tweaks
Below are some common tweaks you may find useful.


4.2.1 Add more users
If multiple users will use the same computer, it is highly recommended to create separate user accounts. Each user can then seamlessly share the same computer with different customization.
You can add new user in KDE in Systemsettings → Manage users → Add user

It is of course also possible to create a new user account from the command line with the following syntax: adduser nameofuser. Issue the following command to add hallvor as user:

Code: Select all

# adduser hallvor
You will then be prompted to type name, password, etc.
If you want to delete this user completely, just type (as root)

Code: Select all

# deluser --remove-home hallvor
4.2.2 Add a user to sudo
If you set a root password during install and still would like to use sudo, you can add yourself to sudo using adduser <username> sudo. In my case that is:

Code: Select all

# adduser hallvor sudo
You can check that you have been added to the sudo group with id <username>, for instance

Code: Select all

$ id hallvor
4.2.3 SSD optimization
Add noatime: If you use an SSD, there are certain things to optimize the performance:

Code: Select all

# nano etc/fstab
Then add the noatime parameter like in the example below to reduce disk writes. Noatime is a little (probably not noticable) faster than relatime.

Code: Select all

/dev/mapper/debian--thinkpad--vg-root /               ext4    errors=remount-ro,noatime 0       1
(The discard option is sometimes recommended, but is not needed if you have enough free space. The discard option also has drawbacks when it comes to cryptography.)

Save and exit.

4.2.4 Enable TRIM
Fstrim is used on a mounted filesystem to discard/trim blocks which are not in use by the filesystem.

Code: Select all

# systemctl enable fstrim.timer
# systemctl start fstrim.timer
Verify that the timer is enabled:

Code: Select all

# systemctl list-timers --all
Your system should now TRIM all mounted filesystems once weekly.

Further SSD optimization is found here: https://wiki.debian.org/SSDOptimization


4.2.5 Font rendering
One of the first things I do is altering the font rendering. First we’ll install liberation fonts. These are metrically identical to Microsoft fonts, so they should yield the same result.

Code: Select all

# apt install fonts-liberation2
If you want to install Microsoft's fonts as well, you can install them with:

Code: Select all

# apt install ttf-mscorefonts-installer
If you are running KDE, you can enter Systemsettings in the menu --> Fonts and then experiment with the settings. I have enabled Sub pixel rendering, Type: RGB and Hinting: Full. Then reboot your computer. You may want to experiment with these settings to find your optimal settings.

GNOME fonts can also be adjusted in the GUI.

If you are not running a desktop environment with GUI options, you can use the following command:

Code: Select all

# dpkg-reconfigure fontconfig fontconfig-config
Type Ctrl + x to save and y to exit. Reboot to see the difference.


4.2.6 Improve your laptop’s battery life
This is very straight forward. TLP will have good default settings, so no tweaking should be necessary. If you already have laptop-mode-tools installed, TLP will conflict with it, so you must not have both installed at the same time.

Run the following command to remove laptop-mode-tools if installed and install TLP:

Code: Select all

# apt remove laptop-mode-tools && apt install tlp tlp-rdw
The following command lets you view system info and status of tlp

Code: Select all

# tlp-stat -s
OR just use laptop-mode-tools:

Code: Select all

# apt install laptop-mode-tools
If you have a ThinkPad, you may want to use TLP with battery charging thresholds. Read this:
http://forums.debian.net/viewtopic.php?f=16&t=140768

KDE allows configuring battery charging thresholds directly in System Settings if your hardware allows it.

Reboot when done.


4.2.7Night colors
Night colours are nice if you can’t resist using the computer at night:

KDE:
Open system settings and search for night colours. Tick the checkbox, adjust the settings to your liking and enable.

Gnome:
GNOME should have a native blue light filter called Night Light. It should be found here: Open Settings > Display > Night Light tab > Turn on Night Light

Redshift is a good option for everyone else:

Code: Select all

# apt install redshift redshift-gtk

4.2.8 Fix non-working plasmoids in KDE
On a new installation, KDE may complain about a missing file when adding some plasmoids. To avoid it, run the following command (as root):

Code: Select all

# apt install qml-module-qtquick-xmllistmodel

4.2.9 Use Bluetooth loudspeakers with PulseAudio
In order to play music over Bluetooth with PulseAudio, you need the Bluetooth module for PulseAudio sound server:

Code: Select all

# apt install pulseaudio-module-bluetooth

4.3 Web browsing
Hardware acceleration and addons are are important in web browsing because they enhance functionality and performance.


4.3.1 Add GPU acceleration in Firefox
Note: These steps will make Firefox use GPU acceleration to render web pages and video. This should result in lower CPU usage and smoother scrolling. GPU acceleration may not be compatible with your graphics card, and it may not offer a noticeable improvement on older hardware.

The best way to enable hardware acceleration in Firefox is to set these flags below in about:config

media.ffmpeg.vaapi.enabled true

media.ffvpx.enabled false

Set the environment variable needed:


For X11:

gfx.x11-egl.force-enabled true

Restart Firefox.


For Wayland:

NOTE: This may not be an optimal solution. Please see below: viewtopic.php?p=790303#p790303

Type in your terminal

Code: Select all

echo "export MOZ_ENABLE_WAYLAND=1" >> ~/.profile
Reboot.

Check that it works:

Type "about:support" in the address bar and press Enter.
Scroll down to the "Graphics" section.
Look for the "Compositing" field, which should show "WebRender" if GPU acceleration is enabled.
Also, check the "GPU Accelerated Windows" field, which should show "1/1 Direct3D 12 (OMTC)" if GPU acceleration is enabled.

https://wiki.debian.org/Firefox


4.3.2 Useful browser addons
I highly recommend the following browser addons to block ads and trackers:
Ublock Origin: https://ublockorigin.com/
Privacy Badger: https://privacybadger.org/


4.4 Add a printer
We'll use CUPS (Common UNIX Printing System) to set up printing. Most modern printers are compatible with Debian, but make sure that your printer is supported before purchasing one.

Make sure cups is installed

Code: Select all

# apt install cups
Enable and start CUPS

Code: Select all

# systemctl start cups
# systemctl enable cups
Open a web browser and go to the CUPS web interface at http://localhost:631/. You may need to authenticate as root:

Click on the "Administration" tab, then click "Add Printer."
You may be prompted to enter your root password.
Follow the on-screen instructions to add your printer.
If your printer is connected locally via USB, it should be automatically detected.
If your printer is on the network, you'll need to specify its IP address or hostname.
If your printer is not automatically detected, you might need to install additional drivers manually. Refer to the manufacturer's website for Linux drivers.

After adding the printer, you can configure various settings, including the printer's name, description, default paper size, and print quality.

To ensure that the printer is set up correctly, you can print a test page from the CUPS web interface. Go to the "Printers" tab, select your printer, and click "Maintenance" > "Print Test Page."


4.5 Advanced system tweaks
Please don't change these values unless you know what you are doing. The default values are fine for most systems.


4.5.1 Swappiness
Swappiness determins how aggressively the Linux kernel swaps data out of RAM to the swap space. Keeping this number low is a good idea for a desktop system with ample RAM. Only adjust these values if you know what you are doing; the default values will be fine for most systems.

In order keep more data in RAM (and write less to disk), we will change the swappiness value to 10.

You can test a new value with this command:

Code: Select all

# sysctl vm.swappiness=10
Edit /etc/sysctl.conf to make permanent changes:

Code: Select all

# nano /etc/sysctl.conf
Then add the following content into the file:

Code: Select all

vm.swappiness=10

4.5.2 Cache pressure
Cache pressure determines how aggressively the kernel reclaims memory from the page cache. Lower values than 100 (maximum) make the kernel more reluctant to free up these cached objects, which can be beneficial for desktop systems with sufficient RAM to keep frequently used files cached in memory.

Do not set the cache pressure to 0, or you will risk running out of memory.

Issue the following command if you want to test a cache pressure of 75.

Code: Select all

# sysctl vm.vfs_cache_pressure=75
If you want to make the new cache pressure permanent:

Code: Select all

# nano /etc/sysctl.conf
Paste in the following line or replace "75" with your preferred value:

Code: Select all

vm.vfs_cache_pressure=75

4.5.3 Zram
Zram (also known as zswap or zcache) is a feature in Linux that allows you to create a compressed block device in RAM, which can help improve system performance by reducing the need to swap data to slower storage devices like hard drives or SSDs. Zram comes with tradeoffs of its own. You swap less with Zram, but you also use more CPU.

Keep in mind that you should keep cache pressure high if you are short on RAM.

If you have plenty of RAM, there is probably not much point using it.

You can install Zram with the following command:

Code: Select all

# apt install zram-tools 
Using 25% of available RAM for Zram is a common rule of thumb.

Configure Zram to use the efficient zstd compression algorithm and 25% of available RAM. Then reload the service to apply the changes.

Code: Select all

# echo -e "ALGO=zstd\nPERCENT=25" | tee -a /etc/default/zramswap
# service zramswap reload
If you would like more manual control, you can edit /etc/default/zramswap

Code: Select all

# nano /etc/default/zramswap
Press Ctrl-x, and y to save.

If you would like to see the status of ZRam, use the zramctl-command

Code: Select all

# zramctl 
Output may be like this, showing algorithm, disksize, data, compression, streams and mountpoint:

Code: Select all

root@debian:~# zramctl
NAME       ALGORITHM DISKSIZE  DATA  COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 zstd          2,8G  8,8M 962,9K  8,1M       4 [SWAP]

4.5.4 Change the GRUB timeout
The Grub timeout is 5 seconds by default. You can set this at 2 seconds and shave a few seconds from your boot time:

Code: Select all

# nano /etc/default/grub
Change the line called GRUB_TIMEOUT=5 to GRUB_TIMEOUT=2

Save and exit.


4.5.5 Check for other operating systems
Edit /etc/default/grub:

Code: Select all

# nano /etc/default/grub
Uncomment this line:

Code: Select all

#GRUB_DISABLE_OS_PROBER=false
It should look like this:

Code: Select all

GRUB_DISABLE_OS_PROBER=false
Save and exit.


4.6 Security
Applying timely security updates and protecting your system from unauthorized access are critical for the safety of a Linux system. This manual is highly recommended for further reading: https://www.debian.org/doc/manuals/secu ... ex.en.html


4.6.1 Updates
The system can simply be kept up-to-date by issuing the following commands:

Code: Select all

# apt update
# apt upgrade
Most desktop environments have built-in update notifiers, prompting the user to install updates.

Updates can also be automated with unattended-upgrades: https://wiki.debian.org/UnattendedUpgrades


4.6.2Firewall
If you want a basic firewall that blocks incoming traffic while allowing outgoing traffic, one of the easiest ways to administer Debian's Netfilter firewall is by using ufw.

Code: Select all

# apt install ufw
Then enable and configure the firewall

Code: Select all

# ufw enable
# ufw default deny incoming
# ufw default allow outgoing
Check that everything works

Code: Select all

# ufw status verbose
A different option can be found here: http://forums.debian.net/viewtopic.php?f=16&t=143876
Just add the ports you would like to keep open in the text file. Very conventient.


4.7 Back up your system
Any computer user has lost data, or has not lost data *yet*. Fortunately, creating a backup is very easy.
KDE has an integrated backup utility in System Settings.

Timeshift is a different option

Code: Select all

# apt install timeshift
Launch the application and choose RSYNC as snapshot type. Select where you want to save your backup and when the backup needs to be created. Then click finish.


4.8 Upgrade to trixie
You should always read the release notes for the next version before attempting a dist-upgrade: https://www.debian.org/releases/stable/releasenotes Debian trixie will be released some time in 2025, so be patient.

https://www.debian.org/releases/
https://en.wikipedia.org/wiki/Debian_version_history


5. Useful external resources
The Debian GNU/Linux FAQ: https://www.debian.org/doc/manuals/debian-faq/
The most common command line interface commands: https://www.debian.org/doc/user-manuals#refcard
The Debian Wiki: https://wiki.debian.org/
The Debian Reference: https://www.debian.org/doc/manuals/debian-reference/
To file bug reports, use the Mailing Lists: https://www.debian.org/MailingLists/
Here you can reach Debian: https://www.debian.org/contact
:linked:
[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

rodw
Posts: 18
Joined: 2023-07-21 10:03
Has thanked: 1 time

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#2 Post by rodw »

A very interesting list in the link but not much I need. I suggest to include how to set up auto logon (gnome is different to Xfce here)
And also how to set power saving to disable screen lock on a screen saver.
These are the two most asked for features from our community.
Possibly some words about Wayland vs xorg. Not every application runs on both.
And how to select xorg based and other alternative desktops from the logon screen as thats a bit obscure.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#3 Post by Hallvor »

Thank you for your feedback! I don't use Xfce or Gnome, so I am not sure how to set up auto login there. If you can write step by step instructions, I will include it and give you full credit. There is one condition, though; you provide support for users in this thread concerning the parts you write.
And also how to set power saving to disable screen lock on a screen saver.These are the two most asked for features from our community.
I made a forum search, and I only got one hit: Your post above.

Please forgive me if the howtos are somewhat KDE oriented, but that is what I use and that is what I know. Sorry. The things you ask are point and click in KDE. if anyone else would like to share their knowledge on how to do this in other desktop environments, I'll include it here on the condition mention above.
[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

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#4 Post by CwF »

rodw wrote: 2023-09-04 10:17 I suggest to include how to set up auto logon (gnome is different to Xfce here)
search.php?keywords=getty%40

Some of the methods discussed should be DE agnostic.

I don't use any logon manager on most installs and use the systemd unit files mentioned in a few of those discussions. There are variations, so the best way is for people to grasp first, then choose.

I use getty@tty2 and 3 to login. This boots to tty1 in a raw state and involves the user to switch to the tty of their choice. You can easily make tty1 auto login. In the others a manual login and startx still is possible. This still works in bookworm. Of course I could be way off base since I only use XFCE. But I assume when you mention differing methods you were considering lightdm vs gdm.

Hallvor puts out excellent guides. A good guide needs to narrow choices since alternatives never end the discussion, they diffuse it. I keep an eye on this in case I have a simpletons way to contribute...I like simple and work to eliminate friction, so no screensavers, no lockers, no passwords, etc.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 138 times
Been thanked: 65 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#5 Post by cds60601 »

If you intend on covering full disk encryption, please include how a user can bypass the long wait of writing of the zero's and one's on the drive by simply pressing "cancel" I have seen lots of folks get hung up on that.
Supercalifragilisticexpialidocious

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#6 Post by Hallvor »

cds60601 wrote: 2023-09-05 21:47 If you intend on covering full disk encryption, please include how a user can bypass the long wait of writing of the zero's and one's on the drive by simply pressing "cancel" I have seen lots of folks get hung up on that.
I will add it, and will cover pros and cons of skipping the step of filling the drive with random data. Thanks for your input.
[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

Alt+F4
Posts: 2
Joined: 2023-09-14 11:32
Has thanked: 2 times
Been thanked: 3 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#7 Post by Alt+F4 »

The best way to enable hardware acceleration in Firefox is to set these flags below in about:config:

media.ffmpeg.vaapi.enabled true

media.ffvpx.enabled false

Set the environment variable needed:

For X11 in about:config change the flag to true

gfx.x11-egl.force-enabled

Restart Firefox.

For Wayland type in your terminal

echo "export MOZ_ENABLE_WAYLAND=1" >> ~/.profile

Reboot.

https://wiki.debian.org/Firefox#Hardwar ... celeration

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#8 Post by Hallvor »

I have tried to clean it up a little. Please notify me of any problems you may see/encounter.
[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
None1975
df -h | participant
df -h | participant
Posts: 1412
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#9 Post by None1975 »

Nice tutorial.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 138 times
Been thanked: 65 times

Re: [HowTo] Install and configure Debian bookworm

#10 Post by cds60601 »

@Hallvor So, when are you releasing the hardcopy ;)
I'd buy it.
Supercalifragilisticexpialidocious

rhinjard
Posts: 24
Joined: 2023-06-23 17:08
Has thanked: 8 times
Been thanked: 6 times

Re: [HowTo] Install and configure Debian bookworm

#11 Post by rhinjard »

Nice post @Hallvor. The drawbacks of Debians are it's biggest strength IMHO. In fact, I've migrated to Debian instead of other distros because of the said drawbacks. :lol:

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] Install and configure Debian bookworm

#12 Post by Hallvor »

Thanks! Indeed, these are drawbacks for some, but likely to a lesser extent for those who choose to stick with Debian.
[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
None1975
df -h | participant
df -h | participant
Posts: 1412
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#13 Post by None1975 »

Alt+F4 wrote: 2023-09-14 12:18 The best way to enable hardware acceleration in Firefox is to set these flags below in about:config:

For Wayland type in your terminal

echo "export MOZ_ENABLE_WAYLAND=1" >> ~/.profile
If you want Firefox (firefox-esr) to crash constantly (in wayland), then yes, you should export this variables.

For Firefox rapid release, starting with version 121, Firefox defaults to Wayland instead of XWayland and does not require any configuration. But it is buggy in wayland sessions (tested in Debian 12 with sway).

I suggest using

Code: Select all

export MOZ_ENABLE_WAYLAND=0
This opting Firefox into xwayland mode.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] [Open Draft] Install and configure Debian bookworm

#14 Post by Hallvor »

None1975 wrote: 2024-01-03 13:03
If you want Firefox (firefox-esr) to crash constantly (in wayland), then yes, you should export this variables.

[...]

I suggest using

Code: Select all

export MOZ_ENABLE_WAYLAND=0
This opting Firefox into xwayland mode.
Thank you! I have added a link to your post, describing possible problems with the first command.
[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

pugwall
Posts: 3
Joined: 2023-12-23 12:21

Re: [HowTo] Install and configure Debian bookworm

#15 Post by pugwall »

Oh no. Followed most of the relevant steps above & boot is now hanging at line:

[ OK ] Finished logrotate.service - Rotate log files

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] Install and configure Debian bookworm

#16 Post by Hallvor »

pugwall wrote: 2024-01-09 02:43 Oh no. Followed most of the relevant steps above & boot is now hanging at line:

[ OK ] Finished logrotate.service - Rotate log files
Still hanging?
[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

pugwall
Posts: 3
Joined: 2023-12-23 12:21

Re: [HowTo] Install and configure Debian bookworm

#17 Post by pugwall »

Hallvor wrote: 2024-01-10 16:07
pugwall wrote: 2024-01-09 02:43 Oh no. Followed most of the relevant steps above & boot is now hanging at line:

[ OK ] Finished logrotate.service - Rotate log files
Still hanging?
Yes, unfortunately. I haven't tinkered too much with it yet for a solution.

Looking back through your tutorial, I only did:

Commented out the deb-src in sources.list
Enabled TRIM
Font rendering
Added GPU acceleration in Firefox for X11
Installed ufw, but never actually ran/enabled it as it didn't seem to be in my $PATH
Rebooted and hang time!

TRIM seems to be the only step that would have significantly changed anything.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

Re: [HowTo] Install and configure Debian bookworm

#18 Post by Hallvor »

None of that should cause any trouble. Try booting into recovery mode in GRUB to get to a command line interface. Get a root shell and then check the log for last boot

Code: Select all

journalctl --boot=-1
Hopefully it shows why things have gone wrong.

You could also disable TRIM once you have a root shell.
[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

Post Reply