Note: read question before marking it as duplicate. It is different. I would't find answer to the question anywhere.

I have windows 10 preloaded and dual booted it with ubuntu 18.04. I needed to increase space in c drive in windows 10. So I followed process given in bellow link https://www.diskpart.com/articles/increase-c-drive-space-5740.html

At the end it required my laptop to restart. After Restart it show me grub screen. It seems normal problem. In fact I found many answers in unix.stackexchange.com and askubuntu.com. I followed the process but I stuck in between.

GRUB starts in command line after reboot

As given answer and many other I need to find grub/ or boot/ I am not able to find that. Neither I was able to find vmlinuz-4.4.0-38-generic or initrd.img-4.4.0-38-generic with respective version by following process

I also followed https://www.linux.com/training-tutorials/how-rescue-non-booting-grub-2-linux/ which also provide good information

It seems my system is in (hd0,gpt1).

Directory structure shown to me in grub is as bellow

Boot/ Microsoft/ ubutnu/

bootx64.efi fbx64.efi

grubx64.efi grub.cfg shimx64.efi mmx64.efi bootx64.csv

So I can't see grub/ or boot/ as required by most of the answers instead what I see is different

Edit1: output of cat (hd0,gpt1)/efi/ubuntu/grub.cfg and ls (hd0 are shown below enter image description here

Edit2: Thank to telcoM. I prepared Ubuntu installation USB and try Ubuntu functionality. I installed testdisk too. But it show me only one harddrive partition which is of my USB 32 GB. enter image description here

  • We need lots more information. Do you have a copy of the partition table before you followed the instructions in the linked guide? The linked guide offers 3 ways to increase the size of the C: drive, which did you follow? In particular did you follow the second method and invoke the "delete partition" step because there was no space to extend the C: partition?
    – icarus
    Jun 2, 2020 at 4:02
  • No I have no copy of partition table. I followed third method using AOMEI. Jun 2, 2020 at 4:05
  • Your (hd0,gpt1) is the EFI System Partition. It currently contains GRUB and the Windows Boot Manager. If you type cat (hd0,gpt1)/efi/ubuntu/grub.cfg and press Enter to the GRUB command line, what is the response? And if you type ls (hd0, and press the Tab key instead of Enter, it should output a list of partitions, their filesystem types and UUIDs - how many partitions are there now, which filesystems do they have, and does the UUID of any partition match with the one listed in the grub.cfg file?
    – telcoM
    Jun 2, 2020 at 4:34
  • I updated question UUID shown at grub.cfg and ls (hd0,gpt1) seems different. File system of other partition is not known Jun 2, 2020 at 4:59
  • I am not able to find root. If we can find root then maybe problem will be solved Jun 2, 2020 at 5:10

1 Answer 1


Unfortunately, it looks like you may have destroyed your Ubuntu root filesystem while using the AOMEI Partition Assistant. Perhaps it could not identify Linux partitions, and showed them as unknown/empty partitions with no drive letter.

The fact that the Debian-style mini grub.cfg on the ESP says the prefix setting was

set prefix=($root)'/boot/grub'

indicates /boot was not a separate filesystem; if it was, the prefix would have been set to $(root)'/grub' instead.

Before the partition modification, at this point GRUB would have been able to find a filesystem with the UUID specified in the mini grub.cfg file. Since it cannot be found now, I'm afraid that filesystem may been overwritten or otherwise corrupted.

Your existing partitions seem to be:

  • (hd0,gpt1) - this is the EFI System Partition that is used to load GRUB from.
  • (hd0,gpt2) - by the size (only 16M), this seems to be the "Microsoft reserved" partition that is normally generated by Windows 10.
  • (hd0,gpt3) - size approximately 67 GB / 64 GiB, your Windows C: drive according to your comments
  • (hd0,gpt4) - size approximately 200GB / 191 GiB, your Windows D: drive according to your comments
  • (hd0,gpt5) - size approximately 870M, contents unknown. Maybe a Windows recovery partition?

According to the partition sizes and start locations, there is a gap of about 220 GiB in between (hd0,gpt3) and (hd0,gpt4). This is probably where the Linux partition used to be located.

So the Linux partition seems to be lost. You should find yourself a Linux Live CD (or other suitable boot media) that contains a partition recovery utility like testdisk, and see if the Linux partition or any parts of it can be recovered.

Here's a link to a list of Live CDs that contain testdisk: https://www.cgsecurity.org/wiki/TestDisk_Livecd

You should be able to get into Windows by typing this into the GRUB prompt:

chainloader /efi/Microsoft/boot/bootmgfw.efi

But if you need to rescue any files from the Linux partition, you should not do that right now. In fact, you should avoid any operations that might write to the disk until you've either successfully rescued all the important files from the lost Linux partition, or are satisfied that further rescue attempts will not be worth the effort.

If you want to give up trying to recover Linux, going to BIOS settings and moving "Windows Boot Manager" to the first place in the boot order should also persistently restore the ability to boot Windows (only).

You should use another computer to prepare a bootable Live CD (or other live boot media, such as a pendrive) with testdisk or some other rescue utility available.

If you are familiar with Ubuntu, you could use Ubuntu Live functionality - you might prepare a Ubuntu installation USB and use its "Try Ubuntu" functionality, and then just use the usual package management tools to automatically download & install testdisk to a RAM-based installation. In this case, you'll need to do that again each time you boot from the USB in order to have the tool available.

Or you might use a longer procedure to set up a live USB with persistence or make a complete USB-based installation of Ubuntu; both of these options should allow you to use the standard package management tools to add testdisk and/or other recovery tools to the USB before coming back to the computer with the damaged Linux partition, booting it from the pendrive and making a recovery attempt.

You'll also need a second pendrive or other media you can use to save any recovered files into; although you might be able to mount the Windows D: drive and use it to store the recovered files, as it seems to be not overlapping the missing partition.

Once you can boot the computer from a pendrive and run testdisk on the computer's HDD (e.g. just sudo testdisk /dev/sda or whatever the device name of the HDD ends up being), the next steps depend on what it will report. In the best case, it might be able to simply undo what AOMEI did and restore the missing partition.

AOMEI Partition Assistant seems to be aimed for Windows users only, as it does not seem to support any non-Windows partition types. In the future, you may wish to use gparted instead for modifying the partitioning of any computer that has Linux installed.

  • (hd0,gpt3) is close to winodws c drive partition it has 64GB space. RAM of my laptop is 8GB. So it most probably windows C drive. Other windows drive is d with total space of 191 GB. I didn't done encryption manually. my ubuntu partition should be 250GB approximately. Total Harddive is 500GB out of it I allocated it into 250GB For Ubuntu Edit- I don't remember exectly how much space I allocated to Ubuntu it can be 200,250 or 300 GB Jun 2, 2020 at 6:02
  • I think process is little bit complex. If you have any article doing this process then share. As far as I understood I had to made bootable device, I am using my pendrive, then I will make it bootable and put package for Ubuntu testdisk on it. But what about dependency package shown there ? How I will Access bootable pendrive ? What process I need to follow ? Jun 2, 2020 at 6:35
  • Sorry for late reply. But I initially thought it was lots for me to take in. I prepared Ubuntu installation USB and try Ubuntu functionality. I installed testdisk too. But it show me only one harddrive partition which is of my USB 32 GB. Do you know why other partition are not shown ? I also uploaded pic in question what I see from testdisk Jun 13, 2020 at 9:54
  • Is your harddrive a NVMe SSD? If it is, then the device name will not be /dev/sd* but /dev/nvmeXn1, where X is a number, probably 0. Perhaps the version of testdisk on the Ubuntu USB is not aware of NVMe-style device names, but as long as the proper drivers have been loaded, testdisk should have no problem if you specify the device name for it, e.g. sudo testdisk /dev/nvme0n1. Alternatively, the storage driver might not be loaded: try sudo modprobe nvme; sudo modprobe ahci if you don't know which specific driver is needed for your disk controller.
    – telcoM
    Jun 13, 2020 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .