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: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

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
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

User avatar
None1975
Posts: 1019
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

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 10.3 Buster / WM: xmonad
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