0

I have a Dell G3 17 3779 laptop.
It has sata HDD as hd0 and m.2 ssd as hd1. Both in GPT.

I deleted everything in the ssd and installed Windows 10.
I used 4 partitions:

  • Windows recovery environment (499M) | /dev/sdb1
  • EFI System (100M) | /dev/sdb2
  • Microsoft reserved (MSR) (16M) | /dev/sdb3
  • Main Windows NTFS partition (70G) | /dev/sdb4

Also I added for Arch Linux 2 partitions:

  • For / (47.7G) | /dev/sdb5
  • For swap (980.3M) | /dev/sdb6

HDD disk has 2 partitions:

  • Microsoft reserved (MSR) (16M) | /dev/sda1
  • Some NTFS (900G) | /dev/sda2

After Windows I installed arch linux from UEFI following the wiki manual.

GRUB was installed with the usual grub-install without keys

I tried to configure GRUB with manual config:

/boot/grub/grub.cfg

. $prefix/menu.cfg

/boot/grub/menu.cfg

set default=0
set timeout=10
menuentry "ArchLinux" {
 linux /boot/vmlinuz-linux root=/dev/sdb4 rw
 initrd /boot/initramfs-linux.img
}
menuentry "Windows" {
  regexp -s root '\((.+)\)' "$cmdpath"
  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

After rebooting just started Windows 10 without any boot menus.

I installed os-prober and tried grub-mkconfig and get some warning like:
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
or
WARNING: Device /dev/loop0 not initialized in udev database even after waiting 10000000 microseconds.

Instead /dev/loop0 was in all partitions.

And still booting only Windows.

May be it because my HDD is first in BIOS unlike SSD (hd0 vs hd1)?

How to fix this problem?

update: this answer https://askubuntu.com/a/816347/879272 allows me to open grub.

But why BIOS started EFI/Microsoft/Boot/bootmgfw.efi ignoring another boot loaders.
Can I disable this behavior?

fdisk

EFI

2
  • I don't see any information in this question about what you've tried changing in the BIOS. EFI allows you to install multiple bootloaders. Usually you set the boot priority in the BIOS. Feb 12, 2019 at 18:05
  • On an UEFI system, the outputs of efibootmgr -v and lsblk -o +PARTUUID would be important in troubleshooting a problem like this. The former will tell you what boot options the firmware knows about, and together with the latter, you will be able to find out exactly which disk and which .efi bootloader file is used by the firmware with each boot option.
    – telcoM
    Jun 14, 2021 at 12:27

4 Answers 4

0

I think the BIOS is still telling the G3 to boot Windows.

The Dell BIOS has a good file browser to select the bootloader. Enter the BIOS setup (maybe F2 or F8) as soon as you see the Dell logo screen and before Windows starts. Next use the file browser to locate the bootloader grubx64.efi you want to boot and select. Then review the boot order and save the new settings to reboot to Grub.

9
  • F12, then choose Setup Bios. I saw boot menu and grubx64.efi was before than Windows Boot Manager in Boot Order
    – MrModest
    Dec 25, 2018 at 20:25
  • Anyway, will try something again in weekend
    – MrModest
    Dec 25, 2018 at 20:26
  • Now I tried again install arch and grub. After rebooting started Windows. When I open boot menu (F12) and choose arch started Support Assistent memory test
    – MrModest
    Dec 30, 2018 at 14:23
  • Bios boot config: imgur.com/a/CVSabQ4
    – MrModest
    Dec 30, 2018 at 15:41
  • Could you try to go into the BIOS and turn off the HDD in the SATA section leaving just the SSD to boot? If you can boot to Arch then maybe try to install another kernel and see if the pacman makes a good grubx64.efi automatically? You are very close now. Dec 30, 2018 at 16:13
0

Several weeks ago I had the same problem on my laptop. It ignored my GRUB2 and start Windows directly. Here is how I solved this problem:

  1. Rename the directory /boot/efi/EFI/Microsoft to Microsoft0
  2. Change the path in chainloader /EFI/Microsoft/Boot/bootmgfw.efi accordingly, to /EFI/Microsoft0/Boot/bootmgfw.efi

It seems that the BIOS in my laptop will always put Microsoft boot loader at the top of the list, no matter how you configure it. So, renaming the Microsoft directory in the EFI partition can fool the BIOS and it won't boot into Windows automatically.

1
0

Maybe there is something wrong with the grubx64.efi bootloader. Here is an amazing utility that can boot anything anywhere without a bootloader:

SuperGrub2

EDIT: As an alternate, there is the excellent 'refind' boot manager and specializing in booting the EFI. The utility can be installed to a usb removable disk for allowing an emergency boot of an otherwise unbootable fixed disk or can be installed to the EFI system partition for regular use. The 'refind' can find a grub bootloader or boot the installed kernel directly if built with the UEFI bootloader stub as is frequently included with modern linux distributions.

refind

0

TBH I do not know the root cause of a similar issue I had dual booting with Win10 and Kali but I spent ages trying to get them to dual boot and failed. This is the hack I used to get it working.

  • With Win installed
  • Disable secureboot in bios
  • Disable fastboot in bios
  • Install Ubuntu. Because Ubuntu pays nicely with Win, it installs grub in a way that Win 'likes' and the machine then successfully dual booted both Win and Ubuntu
  • Install other linux OS (in my case Kali) but without re-installing grub
  • Boot into Ubuntu and reconfigure grub from Ubuntu (I used `grubcustomizer') to a triple boot
  • Uninstall Ubuntu
  • Boot into your other OS and clean up grub and set the boot priority to boot as desired (again I used grubcustomizer).

When I migrated to this (new) machine I just installed Arch and run windows from Virtualbox, copied the Win data to a folder and shared the folder between the Win VM and Arch. I can now have both machines running (Arch as the workhorse and Win as VM) and work on the shared data drive from whichever platform suits any particular task.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .