Grub rescue

I had triple-boot on my system. Windows 8, windows 7 and Ubuntu and all the boot management done by Ubuntu Grub of course. Almost having all the 3 OS for about 6 months, I started facing difficulties like slowing down, shortage of space, etc and so I decided to delete windows 8.

The process to do that is simple.
on start menu, select run and type msconfig. Once that opens select the Boot tab and in it select the Windows 8 option and click on delete and then click on OK.
I then, deleted the partition holding Windows 8 and merged it with one on the other drives. Now, this leads to en error. The Linux grub manages only the windows 8 and the windows 8 boot loader manages between windows 7 and windows 8. So, when the windows 8 partition was deleted , it corrupted the grub as well.
This lead to the error :

unknown filesystem:
grub rescue> _

This error can be fixed easily.  The path the grub has to be set. So, type the following commands :

set boot=(hd0,msdos6)
set prefix=(hd0,msdos6)/boot/grub
insmod normal
normal

Once all the 4 commands are typed , automatically the grub loads allowing you to chose the OS to boot into.

once the boot options is got.. Boot into Ubuntu and then reinstall the grub using the following commands

sudo update-grub
sudo grub-install /dev/sda

Some times the boot file might not be there on (hd0,msdos6) , in this situation , you can type ls and find out all the partitions
Example :
grub rescue> ls
(hd0), (hd0,msdos5),(hd0,msdos6),(hd0,msdos7),(hd0,msdos8)

So use ls to find the boot folder.
Eg:
grub rescue> ls  (hd0,msdos5)
no file system found
grub rescue> ls (hd0,msdos6)
ext4: file system

So, when a message that come like ext4 or any other file system exist, the boot file is present in that partition. So in the above 4 statements, substitute (hd0,msdos6) with the partition you have found containing the file system.

akshay pai

I am a data science engineer and I love working on machine learning problems. I have experience in computer vision, OCR and NLP. I love writing and sharing my knowledge with others. This is why I created Source Dexter. Here I write about Python, Machine Learning, and Raspberry Pi the most. I also write about technology in general, books and topics related to science. I am also a freelance writer with over 3 years of writing high-quality, SEO optimized content for the web. I have written for startups, websites, and universities all across the globe. Get in Touch! We can discuss more.

Leave a Reply

%d bloggers like this: