GRUB2 Minimal BASH-like line editing is supported ...

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
137
Reaction score
67
Credits
1,287
Hi folks, I am facing the problem described here. I have tried to fix this issue by using this tutorial, but I don't know which of the partitions is my Linux (Ubuntu 20.04. LTS) one.
Based on the below output which I got by issuing ls, I know that Win 10 is my Windows 10 Pro partition but despite using GParted to check my partitions, I could not figure out which
of the remaining two partitions is my Ubuntu 20.04. LTS one. I have three disks which are partitioned as follows:

- Samsung 500GB Nv2 SSD (Win 10 Pro)
- WD 4TB (Data)
- Samsung 860 Evo 860 (Ubuntu)

grub_error.JPG


Based on the above output maybe you could tell me which of them is the Ubuntu one.
 


None of them, @mike_linux

For Ubuntu, there should be an EXT4 partition for its root, and that is not evident. Did you wipe a partition, somehow?

...but despite using GParted to check my partitions, I could not figure out which
of the remaining two partitions is my Ubuntu 20.04. LTS one.

Where were you using GParted from? Was it from a Live USB stick, or if not where?

Wizard
 
Did you make you bootable USB Thumb drive on Windows? What did you use to make it?
 
None of them, @mike_linux

For Ubuntu, there should be an EXT4 partition for its root, and that is not evident. Did you wipe a partition, somehow?



Where were you using GParted from? Was it from a Live USB stick, or if not where?

Wizard
No I didn't wipe out any partition @wizardfromoz . I only installed Ubuntu 20.04. LTS on a separate disk and nothing else. The wired thing is that if I start into bios and change the boot order to boot from Ubuntu, then the loader starts properly. The same for when I want to run Windows. Only if I start without going into BIOS then this error occurs.

I have used GParted provided by the Ubuntu installation not from a Live USB.
 
Based on your screenshot it looks like none of those are Linux they are marked ntfs - so apparentley your grub is installed in the wrong place since it is not seeing any ext4 extensions would be my guess
 
Mike, if you don't have Timeshift installed on the Ubuntu, you should do so when this gets fixed, it would restore you to a previous working state. It's in 20.04's Software Centre. I would set up its storage partition on the WD.

If you want to take the trouble, you could boot into the Ubuntu, and use Screenshot to take a picture of each of the 3 drives and show us, make sure you drag the GParted window handle to the right to include Flags and so on so we get a full picture.

Other than that, depending on how much personal date you have in Ubuntu's Home, and not on the WD, I would consider a reinstall. How long have you had the Ubuntu?

If there are numerous settings in Home that you want to save, and Home is a Folder within the Ubuntu root partition, we could move Home to a partition on the WD and I can refer you to an article on how to do that.

For Timeshift help, later, I can refer you to my Thread here, and to other sources.

Let's see if His Lordship agrees or has a different plan.

Chris
 
Mike, if you don't have Timeshift installed on the Ubuntu, you should do so when this gets fixed, it would restore you to a previous working state. It's in 20.04's Software Centre. I would set up its storage partition on the WD.

If you want to take the trouble, you could boot into the Ubuntu, and use Screenshot to take a picture of each of the 3 drives and show us, make sure you drag the GParted window handle to the right to include Flags and so on so we get a full picture.

Other than that, depending on how much personal date you have in Ubuntu's Home, and not on the WD, I would consider a reinstall. How long have you had the Ubuntu?

If there are numerous settings in Home that you want to save, and Home is a Folder within the Ubuntu root partition, we could move Home to a partition on the WD and I can refer you to an article on how to do that.

For Timeshift help, later, I can refer you to my Thread here, and to other sources.

Let's see if His Lordship agrees or has a different plan.

Chris
@wizardfromoz I have installed Timeshift because in past you recommended it to me and I am using it frequently when I create a backup point (like I have done also now) :).


The WD contains only data which get used by linux and win10. There is no Ubuntu partition on it. The Ubuntu partition is on the EVO 860 500GB disk. I have chosen this method to let the bootloader on the linux partition and not on the windows or data one.

Maybe I will let it now as it is (changing the partitions in UEFI BIOS settings)
 
Mike, if you are about to sleep, leave this until your tomorrow, but when you are fresh can you boot into Ubuntu and give me a screenshot of your window in Timeshift where it shows the snapshots that are available to you?

I have to go out for an hour or two, so I'll catch you later.

Cheers

Wiz
 
Mike, if you are about to sleep, leave this until your tomorrow, but when you are fresh can you boot into Ubuntu and give me a screenshot of your window in Timeshift where it shows the snapshots that are available to you?

I have to go out for an hour or two, so I'll catch you later.

Cheers

Wiz
Hi @wizardfromoz sorry, yesterday I was very exhausted from work and so I didn't stayed much time on my pc or laptop.

Today, before I go to work I have done what you wrote and pasted below (there is not much information contained). Take a look if you can and tell me if you want something else. When I come home I will look after. THX and greetings from Greece :).

