Skip to content

Instantly share code, notes, and snippets.

/a.rb Secret

Created January 24, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/969d628874b832243f8abac2dc68de20 to your computer and use it in GitHub Desktop.
Save anonymous/969d628874b832243f8abac2dc68de20 to your computer and use it in GitHub Desktop.
To fix grub rescue go with following steps:
First thing is we have to start our OS only then after we can fix grub.
#to start OS-->
error: unknown filesystem.
Entering rescue mode...
grub rescue>
When u see such error first we have to check for “Filesystem” is ext2'
grub rescue> ls # type 'ls' and hit enter to see drive partition.
(hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos4) ... # you will see such things
this are our drives now we have to check which one is ext2.
grub rescue>ls (hd0,msdos6)
error: disk 'hd,msdos6' not found.
go for another drives until you get “Filesystem is ext2”.
grub rescue>ls (hd0,msdos5)
error: disk 'hd,msdos5' not found.
grub rescue>ls hd0,msdos2)
(hd0,msdos2): Filesystem is ext2 # this is what we want
now set the path
grub rescue>set boot=(hd0,msdos2)
grub rescue>set prefix=(hd0,msdos6)/boot/grub
grub rescue>insmod normal
grub rescue>normal
Now just fix grub by following command on any ubuntu
sudo grub-install /dev/sda
sudo apt-get update
# to update grub
sudo apt-get upgrade
make sure you must update grub after login into OS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment