GRUB error: unknown filesystem

30,480

The most expedient way would be, I think, to... copy the old drive onto the SSD. Virtualization also might be a way, converting the USB disk to a "raw" image and running it full screen (it works well with USB3).

Otherwise, you have to boot from grub. You can add a menu entry for that, if you can do it at all.

Polyshell's problem

To test the following, I installed a Windows 7 Home Premium (I hadn't any other license available, alas) as single operating system.

Then (from Windows 7) I shrank the partition to free enough space for Fedora 18.

At that point I booted from the Fedora 18 DVD (Desktop, Xfce), and installed to the hard disk. The installer found "plenty of space to install Fedora!", I used the automatic partitioning, and defaulted to dual boot.

Both systems did boot correctly.

At that point, I deleted the F18 partition (from Windows), and formatted the free space.

Upon reboot, I got:

GRUB loading.
Welcome to GRUB!

error: unknown filesystem.
Entering rescue mode...
grub rescue> _

Running

ls

found three Windows partitions (the first one was created by Windows 7 and is a 100Mb service partition of some kind. Don't know if boot should be msdos1 or msdos2; the one I created is now msdos3).

(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (fd0)

So, the Linux partition where the necessary GRUB2 code resides is lost. And Grub2 apparently can not do "blind boot" (i.e. chainload to the bootloader on an existing partition at sector level). So now we need the original GRUB2 files to be able to do anything; which means, we need another GRUB2 installation.

So from another computer, we download this tool, which is in fact a GRUB2 recovery installation: http://www.supergrubdisk.org/super-grub2-disk/ (it is a 12 Mb ISO) and put it onto a bootable USB, or burn onto a CD.

And we boot from it. The menu comes up, we go to "Detect Any Operating System"; it should see the Windows partition and be able to boot into it.

Unfortunately the full Windows OS would also lock the system disk and prevent its modification, so we need to boot into Windows and immediately press F8 to enter maintenance mode with disk unlocked.

A quicker way at this point, of course, would be to still have the original Windows DVD, or get a friend to burn a Windows Recovery CD, boot from it instead of the Grub2 recovery CD, and follow these steps (for Windows 8, there's Automatic Repair).

Once at the Windows 7 boot menu, the first menu item ("Boot Repair", I think - my installation wasn't English) automatically looked for whatever might prevent Windows from booting ("No data or documents will be lost", it said). I was then also offered the option to perform a System Restore, which I declined: the system is fine, it is the boot loader that has to be recovered, and that is not even in the System Restore.

After some minutes, the Boot Repair option failed miserably (hope that Windows 8 gets better).

So I booted again into graphics mode and googled for bootsect.exe (the first two links tried to make me download spyware - the good file was around 95 Kb), downloaded it to the disk, rebooted again with F8 into Recovery Tools, and after opening a Command Prompt I located the BOOTSECT.EXE binary I had downloaded. So I ran

BOOTSECT /nt60 SYS /mbr

and then rebooted (after removing the recovery CD).

The system entered the Windows 7 original GUI without problems (except a lengthy wait at the beginning with lots of disk activity, while CHKDSK was being silently run, I guess)

Booting from USB

This is not guaranteed to work, because it depends on how the USB device is "seen" at GRUB boot time. Being able to boot from USB from the BIOS prompt may not be enough.

At the very least, the grub loader will have to be modified, because when the USB disk was hd0, it "saw" itself as hd0. Now it still does, but hd0 is now another disk, so grub's looking for things in the wrong place.

The above commands might yet work, except that now it is not hd0 but hd1, 2... et cetera. Not guaranteed at all, though. But you might get lucky.

root (hd2,1)
chainloader +1
boot

Depending on what's on the SSD, you might need a much more complicated setup, swapping the disks at the BIOS level (hardware EFI support required) and maybe even hiding the SSD itself.

As a first attempt I'd try locating the image on the USB mount point and boot the image from there, hoping that USB is seen as hd2:

root (hd2,1)
find /                       <-- press "Tab"
kernel <path to kernel>
initrd <path to initrd>
boot 

You can find a small tutorial for the above here.

Share:
30,480

Related videos on Youtube

Ali
Author by

Ali

Updated on September 18, 2022

Comments

  • Ali
    Ali over 1 year

    I replaced my old laptop drive which was win7 and ubuntu dual boot with an SSD.

    Now I connected the old drive through a USB adapter and I want to boot from it.

    But this comes up:

    unknown filesystem
    grub rescue>
    

    As i need the programs from old drive I have to boot from it time to time and I don't want to install those software on the new drive. It takes so time to exchange the drives so I want to boot from USB.

    how can I fix this?

    • new123456
      new123456 over 12 years
      You could virtualize it when you need it so that you can save time on reboots and such. VirtualBox has has support for booting from physical hardware for quite a while, as has QEMU. See this SF question.
    • mpy
      mpy about 11 years
      @PolyShell: You want to get rid of Fedora(?), right? Shouldn't it suffice then to rewrite the MBR with Windows? There's a tutorial at mywindows8.org/fix-mbr-in-windows-8
    • Piper
      Piper about 11 years
      @mpy Yes that's the goal; however I'm unable to access my Windows boot, or even boot the system. I'm taken directly to the grub rescue prompt. I've tried booting from a USB but my BIOS says that overclocking failed, and I'm taken to the grub rescue prompt.
    • mpy
      mpy about 11 years
      @PolyShell: Do you have access to a Windows 7/8 Boot DVD?
    • Piper
      Piper about 11 years
      @mpy I don't...
    • mpy
      mpy about 11 years
      @PolyShell: I did some research and unfortunately didn't find a solution in that case. Perhaps somebody else will have an idea... or you can borrow such a Win DVD from some friend/collegue.
    • killermist
      killermist about 11 years
      This seems to be a symptom of a larger problem. I was going to rephrase the question/body to make them more clear, but the question and body are not clear on what the real problem is, and what the intended resolution is. @PolyShell without clarity of purpose, the question may not be salvageable. Bounty or not.
    • Prasad RD
      Prasad RD about 11 years
      @Ali It may work if you re-install grub boot loader howtoubuntu.org/…
    • Prasad RD
      Prasad RD about 11 years
  • James Jenkins
    James Jenkins about 11 years
    A full link and some detail would be helpful for this answer.
  • mx518
    mx518 about 11 years
    all of the detail is described in the tutorial. thenewtech.tv/how-to/…
  • Piper
    Piper about 11 years
    I tried using chainloader +1, but it wasn't recognized: Unknown command 'chainloader'
  • LSerni
    LSerni about 11 years
    The case is a bit more difficult. Editing answer...
  • Piper
    Piper about 11 years
    So I downloaded the Super Grub2 Disk .iso and burned it to a DVD+RW. I tried to boot from it, but no luck. I'm still taken directly to the grub rescue> prompt. I tried searching through my Asus UEFI BIOS utility boot options, and I still only see the default HDD boot option. I don't think my DVD is being recognized, but I'm not sure...
  • Piper
    Piper about 11 years
    When I try to choose a boot device, only my HDD boot option is listed. There's not option for a boot from a DVD. However, I'm trying to make a bootable USB now, and there's an option for the USB.