time_shift_sc.png
 
Mike, if you don't have Timeshift installed on the Ubuntu, you should do so when this gets fixed, it would restore you to a previous working state. It's in 20.04's Software Centre. I would set up its storage partition on the WD.

If you want to take the trouble, you could boot into the Ubuntu, and use Screenshot to take a picture of each of the 3 drives and show us, make sure you drag the GParted window handle to the right to include Flags and so on so we get a full picture.

Other than that, depending on how much personal date you have in Ubuntu's Home, and not on the WD, I would consider a reinstall. How long have you had the Ubuntu?

If there are numerous settings in Home that you want to save, and Home is a Folder within the Ubuntu root partition, we could move Home to a partition on the WD and I can refer you to an article on how to do that.

For Timeshift help, later, I can refer you to my Thread here, and to other sources.

Let's see if His Lordship agrees or has a different plan.

Chris
I agree - need to figure out where the grub is - or reinstall
Code:
sudo lsblk
Also check your BIOS you may have to Add a Boot Option for Ubuntu
 
Last edited by a moderator:
I agree - need to figure out where the grub is - or reinstall
Code:
sudo lsblk
Also check your BIOS you may have to Add a Boot Option for Ubuntu
Issuing lsblk gives me the following partitions

Selection_042.png


And GParted this here

Selection_045.png


Selection_046.png
 

Attachments

  • Selection_044.png
    Selection_044.png
    33.5 KB · Views: 291
Since you have Windowz on one drive and Ubuntu on another drive - since the booting option now is NOT controlled in the Ubuntu boot Manager which is called GRUB. The booting option now is controlled by your system BIOS - So you would have to ADD a Boot option in your BIOS to select Ubuntu to boot then choose which HDD to boot from your BIOS to do that
  • Set Ubuntu hard drive as the first HDD in BIOS.
  • Boot Ubuntu hard drive. Once fully booted
  • In Terminal run:
    Code:
    sudo update-grub
    - once that finishes reboot
    This should automatically add a Windows menu entry to the grub boot menu. So when the Grub boots up again you should see the Windows option then you should be able to select it
 
Last edited by a moderator:
Since you have Windowz on one drive and Ubuntu on another drive - since the booting option now is NOT controlled in the Ubuntu boot Manager which is called GRUB. The booting option now is controlled by your system BIOS - So you would have to ADD a Boot option in your BIOS to select Ubuntu to boot then choose which HDD to boot from your BIOS to do that
  • Set Ubuntu hard drive as the first HDD in BIOS.
  • Boot Ubuntu hard drive. Once fully booted
  • In Terminal run:
    Code:
    sudo update-grub
    - once that finishes reboot
    This should automatically add a Windows menu entry to the grub boot menu. So when the Grub boots up again you should see the Windows option then you should be able to select it
Hi @Lord Boltar I have tried this but the problem still remains. The problem is not that the windows entry to grub does not get set, but that Grub shows the above error while booting the system. The only way to boot both OS is via the BIOS setup not Grub.
 
Have you tried Boot-Repair?
Code:
sudo add-apt-repository ppa:yannubuntu/boot-repair
Code:
sudo apt-get update
Code:
sudo apt-get install -y boot-repair
after install type in a terminal
Code:
boot-repair
- Then click the "Recommended repair" button
 
This is an old problem that we never resolved. Maybe this time....

Mike, your screenshot in Post #1 shows us your broken grub. And that broken grub is on your Windows drive. Your commands show only one drive (hd0) and 3 gpt partitions, all containing Windows filesystems (ntfs and fat). You should not have a grub on this drive, but you do (maybe a result of our efforts a year ago).

The Windows drive is NVMe, and it was not reported with the lsblk command unless you cropped it out of the image. If lsblk doesn't report your NVMe drive, that may be why you cannot get your working grub (on the Ubuntu drive) to find your Windows with sudo update-grub. Your Windows drive has a working Windows Boot Manager in the FAT partition, and this allows you to boot Windows from BIOS.

Your Ubuntu drive has a working grub, and that allows you to boot Ubuntu from BIOS. This drive is /dev/sda and shows in your gparted screenshot. Your working grub is stored in /dev/sda1 which shows the "boot, esp" flags. Your broken grub is probably stored in the FAT partition of your Windows drive with the Windows Boot Manager.

The data drive is /dev/sdb and is not relevant to your problem that I can tell.

You may can delete your broken grub using efibootmgr, but I'll step back and let @wizardfromoz and @Lord Boltar come back with their thoughts on that. They are both much smarter than I am. I can find MANY reports on the web of Linux not recognizing NVMe drives, sometimes with a solution, and sometimes not. We tried many things last year. If your NVMe/Windows drive is "invisible" to Ubuntu, I don't know if you can make grub boot it, but maybe the others will have better ideas about that, or how to do that.
 
