Dies ist eine alte Version des Dokuments!
dd if=/dev/zero of=/dev/sda bs=$((512-64)) count=1
yum install grub2
apt-get install grub-pc update-grub2 grub-install /dev/sda
update-bootloader grub2-install /dev/sda
Z.B. Kernel Argument nomodeset
setzen:
/etc/default/grub
:
Zeile GRUB_CMDLINE_LINUX_DEFAULT
anpassen
/boot/grub2/grub.cfg
neu erstellen:
grub2-mkconfig --output=/boot/grub2/grub.cfg
/etc/default/grub
:
Zeile GRUB_CMDLINE_LINUX_DEFAULT
anpassen
/boot/grub/grub.cfg
neu erstellen:
grub-mkconfig --output=/boot/grub/grub.cfg
Grub Bootprompt: init=/bin/bash
als Parameter zum Linux Kernel hinzufügen
Kernel mit strg+x
booten
mount -o remount,rw / passwd
touch /.autorelabel
mount -o remount,ro / exec /sbin/init
Debian 6, CentOS 7:
grub2-mkpasswd-pbkdf2
Debian (ab 7), Ubuntu (ab 14.04):
grub-mkpasswd-pbkdf2
#!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. set superusers="root" password_pbkdf2 root grub.pbkdf2.sha512.10000.FF73A777C6793E117430446F4D12F00D25DA53515B5048B1DAAA0688743550226CD05AD661EBDCA2AA1997AEBDC0C35C74CA48C9309FBED1C201C5875E3AD2E8.292A1642CB109860054562756A5AE950975B586A8DFDE535F566D1ADDCC6747349406E84862FFD9258F64268A36E63EF25A41A3CC0CD6291E63D98CEDDF00FE6
chmod +x /etc/grub.d/45_password
Debian (ab 6), Ubuntu (14.04):
grub-mkconfig -o /boot/grub/grub.cfg
CentOS (7):
grub2-mkconfig -o /boot/grub2/grub.cfg
Achtung:
Regression. Gibt es eine Möglichkeit, in Grub2 ein Optionspasswort zu
setzen, welches nur beim Überschreiben von Kernel-Optionen benötigt wird
Dieses Feature ist beim grub2 entfernt worden.
Debian (ab 6), Ubuntu (14.04):
grep password /boot/grub/grub.cfg reboot
CentOS (7):
grep password /boot/grub2/grub.cfg reboot
grub-install /dev/sda
oder
grub device (hd0) /dev/sda root (hd0,0) setup (hd0) quit
update-grub
grub-install /dev/sda
oder
grub device (hd0) /dev/sda root (hd0,0) setup (hd0) quit
System rebooten, und einmalig den 3. Eintrag ( grub fängt bei 0 an zu zählen … ) aus /boot/grub/menu.lst
verwenden:
SuSE:
grubonce 2
Debian:
grub-reboot 2
Grub Bootprompt: init=/bin/bash
hinzufügen
Kernel mit b
booten
mount -o remount,rw / passwd mount -o remount,ro / exec /sbin/init
/sbin/grub-md5-crypt
/boot/grub/menu.lst
:
password --md5 $1$ZkniA/$2EBU5eSONAj.i2KIhhtWA0