GRUB terminal instead of menu

7,801

In order to mount file systems grub needs to load modules. These modules are address by physical sector. Moving the root partition, moved these files; thus grub can no longer find them. You need to reinstall grub.

The simplest method:

Boot a LiveCD. and run boot repair. Double check what it wants to do.Some people have had difficulty with boot repair on an EFI system. Be sure the LiveCD boots in EFI mode.

Manually Boot from grub command prompt:

again be sure to boot EFI mode. In grub menu from the LiveCD, press C to get a command line prompt. then enter the following commands:

linux (hd1,3)/vmlinuz root=/dev/sda3
initrd (hd1,3)/initrd.img
boot

If your root partition isn't (hd1,3), then change all the drive references as needed. More detailed instructions can be found here: https://askubuntu.com/a/931327/694267

Share:
7,801
archity
Author by

archity

Updated on September 18, 2022

Comments

  • archity
    archity over 1 year

    I've Windows dual booted with Ubuntu. So recently, I moved one of my free partition so that it would be near the Ubuntu partition and I could expand the Ubuntu partition. But when I moved the free space partition and rebooted the system, I'm stuck at the GRUB terminal instead of the menu.

    When I use F12 to get the boot options and choose Ubuntu from there, it redirects me back to GRUB terminal. Windows, however boots normally.

    Here is the GRUB terminal output I tried diagnosting

    Screenshot

    I listed the drives using ls command and I think that (hd0,1) is the Linux partition. Can anyone guide me as to what should be my next step? I'm new to Linux environment and clueless as to how things work around here.

    • jdwolf
      jdwolf over 6 years
      hd0,1 is a Linux cd not an install. Try first loading the fs driver insmod ext2 then run ls on the partitions again.
    • Terrance
      Terrance over 6 years
      Moving partitions can move where they are found by grub. You need should run Boot Repair from a LiveCD. That link should have the instructions on how to do it.
    • Evgeniy Yanuk
      Evgeniy Yanuk over 6 years
      Yes, hd0 isa n installation usb-drive. And (hd1,2) is your ESP (EFI System Partition) and there should be grubx64.efi file. Show us the content of (hd1,2)/boot and (hd1,2)/efi.
    • archity
      archity over 6 years
      @Terrance I tried Boot Repair, but it didn't work. Here is the link to the log file: drive.google.com/file/d/1zCjUgHN19ovDyTd6PZakac2J__UPCDsv/…
    • archity
      archity over 6 years
      @Evgeniy Yanuk you're right, (hd1,2) is the one. Here's the link to contents: imgur.com/gallery/3K97g
  • archity
    archity over 6 years
    I'm unable to find vmlinuz or initrd files. Can you look at my screenshots and tell something.
  • ravery
    ravery over 6 years
    @archity -- can you post the partition info in gparted from the LiveCD?
  • archity
    archity over 6 years
    Partition info: imgur.com/gallery/rNfRC
  • ravery
    ravery over 6 years
    you don't have any linux partitions. you have to reinstall.
  • archity
    archity over 6 years
    I had installed Linux in the 50GB earlier. Will reinstalling in that partition solve the problem of GRUB too?
  • ravery
    ravery over 6 years
    yes reinstalling will also reinstall grub.
  • archity
    archity over 6 years
    Reinstalling in the same partition solved the problem. Thanks a lot.
  • WinEunuuchs2Unix
    WinEunuuchs2Unix almost 4 years
    @archity Please accept this answer so your question stops popping up on the main board as unanswered. Thank you.