10

I almost know nothing about coding in Ubuntu. I am currently dual booting ubuntu 16.04 LTS and Windows 10. Everything was fine . But today an error occured saying

"can't find filesystem"

and then grub rescue begins . After searching for some time I have found out solution that tells to do these:

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

I know that ls is listing harddrive partitions(let me know if I am wrong) .Then(in set prefix) I need to select a partition . There came a error when I selected msdos5. After some try I selected msdos6. Then it ran . But the problem is that from another solution to this problem I wrote this code:

set boot=(hd0,msdos6)

I think I messed up . Probably , it involves which partition of the harddisks is going to boot .Now, my laptop is running after writing this code and every time I turn on the laptop the boot stuck at the beginning showing the same error & I need to write the code every time I need to run the laptop . How can I solve this issue? I probably also need to know the partition which is booting (msdos*) & I don't know how to find that.

1
  • So are you typing msdos5 or msdos6, or sda5 or sda6 once booted? You may need fsck on your ext4 partition, but lets see details first. May be best to see details, you can run from Ubuntu live installer or any working install: Post the link to the Create BootInfo summary report. Is part of Boot-Repair: help.ubuntu.com/community/Boot-Info
    – oldfred
    Jan 3, 2017 at 16:29

2 Answers 2

19

I got a solution for this type of problem if grub rescue> prompt occurs in booting time and you have to write a code like:

grub rescue> ls
grub rescue> set boot=(hd0,msdos*)
grub rescue> set prefix=(hd0,msdos*)/boot/grub
grub rescue> insmod normal
grub rescue> normal

After boot Linux/Ubuntu based OS will load then open a terminal and write the command:

useranf@ ~ $ sudo update-grub

then type this command:

useranf@ ~ $ sudo grub-install /dev/sda

after these operation now finally reboot your system.

5
  • 1
    Worked on Manjaro as well :)
    – Brij
    Sep 3, 2017 at 17:58
  • Worked on Debian Jessie
    – ako
    Mar 14, 2018 at 19:32
  • Worked on Linux Mint Sylvia
    – Valid
    Jul 14, 2018 at 2:00
  • Worked for ubuntu 19.10 efi, ... had to use (lvm/vgaubuntu-root) ... > normal took me straight to my normal grub screen. Thanks!! Feb 2, 2020 at 14:15
  • Ends with a "Stage1 not read correctly" error, every single time. After almost an entire day spent on this (three days in all trying to get this disk, which works find in one machine, simply migrated to another so I can copy it), I have concluded there is no fix anywhere on the internet, and that includes rescatux and Super Grub 2 disk, which I have read can both fix just about anything, and can't fix this error. I also tried boot-repair, or rather, I tried to figure out how to install boot-repair, but that doesn't seem to be possible anymore either.
    – John Smith
    Nov 5, 2023 at 3:47
1

In the above answer by deepak bundela, i think the following line needs to be corrected:

grub rescue> set boot=(hd0,msdos*)

to:

grub rescue> set root=(hd0,msdos*)

(am repeating the * as bundela put it so as not to distract from the real issue)

i was unable to find a grub environment variable called boot, and as far as i recall it has always been set root=()

i am somewhat confused by all the commenters who said that it worked on their distros. did they do a set boot or a set root?

at the grub rescue> prompt, if one just types set it lists all the env variables that have been set. in all my grub rescue adventures, i've never seen the boot env variable being listed.

1
  • Very curious that everyone missed that. Good catch, Ram.
    – Frobozz
    Dec 3, 2022 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .