Bootloader reparieren

Support-Forum für deutschsprachige Benutzer

Moderator: karlchen

Forum rules
Topics in this forum are automatically closed 6 months after creation.
Meshuggah71
Level 1
Level 1
Posts: 9
Joined: Thu Mar 28, 2024 6:51 am

Bootloader reparieren

Post by Meshuggah71 »

Hallo ich hatte vorher Windows 11 installiert, habe jetzt Mint Linux installiert, würde aber gerne ab und zu zwischen Windows 11 und Linux wechseln.
Seit Linux installiert ist startet es sofort und ich bekomme kein Auswahl Menü mehr angezeigt.
Was muss ich tun um das zu korrigieren.
Hier ist die Konfiguration meinem Bootloaders : http://sprunge.us/BG3mTv

Danke für eure Hilfe, bin Linux Neuling, wenn ihr noch mehr Infos braucht bitte Bescheid geben.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1161
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by Dan-cer »

Willkommen in diesem Forum!

Öffne das Terminal und copy-paste folgenden Befehl hinein:

Code: Select all

sudo grub-install /dev/sda1
Danach diesen Befehl in den Terminal eingeben:

Code: Select all

sudo update-grub
Dann LM neu starten.
Falls Grub beim Booten noch nicht sichtbar ist, mußt Du die Datei /etc/default/grub editieren.
Tippe ins Terminal

Code: Select all

sudo xed /etc/default/grub
um das Text-Programm im root-modus zu starten. Nur so kannst du Änderungen auch speichern.
Suche in der geöffneten Datei "grub" die Zeile
GRUB_TIMEOUT=
Ich habe dort hinter dem "=" eine 3 (für 3sec) eingetragen. Standard ist 10. Es müßte eine 0 dort stehen, um zu bewirken, daß Grub nicht sichtbar ist und LM sofort gebootet wird.
How you get better results when searching for yourself.
Meshuggah71
Level 1
Level 1
Posts: 9
Joined: Thu Mar 28, 2024 6:51 am

Re: Bootloader reparieren

Post by Meshuggah71 »

Danke für deine schnelle Antwort, was ändere ich am besten in der Grub Datei, der Inhalt sieht bei mir so aus. Muss ich das hidden entfernen das er angezeigt wird ? Oder das Quiet Splash ?


If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=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 `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

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

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
User avatar
Dan-cer
Level 6
Level 6
Posts: 1161
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by Dan-cer »

Nein, weiter mußt Du nichts ändern. Es sei denn, Du möchtest nicht 10 sec warten. 3 reicht auch aus, um ggf. Windows zu starten oder ins UEFI zu kommen.
Jetzt zum Abschluß, wie schon beschrieben, im Terminal ein

Code: Select all

sudo update-grub
In der ersten Zeile der Datei "Grub" steht das auch, jedoch leider ohne "sudo", was hier jedoch erforderlich ist.
How you get better results when searching for yourself.
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Bootloader reparieren

Post by Pjotr »

Eine grafische Anwendung wie Xed sollte man nicht starten mit "sudo". Grund:
https://easylinuxtipsproject.blogspot.c ... t.html#ID1
(item 1)

Repariere zuerst mal den möglichen Schaden:

Code: Select all

sudo chown -Rc $USER:$USER $HOME
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1161
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by Dan-cer »

Thank you Pjotr for correcting the issue. I knew of it, however, in the past there were other commands in that case (gksudo i.e.), and I never experienced problems when just using sudo.
But I agree to be more careful, because it could cause problems in other situations. I admit that in most cases I use Nemo to go to the folder (here: etc/) and with rightclick then open the folder as administrator. The file "grub" is then opened in admin modus too.
How you get better results when searching for yourself.
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Bootloader reparieren

Post by Pjotr »

Dann kann ich auch dir raten, um mal möglichen Schaden zu reparieren mit diesem Befehl:

Code: Select all

sudo chown -Rc $USER:$USER $HOME
Damit sollten alle Rechten in deinem Benutzersordner wieder gut sein.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1161
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by Dan-cer »

Danke Pjotr, das habe ich sofort gemacht und am Output des Terminals auch gesehen, was alles tatsächlich geändert wurde.
Eine gute, wichtige Live-Belehrung.
Ich freue mich über Deinen großen, wenn nicht riesigen Erfahrungsschatz, und ebenfalls über Dein EasyLinux-Projekt, das ich schon mehrfach befragen konnte.
How you get better results when searching for yourself.
User avatar
borrtux
Level 3
Level 3
Posts: 193
Joined: Sat Aug 15, 2020 11:19 am
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by borrtux »

Pjotr wrote: Thu Mar 28, 2024 9:08 am Eine grafische Anwendung wie Xed sollte man nicht starten mit "sudo". Grund:
https://easylinuxtipsproject.blogspot.c ... t.html#ID1
(item 1)

Code: Select all

sudo -H xed /etc/default/grub
Ich mach es dann immer mit -H, dann werden die Home-Rechte nicht verwurstelt.
Es grüßt Euch
Borrtux
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Bootloader reparieren

Post by Pjotr »

sudo -H configuriert $HOME zum Benutzerordner von Root, was sicher ist.

Aber es configuriert $XAUTHORITY nicht zu einer neuen Datei, wodurch die Anwendung die du startest, nicht seine eigene Xauthorisation benutzt.

Deshalb sollte es nicht benutzt werden für grafische Anwendungen: es gibt ein Gefahr dass ein .Xauthority-datei in deinem Benutzerordner das Eigentum von Root ist. Was es unmöglich machen kann um dich an zu melden (ewiger Login-kreislauf).
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Meshuggah71
Level 1
Level 1
Posts: 9
Joined: Thu Mar 28, 2024 6:51 am

Re: Bootloader reparieren

Post by Meshuggah71 »

Hi zusammen, danke für eure Antworten.
das hat nur leider alles nicht funktioniert.

sudo grub-install /dev/sda1

x86_64-efi wird für Ihre Plattform installiert.
Installation beendet. Keine Fehler aufgetreten

sudo update-grub

sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-101-generic
Found initrd image: /boot/initrd.img-5.15.0-101-generic
Found linux image: /boot/vmlinuz-5.15.0-97-generic
Found initrd image: /boot/initrd.img-5.15.0-97-generic
Found linux image: /boot/vmlinuz-5.15.0-76-generic
Found initrd image: /boot/initrd.img-5.15.0-76-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

Wenn ich den Computer starte lande ich direkt im Linux Mint Login Screen, keine Abfrage was gebooted werden soll.
User avatar
borrtux
Level 3
Level 3
Posts: 193
Joined: Sat Aug 15, 2020 11:19 am
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by borrtux »

Pjotr wrote: Thu Mar 28, 2024 2:58 pm sudo -H configuriert $HOME zum Benutzerordner von Root, was sicher ist.

Aber es configuriert $XAUTHORITY nicht zu einer neuen Datei, wodurch die Anwendung die du startest, nicht seine eigene Xauthorisation benutzt.

Deshalb sollte es nicht benutzt werden für grafische Anwendungen: es gibt ein Gefahr dass ein .Xauthority-datei in deinem Benutzerordner das Eigentum von Root ist. Was es unmöglich machen kann um dich an zu melden (ewiger Login-kreislauf).
Danke für die Info. Hatte allerdings bisher keine Probleme damit.
Es grüßt Euch
Borrtux
User avatar
borrtux
Level 3
Level 3
Posts: 193
Joined: Sat Aug 15, 2020 11:19 am
Location: Germany, Lower Saxony

Re: Bootloader reparieren

Post by borrtux »

Meshuggah71 wrote: Thu Mar 28, 2024 3:02 pm Hi zusammen, danke für eure Antworten.
das hat nur leider alles nicht funktioniert.


Wenn ich den Computer starte lande ich direkt im Linux Mint Login Screen, keine Abfrage was gebooted werden soll.
Ich glaube Windows.Bootmanager muß im Bios deaktiviert werden und Ubuntu (Mint) muss an die erste Stelle gesezt werden.
Aber warte mal ab, was Pjotr dazu sagt (schreibt).
Es grüßt Euch
Borrtux
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Bootloader reparieren

Post by Pjotr »

Was sagt:

Code: Select all

cat /etc/default/grub
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Meshuggah71
Level 1
Level 1
Posts: 9
Joined: Thu Mar 28, 2024 6:51 am

Re: Bootloader reparieren

Post by Meshuggah71 »

Sorry, Ostern....
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=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 `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

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

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Bootloader reparieren

Post by Pjotr »

Ältere das mal ein Bisschen, auf zwei Stellen:

Code: Select all

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
z.B. auf dieser Weise:

Code: Select all

sudo sed -i 's/hidden/menu/' /etc/default/grub

Code: Select all

sudo sed -i 's/10/5/' /etc/default/grub
Reste so lassen wie die ist. Dann:

Code: Select all

sudo update-grub
Neustart. Gibt's ein Windows im Menü?
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Meshuggah71
Level 1
Level 1
Posts: 9
Joined: Thu Mar 28, 2024 6:51 am

Re: Bootloader reparieren

Post by Meshuggah71 »

Das hat leider auch wieder nichts gebracht ...
at /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
Neustart. Gibt's ein Windows im Menü?
Es gibt nicht mal ein Menü.
Alles was ich sehe ist beim Start --> schwarzer Bildschirm --> Fujitsu Logo ---> Linux Mint Logo ----> Linux Mint Login Screen
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Bootloader reparieren

Post by Pjotr »

Merkwürdige Sache.... Na, dann mache das Grub-menü mal so sichtbar (Englische Anleitung):
https://easylinuxtipsproject.blogspot.c ... tml#ID10.1
(Punkt 10.1)
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Meshuggah71
Level 1
Level 1
Posts: 9
Joined: Thu Mar 28, 2024 6:51 am

Re: Bootloader reparieren

Post by Meshuggah71 »

Funktioniert leider auch nicht, aber egal dann muss ich eben im BIOS die Windows Partition an erste Stelle setzen wenn ich Windows starten will und umgekehrt wenn ich Linux starten will. Umständlich aber funktioniert.
User avatar
db91595
Level 4
Level 4
Posts: 452
Joined: Mon Jun 28, 2021 5:48 am
Location: Germany/Franken

Re: Bootloader reparieren

Post by db91595 »

Code: Select all

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menue
GRUB_TIMEOUT=4
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
Testen, ob es dann funktioniert. (Es heißt "menue" , nicht "menu")
LG
Dietmar

Ich versuche "Hilfe" zur "Selbsthilfe" zu geben. Wenn es gelingt - freue ich mich. :-)
Post Reply

Return to “Deutsch - German”