Grub2 » Historie » Revision 1
Revision 1/2
| Weiter »
Jeremias Keihsler, 12.01.2017 14:38
Grub2 disaster recovery¶
Requirements¶
To install such a system you will need the following:
- Download
Fedora 18 Live DVD
or a newer version of Fedora supporting Grub2 and burn it on an empty CDROM (the .iso can be found here: http://fedoraproject.org/get-fedora) - a bootable CDROM-drive
alternatively you might use a bootable USB-drive created with the Fedora LiveUSB Creator
Preliminary Note¶
It is assumed that- the first harddrive (
sda
) is the system-drive. - the root filesystem to be recovered is in a logical group/volume called
/dev/vp_p2600f18/lv_f18_root
- the boot filesystem to be recovered is in a partition called
/dev/sda8
These settings might differ for you, so you have to replace them where appropriate.
Some very important information is take from https://fermilinux.fnal.gov/documentation/tips/mount-bind-chroot
Many times when you are fixing a machine, you need to chroot into it. Many of those times the programs you run (such as grub-install) will need the /proc, /dev, and /sys directories to be alive and well. This is when you need to use bind.
3 Start Fedora 18 Live DVD¶
list all partitions
fdisk -l
list all logical volumes
lvdisplay
create a base directory for the system to be rescued
mkdir /mnt/f18
mount the 'root'-filesystem
mount /dev/vp_p2600f18/lv_f18_root /mnt/f18
mount the 'boot'-filesystem
mount /dev/sda8 /mnt/f18/boot
bind the /proc, /dev, /sys into the to be rescued 'root'-filesystem
mount -o bind /proc /mnt/f18/proc/
mount -o bind /dev /mnt/f18/dev/
mount -o bind /sys /mnt/f18/sys
chroot and install Grub2
chroot /mnt/f18
grub2-install /dev/sda
exit
restart the machine and test the result
Von Jeremias Keihsler vor fast 8 Jahren aktualisiert · 1 Revisionen