Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Oct 22 '11 at 23:14

This question came from our site for professional and enthusiast programmers.

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. – new123456 Oct 23 '11 at 15:49
I currently have a similar problem. I had a dual boot of F18 and Windows8. I deleted the F18 partition, completely forgetting about the MBR, and now I'm stuck at the grub rescue prompt. I'm not sure how to proceed becuase whenever I insmod I get the error message unkown filesystem. – piperchester May 1 '13 at 15:06
@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 – mpy May 1 '13 at 15:15
@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. – piperchester May 1 '13 at 15:22
@PolyShell: Do you have access to a Windows 7/8 Boot DVD? – mpy May 1 '13 at 15:29

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> _



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: (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

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>

You can find a small tutorial for the above here.

share|improve this answer
I tried using chainloader +1, but it wasn't recognized: Unknown command 'chainloader' – piperchester May 8 '13 at 16:18
The case is a bit more difficult. Editing answer... – lserni May 8 '13 at 22:17
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... – piperchester May 9 '13 at 13:17
You're apparently not booting from the DVD, otherwise the grub rescue would be cut off. I seem to remember Asus has a F2 or a F12 boot menu to choose boot device...? – lserni May 9 '13 at 14:23
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. – piperchester May 10 '13 at 13:09

1st you can try to :

grub rescue> ls
(hd0) (hd0,1)
grub rescue> insmod ext2
grub rescue> insmod msdos
error: unknown filesystem.

then you have to investigate


share|improve this answer

You can use Ubuntu and Lilo to restore the MBR on that drive. I wrote a tutorial on how to do this at

share|improve this answer
A full link and some detail would be helpful for this answer. – James Jenkins May 5 '13 at 14:21
all of the detail is described in the tutorial.… – mx518 May 5 '13 at 15:33

first to boot into Ubuntu from iso.

1.Locate the Ubuntu partition and the folder containing the Grub modules.

The Grub folder containing the modules must be located so the correct modules can be loaded. This folder would have been created during the initial installation of Ubuntu and should be located in the Ubuntu partition. This folder would normally be located at either (hdX,Y)/boot/grub or (hdX,Y)/usr/lib/grub/i386-pc Find your existing Ubuntu partition and the module folder.

ls                               # List the known drives (hdX) and partitions (hdX,Y)
ls (hdX,Y)/                      # List the contents of the partition's root
ls (hdX,Y)/boot/grub             # Normal location of the Grub 2 modules.
ls (hdX,Y)/usr/lib/grub/i386-pc  # Alternate location of the Grub 2 modules.
  • ls - should return all known drives (hdX) and partitions (hdX,Y)
  • ls (hdX,Y)/ - should show the contents of the root directory of the partition.
  • If you get an "error: unknown filesystem" this is not your Ubuntu partition.
  • If this is the Ubuntu partition, you will see the Ubuntu folders, including lost+found/, home/, boot/ and vmlinuz and initrd.img. Use this address as the first part of the next command.
  • ls (hdX,Y)/boot/grub - should display several dozen *.mod files. This is the folder you are looking for.
  • If you don't find the modules, try the alternate location: ls (hdX,Y)/usr/lib/grub/i386-pc

2.Load the modules.

set prefix=(hdX,Y)/<path to modules>
  • This command must correctly point to the folder containing the Grub modules. The address should be the one in the previous section which displayed the modules.


set prefix=(hd0,5)/boot/grub 
set prefix=(hd1,1)/usr/lib/grub/i386-pc
  • Load modules:

    insmod linux insmod loopback insmod iso9660 insmod fat # If ISO is located on fat16 or fat32 formatted partition. insmod ntfs # If ISO is located on an NTFS formatted partition. insmod nftscomp # If NTFS compression is used on the partition. Load if you aren't sure.

  • A "file not found" error means that the path in the prefix is incorrect or the specific module does not exist. The prefix setting may be reviewed with the set command. Rerun the "set prefix=" command with the proper path.

3.Locate the Ubuntu ISO file.

  • Using the combinations of ls commands, locate the Ubuntu ISO image.

4.Create the loopback device. loopback loop (hdX,Y)//

  • Example:

    loopback loop (hd1,1)/path/to/ubuntu-10.04.1-desktop-i386.iso

5.Load the Linux kernel and initrd image.

set root=(loop)

linux /casper/vmlinuz boot=casper iso-scan/filename=/<ISO-name.iso> noprompt noeject

initrd /casper/initrd.lz
  • If the path to the ISO or filename is not correct, the boot will halt at the BusyBox screen and produce a message stating "can't open /dev/sr0: No medium found".
  • Note: If the ISO file is not in the / folder, include the path in the iso-scan/filename= entry. See second example.

  • Examples:

    linux /casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-10.04.1-desktop-i386.iso
    linux /casper/vmlinuz boot=casper iso-scan/filename=/my-iso/ubuntu-10.04.1-desktop-i386.iso


  • That should be it. If the commands ran without any messages/errors, the commands were accepted as entered. It's now time to boot:


further info here

Now do this after booting ::

here is post with same problem and is solved as below,

1.sudo mount /dev/sdaX /mnt

here sdaX is your boot partition. you can get list with sudo blkid like this,

/dev/sda1: LABEL="Windows XP" UUID="96A4390DA438F0FB" TYPE="ntfs" 
/dev/sda3: LABEL="Ubuntu 11.04" UUID="b61fcae3-7744-45b4-95b9-7528d50a3652" TYPE="ext4" 
/dev/sda5: LABEL="Se7en" UUID="A2DC9D71DC9D4109" TYPE="ntfs" 
/dev/sda6: LABEL="Development" UUID="DEB455A1B4557CC9" TYPE="ntfs" 
/dev/sda7: LABEL="EXTRA" UUID="D8A04109A040F014" TYPE="ntfs" 
/dev/sda8: LABEL="SONG" UUID="46080FCD080FBAC7" TYPE="ntfs" 
/dev/sda9: LABEL="BACKUPS" UUID="766E-BC99" TYPE="vfat" 

note: sdaX must be linux partition.

2.sudo grub-install --boot-directory=/mnt/boot /dev/sda

3.sudo update-grub

share|improve this answer

You must log in to answer this question.

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