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

 

 

 

Using apt in recovery mode

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
ukstone
Posts: 3
Joined: 2019-01-05 13:38

Using apt in recovery mode

#1 Post by ukstone »

After last package update from testing (buster) my laptop won't boot.
gnome-shell filled up syslog. I stopped the laptop by removing the battery.
After restarting in recovery mode, I tried to run apt, but apt-get issued "Could not resolve . . . " errors for all lines in sources.list.
I can ping IP addresses. However, apt-get is unable to resolve the entries in sources.list.
So, there are some services that need to be started manually which are not started in recovery mode.
Does anybody know what I need to start via systemctl?

I need to make apt work in order to either downgrade the gnome packages updated during the last update, or, if the bug has been fixed in gnome-shell, then all I need to do is just run a normal upgrade.

TIA,
Robert

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Using apt in recovery mode

#2 Post by Head_on_a_Stick »

ukstone wrote:my laptop won't boot
What happens when you try, exactly?
ukstone wrote:I can ping IP addresses. However, apt-get is unable to resolve the entries in sources.list.
Have you checked /etc/resolv.conf?

Are you using DHCP or static addresses?

For the former the DHCP client should add the nameserver to /etc/resolv.conf, for the latter you may have to set it manually.

Quick fix:

Code: Select all

# echo nameserver 8.8.8.8 > /etc/resolv.conf
deadbang

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1404
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 68 times

Re: Using apt in recovery mode

#3 Post by None1975 »

ukstone wrote:I need to make apt work in order to either downgrade the gnome packages updated during the last update
It is not officially supported.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

ukstone
Posts: 3
Joined: 2019-01-05 13:38

Re: Using apt in recovery mode

#4 Post by ukstone »

Solved this issue by adding dns to the host: line in nsswitch.conf.

I think that when you boot in normal mode, a resolver is loaded that allows apt to function, whereas in recovery mode you only have a bare bones system.

Then I did:-
systemctl start ModemManager
systemctl start NetworkManager

and then apt worked.

Post Reply