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

 

 

 

Upgrade to Debian 12 "bookworm" when available?

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
techsavvy
Posts: 55
Joined: 2019-07-06 20:02

Upgrade to Debian 12 "bookworm" when available?

#1 Post by techsavvy »

I currently have the most recent Debian 11 "bullseye" installed on an amd64 laptop without a cd/dvd, and am wondering please if the following steps will allow me to upgrade to Debian 12 "bookworm", essentially editing the /etc/apt/sources.list:

Code: Select all

$ grep -Ev "^#|^$" /etc/apt/sources.list
deb http://deb.debian.org/debian/ bullseye main non-free contrib
deb-src http://deb.debian.org/debian/ bullseye main non-free contrib
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free

$ sudo (cp /etc/apt/sources.list /etc/apt/sources.list.deb11
        sed -i 's|bullseye|bookworm|g' /etc/apt/sources.list
        apt update && apt -y upgrade && apt -y full-upgrade
       )
I'll also have to update the PGP/GPG key public ring files in /etc/apt/trusted.gpg.d/ somehow?

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: Upgrade to Debian 12 "bookworm" when available?

#2 Post by Aki »

Hello,

The Release Notes for Debian 12 (bookworm) have a specific paragraph about Upgrades from Debian 11 (bullseye).

Hope that helps.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Space Invader
Posts: 7
Joined: 2023-05-18 14:08
Location: $HOME

Re: Upgrade to Debian 12 "bookworm" when available?

#3 Post by Space Invader »

While I second the sound advice given by @aki of referring to Debian 12’s release notes (particularly from section 4.6 onwards), your sources.list should be as follows:

Code: Select all

deb http://deb.debian.org/debian/ bullseye main non-free non-free-firmware contrib
deb-src http://deb.debian.org/debian/ bullseye main non-free non-free-firmware contrib
deb http://security.debian.org/debian-security bullseye-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free non-free-firmware

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: Upgrade to Debian 12 "bookworm" when available?

#4 Post by Random_Troll »

Those deb-src lines are only needed if you want to patch packages. Leave them out otherwise to avoid hitting the servers unnecessarily.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

urdrwho10
Posts: 109
Joined: 2020-03-04 21:53
Has thanked: 17 times
Been thanked: 4 times

Re: Upgrade to Debian 12 "bookworm" when available?

#5 Post by urdrwho10 »

Hm? I think back when I used Mint it was easier to upgrade. Such as "Launch the System Upgrade by clicking on “Edit->Upgrade to Linux Mint 21.1 Vera”.

Debian has to have an easier way then manually reading multiple chapters of Upgrades from Debian 11. I'm in a mode of trying to simplify all things in life.

urdrwho10
Posts: 109
Joined: 2020-03-04 21:53
Has thanked: 17 times
Been thanked: 4 times

Re: Upgrade to Debian 12 "bookworm" when available?

#6 Post by urdrwho10 »

urdrwho10 wrote: 2023-06-02 13:10 Hm? I think back when I used Mint it was easier to upgrade. Such as "Launch the System Upgrade by clicking on “Edit->Upgrade to Linux Mint 21.1 Vera”.

Debian has to have an easier way then manually reading multiple chapters of Upgrades from Debian 11. I'm in a mode of trying to simplify all things in life.

So my question is -- does Debian have an easier way?

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 503
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: Upgrade to Debian 12 "bookworm" when available?

#7 Post by Bloom »

The shortest way is this:

Code: Select all

sudo apt -y update && sudo apt -y dist-upgrade && sudo apt -y auto-remove && sudo apt -y auto-clean
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's/deb-src/#deb-src/g' /etc/apt/sources.list # skip this if you don't have deb-src lines in your sources.list or if you're a programmer
sudo sed -i -e 's/bullseye/bookworm/g' -e 's/non-free /non-free non-free-firmware /g' /etc/apt/sources.list
sudo apt -y update && sudo apt -y dist-upgrade && sudo apt -y auto-remove && sudo apt -y auto-clean
Last edited by Bloom on 2023-06-04 06:40, edited 2 times in total.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Upgrade to Debian 12 "bookworm" when available?

#8 Post by Hallvor »

urdrwho10 wrote: 2023-06-02 13:10 Hm? I think back when I used Mint it was easier to upgrade. Such as "Launch the System Upgrade by clicking on “Edit->Upgrade to Linux Mint 21.1 Vera”.

Debian has to have an easier way then manually reading multiple chapters of Upgrades from Debian 11. I'm in a mode of trying to simplify all things in life.
This will work for most people:

Code: Select all

# apt update && apt upgrade
# nano /etc/apt/sources.list  (then change sources to debian bookworm and save them)
# apt upgrade --without-new-pkgs
# apt full-upgrade
# apt clean && apt autoremove
And if you would like to be a guinea pig, here is a bash script automating it. Why? Because why not.

USE AT OWN RISK!

Code: Select all

#!/bin/bash

# Backup old sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.backup

# Create a new sources.list
tee /etc/apt/sources.list > /dev/null <<EOF
deb http://deb.debian.org/debian/ bookworm main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free

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

deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free
EOF

# Update package lists
apt update

# Upgrade installed packages
apt upgrade --without-new-pkgs

# Perform a full system upgrade
apt full-upgrade

# Clean package cache
apt clean

# Remove unused packages
apt autoremove --purge

# Check the exit code of the previous command
if [ $? -eq 0 ]; then
  echo "Upgrade completed successfully!"
else
  echo "Oh no, upgrade failed!"
fi

Paste the content into a text file called upgrade.sh

Make the file executable:

Code: Select all

chmod +x upgrade.sh
Run the script:

Code: Select all

