Wie Grub bearbeiten?

Ich habe neben majaro auch Windows laufen (an 2 verschiedenen SATA-Ports). Der Grub ist entsprechend konfiguriert. Nun möchte ich aber den Grub so ändern, dass manjaro sofort ohne die Nachfrage, ob Windows gebootet werden soll, startet. Die 10 bis 30 Sekunden, die ich warten muß, bis manjaro erscheint, empfinde ich auch als lästig. Wenn ich Windows starten will, kann ich das im BIOS auswählen. Die Anleitungen im Internet zeigen zwar, wie man den grub aktualisieren kann, damit auch Wiindows bequem gestartet werden kann, aber nicht, wie man das Windows-Booten beseitigen kann.
Im Moment zeigt grub beim Booten folgendes Bild:


Grub sieht im Moment so aus:

1	 GNU nano 8.0  /etc/default/grub   Verändert
2	# GRUB boot loader configuration
3	### ist Original
4	
5	### GRUB_DEFAULT=saved
6	GRUB_DEFAULT=0
7	
8	### hinzugefügt
9	GRUB_HIDDEN_TIMEOUT=0
10	GRUB_HIDDEN_TIMEOUT_QUIET=true
11	
12	###GRUB_TIMEOUT=5
13	GRUB_TIMEOUT=0
14	
15	###GRUB_DISABLE_OS_PROBER=true
16	GRUB_DISABLE_OS_PROBER=false
17	
18	# weiter Original
19	GRUB_DISTRIBUTOR="Manjaro"
20	GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor udev.log_priority=3"
21	GRUB_CMDLINE_LINUX=""
22	
23	# Preload both GPT and MBR modules so that they are not missed
24	GRUB_PRELOAD_MODULES="part_gpt part_msdos"
25	
26	# Uncomment to enable booting from LUKS encrypted devices
27	#GRUB_ENABLE_CRYPTODISK=y
28	
29	# Set to 'countdown' or 'menu' to change timeout behavior,
30	# press ESC key to display menu.
31	GRUB_TIMEOUT_STYLE=hidden
32	
33	# Uncomment to use basic console
34	GRUB_TERMINAL_INPUT=console
35	
36	# Uncomment to disable graphical terminal
37	#GRUB_TERMINAL_OUTPUT=console
38	
39	# The resolution used on graphical terminal
40	# note that you can use only modes which your graphic card supports via VBE
41	# you can see them in real GRUB with the command 'videoinfo'
42	GRUB_GFXMODE=auto
43	# GRUB boot loader configuration
44	### ist Original
45	
46	### GRUB_DEFAULT=saved
47	GRUB_DEFAULT=0
48	
49	### hinzugefügt
50	GRUB_HIDDEN_TIMEOUT=0
51	GRUB_HIDDEN_TIMEOUT_QUIET=true
52	
53	###GRUB_TIMEOUT=5
54	GRUB_TIMEOUT=0
55	
56	###GRUB_DISABLE_OS_PROBER=true
57	GRUB_DISABLE_OS_PROBER=false
58	
59	# weiter Original
60	GRUB_DISTRIBUTOR="Manjaro"
61	GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor udev.log_priority=3"
62	GRUB_CMDLINE_LINUX=""
63	
64	# Preload both GPT and MBR modules so that they are not missed
65	GRUB_PRELOAD_MODULES="part_gpt part_msdos"
66	
67	# Uncomment to enable booting from LUKS encrypted devices
68	#GRUB_ENABLE_CRYPTODISK=y
69	
70	# Set to 'countdown' or 'menu' to change timeout behavior,
71	# press ESC key to display menu.
72	GRUB_TIMEOUT_STYLE=hidden
73	
74	# Uncomment to use basic console
75	GRUB_TERMINAL_INPUT=console
76	
77	# Uncomment to disable graphical terminal
78	#GRUB_TERMINAL_OUTPUT=console
79	
80	# The resolution used on graphical terminal
81	# note that you can use only modes which your graphic card supports via VBE
82	# you can see them in real GRUB with the command 'videoinfo'
83	GRUB_GFXMODE=auto
84	
85	# Uncomment to allow the kernel use the same resolution used by grub
86	GRUB_GFXPAYLOAD_LINUX=keep
87	
88	# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
89	# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
90	#GRUB_DISABLE_LINUX_UUID=true
91	
92	# Uncomment to disable generation of recovery mode menu entries
93	GRUB_DISABLE_RECOVERY=true
94	
95	# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
96	# modes only.  Entries specified as foreground/background.
97	GRUB_COLOR_NORMAL="light-gray/black"
98	GRUB_COLOR_HIGHLIGHT="green/black"
99	
100	# Uncomment one of them for the gfx desired, a image background or a gfxtheme
101	#GRUB_BACKGROUND="/usr/share/grub/background.png"
102	GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"
103	
104	# Uncomment to get a beep at GRUB start
105	GRUB_INIT_TUNE="480 440 1"
106	
107	# Uncomment to make GRUB remember the last selection. This requires
108	# setting 'GRUB_DEFAULT=saved' above.
109	GRUB_SAVEDEFAULT=true
110	
111	# Uncomment to disable submenus in boot menu
112	#GRUB_DISABLE_SUBMENU=y
113	
114	# Uncomment this option to enable os-prober execution in the grub-mkconfig command
115	GRUB_DISABLE_OS_PROBER=false
116	
117	# Uncomment to ensure that the root filesystem is mounted read-only so that
118	# systemd-fsck can run the check automatically. We use 'fsck' by default, which
119	# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
120	# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
121	# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
122	#GRUB_ROOT_FS_RO=true

Welche Zeilen oder welche anderen Dateien muß ich wie ändern, dass manjaro sofort gestartet wird (manjaro vollkommen neu aufzusetzen und vorher die Windows-SSD vom SATA-port abzuziehen, ist sicher keine annehmbare Lösung)?

Hi,
ich habe Deine Grub einmal aufgeräumt.
Tendenziell sollte es so funktionieren…eigentlich hast Du alles richtig gemacht.

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""
GRUB_EARLY_INITRD_LINUX_STOCK=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'menu' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=hidden

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false


# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true

Generiere nach Deinen Änderungen dann einmal Grub neu

sudo grub-mkconfig -o /boot/grub/grub.cfg   

Grub_default=saved statt 0 wird die letzte boot merken. Natürlich solltest du einmal mit esc unterbrechen und manuell auswählen.

Danke Alex fürs Aufräumen, aber beim Booten wird immer noch 10 Sekunden lang gefragt, ob ich Manjaro oder erweitert oder Windows oder Memory Tester auswählen will. Aber genau das möchte ich nicht mehr sehen.

das hilft auch nicht, um das Auswahlmenu zu beseitigen. Aber das gesamte Booten dauert bei mir 40 Sekunden, da machen die 10 Sekunden nicht viel aus.
Ich lasse diesen Post mal ungelöst stehen, vielleicht gibt es noch andere Hinweise.

Bei grub schreibe ich Modifizierungen immer nach: /etc/default/grub.d/overwrite.cfg, da Manjaro diese Drop-Ins unterstützt:

Außerdem weiß man dann immer was die Stanadardwerte sind und muss sich nicht um pacsave/new großartig beschäftigen.

sudo mkdir -pv  /etc/default/grub.d/
echo 'GRUB_TIMEOUT=0' | sudo tee -a /etc/default/grub.d/overwrite.cfg
echo 'GRUB_TIMEOUT_STYLE=hidden' | sudo tee -a /etc/default/grub.d/overwrite.cfg
echo 'GRUB_DISABLE_OS_PROBER=true' | sudo tee -a /etc/default/grub.d/overwrite.cfg
sudo grub-mkconfig -o /boot/grub/grub.cfg

:exclamation: GRUB_TIMEOUT=0 → Standard → 10 Sekunden, 0 ist nicht 0 hier.

Danke an @AlexBoldt für die Korrektur.

Mit den Variablen wird der Windows-Eintrag entfernt, Grub versteckt und versteckte Anzeige dauert nur 0 Sekunde.

Dann werden da wohl Festplatten involviert sein. Das kann man kaum optimieren, da Festplatten immer langsamer sind. Hänge diese einfach nicht während dem Boot-Prozess (/etc/fstab) ein, erst nach dem Login mit udisksctl.

Hallo Elmo,
Du bist der Größte !! Dein Vorschlag hat schon wieder geholfen. Vielen Dank.
Das mit den Festplatten stimmt auch, ich habe in der Tat 2 6TB-Platten immer eingehängt, das ist bequemer.

oh, ok…
Dann ist die Grub-Dokumentation aber irreführend.
6.1 Simple configuration handling

‘GRUB_TIMEOUT’
    Boot the default entry this many seconds after the menu is displayed, unless a key is pressed. The default is ‘5’. Set to ‘0’ to boot immediately without displaying the menu, or to ‘-1’ to wait indefinitely.
    If ‘GRUB_TIMEOUT_STYLE’ is set to ‘countdown’ or ‘hidden’, the timeout is instead counted before the menu is displayed.

Und in meiner VM mit MXLinux führt 0 auch durchaus dazu, das das GRUB-Menü unterdrückt wird…

1 Like

Da hast du vollkommen recht @AlexBoldt . Gerade nochmal geprüft:

$ grep -R "GRUB_TIMEOUT" /etc/grub.d/
/etc/grub.d/00_header:if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi

Danke für die Korrektur. Ich frag mich nur wo ich das her habe, wahrscheinlich irgendwas vermischt. Hab es aus meinem Gedächtnis geschrieben.

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.