LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2019, 11:07 AM   #1
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 165

Rep: Reputation: 35
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
 
Old 05-14-2019, 11:42 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 8,508

Rep: Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775
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

Last edited by BW-userx; 05-14-2019 at 11:44 AM.
 
Old 05-14-2019, 07:47 PM   #3
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,433

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
3 members found this post helpful.
Old 05-14-2019, 08:37 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,763
Blog Entries: 1

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803
# 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
 
Old 05-14-2019, 08:49 PM   #5
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,433

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.

Last edited by mrmazda; 05-14-2019 at 09:53 PM.
 
Old 05-16-2019, 12:04 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,763
Blog Entries: 1

Rep: Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803Reputation: 803
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure GRUB2 to give me the multi boot option GoRaptorsGo Linux - Newbie 6 02-23-2015 04:57 PM
[SOLVED] what's the difference between a multi-cpu , multi-core and a multi-thread system ? entz Linux - Hardware 11 12-20-2011 04:49 PM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
GRUB2 - FreeBSD-8.0 does not show up in triple boot menu, dual boot menu it does.. wiliweld *BSD 7 05-03-2010 01:05 PM
LXer: So HERE'S how you get into grub2 if there's no boot menu in Ubuntu Lucid 10.04 LXer Syndicated Linux News 0 03-23-2010 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration