[systemd-devel] starting networking from within single user mode?
Brian Reichert
reichert at numachi.com
Fri Nov 11 14:05:04 UTC 2022
On Fri, Nov 11, 2022 at 08:08:58AM +0200, Mantas Mikul??nas wrote:
> Boot with either "s" (aka "single" aka "rescue") or "-b" (aka "emergency")
> for two variants of single-user mode with init. The former starts some
> basic stuff (it's the real single-user mode) including udev so that modules
> for your network interfaces still get loaded automatically, while the
> latter doesn't start anything except init and a shell (emergency mode is
> *almost* like init=/bin/sh but in theory might at least let you `systemctl
> start` something).
I was able to get into the emergency target, using these notes:
https://suay.site/?p=1681&PageSpeed=noscript
The speed bump this article helped me with was to overcome systemd's
misconception that the root account was locked.
- it was not locked; verified with 'passwd -S root'
- root did have a password (known to me)
Anyway, I now am at a more functional command line, and I appreciate
everyone's patience.
> If udev is not running, try to `modprobe` whichever drivers you need for
> the Ethernet interface. (The name can be found by PCI ID, e.g. for
> 10ec:8136 "grep -i 10EC.*8136 /lib/modules/`uname -r`/modules.alias") Then
> manually bring eth0 up, add the IP address, add a default route (dhclient
> or dhcpcd will also work without udev, while systemd-networkd probably
> won't).
>
> ip link set eth0 up
> ip addr add 192.168.1.55/24 dev eth0
> ip route add default via 192.168.1.1
These, in isolation, are useful notes. It's been way too many years since
I had to rescue a failing-to-boot Linux server...
> --
> Mantas Mikul??nas
--
Brian Reichert <reichert at numachi.com>
BSD admin/developer at large
More information about the systemd-devel
mailing list