How to Fix Grub rescue.

How to Fix Grub rescue.

posted 3 min read

Error: no such partition, grub rescue.

  • Error no such partition entering rescue mode grub rescue is common after Ubuntu Linux is removed from dual boot PC or when the partition on which a Linux distro was installed is tampered with. The error occurs mainly out of a misconfigured bootloader or wrong active partition.

How to fix the "no such partition, entering rescue mode" error.

If you encounter the dreaded "No Such Partition" error and find yourself stuck in rescue mode, don't worry! Follow these steps to get your system back on track:

Windows Solutions

  • Step 1: Identify Available Partitions

Start by listing all available partitions using the ls command:

ls

This will display a list of partitions similar to the following image:

image

on your case it would be grub rescue> instead of grub>


  • Step 2: Check File Type
    To identify the file type within a specific partition, use the following command:
ls (partition name)

Note: If you encounter a 'Filesystem is unknown' error, it means there's no operating system installed on that partition. Continue searching until you find a different output, as shown in the image below:

img2


  • Step 3: Set the Boot Partition

Once you've identified the partition you want to boot from, set it using the following commands. Adjust the partition name accordingly; use the commands:

set boot=(hd1,msdos5)
set prefix=(hd1,msdos5)/boot/grub
insmod normal

The setup should look like this:

111

If you encounter an error, redo it again as you double-check the partition name and ensure you've used the correct commands.


  • Step 4: Restore Normal Boot

To complete the process, enter the following command:

normal

This should bring your system back to normal, and you should no longer see the "No Such Partition" error. If you still have issues, please go ahead and revisit the partition identification and setting steps.

ma


Other posible challenges:

Windows Not Showing in GRUB Menu

You will need to boot into your Linux distro and use Ctrl + alt + t to open the terminal, then check Windows Partition: Confirm where your Windows is stored using commands like `lsblkorfdisk -l`. It might be /dev/sda1 or any other.

Update GRUB for Windows: Add a special Windows option in the /etc/grub.d/40_custom file. Here's an example:

menuentry "Windows 10" {
    insmod ntfs
    set root=(hd0,msdos5)
    chainloader +1
}

Replace (hd0,msdos5) with your Windows partition info.

Enable os-prober: In /etc/default/grub, make sure GRUB_DISABLE_OS_PROBER is set to false for automatic detection of bootable partitions.

Update GRUB: Run `sudo update-grub` to refresh the GRUB configuration.

Option 2

Are you getting grub rescue every time you reboot your system? Fear not! Here's your escape plan in a few easy steps:

bypass grub rescue

Open your Linux terminal with the command provided on option one then run the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

a new window will open where you will be required to select your preferred repair option and then Patiently wait for the repair process to reach successful completion.
Upon successful repair, you will witness the following confirmation:

image

To finalize the process, reboot your system using the following command:

sudo reboot

and you'll be done!

After these steps, you will be able to boot into your windows.

[!NOTE]

Conclusion: If Windows isn't appearing in GRUB, check its location, set up a custom GRUB entry, and enable os-prober. This should fix the issue and restore dual-boot.

1 Comment

0 votes
0

More Posts

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

I Wrote a Script to Fix Audible's Unreadable PDF Filenames

snapsynapseverified - Apr 20

Breaking the AI Data Bottleneck: How Hammerspace's AI Data Platform Eliminates Migration Nightmares

Tom Smithverified - Mar 16

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

How to Fix 'jupyter' is Not Recognized as an Internal or External Command

mouyuan123 - May 26, 2024
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

3 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!