0

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.

archity
  • 115
  • hd0,1 is a Linux cd not an install. Try first loading the fs driver insmod ext2 then run ls on the partitions again. – jdwolf Dec 24 '17 at 19:48
  • 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. – Terrance Dec 24 '17 at 19:58
  • 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. – Evgeniy Yanuk Dec 24 '17 at 20:02
  • @Terrance I tried Boot Repair, but it didn't work. Here is the link to the log file: https://drive.google.com/file/d/1zCjUgHN19ovDyTd6PZakac2J__UPCDsv/view?usp=drivesdk – archity Dec 25 '17 at 05:12
  • @Evgeniy Yanuk you're right, (hd1,2) is the one. Here's the link to contents: https://imgur.com/gallery/3K97g – archity Dec 25 '17 at 05:19

1 Answers1

1

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

ravery
  • 6,874