跳转到内容


Fedora 26 reinstall grub2 use livecd

fedora grub

  • 您无法回复此主题
No replies to this topic

#1 冰力

    Administrator

  • 总版主
  • 1277 帖子数:

发表于 2017/04/25 13:37:18

Login fedora 25 livecd.

Request root permission:
sudo su

Determine your normal system partition. The following commands may be helpful. The fdisk switch is a lowercase "L".
fdisk -l
blkid
df -Th

Mount your normal system partition. X is the drive letter. Y is the partition number:
Substitute the correct partition: sda1, sdb5, etc. sudo mount /dev/sdXY /mnt

mount /dev/sda1 /mnt

Only if you have a separate boot partition (where sdXY is the /boot partition designation):
mount /dev/sda3 /mnt/boot

Mount the critical virtual filesystems. Run the following as a single command:

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

Chroot into your normal system device:
chroot /mnt

Reinstall GRUB 2 (substitute the correct device with sda, sdb, etc. Do not specify a partition number):
grub-install /dev/sdX
If the system partitions are on a software RAID install GRUB 2 on all disks in the RAID. Example (software RAID using /dev/sda and /dev/sdb):
grub2-install /dev/sda

Exit chroot: CTRL-D on keyboard, and reboot.
reboot