Ask Your Question
1

grub rescue

asked 2013-12-13 13:56:48 -0500

maziar gravatar image

i have dual boot windows7 and fedora19.i edited /etc/fstab and at next reboot my system goes to grub rescue(no help). what could i do?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-12-14 08:23:35 -0500

Marc lml gravatar image

You can re-edit /etc/fstab by booting the live DVD and mount your drive. Here is an example on how to do this.

Boot from the live DVD and open a terminal as root. First use fdisk -l to identify your partitions.

This example is from a system that uses default partitioning of Fedora 19.

[root@localhost ~]# fdisk -l

Disk /dev/mapper/live-rw: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/live-osimg-min: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0003948c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    41943039    20458496   8e  Linux LVM

Disk /dev/mapper/fedora-swap: 2164 MB, 2164260864 bytes, 4227072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-root: 18.8 GB, 18782093312 bytes, 36683776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Mount the root partition.

mkdir /mnt/root
mount /dev/mapper/fedora-root /mnt/root

Edit /etc/fstab with vi.

vi /mnt/root/etc/fstab

Reboot and you should be good to go.

/sbin/shutdown -r now

If you need to restore Grub then please see my answer for question 34772 (this is a link) on how to restore Grub with a default Fedora 19 installation.

edit flag offensive delete link more
2

answered 2013-12-13 14:47:54 -0500

nonamedotc gravatar image

updated 2013-12-13 17:02:28 -0500

You could reinstall grub by using either a Fedora 19 DVD or a netinstall image.

When the CD/DVD boots, choose Troubleshooting ---> Rescue a Fedora Installation from the menus presented.

Once the system boots, the installation image should automatically mount your installation under /mnt/sysimage. Once that happens, all you have to do (hopefully) is

chroot /mnt/sysimage
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

This will install GRUB to master boot record. Also, ideally, when you run the first command, in the output, you should also see Windows 7 presented.

Hope this helps.

edit flag offensive delete link more

Comments

You should probably inspect your /etc/fstab while you are in the chroot; changing /etc/fstab does not affect your GRUB configuration. Compare to blkid output to check UUIDs.

randomuser gravatar imagerandomuser ( 2013-12-13 17:08:03 -0500 )edit

Question Tools

Stats

Asked: 2013-12-13 13:56:48 -0500

Seen: 2,872 times

Last updated: Dec 14 '13