Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:bootloader

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
Nächste Überarbeitung Beide Seiten, nächste Überarbeitung
admin_grundlagen:bootloader [2019/11/10 12:05]
ingo_wichmann
admin_grundlagen:bootloader [2023/10/11 14:32]
natureshadow2 Anpassung für RockyLinux
Zeile 54: Zeile 54:
 ==== Grub2 mit Passwort absichern ==== ==== Grub2 mit Passwort absichern ====
 === Root Passwort ändern === === Root Passwort ändern ===
-Grub Bootprompt: ''​init=/​bin/​bash''​ als Parameter zum Linux Kernel hinzufügen+Grub Bootprompt: ''​init=/​bin/​bash''​ als Parameter zum Linux Kernel hinzufügen, evtl. ''​ro'',​ ''​quiet''​ und ''​splash=silent''​ entfernen. (( siehe 
 +  man bootparam  
 +))
  
 Kernel mit ''​strg+x''​ booten Kernel mit ''​strg+x''​ booten
Zeile 61: Zeile 63:
   passwd   passwd
  
 +++++ bei Systemem mit SELinux |
   touch /​.autorelabel   touch /​.autorelabel
 +++++
  
-((nur bei Systemen mit aktiviertem SELinux notwendig)) 
- 
-  mount -o remount,ro / 
   exec /sbin/init   exec /sbin/init
  
 === Grub absichern === === Grub absichern ===
-== Passwort Hash erzeugen == +(( Weitere Absicherungsmöglichkeiten:​ 
-Debian 6, CentOS 7:+  http://​0pointer.net/​blog/​unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html 
 +)) 
 + 
 +== Passwort-Hash erzeugen == 
 +CentOS ​(ab 7), Rocky, openSuSE Leap (ab 15.1):
   grub2-mkpasswd-pbkdf2   grub2-mkpasswd-pbkdf2
  
Zeile 76: Zeile 81:
   grub-mkpasswd-pbkdf2   grub-mkpasswd-pbkdf2
  
-== Passwort Hash eintragen ​==+== Grub-Configdatei mit Passwort Hash anlegen ​==
 <file txt /​etc/​grub.d/​45_password>​ <file txt /​etc/​grub.d/​45_password>​
 #!/bin/sh #!/bin/sh
Zeile 89: Zeile 94:
   chmod +x /​etc/​grub.d/​45_password   chmod +x /​etc/​grub.d/​45_password
  
-== grub Konfigurationsdatei neu erzeugen == +== Auswahl ermöglichen,​ editieren absichern ​(Standard auf Rocky)==
-Debian (ab 6), Ubuntu (14.04): +
-  grub-mkconfig -o /​boot/​grub/​grub.cfg +
- +
-CentOS (7): +
-  grub2-mkconfig -o /​boot/​grub2/​grub.cfg +
-oder +
-  grub2-mkconfig -o "​$(readlink -e /​etc/​grub2.conf)"​ +
-oder für UEFI-Systeme:​ +
-  grub2-mkconfig -o "​$(readlink -e /​etc/​grub2-efi.cfg)"​ +
- +
-== Auswahl ermöglichen,​ editieren absichern ==+
 <file txt /​etc/​grub.d/​10_linux>​ <file txt /​etc/​grub.d/​10_linux>​
 ... ...
Zeile 106: Zeile 100:
 ... ...
 </​file>​ </​file>​
 +
 +== grub Konfigurationsdatei neu erzeugen ==
 +Für BIOS-Systeme:​
 +
 +Debian (ab 6), Ubuntu (ab 14.04):
 +  grub-mkconfig -o /​boot/​grub/​grub.cfg
 +
 +CentOS (ab 7), Rocky, openSuSE (ab Leap 15.1):
 +  grub2-mkconfig -o /​boot/​grub2/​grub.cfg
 +
 +Für UEFI-Systeme:​
 +
 +Debian, Ubuntu, openSuSE: wie bei BIOS-Systemen
 +
 +CentOS (8)
 +  grub2-mkconfig -o /​boot/​efi/​EFI/​centos/​grub.cfg
 +
 +Rocky
 +    grub2-mkconfig -o /​boot/​efi/​EFI/​rocky/​grub.cfg
  
 == testen == == testen ==
-Debian (ab 6), Ubuntu (14.04)+Debian (ab 6), Ubuntu (14.04)CentOS (ab 7): 
-  grep password /​boot/​grub/​grub.cfg +  grep -E '​superusers|password_pbkdf2' ​/boot/grub*/grub.cfg
-  reboot +
-CentOS (7): +
-  grep password ​/boot/grub2/grub.cfg+
   reboot   reboot
  
admin_grundlagen/bootloader.txt · Zuletzt geändert: 2024/04/17 12:37 von natureshadow2