LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-16-2020, 08:44 AM   #16
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18

Quote:
Originally Posted by tofino_surfer View Post
The only problem would be the small 100 MB size. I don't know how much space Windows needs for its bootloader and how much space would be left over for grub-efi. You should mount this efi partition in Devuan and use df -h to determine the free space. Please post the results.
OK:

# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 794M 744K 793M 1% /run
/dev/sda3 469G 5.6G 439G 2% /
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.7G 187M 7.5G 3% /run/shm
/dev/sda1 945M 86M 795M 10% /boot
/dev/sda4 424G 192K 424G 1% /SHARED/local
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 794M 40K 794M 1% /run/user/1000
/dev/sdb2 95M 27M 69M 28% /boot/EFI

Quote:
The recommended size for Linux alone is at least 128 MB with some distros recommending 200 MB or more. I'm not sure if Windows and Linux can share a small 100 MB EFI partition.



With EFI you don't boot from a drive but from EFI variables stored in NVRAM. You would need to manually select the grub efi loader for the first boot and then use grub-install to put the grub EFI variables first in the list for succeeding boots.

Code:
        grub-install --target=x86_64-efi /dev/sda

    Reboot.
    Change the BIOS from BIOS boot to UEFI boot.
    Use the one-time boot menu to force boot the disk. You may have to navigate to the disk -> EFI -> ubuntu -> grubx64.efi.
    Re-install GRUB's EFI bootloader to update the UEFI boot selector.

        grub-install
...Making sure I'm decoding this right... NVRAM = non-volitile RAM = settings in the BIOS chip?

I'm at step
14. Install the GRUB EFI bootloader.

grub-install --target=x86_64-efi /dev/sda

Should that be /dev/sdb since that's where the /boot/EFI partition is located?
 
Old 04-16-2020, 09:07 AM   #17
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Uh-oh. I've been reading documentation on grub legacy. I need to hunt for the grub2 docs.
 
Old 04-16-2020, 10:14 AM   #18
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Interesting...
Code:
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
That's because the directory /usr/lib/grub/x86_64-efi doesn't exist. The only directory in /usr/lib/grub is i386-pc.
 
Old 04-16-2020, 10:55 AM   #19
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Code:
# df -h
 /dev/sdb2 95M 27M 69M 28% /boot/EFI
Since you have 69MB free in the existing ESP you could try sharing this partition.

Quote:
Should that be /dev/sdb since that's where the /boot/EFI partition is located?
In your case it would be if you wanted to re-use the existing ESP. I just copied those instructions from the webpage that I posted.

Quote:
That's because the directory /usr/lib/grub/x86_64-efi doesn't exist. The only directory in /usr/lib/grub is i386-pc.
You might have to install the grub-efi package with the Devuan package manager first.
 
Old 04-16-2020, 11:16 AM   #20
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
I edited my post #12 to install the grub-efi package

Quote:
grub-install --target=x86_64-efi /dev/sda
Should that be /dev/sdb since that's where the /boot/EFI partition is located?
Don't need either one, don't have to add the /dev/sd? on an efi system, for the efi partition needs to be mounted to /boot/efi before running grub-install. The grub-install will ignore the /dev/sd? when installing in efi mode.
use this
Code:
grub-install --target=x86_64-efi

Last edited by colorpurple21859; 04-16-2020 at 11:27 AM.
 
Old 04-16-2020, 01:38 PM   #21
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
I used Synaptic to load grub-efi and grub-efi-amd64-dbg which also loaded grub-efi-amd64, grub-efi-amd64-bin.

root@XXXXX:~# grub-install --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: error: cannot open `/boot/EFI/EFI/devuan/grubx64.efi': No such file or directory.

/boot/EFI/EFI contains directories named Boot and Microsoft and nothing else. Specifically, no devuan.
/boot/EFI/EFI/Boot contains bootx64.efi and nothing else.
/boot/EFI/EFI/Microsoft contains directories named Boot and Recovery. Boot is full of stuff--too much to list here. Recovery contains files named BCD, BCD.LOG, BCD.LOG1, BCD.LOG2.

This smells like I'm missing another package besides grub-efi.

Last edited by tnandy; 04-16-2020 at 01:41 PM.
 
Old 04-16-2020, 01:48 PM   #22
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
I think the first efi needs to be lower case
/boot/efi
 
Old 04-16-2020, 02:43 PM   #23
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by colorpurple21859 View Post
I think the first efi needs to be lower case
/boot/efi
I created /boot/efi, changed /boot/EFI to /boot/efi in fstab, shutdown and restarted.

root@XXXXX:~# grub-install --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: error: cannot open `/boot/efi/EFI/devuan/grubx64.efi': No such file or directory.
------------------------------------------------------^^^
***************************************notice*

Now /boot/efi/EFI contains Boot and Microsoft just as before; still no devuan directory. What's supposed to create the /boot/efi/EFI/devuan directory?

Last edited by tnandy; 04-16-2020 at 02:44 PM.
 
Old 04-16-2020, 02:57 PM   #24
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
I suspect the efi partition may not be big enough,
try
Code:
grub-install -v --target=x86_64-efi
see if any additional information is outputted as to what is happening.
 
Old 04-16-2020, 02:59 PM   #25
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Quote:
I think the first efi needs to be lower case
/boot/efi
This is not the case here as the OP mounted the ESP at /dev/sdb2 at /boot/EFI.

Code:
# df -h
 /dev/sdb2 95M 27M 69M 28% /boot/EFI
I'm not sure this was a good idea as I believe the Linux mountpoint should use lower case as is the Linux convention. However this is what the OP did.

To the OP it is a good idea to change the mountpoint in your fstab to lower case so it is easier to distinguish the Linux mountpoint from the contents of the ESP. Most guides tell you to use lowercase /boot/efi for your mountpoint such as the guide I posted in my previous post.

https://serverfault.com/questions/96...-gpt-with-uefi

Code:
Create the ESP mount point.

    mkdir /boot/efi

Add the ESP to /etc/fstab. It should look like this:

    /dev/disk/by-partlabel/EFI-system /boot/efi vfat defaults 0 2

Mount the ESP.

    mount /boot/efi
It's simply less confusing if you use lower case for all Linux paths and mountpoints.
 
Old 04-17-2020, 02:35 PM   #26
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by tofino_surfer View Post
....

To the OP it is a good idea to change the mountpoint in your fstab to lower case so it is easier to distinguish the Linux mountpoint from the contents of the ESP.
Add the ESP to /etc/fstab. It should look like this:

/dev/disk/by-partlabel/EFI-system /boot/efi vfat defaults 0 2

Mount the ESP.

mount /boot/efi
[/CODE]

It's simply less confusing if you use lower case for all Linux paths and mountpoints.
This is exactly what I did. (Well, actually I rebooted after I made the changes to fstab; either way, /boot/efi got mounted.) Then I tried to install grub again. No joy.

I know you guys have high hopes I might be able to reconstruct my dual boot using the foundation I built, but I'm thinking that I might be fighting this same battle a week from now. I'm fairly confident that using what I've learned from you that by Monday I could have a working dual boot by wiping the disks and starting over the right way.

I sure appreciate all your efforts!

If I do start over, I'll install Windows 10 and my /SHARED/local directory on the 1 TB SATA-0 disk and Devuan on the 500 GB SATA-1 disk. I'll make sure to setup /boot/efi to point at the EFI partition on the Windows installation.
 
Old 04-17-2020, 04:11 PM   #27
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
add --recheck to grub-install
Code:
grub-install --recheck  --target=x86_64-efi

Last edited by colorpurple21859; 04-17-2020 at 04:14 PM.
 
Old 04-17-2020, 05:43 PM   #28
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by colorpurple21859 View Post
add --recheck to grub-install
Code:
grub-install --recheck  --target=x86_64-efi
Same as before...

root@XXXXXX:~# grub-install --recheck --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: error: cannot open `/boot/efi/EFI/devuan/grubx64.efi': No such file or directory.
 
Old 04-17-2020, 06:12 PM   #29
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Quote:
I know you guys have high hopes I might be able to reconstruct my dual boot using the foundation I built, but I'm thinking that I might be fighting this same battle a week from now
At this point you should take my original advice and create a new 200MB or larger ESP on the Linux drive sda. I never recommended sharing the small 100 MB existing ESP as 100 MB is less than Linux distros recommend just for themselves. As I said Fedora recommends at least 128MB. You wanted to avoid creating a new partition so I was OK with you trying it. Now that it didn't work now is the time to create a new larger ESP on sda.

Newer versions of Debian actually recommend a size of 500 MB.

https://www.ctrl.blog/entry/esp-size-guide.html

Quote:
I'm fairly confident that using what I've learned from you that by Monday I could have a working dual boot by wiping the disks and starting over the right way.
Giving up is never the right way when you never tried the recommended way to begin with.

You never tried the suggestion from colorpurple to use the verbose flag or at least you never replied with the results.

Quote:
I suspect the efi partition may not be big enough,

grub-install -v --target=x86_64-efi

see if any additional information is outputted as to what is happening.
 
Old 04-18-2020, 12:44 AM   #30
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Well, HAPPY DAY! I got a little farther. The entry for /boot/efi in fstab had the wrong options. I deleted everything and just used "defaults". I hope that's right.

Now, there's a /boot/efi/EFI/devuan folder with grubx64.efi in it. But I'm not quite there yet. The verbose stuff scrolled right off the screen and I couldn't see it all. So I sent the output to a file:

root@XXXXXX:~# grub-install -v --target=x86_64-efi &>> /root/grub-install.log

There must be a thousand lines in /root/grub-install.log that start with "grub-install: info: ...." ...Most of which I'm not even going to guess what's happening. And then it ends with this:

Code:
grub-install: info: executing modprobe -q efivars.
EFI variables are not supported on this system.
grub-install: info: executing efibootmgr -c -d /dev/sdb -p 2 -w -L devuan -l \EFI\devuan\grubx64.efi.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
I gotta say, without your encouragement, I'd have punted days ago. I probably would have gotten it wrong again, too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] Grub, Ubuntu, Debian, Windows, Oh my!! Grub can't find Windows partitions crs17 Linux - General 3 05-22-2012 08:13 AM
[SOLVED] GRUB: Cannot find list of partitions && /usr/sbin/grub-setup: error w1k0 Linux Mint 26 12-21-2010 03:29 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
GRUB GRUB GRUB GRUB "Whats Going on?" Gaweph Linux - Newbie 6 03-26-2004 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration