Grub rescue - error: unknown filesystem

Опубликовано: 15 Июнь 2019
на канале: Roel Van de Paar
158
0

Grub rescue - error: unknown filesystem


The Question: I have a multiboot system set up. The system has three drives. Multiboot is
configured with Windows XP, Windows 7, and Ubuntu - all on the first drive. I
had a lot of unpartitioned space left on the drive and was reserving it for
adding other OSes and for storing files there in the future.
One day I went ahead and downloaded Partition Wizard and created a logical NTFS
partition from within Windows 7, still some unpartitioned space left over.
Everything worked fine, until I rebooted the computer a few days later.
Now I'm getting:
error: unknown filesystem.
grub rescue>
First of all I was surprised not to find any kind of help command, by trying:
help, ?, man, --help, -h, bash, cmd, etc.
Now I'm stuck with non-bootable system. I have started researching the issue
and finding that people usually recommend to boot to a Live CD and fix the
issue from there. Is there a way to fix this issue from within grub rescue
without the need for Live CD?
UPDATE
By following the steps from https://askubuntu.com/questions/90471...
commands-typed-to-grub-rescue, I was able to boot to initramfs prompt. But not
anywhere further than that.
So far from reading the manual on https://help.ubuntu.com/community/
Grub2#Rescue_Mode_.28.27.27grub_rescue.3E.27.27.29_Booting, I was able to see
my drives and partitions using ls command. For the first hard drive I see the
following:
(hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)
I now know that (hd0,msdos6) contains Linux on it, since ls (hd0,msdos6)/ lists
directories. Others will give "error: unknown filesystem."
UPDATE 2
After the following commands I am now getting to the boot menu and can boot
into Windows 7 and Ubuntu, but upon reboot I have to repeat these steps.
ls
ls (hd0,msdos6)/
set root=(hd0,msdos6)
ls /
set prefix=(hd0,msdos6)/boot/grub
insmod /boot/grub/linux.mod
normal
UPDATE 3
Thanks Shashank Singh, with your instructions I have simplified my steps to the
following. I have learned from you that I can replace msdos6 with just a 6 and
that I can just do insmod normal instead of insmod /boot/grub/linux.mod. Now I
just need to figure out how to save this settings from within grub itself,
without booting into any OS.
set root=(hd0,6)
set prefix=(hd0,6)/boot/grub
insmod normal
normal
UPDATE 4
Well, it seems like it is a requirement to boot into Linux. After booting into
Ubuntu I have performed the following steps described in the https://
... (Please watch the video for the full question)

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 5 people ==
Use:
1. set prefix=(hdX,Y)/boot/grub. Use the values determined earlier.
Example: If the Ubuntu system is on sda5, enter:
set prefix=(hd0,5)/boot/grub
2. set root=(hdX,Y). Example: set root=(hd0,5)
3. insmod normal. Attempt to load the normal module.
4. normal
We basically need GRUB to know where the /boot/grub folder is. If this is not
working, I guess doing a GRUB install from a boot CD is a good option.

== This solution helped 3 people ==
Funny, I also had the same problem an hour ago!
Anyway, this is what I did.
1. Load ubuntu:
set root=(hd0,6)
set prefix=(hd0,6)/boot/grub
insmod normal
normal
since your ubuntu is installed in 6 right?
2. run terminal:
sudo -i to access root
grub-install --root-directory=/mnt/ /dev/sda
sudo update-grub
sudo grub-install /dev/sda

With thanks & praise to God! With thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free... | Images: https://stocksnap.io/license & others | With thanks to user user53817 (https://askubuntu.com/users/53817), user Shashank Singh (https://askubuntu.com/users/17883), user Peter Mortensen (https://askubuntu.com/users/10883), user Nil (https://askubuntu.com/users/114660), user Francis (https://askubuntu.com/users/53837), user Braiam (https://askubuntu.com/users/169736), and the Stack Exchange Network (http://stackoverflow.com/questions/11.... Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.