Last edited:
That's great, Mike. :) (I started this 8 hours ago but had to attend to personal business)

1. Now with the GParted shots, can you also show us the one for Windows, is that /dev/sdc ?

2. Can you boot into Ubuntu through the BIOS, and in there go to terminal and enter

Code:
du -ah /home/mikelap

and report back to us with the figure you see at bottom left corner, we need to know how much is stored in your Home folder.

Cheers

Wizard
 
Have you tried Boot-Repair?
Code:
sudo add-apt-repository ppa:yannubuntu/boot-repair
Code:
sudo apt-get update
Code:
sudo apt-get install -y boot-repair
after install type in a terminal
Code:
boot-repair
- Then click the "Recommended repair" button
@Lord Boltar I have tried this solution several times which I found via google but this doesn't work :(. After the process has finished a dialog pops up which says that the Bootloader was repaired but this is not the case. When I restart the problem remains unfortunately :(.
 
This is an old problem that we never resolved. Maybe this time....

Mike, your screenshot in Post #1 shows us your broken grub. And that broken grub is on your Windows drive. Your commands show only one drive (hd0) and 3 gpt partitions, all containing Windows filesystems (ntfs and fat). You should not have a grub on this drive, but you do (maybe a result of our efforts a year ago).

The Windows drive is NVMe, and it was not reported with the lsblk command unless you cropped it out of the image. If lsblk doesn't report your NVMe drive, that may be why you cannot get your working grub (on the Ubuntu drive) to find your Windows with sudo update-grub. Your Windows drive has a working Windows Boot Manager in the FAT partition, and this allows you to boot Windows from BIOS.

Your Ubuntu drive has a working grub, and that allows you to boot Ubuntu from BIOS. This drive is /dev/sda and shows in your gparted screenshot. Your working grub is stored in /dev/sda1 which shows the "boot, esp" flags. Your broken grub is probably stored in the FAT partition of your Windows drive with the Windows Boot Manager.

The data drive is /dev/sdb and is not relevant to your problem that I can tell.

You may can delete your broken grub using efibootmgr, but I'll step back and let @wizardfromoz and @Lord Boltar come back with their thoughts on that. They are both much smarter than I am. I can find MANY reports on the web of Linux not recognizing NVMe drives, sometimes with a solution, and sometimes not. We tried many things last year. If your NVMe/Windows drive is "invisible" to Ubuntu, I don't know if you can make grub boot it, but maybe the others will have better ideas about that, or how to do that.
Hi @stan
Mike, your screenshot in Post #1 shows us your broken grub. And that broken grub is on your Windows drive. Your commands show only one drive (hd0) and 3 gpt partitions, all containing Windows filesystems (ntfs and fat). You should not have a grub on this drive, but you do (maybe a result of our efforts a year ago).
I don't really know why this has happened, because I have chosen while I was installing Ubuntu only the second hard drive (EVO 860).
The Windows drive is NVMe, and it was not reported with the lsblk command unless you cropped it out of the image. If lsblk doesn't report your NVMe drive, that may be why you cannot get your working grub (on the Ubuntu drive) to find your Windows with sudo update-grub. Your Windows drive has a working Windows Boot Manager in the FAT partition, and this allows you to boot Windows from BIOS.
This helps me to understand why I can boot both OS from BIOS. THX @stan for the description.

You may can delete your broken grub using efibootmgr, but I'll step back and let @wizardfromoz and @Lord Boltar come back with their thoughts on that. They are both much smarter than I am. I can find MANY reports on the web of Linux not recognizing NVMe drives, sometimes with a solution, and sometimes not. We tried many things last year. If your NVMe/Windows drive is "invisible" to Ubuntu, I don't know if you can make grub boot it, but maybe the others will have better ideas about that, or how to do that
This sounds quite complex and I don't want to break something else. Can you provide me a tutorial for that please, in case the others have no better idea?
 
That's great, Mike. :) (I started this 8 hours ago but had to attend to personal business)

1. Now with the GParted shots, can you also show us the one for Windows, is that /dev/sdc ?

2. Can you boot into Ubuntu through the BIOS, and in there go to terminal and enter

Code:
du -ah /home/mikelap

and report back to us with the figure you see at bottom left corner, we need to know how much is stored in your Home folder.

Cheers

Wizard
Hi @wizardfromoz /home/mikelap/ is the home folder of my laptop. Tha was my fault because In hurry I posted the wrong screenshots of gparted from my laptop instead of my PC where the problem is. So, I have posted below the new ones. This happens when you are in a hurry and want to perform multiple things in parallel :(.

sudo lsblk output
Selection_001.png


NVME device (Windows 10 Pro)
Selection_002.png

4TB device (Data)
Selection_003.png


Ubuntu device
Selection_004.png

Lastly, when I issue du -ah /home/mikeubnt-pc/ (the right one now) I get a very long output which lists me every folder in my home directory with its size. Is that what you need?
 
Last edited:

Members online


Latest posts

Top