0

I have a Windows EFI partition and i have a Linux root partition who contain /boot/


Partition 1 Windows

Partition 2 Windows EFI

Partition 3 Linux Root => /boot/

Partition 4 Linux Home


I try with efibootmgr and bcfg boot add fs to add a boot entry to boot into Linux

To do so i tried this command


efibootmgr --disk /dev/$myHardDrive --part $partition2 --create --label "$linuxName" --loader /vmlinuz-linux --unicode 'root=PARTUUID=$partition3UUID rw initrd=\initramfs-linux.img' --verbose

And i tried too to do


bcfg boot add 0 fs1:\vmlinuz-linux "$linuxName"

bcfg boot -opt 0 fs1:\kernel-opts


. But no fs contain vmlinuz-linux or initramfs-linux.img or kernel-opts. So naturally UEFI say bcfg: Invalid argument - 'fs1:\vmlinuz-linux'


bcfg boot dump -v


is way too large to print correctly on the screen to be read


bcfg boot dump


Output :


Option: 00. Variable: Boot0003
  Desc    - $linuxName
  DevPath - HD(2,GPT,$anUUID,$anHexa,$anHexa2)/\VMLINUZ-LINUX
  Optional- Y
Option: 01. Variable: Boot0000
  Desc    - Windows Boot Manager
  DevPath - HD(2,GPT,$anUUID,$anHexa,$anHexa2)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
  Optional- Y
Option: 02. Variable: Boot0001
  Desc    - Hard Drive
  DevPath - BBS(HD,)
  Optional- Y

And for efibootmgr -v


Boot0000* Windows Boot Manager HD(2,GPT,$anUUID,$anHexa,$anHexa2)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS........x...B.C.D.O.B.J.E.C.T.=.{$anUUIDWithDots}...t..............
Boot0003* $linuxName HD(2,GPT,$anUUID,$anHexa,$anHexa2)/File(\VMLINUZ-LINUX)r.o.o.t.=.P.A.R.T.U.U.I.D.=.$partition3UUIDWithDots .r.w. .i.n.i.t.r.d.=.\.i.n.i.t.r.a.m.f.s.-.l.i.n.u.x...i.m.g.

This question may already have an answer here:

How to make UEFI bios start GRUB, not Windows? 5 answers

No, my question is different. I will edit to explain how.


Not a duplicate, see the second comment

wxi
  • 53
  • 2
  • 9

2 Answers2

1

I succeeded to access to my O.S., it was the "root=PARTUUID" I've used an UUID, so i replaced PARTUUID by UUID and now its okay, thanks !

wxi
  • 53
  • 2
  • 9
0

UEFI can only boot files from partitions which it has a filesystem driver for. (For hopefully obvious reasons.)

Most firmwares only understand FAT filesystems, so your efibootmgr entry must point to the EFI System Partition (or another FAT partition, but there's no point in having more than one), and you must copy vmlinuz-linux and initramfs-linux.img to that partition.

(The easiest way to do so is to have the Windows EFI partition mounted at /boot.)

grawity
  • 501,077