Search

Grub Error 17

 Note: Most of the steps mentioned here are for grub Legacy not for grub2. There are multiple reasons for Grub error 17 and workaround given might or might not work for you. 

If you are encountering Grub error 17 while booting into a dual boot system, there are various causes for it.
If you have single hard disk which you have partitioned to install dual operating systems the simplest solution is to reinstall grub from a live CD.
1.Boot the system from a live cd
2. open a terminal
3. type the following commands
      sudo grub
      find /boot/grub/stage1
           you will see output similar to (hd?,?), the ? replaced by some numbers
     root (hd?,?)  same numbers are you got in the above output
     setup (hd0)
     quit
4. Reboot

You should have your grub up and working if not then you will have to explore the other possible reasons for the failure
The other possibility for the error is if you have multiple hard disks, with each hard disk for one OS, there are chances that grub is looking at the wrong hard disk while booting.

 Check your bios and see the order in which the hard disks are listed and make sure that the one that has Linux installed is the first one.

If that does not work, you will have to boot the system using a live CD.
 Mount the partition that has linux on it .
 Look at the contents of /boot/grub/device.map in that partition and compare the contents with the output of the command "sudo fdisk -l"
The entries in the device map basically map you hard disks between the bios and the  grub.
If the output of fdisk -l shows that linux is installed in /dev/sd?, where ? could be any alphabet.
The order in which the disks are listed in the device.map is the order in which the bios sees it with the number starting from 0 .
Where are the /dev/sd? is the way grub or linux sees it where the ? will start from letter "a".
Check entries are the same else edit them to the proper numbers. (you can use the size to figure out which /dev/sd? should be which hd? )
To edit the device.map file you will need root privileges, you can follow the following steps
1. sudo -i
2. mount /dev/sd? /mnt (replace ? with your drive letter)
3. chroot /mnt
4. cd /boot/grub
5. Edit the device.map to its correct values
6. run the command
        grub -- device.map=device.map
7. Run the command
       root (hd?,0)  ( where hd? is the hard disk on which linux is installed. you can                    
         also  try getting this info using the find command as explained above )
8. setup(hd?)
9. open the file menu.lst and if there are references to the wrong (hd?) as in the device.map then change them too
10. reboot

Hopefully you should see the grub menu back .
  

Follow by Email