Adam Mizerski composed on 2022-12-17 18:21 (UTC+0100):
17:37, Jeffrey Taylor composed:
Mathias Homann wrote:
Am Freitag, 16. Dezember 2022, 02:32:06 CET schrieb Jeffrey Taylor:
Is it possible to start NetworkManager and perhaps other services to have network access from runlevel 1?
Runlevels are a thing of the past - since systemd came in. One of these days someone will ask a question like this, and actually get "What are these 'runlevels' you speak of?" as a reply.
Let me say it again: THERE ARE NO RUNLEVELS. The remains are just that - remains. They sort of work but all they do is point at system targets. You will have to learn about systemd and systemd targets eventually anyways...
Can I boot by altering the linux line in grub? Adding systemd targets instead of runlevel?
I wrote it in the last sentence of my message: https://lists.opensuse.org/archives/list/users@lists.opensuse.org/message/TM...
Add "systemd.unit=your_chosen.target" to the kernel commandline
# which init /sbin/init # which telinit /sbin/telinit # ls -l /sbin/init /sbin/telinit lrwxrwxrwx 1 root root 26 Nov 4 04:32 /sbin/init -> ../usr/lib/systemd/systemd lrwxrwxrwx 1 root root 18 Nov 4 04:33 /sbin/telinit -> /usr/bin/systemctl # ls -l /usr/bin/systemctl ../usr/lib/systemd/systemd -rwxr-xr-x 1 root root 1825232 Nov 4 04:32 ../usr/lib/systemd/systemd -rwxr-xr-x 1 root root 256520 Nov 4 04:32 /usr/bin/systemctl # systemctl list-unit-files | grep nleve systemd-update-utmp-runlevel.service static - runlevel0.target alias - runlevel1.target alias - runlevel2.target alias - runlevel3.target alias - runlevel4.target alias - runlevel5.target alias - runlevel6.target alias - # systemctl cat systemd-update-utmp-runlevel.service # /usr/lib/systemd/system/systemd-update-utmp-runlevel.service # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Record Runlevel Change in UTMP Documentation=man:systemd-update-utmp-runlevel.service(8) man:utmp(5) DefaultDependencies=no RequiresMountsFor=/var/log/wtmp Conflicts=shutdown.target Requisite=systemd-update-utmp.service After=systemd-update-utmp.service After=runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target Before=shutdown.target [Service] Type=oneshot ExecStart=/usr/lib/systemd/systemd-update-utmp runlevel # cat /proc/cmdline root=/dev/sda13 noresume mitigations=auto consoleblank=0 S # journalctl -b | grep 'e Mode.' Dec 17 13:13:32 big41 systemd[1]: Reached target rescue.target - Rescue Mode. # cat /proc/cmdline root=/dev/sda13 noresume mitigations=auto consoleblank=0 1 # journalctl -b | grep 'e Mode.' Dec 17 13:29:51 big41 systemd[1]: Reached target rescue.target - Rescue Mode. # systemctl cat runlevel1.target # /usr/lib/systemd/system/rescue.target # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Rescue Mode Documentation=man:systemd.special(7) Requires=sysinit.target rescue.service After=sysinit.target rescue.service AllowIsolate=yes # cat /proc/cmdline root=/dev/sda13 noresume mitigations=auto consoleblank=0 3 # journalctl -b | grep ulti- Dec 17 13:49:36 big41 systemd[1]: Queued start job for default target Multi-User System. Dec 17 13:49:40 big41 systemd[1]: Reached target Multi-User System. # systemctl cat runlevel3.target # /usr/lib/systemd/system/multi-user.target # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Multi-User System Documentation=man:systemd.special(7) Requires=basic.target Conflicts=rescue.service rescue.target After=basic.target rescue.service rescue.target AllowIsolate=yes # cat /proc/cmdline root=/dev/sda13 noresume mitigations=auto consoleblank=0 5 # journalctl -b | grep aphica Dec 17 15:31:03 big41 systemd[1]: Queued start job for default target Graphical Interface. Dec 17 15:31:07 big41 systemd[1]: Reached target Graphical Interface. systemctl cat runlevel5.target # /usr/lib/systemd/system/graphical.target # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Graphical Interface Documentation=man:systemd.special(7) Requires=multi-user.target Wants=display-manager.service Conflicts=rescue.service rescue.target After=multi-user.target rescue.service rescue.target display-manager.service AllowIsolate=yes Because of the aliases, "S" & mere digits and the init command can continue to override the default boot target (state), and switch between targets (states). Thus adding e.g. "systemd.unit=your_chosen.target" to the kernel cmdline is only necessary with custom targets, and the most used old sysvinit shortcuts and cmdline options remain viable. I have a personal addition: # alias | grep init alias init3='systemctl isolate multi-user.target; killall kdm; killall Xorg ' This I use when X has gone haywire during experimentation or using alpha/beta software versions. -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata