LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub2 Menu - Option to boot into multi-user target. (https://www.linuxquestions.org/questions/linux-newbie-8/grub2-menu-option-to-boot-into-multi-user-target-4175653894/)

ddenial 05-14-2019 11:07 AM

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

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
Code:

menuentry "Fedora Multi-User" {
  linuxefi ($root)/vmlinuz-5.0.13-300.fc30.x86_64 root=/dev/mapper/vg-root ro systemd.unit=multi-user.target 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?

Thanks

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.


Code:

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

0

        Halt        Stops the system

1

        Single-user mode        System administration

2

        (Multiuser without networking)        (Not normally used)

3

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

4

        (Not defined)        (Not normally used)

5

        Graphical        Normal system operation with graphical login.

6

        Reboot        Restarts the system

7, 8, 9,
a, b, c

        (Not defined)        Available for custom purposes

https://www.oreilly.com/library/view...2/ch04s05.html

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 multi-user.target' makes multi-user the default.

Shadow_7 05-14-2019 08:37 PM

# systemctl set-default multi-user.target

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 systemd.unit=multi-user.target 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 multi-user.target and 5 to graphical.target under systemd's ruler-ship.


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