2

Recently I used live ubuntu using pendrive and gparted to merge two partitions of my laptop. (My laptop is dual booted windows 10+ubuntu 18.04). After merging the partitions every time I open my laptop it shows the message

Error: No such partition.
Entering rescue mood...
grub rescue> 

I can open my laptop using the following commands

grub rescue> prefix=(hd0,msdos6)/boot/grub
grub rescue> insmod normal
grub rescue> normal 

How can I solve the problem permanently,so that I do not need to write the commands every time.

1 Answers1

2

When you merged the partitions you (technically) changed their layout/locations on disk and Grub hasn't yet been updated to see their new locations. This can be manually fixed using:

sudo update-grub

This should update the configuration files. Sometimes when making significant changes to the partition layout (usually when adding or removing an entire disk) you may need to also run this command:

sudo grub-install some_device_name

In your case (hd0,msdos6) likely means some_device_name would be /dev/sda but it technically depends on how the disk is connected, such as via SATA cable, NVME, etc. or if your disk has encryption enabled via LUKS.