-   Linux - Newbie (
-   -   Grub2 Menu - Option to boot into multi-user target. (

ddenial 05-14-2019 11:07 AM

Grub2 Menu - Option to boot into multi-user target.

OS: Fedora 30 (EFI)

I want to create an entry in the Grub2 menu to boot into the multi-user target environment.

So, I add this into /etc/grub.d/40_custom

menuentry "Fedora Multi-User" {
  linuxefi ($root)/vmlinuz-5.0.13-300.fc30.x86_64 root=/dev/mapper/vg-root ro quiet
  initrdefi ($root)/initramfs-5.0.13-300.fc30.x86_64.img

It booted well into textmode. But when I type 'systemctl get-default', it says 'graphical'.

How come? shouldn't it say 'multi-user'?

How to make it boot into pure multi-user environment?


BW-userx 05-14-2019 11:42 AM

multi user is not a Fedora specif option in Linux, it is a Linux (OS) option governed by run level that even Fedora adheres to.


Table 4-11. Standard runlevels
Runlevel        Description        Purpose
s (or S)        Single-user maintenance mode        Emergency system recovery work


        Halt        Stops the system


        Single-user mode        System administration


        (Multiuser without networking)        (Not normally used)


        Multiuser, character-mode        Normal system operation without graphical login; useful for servers


        (Not defined)        (Not normally used)


        Graphical        Normal system operation with graphical login.


        Reboot        Restarts the system

7, 8, 9,
a, b, c

        (Not defined)        Available for custom purposes

mrmazda 05-14-2019 07:47 PM

All kernel cmdline options are per boot. They have no impact on configuration of defaults. 'systemctl get-default' shows the default. 'systemctl set-default' makes multi-user the default.

Shadow_7 05-14-2019 08:37 PM

# systemctl set-default

Is how I normally do it. I didn't even know you could override the default in grub. Oddly I learned that while using fedora since all the switch-desktop features seemed broken at the time. v.23

mrmazda 05-14-2019 08:49 PM

The Grub override OP used is the long way. The old init system's runlevel numbers in BW-userx's post 1, 3 and 5, functionally alias to single, multi-user and graphical targets, the same as they did in Fedora (and did and still do in Mageia and openSUSE among others) prior to the existence of systemd. Thus instead of on cmdline, one can simply include a 3. These aliases also work in Debian, and its derivatives that use systemd.

Shadow_7 05-16-2019 12:04 PM

Debian used to run init level = 2. And even launch X at the run level. Might still as I haven't kept up on the systemd quirks. Granted the old school *nix ways were 3 for CLI and 5 for GUI, BITD. Rename 3 to and 5 to under systemd's ruler-ship.

All times are GMT -5. The time now is 03:14 AM.