How to boot from USB with grub2:

grub> ls
(hd0) (hd0,msdos5) (hd1) (hd1,msdos0)

This will show you the available devices

grub> linux (hd1,msdos1)/install/vmlinuz root=/dev/sdb1
grub> initrd (hd1,msdos1)/install/initrd.gz
grub> boot

Install - Repair

Boot your system with a live-linux such as systemrescuecd:

Prepare install on the running system:

mkdir /mnt/root
mount /dev/sda2 /mnt/root/                           #sda2 contains the root-filesystem. You can mount as well a lvm-based partition!
mount -o bind /proc /mnt/root/proc/
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys
chroot /mnt/root /bin/bash
export PATH=$PATH:/bin
export PATH=$PATH:/usr
export PATH=$PATH:/usr/sbin

Note:“/mnt/root/” is the change root directory, where the root-filesystem has to be mounted!

To install run

grub-install /dev/sda



inside chroot, where “/dev/sda” is the boot-disc.

Check also on:

linux/grub2.txt · Last modified: 2020/03/31 16:37 by tmade
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki