ZhoubaWiki:GrubShellBoot

From ZhoubaWiki
Jump to navigation Jump to search

Grub Shell Boot

Sometimes an installation of Grub bootloader fails on the halfway, probably caused by changing partitions order or so. In cases like this either Grub Shell or Grub Rescue shell is presented.

This section shows how to manually boot a system from the Grub Shell. The Grub shell offers an autocomplete feature, so utilize it to save your fingers.

1/ list disks and partitions

grub> ls

2/ identify your partition by listing partion contents like this:

grub> ls (hd0,gpt5)/

3/ Set root partition. No spaces around equals sign!

grub> set root=(hd0,gpt5)

4/ Set path to a linux image. Autocomplete your way out or use symlinks generated to system root in case your GNU/Linux distro prepares them for you. (if not, use /boot/vmlinuz-XXXX instead)

grub> linux /vmlinuz root=/dev/nvme0n1p5
  • use linuxefi command for UEFI native mode partitions
  • root param must not be forgotten!

5/ Set path to an initrd. Autocomplete your way out or use symlinks generated to system root in case your GNU/Linux distro prepares them for you. (if not, use /boot/initrd-XXXX instead)

grub> initrd /initrd.img
  • use initrdefi command for UEFI native mode partitions

6/ Boot!

grub> boot
  • Your system should be booting right now in case everything went OK.