Using apt in recovery mode

Here you can discuss every aspect of Debian. Note: not for support requests!

Using apt in recovery mode

Postby ukstone » 2019-01-05 13:49

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
ukstone
 
Posts: 2
Joined: 2019-01-05 13:38

Re: Using apt in recovery mode

Postby Head_on_a_Stick » 2019-01-05 14:00

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
User avatar
Head_on_a_Stick
 
Posts: 10382
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Using apt in recovery mode

Postby None1975 » 2019-01-05 15:58

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 Buster / WM: Awesome
Debian Wiki | DontBreakDebian, My config files in github
User avatar
None1975
 
Posts: 922
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Using apt in recovery mode

Postby ukstone » 2019-01-09 11:12

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.
ukstone
 
Posts: 2
Joined: 2019-01-05 13:38


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable