Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi1: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
lpi1:bootloader [2015/11/17 08:40]
ingo_wichmann [Grub installieren]
lpi1:bootloader [2017/06/01 09:36]
127.0.0.1 Externe Bearbeitung
Zeile 1: Zeile 1:
 ====== Bootloader ====== ====== Bootloader ======
 ===== Bootloader löschen ===== ===== Bootloader löschen =====
-  dd if=/​dev/​zero of=/dev/sda bs=446 count=1+  dd if=/​dev/​zero of=/dev/sda bs=$((512-64)) ​count=1
  
 ===== grub2 ===== ===== grub2 =====
Zeile 43: Zeile 43:
   mount -o remount,rw /   mount -o remount,rw /
   passwd   passwd
 +
 +  touch /​.autorelabel
 +
 +((nur bei Systemen mit aktiviertem SELinux notwendig))
 +
   mount -o remount,ro /   mount -o remount,ro /
   exec /sbin/init   exec /sbin/init
  
 === Grub absichern === === Grub absichern ===
 +== Passwort Hash erzeugen ==
 Debian 6.0, CentOS 7: Debian 6.0, CentOS 7:
   grub2-mkpasswd-pbkdf2   grub2-mkpasswd-pbkdf2
Zeile 53: Zeile 59:
   grub-mkpasswd-pbkdf2   grub-mkpasswd-pbkdf2
  
-''​/​etc/​grub.d/​45_password''​ : +== Passwort Hash eintragen == 
-<file>+<file txt /​etc/​grub.d/​45_password>​
 #!/bin/sh #!/bin/sh
 exec tail -n +3 $0 exec tail -n +3 $0
Zeile 66: Zeile 72:
   chmod +x /​etc/​grub.d/​45_password   chmod +x /​etc/​grub.d/​45_password
  
 +== grub Konfigurationsdatei neu erzeugen ==
 Debian (ab 6), Ubuntu (14.04): Debian (ab 6), Ubuntu (14.04):
   grub-mkconfig -o /​boot/​grub/​grub.cfg   grub-mkconfig -o /​boot/​grub/​grub.cfg
Zeile 73: Zeile 80:
  
 == testen == == testen ==
 +Debian (ab 6), Ubuntu (14.04):
   grep password /​boot/​grub/​grub.cfg   grep password /​boot/​grub/​grub.cfg
 +  reboot
 +CentOS (7):
 +  grep password /​boot/​grub2/​grub.cfg
   reboot   reboot
  
Zeile 84: Zeile 95:
 oder oder
   grub   grub
 +  device (hd0) /dev/sda
   root (hd0,0)   root (hd0,0)
   setup (hd0)   setup (hd0)
Zeile 94: Zeile 106:
 oder oder
   grub   grub
 +  device (hd0) /dev/sda
   root (hd0,0)   root (hd0,0)
   setup (hd0)   setup (hd0)
Zeile 128: Zeile 141:
 ===== Dokus & Links ===== ===== Dokus & Links =====
   * http://​wiki.ubuntuusers.de/​grub_2/​konfiguration   * http://​wiki.ubuntuusers.de/​grub_2/​konfiguration
 +
lpi1/bootloader.txt · Zuletzt geändert: 2024/04/17 12:37 (Externe Bearbeitung)