Ошибка grub no such partition

Have you encountered the error message “no such partition grub rescue” on Windows 10 and cannot boot the OS? This issue often happens when you do something wrong on your PC. Here we will show you four situations that may cause this error. Also, you can find some possible ways to fix “no such partition” error in this post.

Error No Such Partition Grub Rescue Windows 10

Nowadays, many disk or partition problems may come out when you use your laptops or desktops inappropriately. When an issue appears, it is usually followed by a message which informs you of the specific error. Among those errors, no such partition error on Windows is very common; it is especially common in the dual system.

It always appears when you boot your computer, followed by an error message «GRUB loading. Welcome to GRUB! Error: no such partition. Entering rescue mode… grub rescue>» or «error: no such partition. grub rescue>». This error message is displayed as follows.

When Error No Such Partition Grub Rescue Windows 10 Happens?

Suppose that there are two systems, Windows 10 & Ubuntu and you may want to do some disk and partition operations to these two operating system partitions on the same hard disk; this is when the problem would occur. (Especially to Ubuntu OS partition)

1. Delete Ubuntu Partition

There are times when you don’t like such a system because you think the command line based system is too difficult to use. You then want to uninstall it in order to create a new partition. However, sometimes disk space is very limited, and then you would decide to delete such a partition to free up some disk space and expand other partitions.

2. Resize/Merge/Split Partition

When you manage your hard drive and do operations such as resize/merge/split Ubuntu partition, this issue may appear during the process when restarting computers.

3. Reinstall Ubuntu OS

Sometimes, you will reinstall the Ubuntu operating system for reasons including system breakdown, or system file damage.

4. Restore Ubuntu OS to the Old Version

After installing an update, some issues or errors will appear which leads to you choosing to restore Ubuntu OS to the old Version, for example, Ubuntu 8.X.

How to Fix Ubuntu Grub Rescue in Windows 10

Actually, the error “no such partition grub rescue” always happens on Windows 10 and Windows 7/8. When this issue occurs, what should you do to fix it to ensure the operating system can boot normally? Here are the solutions and you can try them one by one.

Case 1: When Deleting Ubuntu/Linux Partition

After uninstalling Ubuntu partition, Windows 10 may be unable to boot due to boot loader files. Therefore, the most important thing is to fix MBR and restore the boot sector code. What can you do to repair the grub rescue after deleting Linux partition? Here are the solutions to this case.

Solution 1: Fix MBR and Restore Boot Sector Code

Rebuild MBR with MiniTool Partition Wizard

If you want to fix the boot sector and BCD files easily and effectively, you can ask for a third-party tool for help. When searching for the tool online, many kinds of software will be provided. Among the tools, MiniTool Partition Wizard is popular software in managing partitions and disks. Here, we strongly recommend this software for you.

As a professional and reliable partition manager, this tool can be used to resize /extend/copy partition, migrate OS to SSD/HD, convert between NTFS and FAT32, convert disk between MBR and GPT, rebuild MBR, recover partition and many more.

In addition, this tool has the Bootable Media feature which is used when there is no operating system or your OS fails to boot. MiniTool Partition Wizard Professional Edition is a good choice on Windows 10 because it supports such a feature which enables you to rebuild MBR when encountering the error no such partition in Windows 10.

Before you rebuild MBR, you need to purchase a license key of Professional Edition since MiniTool Partition Wizard Free Edition doesn’t support such a function.

Buy Now

Now it is time to rebuild MBR with this tool to fix “error no such partition grub rescue after deleting ubuntu”. Here is the guidance:

Step 1: After booting your computer, you will enter the following interface. Click Partition Wizard to launch this tool.

MiniTool PE Loader

Step 2: Once you enter the main interface of MiniTool Partition Wizard, please select the target disk on the Windows 10 operating system, and click Rebuild MBR feature from the Check Disk menu.

rebuild MBR

Step 3: Click Apply to execute this change.

With MiniTool Partition Wizard Professional Edition, you can easily rebuild MBR. After restarting your PC, the error no such partition can be fixed.

Tip: After MBR is repaired, we suggest backing up the Windows OS with professional Windows 10 backup software, MiniTool ShadowMaker to avoid system corruption.

Rebuild BCD Files with Windows 10 Automatic Repair

There is another way to repair “error no such partition grub rescue after deleting Ubuntu” without using the third-party tool.

When Windows 10 is unable to boot, you can restart the system several times and the system will enter into WinRE mode. Sometimes Windows 10 system will go to the Automatic Repair interface automatically. If not, you can use a Windows 10 installation disc to get into this recovery environment.

In WinRE mode, you can repair your system according to the step-by-step guidance.

Step 1: Under the Choose an option tab, click the Troubleshoot button.

click Troubleshoot

Step 2: Click Advanced options. In the pop-up window, choose Command Prompt to fix BCD files.

open command prompt in Windows 10 WinRE

Step 3: Once CMD starts, type the following commands in turn:

  • bootrec /fixmbr
  • bootrec /fixboot
  • bootrec /scanos
  • bootrec /rebuildbcd

bootrec commands

Step 4: Close Command Prompt and restart your computer. Deleted Ubuntu partition grub rescue error will be fixed.

Restore the Boot Sector Code with Windows 10 Automatic Repair

If the method above is not useful when repairing “error no such partition grub rescue after deleting ubuntu”, you should take restoring the boot sector code into consideration. In order to do this, a Windows DVD or USB flash drive is necessary. To start restoring, follow the steps shown below:

Step 1: Connect your USB flash drive to your computer or insert Windows 10 DVD to your PC.

Step 2: Boot the computer from the disc or USB drive.

Step 3: Click Troubleshoot > Advanced Options > Command Prompt to open CMD.

Step 4: You need to type these command lines:

  • diskpart
  • select disk 0
  • list volume

Step 5: All volumes will be displayed here. In the Type column, you will find «DVD-ROM» value, Please remember the drive letter of your disc. Here we take the letter F as an example.

Step 6: Next type the command lines:

  • Exit
  • F:
  • cd boot
  • Dir

Step 7: Next, you need to check if you have bootsect.exe files in the list. If so, enter the following command:

  • bootsect /nt60 SYS /mbr
  • Exit

bootsect nt60 SYS mbr

Step 8: Restart your computer.

It is pretty complicated to use commands to rebuild BCD and MBR. Compared to that, using a third-party tool is much easier and efficient.

Solution 2: Manually Configure the Active Partition

Use Diskpart

Another common factor that could cause no such error in Windows 10 is that you didn’t set the correct partition to active. If you want to make sure your computer can boot normally, you must set partition active.

When booting PC, the BIOS will start up the boot loader from an active partition. Otherwise, many issues including «Error: no such partition» will be likely to appear.

You may be wondering: how to fix error no such partition grub rescue Windows 10 without CD? The solution is to run Command Prompt by entering into WinRE.

Step 1: Type diskpart.

Step 2: Then type the following commands one by one:

  • list disk: all hard drives in your computer will be displayed.
  • select disk n: n means the disk where Windows 10 is installed. Here I choose disk 0.
  • list volume: all volumes on disk 0 is listed.
  • select volume n: n refers to the number of system partition.
  • active: it can mark the correct system partition active.

mark system partition active in cmd

Run MiniTool Partition Wizard Bootable CD

In addition to diskpart, there is a more simple way to do this work by using the software, MiniTool Partition Wizard Bootable CD. Before you continue with the following steps, you also need to boot your computer from a bootable disc.

Step 1: In the MiniTool Partition Wizard main interface, you should select the target partition; then click the Set Active feature in the left pane.

set system partition active

Step 2: Finally, click Apply to perform this operation.

click apply button to execute the operation

After you finish marking Windows 10 system partition active, you can boot your computer normally. Now deleted Ubuntu partition grub rescue issue is fixed.

Click to Tweet

Recommended Articles:

  • Quick Fix Windows Detected a Hard Disk Problem in Windows 10
  • If A Disk Read Error Occurred in Windows 10/7/8, Try These Solutions

If you are interested in MiniTool Partition Wizard Bootable Edition, you can purchase its Professional Edition to create a bootable disc to boot your computer and fix “no such partition grub rescue in Windows 10” issue now.

Buy Now

Case 2: When Doing Certain Ubuntu Partition Operations

It is possible that Grub is damaged when managing Ubuntu; for example, when resizing partition and reinstalling Ubuntu OS. In this situation, you can choose to reinstall or fix Grub.

When having Ubuntu grub rescue in Windows 10 issue, you can see the grub rescue> prompt appears on the screen. This means Grub 2 has failed to find the grub folder, the grub.cfgfile, and the associated modules. It is presented to you to give the path to the grub folder, load the necessary modules, and provide the proper boot commands.

Generally, this prompt occurs due to an incorrect path to the grub folder, failure to update Grub 2 after certain system or partition operations, the improper designation of the grub folder location, or a failed installation.

In order to successfully fix grub, please follow the commands shown below, a screenshot is offered to you:

grub rescue Windows 10 repair

For more information, please visit this video:

How to Avoid No Such Partition Error

In order to prevent this issue from happening again, you should pay attention to the following steps:

Step 1: If you want to delete Ubuntu OS in a dual system, you should do this work in a correct way. Here is a way from one forum:

correctly delete Ubuntu OS in a dual system

Step 2: If you want to reinstall the Ubuntu operating system, make sure the new system is installed to the original partition.

Step 3: You’d better not restore your Ubuntu system to an old version, otherwise, Grub can be damaged.

Further Reading: Reasons for No Such Partition Grub Rescue Windows 10

You may ask me what the specific factors are causing such a problem on your computer. Here we will give a detailed analysis of this error to you.

1. Generally speaking, the most common reason for this error is a misconfigured boot loader file. While installing Ubuntu in Windows, a part of Grub lives in the Master Boot Record (MBR), and the other parts live in the Linux boot partition.

This means that although the Ubuntu partition is deleted, Grub is still in MBR. In addition, the active partition is not correctly set. As a result, you will receive the error of «no such partition grub rescue» during your Windows 10 operating system startup.

2. When resizing Ubuntu partition,UUID is modified, so that Grub can’t read the boot information.

3. When reinstalling Ubuntu system, you may install it to a new partition. Although the original partition has been formatted, you haven’t reinstalled Grub 2.

4. While restoring to Ubuntu 8.X, the Grub is version 1. So, Grub 2 is damaged.

Suggestion: Back up Your PC to Avoid System Breakdown

After fixing Windows 10 error no such partition, it is better to back up your operating system so that you can restore the PC to a previous state in case you face any system issue.

To do this work, we suggest using professional Windows backup software, MiniTool ShadowMaker since it enables you to back up your OS, files & folders, partition or the entire disk within simple clicks. If something goes wrong with your Windows system, you can restore it from the created image. Just get its Trial Edition for a free trial.

Free Download

Step 1: Run MiniTool ShadowMaker Trial in Windows 10, and then choose the local backup mode to continue.

Step 2: Under the Backup tab, this software will help you to create a system backup since it has chosen system partitions as the default backup source. Then, specify a destination path. After that, you can directly click the Back up Now button to perform the backup right now.

MiniTool ShadowMaker system backup

Bottom Line

Now we are at the end of this post. In this article, we introduced to you what «no such partition grub rescue Windows 10» error is, the detailed solutions to solve it and the reasons causing this issue.

After trying so many solutions, we believe that you may have solved your problem successfully. If you have any suggestion or need any help, you are welcome to email us via [email protected] or leave a comment below. Thank you in advance.

No Such Partition Grub Rescue Windows 10 FAQ

How do I fix no such partition grub rescue?

  1. Rebuild MBR with MiniTool Partition Wizard
  2. Rebuild BCD Files with Windows 10 Automatic Repair
  3. Restore the Boot Sector Code with Windows 10 Automatic Repair
  4. Manually Configure the Active Partition

How do I fix grub after installing Windows 10?

There are two ways you can fix grub after installing Windows 10: Run Boot Repair and Reinstall GRUB. This post — Windows 10 deleted GRUB [FIXED BY EXPERTS] gives much information to you.

How do I get into grub rescue mode?

To know how to get into grub rescue mode, you can follow these steps in the wiki article – Recovery Mode.

How do I manually rebuild my BCD?

Open Command Prompt and use these commands: bootrec /fixmbr, bootrec /fixboot, bootrec /scanos and bootrec /rebuildbcd.

Данная статья рассказывает историю моих о мучениях и за одно несет в себе полезную информацию для тех, кто столкнулся с такой же проблемой «no such partition grub rescue». Часть с установкой, софтом и прочем будет сильно урезана, ибо статья не об этом. Итак, поехали!

Началось все с того, что захотелось мне после прочтения очередного номера журнала про линукс посмотреть вживую на все нововведения, ибо в последние годы не пользовался линукс дистрибутивами и сидел полностью на окнах. И вот скачал самый популярный дистрибутив Ubuntu, оторвал от диска D 100Гб на новый раздел L, установил, поигрался.

Надоело, поставил вместо него более любимый мною дистрибутив Linux Mint, поигрался, и вот решил сносить все это через пару дней.

Загружаюсь в Windows, управление дисками, раздел L – удалить, диск D расширить и возвращаю диску обратно его родные 100Гб.

Перезагружаюсь…BIOS…ASUS…error: no such partition grub rescue. Перезагружаюсь опять, BIOS – перепроверяю все настройки. Все верно, сохранить и перезагрузить. И опять после BIOS идет error: no such partition grub rescue. Ни выбора системы, ни возможности загрузить Windows. Сразу пошел за ноутом и гуглить.

Grub — это загрузчик систем, который устанавливается с Linux и пишет всю нужную информацию на самый первый раздел на диске — MBR (master boot record). А его файлы размещаются на диске с системой Linux

Так вот, после удаления Linux, компьютер просто «не знает, что делать» поскольку обращаясь в папку с grub, ничего не находит (все же было удалено). Вот и получаем «grub rescue».

Решения и тщетные попытки все исправить

Для начала, если есть желание удалить любой дистрибутив линукс, лучше прочтите, как это правильно делать. А не так, как я – удалить рездел и думать, что все так просто.

Если же вы не удаляли линукс, но получили эту ошибку «error: no such partition grub rescue>», то все можно легко исправить, указав в новый раздел и папку на нем с файлами GRUB подобной информации полно на форумах. Но в моём случае это не подходило, ибо удален не просто сам линукс, но и раздел на котором он был и возвращен к диску D. Ищу дальше и, натыкаясь на статью, что такую ошибку исправить можно 2 способами:

— исправить раздел MBR с помощью загрузочного диска Windows;
— исправить раздел MBR с помощью live CD с Linux.

У меня уже была флешка с Linux Mint – с нее и загрузился и выбрал «Попробовать Mint».
Открываем терминал (Ctrl+Alt+T) и пишем:

sudo apt-get install lilo ждем установки, далее sudo lilo -M /dev/sda mbr

После перезагружаемся и все должно работать, очень многим этот способ помог, но не мне. Выдавало на 2-й команде ошибку. Начал искать еще способы и наткнулся на пост о том, что можно запустить установку windows и на моменте управления дисками, удалить все разделы, включая «Зарезервировано системой» — и это свободное место преобразовать в новый раздел. Оставить только раздел с окнами и D. Записал образ, запустил установку, удалил все разделы, создал на их месте новый один раздел. Перезагрузка — no such partition grub rescue.

Хоть этот способ и многим помог, но опять же — только не мне. Идем дальше:

Запустить восстановление системы с диска/флешки, отрыть дополнительные параметры, консоль и там ввести bootrec.exe /fixmbr. Написало, что все выполнено успешно. Перезагрузка — no such partition grub rescue. Психанул запустил установку Windows и удалил все разделы, кроме D, создал один новый и переустановил систему. Все заработало.

P.S. Хоть я и не смог решить проблему «деликатными» методом, но по отзывам эти методы помогали большинству. Надуюсь, помогут и вам при такой проблеме. И вам не придется все переустанавливать.

Спасибо за внимание.

