GRUB2 stuck at rescue console, showing "unknown filesystem" for all partitions

19,170

I also experienced that issue. But I've found a workaround for this.

My USB drive has first NTFS partition of 430GB (sdg1) followed by Linux partition of 10 GB (sdg2) (all primary). I installed Ubuntu (or afterwards Trisquel) to it and had the same error about unknown filesystem.

It was that grub was unable to "see" Linux partition after such "large" NTFS partition. I don't know the exact limitations of GRUB2, but my 430GB was above it.

Here is the workaround:

  1. Install grub to USB HDD with root directory at /dev/sdg1 (NTFS partition). You then will have grub.cfg in /boot/grub/ on that partition.

  2. Copy kernel and inirtd image to /boot/ubuntu/ at /dev/sdg1.

  3. Change grub.cfg to have root at 'hd0,msdos1' and to load kernel and initrd from /boot/ubuntu/.

Done.

Here is my grub.cfg entry, for example:

menuentry 'Ubuntu' {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    echo    'Loading Linux'
    linux   /boot/iubuntu/vmlinuz-3.5.0-17-generic root=UUID=erg7659b-ad4c-4f84-9ea0-6e9636768669 ro   quiet splash
    echo    'Loading initial ramdisk ...'
    initrd  /boot/iubuntu/initrd.img-3.5.0-17-generic
}

PS: this workaround won't work with every distro (with ArchBang, for example).

Share:
19,170

Related videos on Youtube

AndiDog
Author by

AndiDog

Updated on September 18, 2022

Comments

  • AndiDog
    AndiDog almost 2 years

    I installed Ubuntu 12.04 on my external USB drive, where I have a 700GB NTFS partition followed by the new 6GB ext4 partition and a swap partition (all primary). The GRUB MBR is also installed to the external hard disk.

    Since my BIOS puts the external drive as first disk when booting, I removed my internal hard disk before installation in order to avoid ordering problems.

    Now when I boot from the external drive, GRUB is stuck at the rescue console with the error "unknown filesystem".

    grub rescue> ls
    (hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
    
    ls (hd0,<any of them>)/ gives me "unknown filesystem", thus also "insmod normal"
    

    GRUB doesn't seem to be able to read my Linux partition as you can see above?! How can I solve this?


    Additional info:

    bootinfoscript says (this is with the internal drive in again, but that does not make a difference):

    Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks for (,msdos2)/boot/grub on this drive.

    sdb1: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows Vista/7: NTFS
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:        
    
    sdb2: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info: 
        Operating System:  Ubuntu 12.04 LTS
        Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
    
    sdb3: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info: 
    
    • Sun Dial
      Sun Dial about 12 years
      You will probably find your answer here, this chap (drs305) is an expert on Grub. ubuntuforums.org/search.php?searchid=86421203
    • AndiDog
      AndiDog about 12 years
      @SunDial: Thanks for the resource, great tutorials there. But none of them seem to be relevant since GRUB even shows the error for ls (each partition).
    • Sun Dial
      Sun Dial about 12 years
      OK, is sda your hard drive and sdb the USB??
    • AndiDog
      AndiDog about 12 years
      Yes, when I start from the live CD, the internal is /dev/sda and external is /dev/sdb. But when I boot from the external, my bios sets the USB drive as the first disk. That's why I installed with my internal hard drive unplugged. But even if I install Ubuntu with that drive plugged in, same issue...
    • AndiDog
      AndiDog almost 12 years
  • Khurshid Alam
    Khurshid Alam over 9 years
    What would be the root=UUID= in that grub.cfg? sdg1's UUID or sdg2's UUID?