The officially official Devuan Forum!

You are not logged in.

#1 2022-07-25 19:10:28

giorgiob
Member
Registered: 2017-04-30
Posts: 18  

[SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu

I am trying to install Devuan Chimaera on a Lenovo ThinkPad that has Windows 10 pre-installed.
I would like to have a dual boot system. I have done such installations many times with MBR but
I have no experience with EFI/GPT.

The SSD internal disk has a GPT-partitioning that initially looked like this:

/dev/sda1 1G Microsoft basic data
/dev/sda2 260M EFI System
/dev/sda3 500M Microsoft reserved
/dev/sda4 ~220 G Microsoft basic data (drive C:)
/dev/sda5 953 M Microsoft basic data 

I have shrinked partition 4 from Windows and then installed Devuan using a netinstall image.
From the installer, I have created a 1G ext4 boot partition (/dev/sda6) and a 124 G encrypted partition (/dev/sda7) in the free space.
Then I have used the encrypted partition as a volume for LVM and put a swap and a root partition in it.

The installation seemed to work. I had a warning from GRUB but I thought everything would be OK.
But when I rebooted the laptop I got not GRUB-menu: the system just booted into Windows.

So I read some domentation (https://www.gnu.org/software/grub/manual/grub/grub.html, Section 4.1 Installing GRUB using grub-install)
and I rebooted the installation USB-stick into recovery mode and opened a shell in the root filesystem of the installation.

There; I followed the instructions from the GRUB documentation and made a directory

/boot/efi

and mounted the EFI System partition (/dev/sda2) under /boot/efi. Then I ran

# update-grub
# grub-install --target=x86_64-efi

This seemed to work, even though the second command printed a warning: EFI variables are not supported on this system.
Anyway, the EFI System partition now contained a directory:

/EFI/debian

or

/boot/efi//EFI/debian

from Devuan.

So, I left the recovery shell and rebooted but I still got no GRUB-menu: The computer booted directly into Windows as if GRUB were not installed.

Do you have any hints? I can reinstall from scratch and post any GRUB warnings here in case you need more detailed information.

Offline

#2 2022-07-25 19:30:37

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu

Well, the error you got saying "EFI variables are not supported on this system." tells me you run into the same problem I have seen several times with Chimaera. Have a read through this thread: https://dev1galaxy.org/viewtopic.php?id=4496

I guess you need to mount the efivars before running the grub-install.

Good luck, rolfie

Last edited by rolfie (2022-07-25 19:30:54)

Online

#3 2022-07-25 19:59:54

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu


Brianna Ghey — Rest In Power

Offline

#4 2022-07-25 21:02:30

giorgiob
Member
Registered: 2017-04-30
Posts: 18  

Re: [SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu

Thanks a lot for the hints.

I have booted into recovery mode: There is indeed no directory /sys/firmare/efi, neither in the installer console nor in the chroot shell.
I tried

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars

In the chroot shell this gives:

mount: /sys/firmware/efi/efivars: mount point does not exist

I am not allowed to create the mount point:

# mkdir -p /sys/firmware/efi/efivars
mkdir: cannot create directory `/sys/firmware/efi': Operation not permitted

Trying to mount from another console (without chroot) gives the following error:

mount: mounting efivarfs on /sys/firmware/efi/efivars failed: No such file or directory

Offline

#5 2022-07-25 23:07:28

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,107  

Re: [SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu

perhaps it works with

# modprobe efivars

Offline

#6 2022-07-26 05:44:05

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu

If /sys/firmware/efi/ does not exist then the system is not booted in UEFI mode and no new NVRAM boot entries can be made.

@OP: make sure "Legacy" mode (CSM) is disabled and UEFI is enabled in the firmware ("BIOS") options.

As a last resort Windows can chainload Devuan with this command (run as Administrator):

bcdedit /set "{bootmgr}" path "\EFI\debian\grubx64.efi"

Brianna Ghey — Rest In Power

Offline

#7 2022-07-26 08:24:59

giorgiob
Member
Registered: 2017-04-30
Posts: 18  

Re: [SOLVED] Chimaera Dual Boot with Existing Windows (GPT/EFI): No GRUB Menu

Head_on_a_Stick wrote:

If /sys/firmware/efi/ does not exist then the system is not booted in UEFI mode and no new NVRAM boot entries can be made.

@OP: make sure "Legacy" mode (CSM) is disabled and UEFI is enabled in the firmware ("BIOS") options.

As a last resort Windows can chainload Devuan with this command (run as Administrator):

bcdedit /set "{bootmgr}" path "\EFI\debian\grubx64.efi"

That was the problem! I have enabled both legacy and UEFI in the BIOS, and legacy had higher priority so the installation USB stick was booted in legacy mode.
After changing the priority, I started the USB-stick in recovery mode and the efi directory was there. However, efivars had not been mounted and I had to mount it by hand. After that

# update-grub
# grub-install --target=x86_64-efi

did the job: I now get the GRUB menu with Devuan as default entry and from there I can also boot into Windows.

Thanks a lot for all the answers!

Offline

Board footer