Discussion:
upgrade to bookworm causes breakage
(too old to reply)
Bob Mroczka
2024-08-19 23:00:01 UTC
Permalink
Hello,

I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
I got to the point of executing the command at step 6 to do sudo apt
full-upgrade. At this point my system is in a state where I'm having
difficulty recovering from. Dpkg is unable to install any packages and
terminates with the following error on any package and then segfaults. The
system has network access and apt is able to pull packages. I just need to
get dpkg working again.

dpkg -i gzip_1.12-1_amd64.deb
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2
dpkg: error processing archive gzip_1.12-1_amd64.deb (--install):
dpkg-deb --control subprocess returned error exit status 2
Segmentation fault

I attempted to run reportbug from the system but it segfaults after showing
the list of related bugs.

I am unable to get a backtrace from gdb since gdb segfaults.

I am able to get a strace off of the command but nothing stands out in the
output.

I then attempted to use dpkg -D77777 -i gzip_1.12-1_amd64.deb but it
doesn't show much more than the above:

/var/cache/apt/archives# dpkg -D77777 -i gzip_1.12-1_amd64.deb
D000001: root= admindir=/var/lib/dpkg
D000001: ensure_diversions: new, (re)loading
D000001: ensure_statoverrides: new, (re)loading
D000010: path_remove_tree '/var/lib/dpkg/tmp.ci'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2
dpkg: error processing archive gzip_1.12-1_amd64.deb (--install):
dpkg-deb --control subprocess returned error exit status 2
D000010: path_remove_tree '/var/lib/dpkg/tmp.ci'
D000010: path_remove_tree '/var/lib/dpkg/reassemble.deb'
D010000: trigproc_run_deferred
Segmentation fault

Do you have any suggestions for further identifying the cause of this
and/or resolving this without recovering from back up? Thanks.

Bob
Greg Wooledge
2024-08-19 23:10:01 UTC
Permalink
Post by Bob Mroczka
I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
I'm not going to read that web site. I'll just assume it's correct.

What kind of computer are you using?
Post by Bob Mroczka
dpkg -i gzip_1.12-1_amd64.deb
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2
dpkg-deb --control subprocess returned error exit status 2
Segmentation fault
I attempted to run reportbug from the system but it segfaults after showing
the list of related bugs.
I am unable to get a backtrace from gdb since gdb segfaults.
My first thought when I saw that error message was that you've got a
corrupted gzip .deb file. But if *everything* is segfaulting, then
you've either got a corrupted libc or kernel, or your computer isn't
supported by Bookworm.

Your error message shows you're using amd64, so my second guess (that
you're on one of the Pentium-era i386 CPUs which has been obsoleted)
is also wrong. I don't know if any specific amd64 CPUs are obsoleted,
but if you post your hardware specs, maybe someone will know more.

If it's not a hardware compatibility issue, then I'm back to "corrupted
file" as the primary guess.
Mike
2024-08-19 23:30:01 UTC
Permalink
Post by Bob Mroczka
I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
In the future, consider using https://www.debian.org/release/stable/ and
such. cyberciti.biz usually just copies content from elsewhere, to sell ads
against it. It may not be authoritative.
Post by Bob Mroczka
Do you have any suggestions for further identifying the cause of this
and/or resolving this without recovering from back up?
My only thought is that maybe, somehow, you're running a mix of incompatible
libraries and executables, some upgraded and some not. You might go into
`aptitude`, if it runs, and see what it thinks.

The "rescue" option on the Debian image may be able to help you mount and
install a proper installation on your existing disks, since it runs its
own copy of Linux on a ramdisk. But it's been a long time since I've used
it, so I forget the procedure.
Gary Dale
2024-08-20 00:30:01 UTC
Permalink
Post by Mike
Post by Bob Mroczka
I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
In the future, consider using https://www.debian.org/release/stable/ and
such. cyberciti.biz usually just copies content from elsewhere, to sell ads
against it. It may not be authoritative.
Post by Bob Mroczka
Do you have any suggestions for further identifying the cause of this
and/or resolving this without recovering from back up?
My only thought is that maybe, somehow, you're running a mix of incompatible
libraries and executables, some upgraded and some not. You might go into
`aptitude`, if it runs, and see what it thinks.
The "rescue" option on the Debian image may be able to help you mount and
install a proper installation on your existing disks, since it runs its
own copy of Linux on a ramdisk. But it's been a long time since I've used
it, so I forget the procedure.
Further to Mike's suggestion, sometimes going back to apt-get instead of
apt can work.

Also, since the full-upgrade step has failed, you should be able to
reboot and try again. One of the kernels should be able to work.
However, you can also boot to a command prompt, which might be safer.

To fix dpkg, I suspect that it's the tar package that needs to be fixed.
That may just be a single binary that you can copy from another system.

Worst case scenario is to do a fresh install of bookworm. If your /home
is in a separate partition, that should be easy and safe. Just don't let
it reformat or erase /home. Use manual partitioning.


I personally don't like using sudo for everything. When I have more than
one command, I just do a sudo bash and run them as root.

Looking at the cybercit.biz article, it's doing some stuff that I find a
little strange. Step 3 should just ask you to run sed to replace
bullseye with bookworm - less chance for errors.

And I don't like step 5 at all. The difference between versions often
includes packages being replaced. Upgrading without new packages seems
like asking for trouble.
David Wright
2024-08-20 05:10:02 UTC
Permalink
Post by Gary Dale
Post by Mike
Post by Bob Mroczka
I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
In the future, consider using https://www.debian.org/release/stable/ and
such. cyberciti.biz usually just copies content from elsewhere, to sell ads
against it. It may not be authoritative.
Post by Bob Mroczka
Do you have any suggestions for further identifying the cause of this
and/or resolving this without recovering from back up?
My only thought is that maybe, somehow, you're running a mix of incompatible
libraries and executables, some upgraded and some not. You might go into
`aptitude`, if it runs, and see what it thinks.
The "rescue" option on the Debian image may be able to help you mount and
install a proper installation on your existing disks, since it runs its
own copy of Linux on a ramdisk. But it's been a long time since I've used
it, so I forget the procedure.
Further to Mike's suggestion, sometimes going back to apt-get instead
of apt can work.
Also, since the full-upgrade step has failed, you should be able to
reboot and try again. One of the kernels should be able to work.
However, you can also boot to a command prompt, which might be safer.
To fix dpkg, I suspect that it's the tar package that needs to be
fixed. That may just be a single binary that you can copy from another
system.
It might be worth looking for any corruption with:

# cd /
# md5sum -c /var/lib/dpkg/info/{dpkg,gzip,tar}.md5sums

Or use a sledgehammer and check the whole lot:

# md5sum -c /var/lib/dpkg/info/*.md5sums | grep -v ': OK$'

though expect some output from such things as diversions and some
empty foo.md5sums files. (I'm assuming that debsums hasn't been
installed.)
Post by Gary Dale
Worst case scenario is to do a fresh install of bookworm. If your
/home is in a separate partition, that should be easy and safe. Just
don't let it reformat or erase /home. Use manual partitioning.
I personally don't like using sudo for everything. When I have more
than one command, I just do a sudo bash and run them as root.
Looking at the cybercit.biz article, it's doing some stuff that I find
a little strange. Step 3 should just ask you to run sed to replace
bullseye with bookworm - less chance for errors.
To be fair, the long version (rather than the summary at the top)
does suggest this, and adds one reason for using an editor for this
particular upgrade: the addition of non-free-firmware.
Post by Gary Dale
And I don't like step 5 at all. The difference between versions often
includes packages being replaced. Upgrading without new packages seems
like asking for trouble.
This step (which is labelled step 4 in the long version¹) corresponds
to §4.4.5 Minimal system upgrade in the bookworm Release Notes,
so like it or not, it's official.

¹ Step 4 in the summary is the last action in the long version's step 3.

Cheers,
David.
Jeffrey Walton
2024-08-20 02:10:01 UTC
Permalink
Post by Bob Mroczka
Hello,
I attempted to upgrade my system from debian 11 to 12 following the instructions provided at https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
In the future, you should probably follow a Debian guide, like
<https://wiki.debian.org/DebianUpgrade>.
Post by Bob Mroczka
I got to the point of executing the command at step 6 to do sudo apt full-upgrade. At this point my system is in a state where I'm having difficulty recovering from. Dpkg is unable to install any packages and terminates with the following error on any package and then segfaults. The system has network access and apt is able to pull packages. I just need to get dpkg working again.
dpkg -i gzip_1.12-1_amd64.deb
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2
dpkg-deb --control subprocess returned error exit status 2
Segmentation fault
I attempted to run reportbug from the system but it segfaults after showing the list of related bugs.
I am unable to get a backtrace from gdb since gdb segfaults.
I am able to get a strace off of the command but nothing stands out in the output.
/var/cache/apt/archives# dpkg -D77777 -i gzip_1.12-1_amd64.deb
D000001: root= admindir=/var/lib/dpkg
D000001: ensure_diversions: new, (re)loading
D000001: ensure_statoverrides: new, (re)loading
D000010: path_remove_tree '/var/lib/dpkg/tmp.ci'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2
dpkg-deb --control subprocess returned error exit status 2
D000010: path_remove_tree '/var/lib/dpkg/tmp.ci'
D000010: path_remove_tree '/var/lib/dpkg/reassemble.deb'
D010000: trigproc_run_deferred
Segmentation fault
Do you have any suggestions for further identifying the cause of this and/or resolving this without recovering from back up? Thanks.
Restore from backup, and then try again. This time, follow a Debian guide.

Jeff
David Christensen
2024-08-20 04:00:01 UTC
Permalink
Post by Bob Mroczka
Hello,
I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
I got to the point of executing the command at step 6 to do sudo apt
full-upgrade. At this point my system is in a state where I'm having
difficulty recovering from.
<snip>


I understand that in-place upgrading a FOSS computer over many years is
a source of pride for many people. I tried that, and it did not work
out for me. Since then, I have invested myself in fresh installs,
minimal sysadmin changes, thorough documentation, scripting, version
control, backup, restore, and multiple layers of redundancy. The
efforts are far more predictable and the results are far more reliable.


So, I suggest that you put a secure erased SSD into another computer
with no drives other than optical, do a fresh install of Bookworm, add
software/ configure as desired, add disks, and migrate your data.


David
songbird
2024-08-20 11:00:02 UTC
Permalink
David Christensen wrote:
...
Post by David Christensen
I understand that in-place upgrading a FOSS computer over many years is
a source of pride for many people. I tried that, and it did not work
out for me. Since then, I have invested myself in fresh installs,
minimal sysadmin changes, thorough documentation, scripting, version
control, backup, restore, and multiple layers of redundancy. The
efforts are far more predictable and the results are far more reliable.
So, I suggest that you put a secure erased SSD into another computer
with no drives other than optical, do a fresh install of Bookworm, add
software/ configure as desired, add disks, and migrate your data.
this varies so much depending upon how many legacy systems
you have in place that will need to be verified - but otherwise
i completely agree.

the amount of changes that i can apply through the years that
i may not document anyplace can become a problem for others
later so to me doing a completely fresh install is worth the
reminder that i'm doing something wrong and that they should
all be either removed or documented properly.

doing a fresh install gets rid of a lot of packages i may
no longer be using and their configuration files that could
also be hanging around. i try to review my package list once
in awhile and remove those i don't need.

another thing that is useful to review from time to time is
my scripting include files so that i don't have aliases or
other things in there i'm not using any longer.


songbird

David
2024-08-20 06:00:01 UTC
Permalink
Post by Bob Mroczka
I attempted to upgrade my system from debian 11 to 12 following the
instructions provided at
https://www.cyberciti.biz/faq/update-upgrade-debian-11-to-debian-12-bookworm.
Hi,

For a better version of:
"How to upgrade Debian 11 to Debian 12 bookworm using CLI",

to use next time, see here:
https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html
Loading...