Some users that have previously configured their computers to dual-boot Windows and Linux distributions (most commonly with Ubuntu) are reporting that their PC is entering Grub Rescue Mode and displaying the error No Such Partition – Grub Rescue.

Error No Such Partition -Grub Rescue

After investigating this particular issue thoroughly, it turns out that there are several different situations that might trigger the apparition of this issue. Here’s a list of potential culprits that might be responsible for this issue:

  • GRUB Bootloader is Corrupted or Deleted – If you are seeing this error due to some type of corrupted data associated with the GRUP Bootloader or after you have unwillingly deleted data associated with it, you can fix the issue by manually reconfiguring the utility to boot using the correct files.
  • The bootloader is Misconfigured or Corrupted – Since this issue can also occur due to misconfigured or corrupted BCD data, you should be able to fix the issue by rebuilding the Boot Configuration data from an elevated Command Prompt.
  • Current Boot Configuration is inconsistent – In case the issue is being caused by bad data that’s being fed into the GRUB bootloader, you can potentially fix the issue by using a Registry Backup to restore your computer back to a good configuration.

Now that you know every potential culprit, here’s a list of methods that other affected users have successfully used to fix the issue and prevent their computer from booting into Grub rescue mode:

Method 1: Manually Reconfigure GRUB Bootloader

By far, the most effective fix and the one you should start with since it’s the least destructive is to manually reconfigure the GRUB bootloader and make sure that the primary OS is prioritized.

Several affected users have confirmed that they finally managed to bypass the GRUB rescue state by following a set of instructions designed to manually reconfigure the GRUP Bootloader to prioritize the main OS.

If this scenario is applicable, follow the instructions below to do so directly via the GRUB Rescue menu:

  1. Once your PC enters GRUB Rescue Mode, type the following command and press Enter to get an overview of all your available partitions:
    ls
  2. After you do this, you should get an overview of all partitions that you currently have on your primary disk. At this point, you need to make sure that you select the primary OS. In our case, the correct partition is (hd0,msdos2), so we used the following command to interrogate the partition:
    ls (hd0, msdos2)

    Note: Make sure to replace the partition with the correct example in your case. If you get a message saying something like ‘File System is ext2 or ext3‘, you have correctly identified the partition that holds your primary OS.
    Note 2: If you interrogate a partition and you get the message ‘Filesystem is unknown‘, you didn’t select the correct partition.

    Incorrect partition error message in GRUB
  3. Once the correct partition is selected, type the ‘set‘ and press Enter to interrogate and get a definitive listing of your main partition.
  4. Next, type the following commands and press Enter after each command to change the priority of GRUB Bootloader to the correct one:
    set boot = (hd0, msdos5)
    set prefix=(hd0, msdos5)/boot/grub
    insmod normal 
    normal
  5. After you input the final command, you’ll be taken to the main GNU Grub menu. Once you get to this screen, simply select the OS that you want to boot from and press Enter.
    Booting from the main partition in GRUB

In case this method didn’t work for you and the booting sequence eventually boots in the same No Such Partition -Grub Rescue error, move back to the next potential fix below.

Method 2: Rebuilding the Boot Configuration Data files (BCD)

If the first method didn’t work for you, the next step would be to use the Boot Configuration Data (BCD) utility to locate the Windows installation files on all disks and add them back to the boot list so that the booting sequence can locate it during startup.

This method was successfully used by a lot of users that were previously dealing with No Such Partition – Grub Rescue error. Rebuilding the BCD file clusters successfully allowed them to dual-boot normally without being forced into the GRUP Rescue menu.

IMPORTANT: This method will require you to plug in a compatible installation Windows installation media. If you don’t have one at the ready, you can create the Windows installation media from scratch and load it on a USB drive.

Once you meet all requirements, follow the instructions below:

  1. Plug-in the USB stick containing the installation media and start your computer normally via the power button.
  2. Access the Setup key by pressing the correspondent button depending on your motherboard manufacturer.
    Accessing the BIOS / UEFI Setup menu

    Note: The setup key will be different from manufacturer to manufacturer. Most commonly the Setup key is either one of the F keys (F2, F4, F6, F8), the Esc key, or the Del key (on Del computers/laptops). If you’re having trouble accessing the Setup menu, search online for specific instructions on accessing it.

  3. Once you’re inside the Setup menu, access the Boot tab and make sure to set the USB stick containing the installation media as Boot Option #1.
    Booting from the installation media
  4. Save the changes, then restart and allow your computer to boot from the installation media and wait for the installation files to load.
  5. Once you get to the first page, click on Next, then click on Repair your computer from the bottom-right corner of the screen.
    Repairing Computer via installation media
  6. Next, wait for the Recovery menu to load, then select Troubleshoot and click on Command Prompt from the list of available options:
    Accessing the Command Prompt via the Recovery menu

    Note: On certain Windows 10 versions, you might also be able to boot from the Recovery menu by forcing 3 consecutive system interruptions during the startup procedure.

  7. Once you’re inside the elevated Command Prompt, type the following command and press Enter to fix the MBR dependencies associated with your Windows installation:
    bootrec /fixmbr
  8. Once the command is processed successfully, type the following commands and press Enter to fix the Boot Configuration Data associated with your Windows installation:
    bootrec /fixboot

    Note: If you get the ‘Access is denied’ error while inputting one of the 2 commands above, follow these instructions to fix the bootrec access problem. 

  9. Next, type the following command and press Enter to scan all your disks for the Windows installation media:
    bootrec /scanos

    Note: This operation might take some time depending on the size of your partitions. Don’t close this window until the operation is complete.

  10. If the operation is completed successfully, type the following command to effectively rebuild the BCD configuration data:
    bootrec /rebuildbcd
  11. When asked to confirm, type Y and press Enter to confirm and start the operation.
    Confirm the operation of building the BCD file system
  12. Finally, type ‘exit’ and press enter to effectively leave the elevated CMD prompt and allow your Windows to boot normally.

In case the end result is the same (the boot attempt ends with the same No Such Partition error), move down to the next method below.

Method 3: Using the Registry Backup to Restore the last good Configuration

If none of the methods above have worked for you, you might be able to fix the current configuration with the last known good backup that should allow you to dual boot without issues.

Doing this will require you to use the Advanced Options menu to open an elevated Command Prompt and run a series of commands that will allow you to boot using the last known good configuration.

This method was reportedly used successfully by a lot of users dealing with the No Such Partition -Grub Rescue error.

In order to use the Registry Backup to restore the last known good configuration, follow the instructions below:

  1. Insert a compatible Windows installation media and boot from it by pressing any key when prompted to do so.
    Booting from the installation media

    Note: If you don’t have a compatible installation media or your system doesn’t boot from it, follow steps 1 to 4 from Method 2.

  2. Once you manage to successfully boot from the installation media, click on Repair your computer from the bottom-left corner of the screen.
    Repairing your computer
  3. Once you’re finally inside the Advanced Recovery menu, click on Troubleshoot, then click on Command Prompt from the list of available Options.
    Accessing the Command Prompt via the Recovery menu
  4. Once you are inside the elevated Command prompt, type ‘C:‘ and press enter to access the partition where you installed Windows. If you installed Windows on a different partition, replace the letter accordingly.
  5. Next, type ‘dir‘ and press Enter to access the root location of your OS drive.
    Note: It’s recommended to back up the current registry before going forward. To do this, input the following command and press Enter after each command:
    cd windowssystem32config
    MD backup
    copy *.* backup

    Backing up the Registry
  6. Next, type the following commands and press Enter to access the last known good configuration and modify the default behavior to boot from it:
    CD regback
    copy *.* ..
  7. When prompted by the prompt, press A and hit Enter once again.
  8. Finally, type exit and press Enter to exit and boot normally. This should take you to the main GRUP menu where you should be able to dual boot as you see fit.

Photo of Kevin Arrows

Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Ever get into the freaking condition, when your system doesn’t boot successfully and throw your control to a grub rescue utility informing the following error?

error: no such partition.
Entering rescue mode...
grub rescue>

I went through this situation today. And here is how I rescued with it.

Note: Other possible solutions might be available, but this is just what worked for me. You are recommended to explore the web first, then go with the solution that suits *your* condition perfectly.

