Ask Your Question

restore grub2 fedora16 after window7 washed it away

asked 2012-06-22 00:20:02 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Please help me restoring my grub2 as i reinstall window7 it washed it away.

I have installed fedora 16 on my system

the disk description is as follows

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xf956ef86

   Device     Boot         Start         End      Blocks   Id  System

/dev/sda1      *         2048       206847      102400    7  HPFS/NTFS/exFAT

/dev/sda2          206848   104859647    52326400    7  HPFS/NTFS/exFAT

/dev/sda3       104859648   871995391   383567872    7  HPFS/NTFS/exFAT

/dev/sda4       871995392   976773167    52388888    5  Extended

/dev/sda5       871997440   873021439      512000   83  Linux

/dev/sda6       873023488   976773119    51874816   8e  Linux LVM
edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2012-06-22 04:35:21 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Boot into Fedora Live CD, open up a terminal and do this:

grub2-install /dev/sda

It should install it on sda for you automatically detecting Windows. If not, add them to the grub.conf manually.

Usage: grub2-install [OPTION] install_device
Install GRUB on your drive.

  -h, --help              print this message and exit
  -v, --version           print the version information and exit
  --modules=MODULES       pre-load specified modules MODULES
  --boot-directory=DIR    install GRUB images under the directory DIR/grub2
                          instead of the /boot/grub2 directory
  --grub-setup=FILE       use FILE as grub-setup
  --grub-mkimage=FILE     use FILE as grub-mkimage
  --grub-mkrelpath=FILE   use FILE as grub-mkrelpath
  --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
  --grub-probe=FILE       use FILE as grub-probe
  --no-floppy             do not probe any floppy drive
  --allow-floppy          Make the drive also bootable as floppy 
                          (default for fdX devices). May break on some BIOSes.
  --recheck               probe a device map even if it already exists
  --force                 install even if problems are detected
  --disk-module=MODULE    disk module to use

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub2-install copies GRUB images into /boot/grub2, and uses grub-setup
to install grub into the boot sector.
edit flag offensive delete link more

answered 2014-01-12 02:59:27 -0500

Glenn gravatar image

Boot the install DVD and choose Troubleshooting > Rescue Installed System.

Step through the several prompts choosing the defaults (should be fine). The last prompt will allow you to "start shell". Choose this, then type the following commands:

chroot /mnt/sysimage
grub2-install /dev/sda

Exit and reboot. In most cases you will see your grub boot menu.

edit flag offensive delete link more

answered 2014-01-11 07:12:09 -0500

This worked for me (with LiveCD):

edit flag offensive delete link more

answered 2012-07-12 17:40:17 -0500

jsuhm gravatar image

There's a rescue entry on Fedora DVD you cannot found on Fedora Live CDs.

This functionnality is very useful and can assist you to chmod you system (even if the filesystem is crypted by LUKS like mine).

edit flag offensive delete link more

Question Tools


Asked: 2012-06-22 00:20:02 -0500

Seen: 8,595 times

Last updated: Jan 12 '14