• Re: Starting Debian 12 in run level 3

    From Greg Wooledge@21:1/5 to Roger Price on Tue Apr 29 14:10:01 2025
    On Tue, Apr 29, 2025 at 13:58:31 +0200, Roger Price wrote:
    I would like to start a small server in what used to be known as run level 3, i.e. with no graphical interface. I tried setting GRUB_CMDLINE_LINUX="3" in /etc/default/grub and running update-grub, but this had no effect.

    What is the correct way of booting Debian 12 without a graphical interface?

    Your run levels are incorrect. "3" included the graphical Display
    Manager and "2" did not.

    Setting the "run level" (which gets translated to a systemd target)
    via the kernel command line parameters is not recommended as a long-term solution. It's fine for one-off boots.

    For the long-term solution, what you want is

    systemctl set-default multi-user.target

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Price@21:1/5 to All on Tue Apr 29 14:00:02 2025
    I would like to start a small server in what used to be known as run level 3, i.e. with no graphical interface. I tried setting GRUB_CMDLINE_LINUX="3" in /etc/default/grub and running update-grub, but this had no effect.

    What is the correct way of booting Debian 12 without a graphical interface?

    Roger

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Price@21:1/5 to Greg Wooledge on Tue Apr 29 14:30:02 2025
    On Tue, 29 Apr 2025, Greg Wooledge wrote:
    On Tue, Apr 29, 2025 at 13:58:31 +0200, Roger Price wrote:
    What is the correct way of booting Debian 12 without a graphical interface?

    For the long-term solution, what you want is

    systemctl set-default multi-user.target

    Thanks. Will "systemctl set-default graphical.target" take my box back to it's original installed configuration ? Roger

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Apr 29 14:20:01 2025
    Roger Price (HE12025-04-29):
    I would like to start a small server in what used to be known as run level 3, i.e. with no graphical interface. I tried setting GRUB_CMDLINE_LINUX="3" in /etc/default/grub and running update-grub, but this had no effect.

    What is the correct way of booting Debian 12 without a graphical interface?

    Hi.

    You need to look at `systemctl set-default`.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Miata@21:1/5 to All on Tue Apr 29 19:50:01 2025
    Van Snyder composed on 2025-04-29 10:12 (UTC-0700):

    On Tue, 2025-04-29 at 08:03 -0400, Greg Wooledge wrote:

    Your run levels are incorrect.  "3" included the graphical Display
    Manager and "2" did not.

    Level 0 is shutdown
    Level 1 is single user
    Level 2 is multi user
    Level 3 is multi user with networking
    Level 4 is not used
    Level 5 is GUI
    Level 6 is reboot

    That list was applicable to Mageia, Fedora & openSUSE and various other rpm distros, but by no means all, before they switched to systemd from sysvinit. It did not apply in any pre-systemd Debian I ever used.
    --
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Van Snyder on Tue Apr 29 19:50:01 2025
    On Tue, Apr 29, 2025 at 10:12:10 -0700, Van Snyder wrote:
    On Tue, 2025-04-29 at 08:03 -0400, Greg Wooledge wrote:
    Your run levels are incorrect.á "3" included the graphical Display
    Manager and "2" did not.

    Level 0 is shutdown
    Level 1 is single user
    Level 2 is multi user
    Level 3 is multi user with networking
    Level 4 is not used
    Level 5 is GUI
    Level 6 is reboot

    OK... it's ugly and horrible and stupidly complicated, and much worse
    than I remembered.

    Your list matches <https://en.wikipedia.org/wiki/Runlevel#Linux_Standard_Base_specification> which shows what LSB defines for runlevels, which I believe is derived
    from Red Hat.

    In Debian, before systemd, runlevels 2 through 5 were all identical
    out of the box. You could configure the system's boot behavior by
    changing symlinks on your own system, which would cause runlevels 2-5
    to differ from each other. Or, more commonly, you could simply remove
    whatever packages you didn't want to run.

    I could've sworn there was some system I used, at some point in the past,
    where runlevel 2 was without-DM and runlevel 3 was with-DM, but I can't remember how long ago that was.

    Check out some of the other systems shown on that wikipedia page to see variants.

    In any case, use of the numeric runlevel aliases for systemd targets
    is not the recommended way. Use the actual target names instead, for
    less confusion.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to David Wright on Tue Apr 29 21:10:01 2025
    On Tue, Apr 29, 2025 at 13:30:18 -0500, David Wright wrote:
    Is the break in communication between Grub and the kernel, or
    the kernel and systemd? I'm not best qualified to answer that,
    because my graphical.target.wants includes solely udisks2.service,
    and I suspect that I don't even depend on that. Is a DM startup
    placed only in graphical.target.wants, and not multi-user.t.w?

    I don't know either. I boot without a graphical Display Manager by
    the simple expedient of not having one installed.

    hobbit:~$ runlevel
    N 5
    hobbit:~$ systemctl get-default
    graphical.target

    It acts just like multi-user.target when there isn't any DM to run.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From xuser@21:1/5 to Van Snyder on Tue Apr 29 23:10:01 2025
    On older debians runlevel 2 had X11.

    On Tue, 29 Apr 2025, Van Snyder wrote:

    Date: Tue, 29 Apr 2025 13:06:44 -0700
    From: Van Snyder <van.snyder@sbcglobal.net>
    To: debian-user@lists.debian.org
    Subject: Re: Starting Debian 12 in run level 3
    Resent-Date: Tue, 29 Apr 2025 20:07:08 +0000 (UTC)
    Resent-From: debian-user@lists.debian.org

    On Tue, 2025-04-29 at 13:46 -0400, Greg Wooledge wrote:

    Level 0 is shutdown
    Level 1 is single user
    Level 2 is multi user
    Level 3 is multi user with networking
    Level 4 is not used
    Level 5 is GUI
    Level 6 is reboot

    Your list matches <https://en.wikipedia.org/wiki/Runlevel#Linux_Standard_Base_specification> which shows what LSB defines for runlevels, which I believe is derived
    from Red Hat.


    IIRC, it was the same in Unix Version 7, which Kernighan ? or was it Johnson or Richie? ? said was an improvement on all of its successors. And in BSD and SunOS and Solaris.




    xuser@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Van Snyder on Wed Apr 30 00:20:01 2025
    On Tue, Apr 29, 2025 at 13:06:44 -0700, Van Snyder wrote:
    IIRC, it was the same in Unix Version 7, which Kernighan — or was it Johnson or Richie? — said was an improvement on all of its successors.
    And in BSD and SunOS and Solaris.

    <https://en.wikipedia.org/wiki/Runlevel#System_V_Releases_3_and_4>
    gives a different list of runlevels for System V.

    Pure BSD systems don't use runlevels at all. Solaris did, being a
    hybrid of SysV and BSD.


    On Tue, Apr 29, 2025 at 21:00:16 +0000, xuser wrote:
    On older debians runlevel 2 had X11.

    That's correct. On Debian before systemd, runlevels 2 through 5 were
    all equivalent out of the box, and would run a Display Manager if one
    were installed and not disabled.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)