The efivar question

it makes sense that changing it to uefi only while your present installation is in legacy mode wouldn’t be very helpful. what I was hoping was that when you decide to reinstall mint, setting that to uefi only will help make sure your install dvd boots in uefi.

Dear @01101111
right you are. I tried with my USB boot-repair disk with Uefi Only option. and I think it booted in uefi. But I am not very sure. I want to be away from this for some time and devoting my attention to some other subject. So that I can give full attention next day to this one. If after testing I know that the USB disk has successfully booted in uefi then the correct Bios parameters will be known as well as if the boot-repair disk can repair the fault in my hdd(hoping remotely) nothing better than that.

Dear @ubhat,
I did a conversion of LM in legacy mode to UEFI mode with success using this guide

My test (you don’t need to do these steps):

  • I changed boot mode to UEFI
  • I ran LM 19.2 USB LIVE
  • I formatted SSD using GUID Partition Table and create 2 partitions:
    • 537 MB EFI Partition in FAT32 (sda1)
    • 240 GB / in ext4 (sda2)
  • Reboot
  • I changed boot mode to Legacy
  • I ran again LM 19.2 USB LIVE and installed LM choosing sda2 to install it.

Since I changed boot mode to Legacy, the LM was installed in legacy mode.
With these steps I created an installation similar to yours:




After, I followed the steps of this guide to convert Legacy to UEFI mode:

  • I changed boot mode to UEFI

  • I ran again LM 19.2 USB LIVE

  • I tested if LM LIVE is running in UEFI with this bash command:
    $ [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
    The result was: UEFI

  • And I entered these commands:

sudo mount /dev/sda2 /mnt
sudo mkdir -p /mnt/boot/efi
sudo mount /dev/sda1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
sudo modprobe efivars
sudo chroot /mnt
sudo apt-get install grub-efi-amd64
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck --no-floppy --debug
  • I Entered again to boot menu and disabled Secure Boot.
  • I ran LM from SSD and confirmed if it’s running in UEFI
  • I checked If ESP partitions was mount and in my case was not mounted
  • I edited /etc/fstab:
    • sudo xed /etc/fstab
      and added the follow line:
UUID=YOUR_UUID  /boot/efi       vfat    defaults      0       2
  • reboot

And now LM is running in UEFI mode!

NOTE: Remember that if something goes wrong, you will need to reinstall LM and you will lose everything you have on your hard drive.

I think, this is what’s you are looking for.

good luck when you decide to return to this question.

regarding this statement:

you can always check with either of the commands @Tech_JA has provided here:

or

both work perfectly on my regular system to let me know it is uefi and on my ubuntu 18.04 vm to let me know it is bios :slight_smile:

1 Like

Dear @ubhat,
After inform you how to convert legacy mode LM installation to UEFI mode and having tested it to make sure the code I provided worked, I think the questions you asked on this topic are all answered, so I think I can conclude my speech on this topic

I wish you the best of luck if you convert your LM

1 Like

Dear @Tech_JA
At Last I have solution to this issue but in a very hard way.
After your last post I tried to boot in UEFI mode with a live DvD but failed several times. Tried your set of commands with a live DVD in Legacy mode.
The Result is interestin in the last line
mint@mint:~$ sudo update grub
sudo: update: command not found
mint@mint:~$ sudo mount /dev/sda1 /mnt
mint@mint:~$ sudo mkdir -p /mnt/boot/efi
mint@mint:~$ sudo mount --bind /dev /mnt/dev
mount: /mnt/dev: mount point does not exist.
mint@mint:~$ sudo mount --bind /proc /mnt/proc
mount: /mnt/proc: mount point does not exist.
mint@mint:~$ sudo mount --bind /sys /mnt/sys
mount: /mnt/sys: mount point does not exist.
mint@mint:~$ sudo mount --bind /run mnt/run
mount: mnt/run: mount point does not exist.
mint@mint:~$ sudo modprobe efivar
modprobe: FATAL: Module efivar not found in directory /lib/modules/4.15.0-54-generic
mint@mint:~$
So I switched to another kernel.
In order to solve UEFI boot mode in mobo’s Bios I started reading Bios documents of different Motherboards and what I gathered that i/r of Efi Asrock is the easiest.
image
PCs and laptops from most manufacturers including Dell, HP, Asus, Acer, Toshiba, Lenovo and more, Legacy Boot can be disabled with the feature known as CSM… But in Gigabyte CSM is on . The default setting of all options to be kept intact. When I insert a Live DVD or Live USB which can boot in UEF, it adds an additional option prefixing UEFI shown as below:


Armed with this knowledge I started the set of commands you have given me

Immediately this a pop up message came " The DVD or the HDD might have crashed "
I kept backup of my data.
So I restarted with the DVD but the computer hanged…
I left the matter there to give the machine one night rest and also to cool off the HDD. Next day I strted chechking my HDD and ran a CheckDisk . Found the HDD in order. I had one one DVD which has never been used. This was LM19.2 MATE which I used to Boot. Got UEFI Menu at the begining. Confired the partiotn is GPT and deleted the earlier efi partition. created new esp/boot partition and flagged the /root in the rest of the disk which is formatted in Ext4. So I am now running LM19.2 Mate in UEFI Mode.
image
Thanking you very much. You & @01101111 were of great help in understanding this UEFI matter as well as the BIOS settings. If all you permit me ai shall close this thread. Thanking all of you again

1 Like

in your last screenshot, the first command needs a couple of changes to properly check if you are installed in uefi mode:

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

there has to be a space between -d and /sys/firmware/efi and /sys/firmware needs /efi.

1 Like

It’s really important that you take your time writing commands and double check if you write the correct ones. As you have already experienced, in the worst case this can lead to something like rm -fr / which is devastating. So you should really be aware of what is actually typed into the CLI, before you could destroy even more.

1 Like

Dear @01101111 I am sorry. As you stated I checked and unfortunately each time BIOS is returned by the command. can you tell me what should I do now. Incidentally each time UEFI boot menu is coming first.

2 Likes

Turn off CSM.

1 Like

Dear @Akito . Thank you I shall be mindful henceforth. I am very sorry.

1 Like

Don’t be sorry to me. Be sorry to your daughter and her files.

1 Like

Dear @ Akito,
CSM & Secure Boot is Off yet Bios is returned.:cold_sweat:

1 Like

Try changing BOOT to legacy instead of UEFI and try running LM again
I think you changed the boot to UEFI to run the DVD, but you didn’t convert your LM HDD to UEFI MODE

Please read carefully what @Akito just said in your post: It is very important to check all the commands you type before executing them. You typed some commands with errors that can cause serious problems with your operating system that could cause LM to stop working and you need to reinstall LM

1 Like

I did not understand what you meant. The bios options were all default. BBS Priority was in legacy. As I inserted LM dvd UEFI: DRW bacame enabled and uefi boot menu was available. As the live session started I called Gparted. Deleted previous partitions. Converted the Partition into GPT. Created 512 mb fat Partition.flag boot+esp.
Ticked “Something else” and put the root flag on the remaining portion. In the end of the page “bootloader” option selected /dev/sda. After installation restarted with "UEFI: OS option in the Bios.
One thing I have noted… The HDD BBS option cannot be changed. It is default as Legacy whatever changes I make in other options. Though the manual says it can be changed. Perhaps it can be changed by entering set up. But I dare not to do so as I have zero knowledge.
I am going to give an email to GIGABYTE to know the process. Disabling CMS did not do any good.
As per advice of @Akito I shall remain careful.

2 Likes

If I understood correctly you did a clean install of LM
You need to disable CMS like @Akito said
When you do a clean install with success, you have in your boot list an entry which name is Ubuntu
Choose this one to run
(take a photo of your boot list and add to this topic)

i know every system is different, but just wanted to add that mine does not present like this. even when i just had one distro installed, my boot options were taken care of by grub. i am wondering if this is a difference with windows dual boot options and the interaction between multiple bootloaders.

that is part of why your uefi thread was a little harder for me to follow. not because of any of the technical issues, but because my boot does not say anything about ubuntu like your screenshots showed. if i choose f12 at boot and enter my other boot options, i see ubuntu (and, since install, my other distros) listed, but otherwise grub takes over immediately after boot for me.

1 Like

there is never any need to apologize to me. you have already been given good advice about being careful and i believe you are following that. i think that will help a lot :slight_smile:

it’s not a race so nothing has to be done yesterday. you have a functioning system so the world won’t come to an end if installing in uefi mode takes longer than you had hoped it would. when i work with my system or other issues and questions here, i feel like it is a puzzle with many many moving parts. sometimes it just takes more work to get them all going in the same direction.

i feel like it might be helpful to take a look at this part again to try to make sure all of the settings are in the right place before the install dvd even loads. i found what appears to be your motherboard (mobo) book online and it has the following screenshot of your uefi/bios settings:

the manual has this to say about BBS Priority:

Hard Drive/CD/DVD ROM Drive/Floppy Drive/Network Device BBS Priorities Specifies the boot order for a specific device type, such as hard drives, optical drives, floppy disk drives, and devices that support Boot from LAN function, etc. Press on this item to enter the submenu that presents the devices of the same type that are connected. This item is present only if at least one device for this type is installed.

since you only have one boot drive (i think it would definitely help to make sure your external drive isn’t connected when you are working on all of this) and one dvd drive, i don’t read that as saying BBS will have any bearing on whether or not you will install in legacy or uefi. if you have settings or options listed when you choose this option that you are unsure about, posting a picture of that could be helpful.

i believe from your previous post you already have Windows 8 Features set to (Other OS - default) which sounds like it should work. are there other options listed when you click on it that you are unsure of or think might be helpful to know?

the next two sections (CSM Support and Boot Mode Selection) listed in the manual feel like maybe where things are getting stuck. CSM Support seems like the more important one, but i do not see it listed in that screenshot. after reading again (probably the 3rd or 4th time), i finally spotted this:

CSM Support

This item is configurable only when Windows 8 Features is set to Windows 8 or Windows 8 WHQL.

so it seems pretty clear that you cannot fully disable CSM (default is Always which = enables UEFI CSM) unless you choose one of those two (Windows 8 or Windows 8 WHQL) options. i still feel like Other OS is the more reasonable choice, but if someone else feels differently (maybe choosing Windows 8 doesn’t disallow installing linux?) please feel free to say so.

what seems like the more efficient way to ensure uefi installation is the next setting which is Boot Mode Selection. you stated in your most recent post (which i quoted up top) that bios options were all default. the default for this setting is UEFI and Legacy. UEFI Only which is described as “Allows booting from operating systems that only support UEFI Option ROM” sounds like it will be better at ensuring uefi installation.

since your previous installation was in legacy mode, UEFI and Legacy should have been necessary for you to boot.

so my first direction/thought about steps to take when you are ready to reinstall is to make sure this is definitely set to UEFI Only before you load your installation dvd.

after you load that dvd, it would be a good idea to make sure it has in fact loaded in uefi mode. running the command

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

works just fine to check that as long as you remain careful about each and every keystroke. running the command

ls /sys/firmware/

will also help make sure that the output (acpi dmi efi memmap for my ubuntu 18.04-based system) you get from the previous command is confirmed if you see an efi directory listed.

one other way would be to open your file manager and check that folder by sight as in this screenshot:

given all of the effort you have put into this process, it would even be my advice to check all three of those methods just to triple make sure that your dvd is running in uefi mode before attempting another install. it will only take a few minutes at best and should be a pretty good way to try and ensure you are moving in the right direction.

i know that is a lot to read :slight_smile:

so, in summation:

  1. make sure you switch Boot Mode Selection to UEFI Only before loading your installation dvd
  2. load your dvd
  3. check that your dvd is running in uefi mode
  4. check that your dvd is running in uefi mode
  5. check (one last time!) that your dvd is running in uefi mode :smiley:

if anything looks like it might be incorrect or my interpretation of what i read in your manual is off, please feel free to say so before installing again just to make sure you don’t go through the whole process for no reason again. here in the states they have the saying “measure twice. cut once.”

let’s try to make sure you (and me too - this discussion has helped me understand the use of the [ command much better) understand all of the uefi/bios settings and terminal commands before moving forward :slight_smile:

1 Like

Dear @01101111 & @Tech_JA
I am appending four screen shots .
image

image

image

image

I have sent five screenshots. The last one is only for the reason that I believe there is no space between /sys/firmware and /efi.
However from the above four screenshots you will please convey your verdict.:relieved:
I have not been able to give any screenshot of BIOS as I am unable to enter into Bios by any means. I have been trying since morning but F12, DEL & F2 failed. Within a second UEFI boot menu comes up and does not respond to “Enter” and just in 26 seconds it boots and LM 19.2 Mate desktop appears.
Do you have any solution for it.?:pleading_face:
NOTE: Last night @AKITO advised in his post to disable CMS. I did that but instantly there was no expected result… I was feeling ill and shut down the computer and went to sleep. In the morning I received @Tech_JA’ s post in my mobile and relied from my mobile. thereafter I went to drive my daughter to her office. came back and found that I cannot reach BIOS of my computer. :cry:

1 Like

Dear @01101111
I know I make mistakes in typing as I am a little unmindful. I am 78 now and cannot concentrate sometimes.But in Linux Commands should be doubly checked I know… Earlier I have lost Two 1TB External HDDs with lots of data. They were not just mounting.
When I have written to Abhishek I have thrown the question as a puzzle and hoping that he will be able to solve. He threw the puzzle amongst you and @Tech_JA took it very seriously unlike you. I was also carried away with him.
you have a functioning system so the world won’t come to an end if installing in uefi mode takes longer than you had hoped it would— I very much appreciate your this outlook.:slightly_smiling_face:
I shall be trying Hard to reach to Bios. I presume that perhaps I have enabled ‘ultra fast’
option or somehow locked it.---- without my knowing.:yum:

1 Like