Ubuntu – Error: file ‘/grub/i386-pc/normal.mod’ not found

bootgrub2

error: file '/grub/i386-pc/normal.mod' not found.
grub rescue>

What can I do? I just sit and stare at it.

I found my old netbook (Dell Inspiron 1010) which I have not used for about four years. I replaced Windows XP with Ubuntu 12.10. I used my bootable USB drive. I installed and rebooted. I got the message that normal.mod is not found.

What should I do? Type exit, reboot, or quit? Should I re-install?

Best Answer

  • Grub has a small core image that is loaded at boot time. The core image dynamically loads modules which provide further functionality. i386-pc/normal.mod not found indicates that grub can not load normal.mod, which is a grub module that provides the normal command. To load normal.mod you need to tell grub where it is. To do this you can use the grub command-line (aka Rescue Console). Grub will start the command-line if there is a problem booting, or you can start it manually by holding the shift key as grub starts (to force show the grub menu), and then pressing the 'c' key.

    Using grub you can explore the drives, partitions, and filesystems. You need to:

    • locate the grub install using ls or search.file
    • set grub variables $prefix and $root
    • load and run the normal module

    Example

    The following is just an example. You will need to adapt it to your local drive and partition setup.

    where is normal.mod? look in some likely locations

    grub> search.file /i386-pc/normal.mod
    error: no such device: /i386-pc/normal.mod
    
    grub> search.file /grub/i386-pc/normal.mod
    error: no such device: /grub/i386-pc/normal.mod
    
    grub> search.file /boot/grub/i386-pc/normal.mod
    hd0,msdos1
    

    If you get "Unknown command 'search.file'" this means that the search.file command is not available. This is probably because you are at the grub rescue> prompt and not grub> prompt. In this case you can still carry on and use the ls command and your knowledge of your partition layout to find normal.mod.

    found it at (hd0,msdos1)

    grub> ls (hd0,msdos1)/boot/grub/i386-pc/normal.mod
    normal.mod
    

    why did grub not find it?
    check $prefix - absolute location of the grub directory
    (this is set when grub is installed by grub-install)

    grub> echo $prefix
    (hd0,msdos2)/boot/grub
    

    check $root - default device for paths that do not include a device
    grub initially sets this to the device from $prefix

    grub> echo $root
    hd0,msdos2
    

    root and prefix are pointing to the wrong partition (hd0,msdos2)
    set $root and $prefix to the partition where we found normal.mod (hd0,msdos1)

    grub> set root=(hd0,msdos1)
    grub> set prefix=(hd0,msdos1)/boot/grub
    

    load and run normal module

    grub> insmod normal
    grub> normal
    

    Some other commands that may be helpful

    ls list all devices and partitions

    grub> ls
    (hd0) (hd0,msdos5) (hd0,msdos1)
    

    ls partition

    grub> ls (hd0,msdos1)
            Partition hd0,msdos1: Filesystem type ext* - Last modification time
    2014-05-08 15:56:38 Thursday, UUID c864cbdd-a2ba-43a4-83a3-66e305adb1b6 -
    Partition start at 1024KiB - Total size 6290432Kib
    

    ls filesystem (note / at end)

    grub> ls (hd0,msdos1)/
    lost+found/ etc/ media/ bin/ boot/ dev/ home/ lib/ lib64/ mnt/ opt/ proc/
    root/ run/ sbin/ srv/ sys/ tmp/ usr/ var/ vmlinuz initrd.img cdrom/
    

    look inside /boot/grub
    presence of i386-pc directory means this is a BIOS install
    presence of x86_64-efi directory would indicate an EFI install

    grub> ls (hd0,msdos1)/boot/grub
    i386-pc/ locale/ fonts/ grubenv grub.cfg
    

  • Related Question