GRUB2 normale Partitionen: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „=Root-Partition mounten= *mount /dev/sdXY /mnt ;(OPTIONAL) ==Nutzt man auf dem System eine separate Boot-Partition, so muss diese ebenfalls vorab eingehängt…“)
 
 
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
=Booten mit einem Image=
 +
;Grafisch oder Konsole
 
=Root-Partition mounten=
 
=Root-Partition mounten=
 
*mount /dev/sdXY /mnt  
 
*mount /dev/sdXY /mnt  
Zeile 9: Zeile 11:
 
*mount -o bind /dev /mnt/dev  
 
*mount -o bind /dev /mnt/dev  
 
*mount -o bind /sys /mnt/sys  
 
*mount -o bind /sys /mnt/sys  
*mount -o proc /proc /mnt/proc  
+
*mount -o bind /proc /mnt/proc  
*cp /proc/mounts /mnt/etc/mtab
+
*chroot /mnt /bin/bash
*chroot /mnt /bin/bash  
+
 
 
=grub installieren=
 
=grub installieren=
 
*grub-install /dev/sdX  
 
*grub-install /dev/sdX  
 
;(evtl.: grub-install --recheck /dev/sdX)  
 
;(evtl.: grub-install --recheck /dev/sdX)  
*update-grub  
+
*update-grub
 +
=Und wieder raus=
 +
*exit
 +
 
 
=chroot-Umgebung verlassen und neustarten=
 
=chroot-Umgebung verlassen und neustarten=
 
*umount /mnt/dev  
 
*umount /mnt/dev  
 
*umount /mnt/sys  
 
*umount /mnt/sys  
 
*umount /mnt/proc  
 
*umount /mnt/proc  
 +
*umount /mnt
 
*reboot
 
*reboot

Aktuelle Version vom 28. Juni 2023, 12:32 Uhr

Booten mit einem Image

Grafisch oder Konsole

Root-Partition mounten

  • mount /dev/sdXY /mnt
(OPTIONAL)

Nutzt man auf dem System eine separate Boot-Partition, so muss diese ebenfalls vorab eingehängt werden

  • mount /dev/sdXY /mnt/boot

Nutzt man auf seinem Rechner das "(U)EFI"-Bootverfahren, so muss die relevante Bootpartition vorab eingehängt werden mit

  • mount /dev/sdXY /mnt/boot/efi

Vorbereitung und Wechsel in die chroot-Umgebung

  • mount -o bind /dev /mnt/dev
  • mount -o bind /sys /mnt/sys
  • mount -o bind /proc /mnt/proc
  • chroot /mnt /bin/bash

grub installieren

  • grub-install /dev/sdX
(evtl.
grub-install --recheck /dev/sdX)
  • update-grub

Und wieder raus

  • exit

chroot-Umgebung verlassen und neustarten

  • umount /mnt/dev
  • umount /mnt/sys
  • umount /mnt/proc
  • umount /mnt
  • reboot