sudo ./upgrade.sh
[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

urdrwho10
Posts: 109
Joined: 2020-03-04 21:53
Has thanked: 17 times
Been thanked: 4 times

Re: Upgrade to Debian 12 "bookworm" when available?

#9 Post by urdrwho10 »

Hallvor wrote: 2023-06-02 16:32
urdrwho10 wrote: 2023-06-02 13:10
Ha! This gave me a good smile! "Why? Because why not."

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Upgrade to Debian 12 "bookworm" when available?

#10 Post by stevepusser »

I was aware of the new non-free-firmware section in Bookworm, but when was it added to Bullseye?
deb http://deb.debian.org/debian/ bullseye main non-free non-free-firmware contrib
MX Linux packager and developer

urdrwho10
Posts: 109
Joined: 2020-03-04 21:53
Has thanked: 17 times
Been thanked: 4 times

Re: Upgrade to Debian 12 "bookworm" when available?

#11 Post by urdrwho10 »

Everything went 99% as expected but there is the 1% --- I don't have any audio. Codec issue maybe????

Code: Select all

/sbin/lsmod | grep snd
snd_hda_codec_idt      69632  1
snd_hda_codec_generic    98304  1 snd_hda_codec_idt
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_intel          57344  0
snd_intel_dspcfg       28672  1 snd_hda_intel
soundwire_intel        45056  1 snd_intel_dspcfg
snd_soc_core          319488  1 soundwire_intel
snd_compress           32768  1 snd_soc_core
snd_hda_codec         176128  3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_idt
snd_hda_core          110592  4 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hda_codec_idt
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               143360  6 snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_soc_core,snd_hda_core
snd_timer              49152  1 snd_pcm
snd                   110592  9 snd_hda_codec_generic,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_hda_codec_idt
soundcore              16384  1 snd
Hallvor wrote: 2023-06-02 16:32
urdrwho10 wrote: 2023-06-02 13:10 Hm? I think back when I used Mint it was easier to upgrade. Such as "Launch the System Upgrade by clicking on “Edit->Upgrade to Linux Mint 21.1 Vera”.

Debian has to have an easier way then manually reading multiple chapters of Upgrades from Debian 11. I'm in a mode of trying to simplify all things in life.
This will work for most people:

Code: Select all

# apt update && apt upgrade
# nano /etc/apt/sources.list  (then change sources to debian bookworm and save them)
# apt upgrade --without-new-pkgs
# apt full-upgrade
# apt clean && apt autoremove
And if you would like to be a guinea pig, here is a bash script automating it. Why? Because why not.

USE AT OWN RISK!

Code: Select all

#!/bin/bash

# Backup old sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.backup

# Create a new sources.list
tee /etc/apt/sources.list > /dev/null <<EOF
deb http://deb.debian.org/debian/ bookworm main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free

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

deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free
EOF

# Update package lists
apt update

# Upgrade installed packages
apt upgrade --without-new-pkgs

# Perform a full system upgrade
apt full-upgrade

# Clean package cache
apt clean

# Remove unused packages
apt autoremove --purge

# Check the exit code of the previous command
if [ $? -eq 0 ]; then
  echo "Upgrade completed successfully!"
else
  echo "Oh no, upgrade failed!"
fi

Paste the content into a text file called upgrade.sh

Make the file executable:

Code: Select all

chmod +x upgrade.sh
Run the script:

Code: Select all

sudo ./upgrade.sh

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Upgrade to Debian 12 "bookworm" when available?

#12 Post by Hallvor »

Possibly, also check that it's not muted somehow. You may want to start a new thread for that in the Testing and Unstable subforum to get more responses.
[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

urdrwho10
Posts: 109
Joined: 2020-03-04 21:53
Has thanked: 17 times
Been thanked: 4 times

Re: Upgrade to Debian 12 "bookworm" when available?

#13 Post by urdrwho10 »

I repeated the exercise of installing updates. The first time when I did it I made an error in sources.lst. Instead of bookworm I had brookworm and I'm thinking it caused issues. I corrected the issue in this manner...........

TO begin with I use separate partitions for Home, etc.

So I installed 11.7 and kept home, everything was working fine. Then I repeated installing the upgrade to 12 and everything is still fine. This was probably operator error. :(
Hallvor wrote: 2023-06-03 21:57 Possibly, also check that it's not muted somehow. You may want to start a new thread for that in the Testing and Unstable subforum to get more responses.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Upgrade to Debian 12 "bookworm" when available?

#14 Post by Hallvor »

This would not happen if you ran the script. :lol:
[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

urdrwho10
Posts: 109
Joined: 2020-03-04 21:53
Has thanked: 17 times
Been thanked: 4 times

Re: Upgrade to Debian 12 "bookworm" when available?

#15 Post by urdrwho10 »

True!!! :D :)
Hallvor wrote: 2023-06-04 13:32 This would not happen if you ran the script. :lol:

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: Upgrade to Debian 12 "bookworm" when available?

#16 Post by donald »

Hallvor wrote: 2023-06-02 16:32 And if you would like to be a guinea pig, here is a bash script automating it. Why? Because why not.
USE AT OWN RISK!
Welcome new users to the "Posting from a friends iPAD" new sub-forum. :lol:
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: Upgrade to Debian 12 "bookworm" when available?

#17 Post by donald »

Pay particular attention to some of the other points that people skip over in the release notes such as backports, which need to be removed from your sources list. Pay attention to your unofficial sources as well. No need to brick your own system. Also watch out for APT pinning which is another potential downfall.
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Upgrade to Debian 12 "bookworm" when available?

#18 Post by Hallvor »

Yes, to be clear: Everyone should carefully read the release notes linked in the second post above. It is not a massive text, and it contains lots of useful info on how the system works.

New users should never blindly copy and paste commands (or run scripts made for fun) and assume that everything will work. Read and learn. The few minutes you spend on reading the release notes will pay off whenever you want to upgrade your system. A broken system where you have to reinstall and recreate all your configurations will cost you much more time than a few minutes of reading.

The Debian developers are true masters of flawless dist-upgrades, but even masters need a helping hand if you have done special configurations to your system.

https://www.debian.org/releases/stable/ ... ng.en.html
[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

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: Upgrade to Debian 12 "bookworm" when available?

#19 Post by Random_Troll »

Hallvor wrote: 2023-06-06 11:56users should never blindly copy and paste commands
Just to reinforce this point: users should never copy&paste from internet sites even if they fully understand the commands. It is *very* easy to hijack the copy&paste mechanism and do serious damage to your system.

Reference: https://www.bleepingcomputer.com/news/s ... et-hacked/
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

User avatar
sdibaja
Posts: 89
Joined: 2005-10-22 21:14
Location: Baja California, Mexico
Has thanked: 28 times
Been thanked: 11 times

Re: Upgrade to Debian 12 "bookworm" when available?

#20 Post by sdibaja »

Excellent advice. Thanks

Post Reply