Page 1 of 1

Using apt in recovery mode

PostPosted: 2019-01-05 13:49
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

Re: Using apt in recovery mode

PostPosted: 2019-01-05 14:00
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

Re: Using apt in recovery mode

PostPosted: 2019-01-05 15:58
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.

Re: Using apt in recovery mode

PostPosted: 2019-01-09 11:12
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.