Skip to main content

How To Upgrade To Debian 11 Bullseye From Debian 10 Buster

 

Debian 11, codenamed bullseye, has been released! This step by step guide explains how to upgrade to Debian 11 bullseye from Debian 10 buster from command line.

Debian 11 "bullseye" is released

The long wait is over! Debian 11, codenamed "bullseye", stable version is available for download!!

Thanks to the combined work of the Debian Security team and the Debian Long Term Support team, Debian 11 will be supported for next 5 years.

The new Debian 11 distribution ships with many different desktop environments (DE) and several updated applications.

Debian 11 currently includes the following DEs:

  • Gnome 3.38,
  • KDE Plasma 5.20,
  • LXDE 11,
  • LXQt 0.16,
  • MATE 1.24,
  • Xfce 4.16.

For more details, check the Debian 11 "bullseye" release notes.

Upgrade to Debian 11 bullseye from Debian 10 buster

Let us check the currently installed Debian version using command:

$ cat /etc/debian_version 
10.10

You can also use lsb_release command to display Debian version.

$ lsb_release -a

Sample output:

No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster
Check Debian version
Check Debian version

As you see in the above output, I am using the latest Debian 10 buster system. Now, let us start to upgrade Debian 10 buster to Debian 11 bullseye.

Step 1 - Update and upgrade all currently installed packages

Before we start upgrade Debian buster to bullseye, make sure you've updated and upgraded all existing packages to their latest available version by running the following commands one by one:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade

And then clean any leftover packages and configuration files using commands:

$ sudo apt autoremove
$ sudo apt autoclean
$ sudo find /etc -name '.dpkg-' -o -name '.ucf-' -o -name '*.merge-error'

Reboot your system to apply all updates.

$ sudo reboot

Step 2 - Backup your data

The next important step is backup. Make sure you have taken backup of all important personal files, directories and configuration files.

The important things you'll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg --get-selections "*" (the quotes are important) command.

You can also use any one or two of the following backup applications to backup the data and system settings in your Debian Linux system.

  • Rsync - A powerful command line utility to backup personal data and $HOME directory.
  • Deja Dup - A simple GUI utility to backup personal data.
  • Timeshift - A graphical application to backup system files and settings.
  • Restic - A command line utility to save multiple revisions of files and directories in an encrypted repository stored on different backends.
  • Rsnapshot - A command line utility to create periodic snapshots of local machines, and remote machines over ssh.

I personally use Deja Dup and Timeshift for backup. You can pick any one or more of your choice from the above list.

Step 3 - Update software repositories

Before updating the software repositories in Debian buster, first backup the current software source list.

$ mkdir ~/apt
$ sudo cp /etc/apt/sources.list ~/apt
$ sudo cp -rv /etc/apt/sources.list.d/ ~/apt

Verify the contents of ~/apt directory to make sure the software repository lists have been copied.

$ ls apt/
sources.list sources.list.d

Now we need to update the current repository list to point to Debian 11 repositories.

To replace and update Debian 10 repositories with Debian 11 repositories, run:

$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*

Now verify if the sources list file is updated with new repository links:

$ cat /etc/apt/sources.list

Sample output:

deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main

deb http://security.debian.org/debian-security bullseye/updates main
deb-src http://security.debian.org/debian-security bullseye/updates main

# bullseye-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Heads Up: For Debian bullseye, the security suite is now named bullseye-security instead of codename/updates and users should adapt their APT source-list files accordingly when upgrading.

So we need to update the security lines in the APT configuration file.

Find the following lines in your sources.list file:

deb http://security.debian.org/debian-security bullseye/updates main
deb-src http://security.debian.org/debian-security bullseye/updates main

And replace them with following lines:

deb https://deb.debian.org/debian-security bullseye-security main contrib 
deb-src https://deb.debian.org/debian-security bullseye-security main contrib

After changing the security lines, the final APT sources.list file should look like below:

deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main

deb https://deb.debian.org/debian-security bullseye-security main contrib
deb-src https://deb.debian.org/debian-security bullseye-security main contrib

# bullseye-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
Debian 11 sources list
Debian 11 sources list

As you see in the above output, the sources.list file is updated with new Debian 11 repository links. Save the file and exit.

Update the repository lists using command:

$ sudo apt update

Step 4 - Perform minimal system upgrade

In some cases, doing a full system upgrade (which is explained in the next step) will remove large number of packages that you want to keep. So Debian developers recommends two-part upgrade process, namely minimal upgrade and full upgrade.

The minimal upgrade will upgrade all existing packages without installing or removing any other packages.

First, you need to do minimal upgrade using command:

$ sudo apt upgrade --without-new-pkgs

Keep an eye on the screen. During the upgrade process, you'll be asked to answer a few questions like what do you want to do with a configuration file or if you want to restart a service etc. The questions may vary depending upon the number of installed packages in your current Debian system.

If the apt-listchanges package is installed, it will show important information about upgraded packages in a pager after downloading the packages. Press ENTER to read the information or simply press q to exit and return back to the upgrade process.

Next you will be asked what do you want to do with a specific configuration file ( E.g. pam login file). Read the instructions on the screen and decide accordingly. If you're not sure what to do, just go with defaults by simply pressing ENTER key:

Choose what do you want to do with a configuration file
Choose what do you want to do with a configuration file

Many services installed on your Debian system need to be restarted when certain libraries, such as libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will normally be prompted on each upgrade for the list of services you wish to restart. If you want to avoid being asked such questions on each library upgrade choose Yes and press ENTER to continue.

Restart services during package upgrades without asking
Restart services during package upgrades without asking

Next the installer will prompt what do you want to do about modified configuration file sshd_config. Select any one of the given choices and choose OK and press ENTER to continue.

Configure openssh server
Configure openssh server

Choose where do you want to install Grub and select OK and press ENTER key to continue.

Configure grub
Configure grub

The minimal upgrade process will complete in a few minutes.

Step 5 - Upgrade to Debian 11 bullseye

Now start the actual Debian 11 bullseye upgrade using command:

$ sudo apt full-upgrade
Upgrade to Debian 11 bullseye from Debian 10 buster
Upgrade to Debian 11 bullseye from Debian 10 buster

Again, you need to keep an eye on the screen and answer all questions that might come up as usual.

As stated earlier, if the apt-listchanges package is installed, it will show important information about upgraded packages in a pager after downloading the packages. Press q to quit after reading the information and continue upgrade.

apt list changes
apt list changes

Select the mail server configuration type from the list, and choose Ok and press ENTER to continue:

Postfix configuration
Postfix configuration

Once the Debian 11 upgrade process is completed, reboot your system:

$ sudo reboot

Log in to the system and Check Debian 11 bullseye version using command:

$ cat /etc/debian_version 
11.0

Or, use lsb_release command:

$ lsb_release -a

Sample output:

No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
Check Debian 11 bullseye version
Check Debian 11 bullseye version

Congratulations! We have successfully upgraded Debian 10 buster to Debian 11 bullseye.

Optionally, you can remove all packages that are no longer required using commands:

$ sudo apt --purge autoremove
$ sudo apt autoclean

Step 6 - Verify if everything works fine

Log in to your newly upgraded Debian 11 system and check everything works fine. You may need to open and/or run a few installed applications and verify if they are working as usual. If something breaks your system, please let us know in the comment section or reach out to your Debian forum.

Debian 11 is just released (August 14, 2021), so you may expect some minor glitches. But in my case, the upgrade process was smooth and everything worked just fine.

Step 7 - Restore the backup

Once everything works as expected, restore the backup which you've taken before upgrading your system.

Install new applications of your choice and start using Debian 11 bullseye edition!

TL;DR (TOO LONG DIDN'T READ)

Basically, Debian 11 bullseye upgrade process consists of the following steps:

  1. Update all existing packages
    • sudo apt update
    • sudo apt upgrade
  2. Restart system
    • sudo reboot
  3. Backup important data
  4. Update software repositories
    • sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
    • sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*
  5. Perform minimal upgrade
    • sudo apt upgrade --without-new-pkgs
  6. Upgrade to Debian 11 bullseye
    • sudo apt full-upgrade
  7. Restart system
    • sudo reboot

Hope this helps.

 

from:

 https://ostechnix.com/upgrade-to-debian-11-bullseye-from-debian-10-buster/

 

Comments

Popular posts from this blog

OWASP Top 10 Threats and Mitigations Exam - Single Select

Last updated 4 Aug 11 Course Title: OWASP Top 10 Threats and Mitigation Exam Questions - Single Select 1) Which of the following consequences is most likely to occur due to an injection attack? Spoofing Cross-site request forgery Denial of service   Correct Insecure direct object references 2) Your application is created using a language that does not support a clear distinction between code and data. Which vulnerability is most likely to occur in your application? Injection   Correct Insecure direct object references Failure to restrict URL access Insufficient transport layer protection 3) Which of the following scenarios is most likely to cause an injection attack? Unvalidated input is embedded in an instruction stream.   Correct Unvalidated input can be distinguished from valid instructions. A Web application does not validate a client’s access to a resource. A Web action performs an operation on behalf of the user without checking a shared sec

CKA Simulator Kubernetes 1.22

  https://killer.sh Pre Setup Once you've gained access to your terminal it might be wise to spend ~1 minute to setup your environment. You could set these: alias k = kubectl                         # will already be pre-configured export do = "--dry-run=client -o yaml"     # k get pod x $do export now = "--force --grace-period 0"   # k delete pod x $now Vim To make vim use 2 spaces for a tab edit ~/.vimrc to contain: set tabstop=2 set expandtab set shiftwidth=2 More setup suggestions are in the tips section .     Question 1 | Contexts Task weight: 1%   You have access to multiple clusters from your main terminal through kubectl contexts. Write all those context names into /opt/course/1/contexts . Next write a command to display the current context into /opt/course/1/context_default_kubectl.sh , the command should use kubectl . Finally write a second command doing the same thing into /opt/course/1/context_default_no_kubectl.sh , but without the use of k

标 题: 关于Daniel Guo 律师

发信人: q123452017 (水天一色), 信区: I140 标  题: 关于Daniel Guo 律师 关键字: Daniel Guo 发信站: BBS 未名空间站 (Thu Apr 26 02:11:35 2018, 美东) 这些是lz根据亲身经历在 Immigration版上发的帖以及一些关于Daniel Guo 律师的回 帖,希望大家不要被一些马甲帖广告帖所骗,慎重考虑选择律师。 WG 和Guo两家律师对比 1. fully refund的合约上的区别 wegreened家是case不过只要第二次没有file就可以fully refund。郭家是要两次case 没过才给refund,而且只要第二次pl draft好律师就可以不退任何律师费。 2. 回信速度 wegreened家一般24小时内回信。郭律师是在可以快速回复的时候才回复很快,对于需 要时间回复或者是不愿意给出确切答复的时候就回复的比较慢。 比如:lz问过郭律师他们律所在nsc区域最近eb1a的通过率,大家也知道nsc现在杀手如 云,但是郭律师过了两天只回复说让秘书update最近的case然后去网页上查,但是上面 并没有写明tsc还是nsc。 lz还问过郭律师关于准备ps (他要求的文件)的一些问题,模版上有的东西不是很清 楚,但是他一般就是把模版上的东西再copy一遍发过来。 3. 材料区别 (推荐信) 因为我只收到郭律师写的推荐信,所以可以比下两家推荐信 wegreened家推荐信写的比较长,而且每封推荐信会用不同的语气和风格,会包含lz写 的research summary里面的某个方面 郭家四封推荐信都是一个格式,一种语气,连地址,信的称呼都是一样的,怎么看四封 推荐信都是同一个人写出来的。套路基本都是第一段目的,第二段介绍推荐人,第三段 某篇或几篇文章的abstract,最后结论 4. 前期材料准备 wegreened家要按照他们的模版准备一个十几页的research summary。 郭律师在签约之前说的是只需要准备五页左右的summary,但是在lz签完约收到推荐信 ,郭律师又发来一个很长的ps要lz自己填,而且和pl的格式基本差不多。 总结下来,申请自己上心最重要。但是如果选律师,lz更倾向于wegreened,