This is an old revision of the document!


Grub2

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

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

http://www.system-rescue-cd.org/Download/

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

or

grub2-install
update-grub

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

Check also on:

http://www.system-rescue-cd.org/disk-partitioning/Repairing-a-damaged-Grub/

linux/grub2.1585555404.txt.gz · Last modified: 2020/03/30 10:03 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