1. Reason

Actually, I was trying to resize my Linux (Ubuntu 16.04 LTS) partition which is dual booted with Windows 10. For that, my first step was to unallocate the partition which I wanted to merge with my ext4 (Linux partition). For this, first I logged in Windows and tried to unallocate the partition I wanted to merge (Local Disk :D) but I found out that it can be done with Gparted from Ubuntu as well. But still.

“I started to explore windows storage management console, and a couple of times I detached and reallocate this partition, together with separating out a partition of 3 GB from it. I was just playing and testing the working of the console. But this fun, lead me to freak, later in the day.”

2. Problem

Now the next step was to use Gparted from Linux. But for that, I needed to reboot and login to my Ubuntu 16.04 LTS and here is the twist. When I did reboot my laptop to switch the OS. Oh my God! I get encountered with this scary error.

error: no such partition.
Entering rescue mode... 
grub rescue>

I was screwed up! I didn’t know what the hack is done with my system.

I searched the web and found out the reason for this error that was “I deleted a Windows partition. and somehow (I don’t know how), I messed up with some grub configurations.”

3. Solution

But something worked like heaven for me. Here is the solution, if you ever get into this, proceed as follows.

4. List File Systems

error: no such partition.
Entering rescue mode...
grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

This “ls” command will list possible file systems where grub might be available. Now our next step is to find out, that which among these listed systems is the one that we can use for booting.

5. Find the File System we may use to boot

grub rescue> ls (hd0,msdos1)
(hd0,msdos1): Filesystem is unknown.
grub rescue> ls (hd0,msdos2)
(hd0,msdos2): Filesystem is unknown.
grub rescue> ls (hd0,msdos3)
(hd0,msdos3): Filesystem is unknown.
grub rescue> ls (hd0,msdos5)
(hd0,msdos5): Filesystem is ext2.

Hurray! we have found out, that which filesystem we have to choose for booting. In this case, it is (hd0, msdos5).

6. Configuration

grub rescue> set root=(hd0,msdos5)
grub rescue> set prefix=(hd0,msdos5)/boot/grub
grub rescue> insmod normal
grub rescue> normal

After this, I could see the old booting menu, where I may select between Ubuntu and Windows. At this point, it seems that the problem is solved, but that’s not the truth!

Now if you again reboot your system, you will again get into this grub rescue. If you want to permanently fix this issue. Proceed as follows (after step 3).

7. Updating System grub

Login to Ubuntu and just give these 2 commands.

$ sudo update-grub
$ sudo grub-install /dev/sda

Now try to reboot! Hopefully, you are back to your previous experience of booting. After going through this, now I don’t feel that grub rescue is a freaking issue, on the other hand, it’s a simple utility to rescue our system with faulty grub configurations.

Updated:

  • Unfortunately, sometimes this process doesn’t work. I recommend you to have a look at this post if you want to give a try to recover your files.
  • Recently, I found out here, that sometimes insmod normal doesn’t work due to the absence of a complete path of normal module. If this is the case, please try the complete path with insmod (hdX, Y)/boot/grub/normal.mod. If this doesn’t work please try the command using “semicolon” instead of “coma” after “hdX” as pointed out here.
  • Also, the location of the complete path to normal.mod is not consistent across all the systems. Therefore, you may use ls or search.file commands to find out the exact location of your system’s `normal.mod` as explained here.
  • In my case, I didn’t get into condition when insmod normal doesn’t  work. So, all these additional updates, I have not performed myself. Therefore, I request you all if any of these *updated* points doesn’t work or if you see a bug in these, then please let me know in the comments section below.

Aftermath:

When I was back with my Linux and an unallocated partition, I proceeded ahead for my goal of re-sizing. Explore the second part of this journey on How to resize your Linux partition with Gparted?

See you in the next post.

The other day I was trying to extend my root partition of Ubuntu which I dual boot with Windows 8. The partition extension was successful except that I screwed up the Grub configuration. When I booted in my laptop after the partition changes, I was welcomed by the Death Screen of Linux saying:

error: no such partition
grub rescue

After googling a bit, I found this mega thread on Ubuntu forum that helped me. But since it is a very complicated thread, I have re-written the tutorial so that one can follow it easily. So there are some assumption and some requirements to fix the error: no such partition grub rescue problem.

Requirements and presumptions:

  • You must have a live CD/DVD/USB of the same version of OS
  • You must have internet connection
  • You are dual booting Windows with Ubuntu (no Wubi installation)
  • You do not have a separate /boot partition

Now lets see how can we rescue the grub here.

How To Fix: error: no such partition grub rescue

We’ll be using chroot to rescue grub. The whole concept is that since grub configuration files have been deleted or corrupted, it needs to be re-installed. And using the live CD of exact OS version, we can install the grub configuration again. It will delete all the changes (if any) you have made to the grub.

Please follow these steps to easily fix grub rescue problem in Ubuntu (or other Linux distributions):

Step 1: Know you root partition

Boot from live CD, DVD or USB drive. Try Ubuntu from live disk. Open a terminal (Ctrl+Alt+T) and use the following command:

sudo su
fdisk -l

Here, you will see the drive name and partition number. It should look like sdXY. Where X is the drive letter and Y is the partition number. Usually it should be like sdaY.  You have to recognize the partition where root has been installed.

Step 2: Mount the root partition

Once we have got the partition where root has been installed, we’ll mount the root partition where Ubuntu has been installed. Use the following commands to mount it:

sudo mkdir /mnt/temp
sudo mount /dev/sdXY /mnt/temp

Replace XY with appropriate values.

Step 3: Be the CHROOT

Once we have the partition mounted, next step is to mount certain items in preparation of the chroot. Run the following commands one by one:

for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/temp$i;  done
sudo cp /etc/resolv.conf /mnt/temp/etc/resolv.conf
sudo chroot /mnt/temp

If the above commands ran successfully, you’ll see [email protected]:/# in the terminal indicating that you are in chroot mode.

Step 4: Purge Grub 2 packages

Now when we are in chroot environment (you can think of it as if we are behaving as root for the mounted partition)., time to get rid of the Grub 2 packages but before that lets update the repository.

apt-get update
apt-get purge grub grub-pc grub-common

While removing the grub, you’ll see a strange screen asking if you want to remove Grub 2 packages. Press TAB to select Yes. It will be highlighted once selected. Press enter to proceed.

Solving Error no such partition grub rescue in Ubuntu

Step 5: Re-install Grub packages

As we deleted the previous Grub, we deleted the messed up settings as well as any favourite settings stored in it. Now we’ll install a new and fresh Grub. Few things to keep in mind before you go on with the command to install the Grub.

  • While installing the new Grub, it will ask you to add extra kernel options. Just press TAB to go to OK and press enter to continue.
  • It will bring you the installation notes. Press Tab to OK followed by enter and continue.
  • When it presents with you the device option (to ask on which partition should it install Grub), choose the option in the format of sdX. DO NOT select the drive partition in 4 letter format i.e. sda4 etc. When you select the partition,  it should have an asterisk (*) before it like [*] sdX. If it does not, highlight (with tab) and press SPACE to select it. Tab OK and press enter.

It should look like this:

Solve Error no such partition grub rescue in Ubuntu

Now when you taken all those things in mind, use the command below to install the Grub.

apt-get install grub-common grub-pc

Update the grub and exit the chroot:

update-grub 
exit

Step 6: Unmount the partition:

We mounted something at the start, didn’t we? Well lets just unmount them.

for i in /dev/pts /dev /proc /sys; do sudo umount /mnt/temp$i ; done

That’s it. Reboot your system and you should see the good old Grub boot screen as before. I hope this tutorial helped you to get rid of error: no such partition grub rescue problem and the tutorial was easy to follow. Any question, suggestions or a word of thanks is always welcomed. Stay tuned for more Linux tutorials.

Like this post? Please share to your friends:
  • Ошибка group policy 1130
  • Ошибка google drive 404
  • Ошибка grbl error 9
  • Ошибка google chrome 0xc0000142
  • Ошибка graphics device removed