The efivar question

Dear @Tech_JA
Yes, LM is now running from HDD under BIOS option of Legacy.
I have been thinking of this issue and probably I have found the root of this problem. In my mobo’s Manual it is written “Storage devices that support GPT format will be prefixed with “UEFI” string. To boot from an operating system that supports GPT partitioning select the drive that is prefixed with “UEFI” string…” In my BIOS image there is UEFI (P4 WDC;;;;;" ) is present but I cannot boot with this option. GRUB prompt is coming.
So I looked into the Disk . the image is given below.:


The last line shows that the partition Sda1 containing EFI is not mounted.
May I know is there any way to mount this partition through terminal?

1 Like

Dear @ubhat,
I would like to help you solve your problem but as I mentioned earlier, I’m newbie to Linux and I’m afraid that if you make some changes to your system, you may damage it and need to reinstall it again.

Please backup all your work before trying to change something in your LM and keep in mind that if something goes wrong you’ll need to reinstall LM

I can’t tell you to do what I wrote below, but this would be the test I would do if I had the same problem as you:
I’m confused because in your previous image of Boot Option #1 I can see 2 Ubuntu entries…

The first step I would do would be to mount the ESP partition and make sure it was not empty.

  • mount /dev/sda1 /boot/efi
  • sudo tree /boot/ efi

NOTE: If you run these commands, post a screenshot of your sudo tree /boot/efi

Dear @Tech_JA I am giving the screen shot as below

soma@soma-B85M-D3H:~$ mount /dev/sda1 /boot/efi
mount: only root can do that
soma@soma-B85M-D3H:~$ sudo mount /dev/sda1/boot/efi
[sudo] password for soma:
mount: /dev/sda1/boot/efi: can’t find in /etc/fstab.
soma@soma-B85M-D3H:~$ sudo tree /boot /efi
sudo: tree: command not found
soma@soma-B85M-D3H:~$
I have taken backup of the data. and ready to reinstall
Can any one help me to correct it without reinstalling LM 19.2?

Dear @ubhat,
The correct command is:

  • sudo mount /dev/sda1 /boot/efi
    ( I think you forgot the spaces)

since you don’t have tree comand installled try this command after mount partition:

  • ls -LR /boot/efi
    and please give the feedback

If the ESP partition ins’t empty, I’ll do the next steps:

  • sudo update-grub
  • sudo grub-install   /dev/sda
  • Reboot
  • Press F2 to enter to UEFI/BIOS Menu
  • change boot priority to ubuntu
  • Save changes and test if LM runs
  • If you have more than one ubuntu entry in boot list, try all and check If LM runs
  • If LM runs, run again the command ls /sys/firmware and check if you have the EFI directory

These are all the steps I made to put my LM running in UEFI MODE in the thread I mentioned earlier

Dear @Tech_JA
16/11/19
soma@soma-B85M-D3H:~$ sudo mount /dev/sda1 boot/efi
[sudo] password for soma:
mount: boot/efi: mount point does not exist.
soma@soma-B85M-D3H:~$ ls -LR /boot/efi
ls: cannot access ‘/boot/efi’: No such file or directory
soma@soma-B85M-D3H:~$
Please note that there is package “Boot-Repair”. Information available in https://help.ubuntu.com/community/Boot-Repair
Live USB flash drive to be prepared from http://sourceforge.net/p/boot-repair-cd/home
Can be installed via terminal:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
I tried this and the result is hereunder
" GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.
Alternatively, you can retry after activating the [Separate /boot/efi partition:] option."
There is an advance option which will put boot flag on /dev/sda1. When I tried the advance option it advised me:- " The current session is in Legacy mode. Please reboot the computer, and use this software in an EFI session. This will enable this feature. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode.
I have shortage of USB drive but ample stock of CD & DVD.
So I shall procure an usb and try. If you want to advice me any thing else please give me a mail as the controller of this forum has advised me to make our correspondences through email as other members are not involved in this thread. My email address: ubhattacharjee.65@gmail.com

Dear @ubhat,
Please check the command I wrote and the command you wrote: you miss a slash. The command is

  • sudo mount /dev/sda1 /boot/efi
1 Like

Dear @Tech_JA
I am very sorry that I missed the slash in the command. Nevertheless there is no change in the position. the terminal returned the same reply.
soma@soma-B85M-D3H:~$ sudo mount /dev/sda1 /boot/efi
[sudo] password for soma:
mount: /boot/efi: mount point does not exist.
soma@soma-B85M-D3H:~$ ls -LR /boot/efi
ls: cannot access ‘/boot/efi’: No such file or directory
soma@soma-B85M-D3H:~$
Now if I create a mount point and try to mount /dev/sda1 the terminal will possibly reply that there is no entry in /etc/fastab. By going to edit /etc/fastab wirh the UUID of /dev/sda1 is not a good option for me rather I would re-install LM with ESP boot flag. However I prefer to seek your advice.

Dear @ubhat,
From what I can realize now, your issue is different of what I had and you did your installation in legacy mode, I cannot explain how you have an ESP partition, maybe from a prior installation, I really don’t know.

I don’t know enough about Linux to help you solve your problem, but I will now install LM on legacy bios and try to convert it to UEFI to see if I can find a solution that can help you solve your problem.

In my opinion, the correct solution for your issue now is a clean install

I give feedback as soon as possible on tests done

Dear @ubhat,
Could you please inform me the name of the controller who said to you to communicate with me with email about this thread?

You did 5 questions in this thread and after you said you like to repair your LM without install it again, so I still believe this topic involve all members in this forum to help you to solve your issues
Maybe I’m a persona non grata in this forum but it’s you who needs help and everybody on this forum could help you include moderators if you post in your topic instead sending emails to me and vice-versa

My apologies to all. Is an automatic message that appears when we are replying to the topic

1 Like

i believe one of the things that helped me when i switched my computer over to uefi boot this last time was to go into my uefi/bios settings and make sure only uefi was enabled and csm was off when i was installing. i realize yours will be different, but mine look like:

1 Like

the final section of post linked below (titled: Prepare machine to serve UEFI properly) written by @Akito is what i used to find the correct settings and make sure i had everything set up correctly before my installation. if these settings are correct, your dvd should be able to properly install in uefi mode. i would still check with ls /sys/firmware as @Tech_JA has suggested here to make sure it has also booted in uefi mode just to make sure before continuing with the installation :slight_smile:

2 Likes

@cord,
I found today on AskUbuntu, when I tried to find a solution to @ubhat, other bash command to check if it’s running in UEFI or in BIOS mode :

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

Dear @Tech_JA , You are very right . My solution lies in a clean install and suitable tweaking of BIOS for booting in EFI mode. Actually when I reinstalled Win10 a few years ago I converted the HDD Partition from MBR to GPT and installed in EFI mode. But I did not check whether it is EFI or Legacy Bios. Then when installed Mint 19 two years ago , the DVD itself asked for installing in EFI which it did. I found in the Disk that an efi Partition is there in /dev/sda1 with fat32 file system. But I did not check. Next I updated in LM19.1 through update manager. But I made a clean install for LM19.2 . At the time of installation I did not touch the efi partition but flagged the rest of the Disk with root flag. and was working happily thinking that I am booting in EFI mode. But suddenly it came to my notice that the Legacy option is selected in Bios. I 'll let you know the result.
and two /three examinations through terminal resulted that “efi variable not present in the system”
I must thank all of you who helped me a lot in this matter.:smile: I am going for clean install of LM. But I shall wait for a few days as my daughter needs the computer for a few days and I may wait till LM 19.3 in the next month when I would make a clean install. In the meantime I shall try
with the USB boot-repair disk if the mounting flag can be placed on the /dev/sdb1 of my HDD.

1 Like

Dear @01101111 My computer’s Bios is very different you can see from the image below:-


It has a second page as below:
I have a manual of the Motherboard. I have studied it and still reading and comparing settings
I have a Boot-Repair USB Disk. I tried with the repair, the Disk booted in UEFI mode and the the /dev/sda1 was seen to have a mount point :relieved: . but after the session it disappeared :frowning:. So I am working with bios setting and BOOT-REPAIR disk .Thank you very much forPrepare machine to serve UEFI properly I hope to find my solution of BIOS setting.

1 Like

in the second picture i see one called Boot Mode Selection that seems to be set as “UEFI an…”. is it possible to set that one to “UEFI only”?

1 Like

i wanted to clarify that i meant you should only change that setting when you are ready to reinstall in uefi mode. obviously doing so now would mean you couldn’t boot and that wouldn’t be helpful :slight_smile:

1 Like

Dear@cordx. The option read as Uefi & lrgacy

To @01101111 that parameter opens up three options
(1) Uefi & Legacy
(2)UEFI only
(3) Legacy only

1 Like

To @01101111. yes I have the only one machine and if it does not boot at all I am totally lost. I have Super Grub2 boot disk which I have to use many a time when I tweak Bios setting.
Regarding your previous question my answer is yes it can be set “Uefi Only”. and which I did several times but nothing fruitful achieved.