How To Solve: error: no such partition grub rescue in Ubuntu Linux

Care to Share?

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.

You can read this tutorial to fix similar Grub error minimal BASH like line editing is supported. For the first word,TAB lists possible command completions. anywhere else TAB lists possible device or file completions.

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 root@ubuntu:/# 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:


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.

  • Caldostrong

    it works perfectly.

    but you have an error in the step4:

    apt-get purge grub grub-pc grub-commo should be apt-get purge grub grub-pc grub-common


    • Abhishek Prakash

      Thanks for spotting it. I mistyped N here.

      • mohit

        i inserted my dvd but its not run nothing happend i pressrd all function keys but nothing happend plzz help me

        • Abhishek Prakash

          You mean you are not able to boot from a live DVD? Sounds like a separate issue.

  • Steph

    What do I do if I don’t remember which version of Linux is installed? (The computer has been in storage)

    • Abhishek Prakash

      Ah… that’s a pity… you can try with a newer version may be. Can’t guarantee if it will work though.

  • ME

    okay….so this is an!a real remergency!
    i Iinserted the disc and tried ctrl+alt+T but nthing happened……
    Please help me how to do it!!!!!
    (P.S.I got no knowledge about this whole booting stuff but I would really appreciate if you help me out)

    • Abhishek Prakash

      All you have to do is to open the terminal. If Ctrl+Alt+T short cut does not work, try to run the terminal from menu/Unity HUD.

  • Camilo

    When I run the ‘fdisk -l’ command I see multiple boot devices, is there a way to figure out which of these is the root partition?

  • Joe random

    Thanks for this easy-to-follow and useful guide! You saved my but after I screwed up my partitions, thanks!

    • Abhishek Prakash

      Welcome Joe :)

  • Happy
  • Anvith

    The boot loader is working now… But the menu to choose which os I want to boot into doesn’t come… Everytime it directly boots into Ubuntu… Please help!

    • Anvith

      Fixed it :)

      • Abhishek Prakash

        And what was the problem? Please share it with others.

  • Rick

    Flawless! Thank you very much! Got this problem after installing Ubuntu 13.10 and the installation couldn’t complete the install of grub. =/. Anyway… Awesome tutorial. Very well organized.

    • Abhishek Prakash

      Thanks Rick.

  • Shanks

    But in my case, this screen doesnt show up after a couple of force restarts, What could be the problem, I don’t know.

    • Abhishek Prakash

      Sorry, I don’t follow what you mean by “this screen doesnt show up after a couple of force restarts”. Please elaborate.

  • rohit

    I have pre-installed window8 laptop and i was trying to installed ubuntu, but when i restart it , following error comes

    error: file ‘boot/grub/i386-pc/normal.mod’ not found.
    Entering in the rescue mode…….
    grub rescue>

    Whenever i restart same error comes. None of the keys F2, F12 are working. Please let me know how can i fix it. I don’t have window recovery CD.

    • Abhishek Prakash

      Hi Rohit,

      Can you try to reconfigure the Grub using the live USB of Ubuntu, following the steps mentioned here?

      • rohit

        Hi Abhishek,

        Thank you for the reply.

        I am not able to try your steps because it is not showing the BIOS screen. When i restart, it just enters in the grub rescue>. None of the keys is working F2, F12, F11, F8.

        And it is searching for ‘boot/grub/i386-pc/normal.mod’ not found. But this path does not exists. Only ‘boot/grub/x86_64-efi/normal.mod’ path exists.

  • Shoop

    Hey hoping you can help me out, new to Linux, been reading for some time, been tying ubuntu with live cd, but no wireless, got the drivers so decided to do dual boot with xp tonight and initially when reboot would go straight to ubuntu, no grub menu to decide which OS, which I was used to with multiple windows platforms in the past, but I was able to one time hit esc>down arrow>enter and xp booted but after that wouldn’t work and then got the error. I can’t delete the Linux partition, just keeps reinstalling can’t boot with xp disc to reformat. and I’m trying your tutorial here (without Internet) I get the first step to work and have tried the 3 partitions but second step I’m getting cannot create directory and file exists. Then I get root@ubuntu:/home/ubuntu# is this wrong to have /home and is Internet an absolute must? I’m going to keep trying, hopefully can get some assistance to clear up my errors. Please? Thank you

    • Abhishek Prakash


      In step 2, try to see the content of /mnt/temp using the following command:

      sudo ls /mnt/temp

      It may happen that /mnt/tmp already exists. If it exists (it will not throw any error) and it is empty (it will not display anything in output), then use the second command (in second step only) and mount the partition.

      • Shoop

        Thank you for the fast response, that command came back with nothing then I tried just mount command and sda2(extended) and sda5 (Linux) mount:can’t find and sda1(HPFS/NTFS/exFAT) already mounted or busy. Is this normal?

        • Shoop

          I’ve ubuntuworking now and can see the boot menu by holding shift at startupbut xp won’t boot, get an error- error:no video mode activated. Have you come across this one, any solution?

  • Ky groff

    Hi I get to step 4 then apt-get update responds with ‘could not resolve’ and ‘failed to fetch’. Apt-get purge… ‘package grub is not installed,so not removed the following packages will be removed: grub-common* grub-gfxpayload-lists* grub-pc* grub-pc-bin* grub2-common* 0 upgraded, 0 newly installed, 5 to remove and 140 not upgraded do you want to continue [y/n]?’

    It is all in terminal, not an additional window (strange screen) as you show. Is this going to give me the same result or remove the wrong items?

    • Mehdi Tlili

      You should have an Internet connexion to be able to download the needed packages.

  • Z_M@

    Tnx Abhishek

  • gowtham

    is all disks are formated…….

  • gowtham

    i want the files which is stored on the windows 7 what can i do plssss help me

  • Satriyo Achmad

    Wow thankyou.. it’s very help me to solve grub problem.. 😀

  • Marco Mendiguchia

    Good post, works perfect! Thanks!

  • ahmed ben saleh

    In the five step , I get this error: E: unable to locate package grub-common
    E: package “grub-pc” has no installation candidate. How can i fix given that I deleted th grub in the step 4? thanks

    • Abhishek Prakash

      strange. Which Linux OS and which version are you using?

  • Shafeeq Rahman

    Thank you very much for this great article ………!!!!!!!!

    I deleted my sda5(Windows D drive) for some other purpose , mean while my ubuntu root partiotion got shifted to sda5 and swap to sda6 from sda6 and sda7 respectively.And I was sucked .Thank god , I have seen you post.

    Thanks again ….!!!

    • Abhishek Prakash

      Welcome Shafeeq :)

  • Manoj

    Hi Abhishek,

    I have problem similar to this. I have two hard disks and I have set up the boot order as well(the slave was previously configured to boot ubuntu up). But however I formatted all of the drives in slave and I once used it with master and performed file operations as well. I am using a DH87RL board with a i7 4770K cpu. Thing is, from the 2nd start up after format, I cannot boot into windows or anything, with slave attached. I specify the boot order, remove the slave from boot up, but no matter, I get this ‘no such partition’ error. So I use with the slave drive detached nowadays. I can use windows dvd and reformat all the drives and get back on toes, but I sincerely want all my data from slave. I retrieved them just a day ago after a long trial of almost 3 years, And to my bad luck, my ubuntu cd doesn’t work to boot up either. Any help will be appreciated :) Thanks in advance.

    • Abhishek Prakash

      I think I am too late now. Sorry but your comment was piled upon by several others. If you have fixed the issue, do share it with us as well.

      • Manoj

        Hi Abhishek,

        I did what I have mentioned above. I tried to reformat the slave disk using Win7, but that messed up with my drive. It never completed formatting and it took like forever. And a restart caused the corruption of that hard disk. I believe the controller chip information in the HDD is corrupt or lost and so I cannot use it with any board so far! :( I should use SeaTools or something else to get back the HDD i guess.

  • Matt Tucci

    Shoot.I needed this two weeks ago.

    • Abhishek Prakash

      Is it solved now?

      • Matt Tucci

        No, I just re-installed. I spent several hours trying to recover it. I didn’t even do dual boot this time. Everytime I would need to use windows there was so many updates and waiting it just wasn’t worth it. In the process of trying to save it, I probably boogered things up more-so.

  • aalia lyon

    Superb article. We are provide full solution of your problem
    visit this site and make free from all error.

    windows 7 problems

    Thank you
    Aalia lyon

  • Brick

    I love lamp.

  • yassine

    an ocean of thanks man, thank you very much !! it works

    • Abhishek Prakash

      Welcome Yassine

  • Patrick Toohey

    Thank you, this worked like a charm and it was easy to follow. That was yesterday. Today, the grub error is back. My issue is, I installed Kubuntu on an external hard drive and I get the error when trying to boot to the external hard drive. If I boot from the pen drive, it still seems to use the Kubuntu on the external hard drive. I’ll try running through this procedure again, but if you know of any other reason why this continues to happen, please let me know.

    • Abhishek Prakash

      I have virtually no experience with external hard drive unfortunately :( I hope it works out for you.

  • Prachi Sharma

    hey what if i dont have the CD for same version of Windows OS which was installed

    • Abhishek Prakash

      It is for same version of Linux OS. You don’t need Windows CD here :)

      • Prachi Sharma

        dont have linux OS too :/

        • Abhishek Prakash

          Which Linux OS and version are you using? You can download the ISO again.

          • Prachi Sharma

            will my data get erased ?? 😮

          • Abhishek Prakash

            Download the OS again.. create a live disk and follow the procedure given here. Your data should be fine.

  • Niket
  • kishan

    hy i m kishan grub scure problm in my lapi.i have install w7 and fedora20 . i m open fedora bt there is no option of w7 during the start lapi. so what i do for this solve my prolm, pls help me there is imp. file in w7. so i don.t formt it.

    • Abhishek Prakash

      From what I understood… you have dual booted Fedora with Windows 7 but you don’t see the GRUB option to select Windows 7.

      Try Grub recovery disk.

  • jakob

    The problem I am having is that my hard disk isnt being recognized. I was on Ubuntu, and wanted to replace it with windows XP. The install failed at some point, and now I just get the no such partition error and pxe-e61 media test failure error

  • Pingback: Fix Minimal BASH like line editing is supported GRUB Error In Linux()

  • Anon

    Dont know the partition where root has been installed.

    Here is the picture can u pls tell me –

  • anon

    after step 3 command – sudo cp /etc/resolv.conf /mnt/temp/etc/resolv.conf

    i get this – cp: not writing through dangling symlink `/mnt/temp/etc/resolv.conf’
    Help me pls :/

    • anon

      pls help me ! :( :(

  • Pingback: [ubuntu] error: no such partition. grub rescue> topic | ubuntu()

  • Shubham

    I have windows 8 and ubuntu installed on my system. I want to erase 8 and instead of want to install windows 7. But, I do fear grub error might occur. Windows installed on one end and Ubuntu installed on other end of Memory.
    Any Suggestions?

  • Gogyoo


    What I downloaded on Ubuntu website and burn on a DVD is actually Sysresccd, is it the correct program that should launch?