Sample Header Ad - 728x90

Debian very unstable after disastrous upgrade - how to recover GRUB, missing executables and more?

0 votes
0 answers
382 views
I upgraded Debian stable from 11 to 12 today by
apt-get upgrade
. Thousands of packages were downloaded. However while packages were being upgraded the system froze. I manually shutdown by pressing the power button for 10 seconds. Next boot I was stuck in a hardware error message loop so I had to reboot again. This time it booted successfully. Some notable changes include the Debian 12 logo on the boot screen as well as a missing background because the stock backgrounds were replaced. I tried
apt-get upgrade
but got an error saying
was interrupted
. I ran
dpkg --configure -a
and got the following response:
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/bin, /user/sbin and /sbin
Then I attempted
apt-get upgrade
again. This time it did let me upgrade while letting me know that hundreds of packages were not fully installed. But it froze again. What is worse, after a reboot I was greeted by the GRUB shell. I had to use the following commands to escape to the GRUB GUI.
set prefix=(hd0,2)/grub
set root=(hd0,2)
insmod linux
insmod normal
normal
Fortunately I was back in Debian. However a third attempt at finishing the upgrade failed when
-reconfigure libdvd-pkg
froze the system. I was back at the GRUB shell. This time it returned errors while hanging for an extended period of time in
, saying it was unable to read a certain sector. After yet another reboot, I was able to use the same set of commands to get back into the system. Having gone through a roller coaster of emotions, I am scared to upgrade packages now. While
apt-get upgrade
shows that no more packages are hanging in an intermediary state, thousands of packages were held back. I went to GNOME Software app which displayed the same list of updates available. It displayed the option to begin the upgrade. My questions: 1.
dpkg --configure -a
still gives me the same warnings and errors. Do I need to manually insert the missing executables? 2. Why are so many apps blocked from upgrading in CLI but not so in GUI? Is it safe to upgrade, given that my computer already failed to do so multiple times? 3. I do not want to transit the GRUB shell every time I boot. How do I repair it? 4. After resolving 1-3, is it safe to assume that everything else is fine, brush it off and move on? Are there tools that resemble
and
of Windows that automatically scan the system for damages? 5. How do I backup the entire system so that GRUB can fall back to it in case of a unrecoverable accident? I do backup personal files manually on a thumb drive that has no where near the capacity to store the system. However my SSD's total space is more than double the size of all partitions combined and could thus store a copy of all of them.
Asked by juo9973 (1 rep)
Jun 12, 2023, 05:17 AM