2012-10-27

‎efibootmgr:

← Older revision

Revision as of 15:45, 27 October 2012

(3 intermediate revisions by one user not shown)

Line 166:

Line 166:

Verify whether there are files in ''/sys/firmware/efi/vars/'' directory. This directory and its contents are created by "efivars" kernel module and it will exist only if you have booted in UEFI mode, without the "noefi" kernel parameter.

Verify whether there are files in ''/sys/firmware/efi/vars/'' directory. This directory and its contents are created by "efivars" kernel module and it will exist only if you have booted in UEFI mode, without the "noefi" kernel parameter.



If ''/sys/firmware/efi/vars/'' directory is empty or does not exist, then {{ic|efibootmgr}} command will not work. If you are unable to make the ISO/CD/DVD/USB boot in UEFI mode try
https://gitorious.org/tianocore_uefi_duet_builds/pages/Linux_Windows_BIOS_UEFI_boot_USB
.

+

If ''/sys/firmware/efi/vars/'' directory is empty or does not exist, then {{ic|efibootmgr}} command will not work. If you are unable to make the ISO/CD/DVD/USB boot in UEFI mode try
[[#Create_UEFI_bootable_USB_from_ISO]]
.



{{Note| The below commands use
refind
-efi
-x86_64
boot-loader as example.}}

+

{{Note| The below commands use
{{Pkg|gummiboot
-efi
}}
boot-loader as example.}}



Assume the boot-loader file to be launched is {{ic|/boot/efi/EFI/
arch
/
refind/refindx64
.efi}}. {{ic|/boot/efi/EFI/
arch
/
refind/refindx64
.efi}} can be split up as {{ic|/boot/efi}} and {{ic|/EFI/
arch
/
refind/refindx64
.efi}}, wherein {{ic|/boot/efi}} is the mountpoint of the UEFI System Partition, which is assumed to be /dev/sdXY (here X and Y are just placeholders for the actual values - eg:- in /dev/sda1 , X=a Y=1).

+

Assume the boot-loader file to be launched is {{ic|/boot/efi/EFI/
gummiboot
/
gummibootx64
.efi}}. {{ic|/boot/efi/EFI/
gummiboot
/
gummibootx64
.efi}} can be split up as {{ic|/boot/efi}} and {{ic|/EFI/
gummiboot
/
gummibootx64
.efi}}, wherein {{ic|/boot/efi}} is the mountpoint of the UEFI System Partition, which is assumed to be
{{ic|
/dev/sdXY
}}
(here X and Y are just placeholders for the actual values - eg:- in
{{ic|
/dev/sda1
}}
, X=a Y=1).



To determine the actual device path for the UEFI System Partition, try :

+

To determine the actual device path for the UEFI System Partition
(should be in the form {{ic|/dev/sdXY}})
, try :



#
awk '/\
/boot
\
/efi/
{ print $1 }'
/
proc/self/mounts

+

#
findmnt
/boot/efi



/dev/sdXY

+

TARGET SOURCE  FSTYPE OPTIONS

+

/
boot
/
efi
/dev/sdXY
vfat        rw,flush,tz=UTC

Then create the boot entry using efibootmgr as follows :

Then create the boot entry using efibootmgr as follows :



# efibootmgr -c -g -d /dev/sdX -p Y -w -L "
Arch Linux (rEFInd)
" -l
\
\EFI\\
arch\\refind\\refindx64
.efi

+

# efibootmgr -c -g -d /dev/sdX -p Y -w -L "
Gummiboot
" -l
'
\EFI\
gummiboot
\
gummibootx64
.efi
'



In the above command {{ic|/boot/efi/EFI/
arch
/
refind/refindx64
.efi}} translates to {{ic|/boot/efi}} and {{ic|/EFI/
arch
/
refind/refindx64
.efi}} which in turn translate to drive {{ic|/dev/sdX}} -> partition Y -> file {{ic|/EFI/
arch/refind
/
refindx64
.efi}}.

+

In the above command {{ic|/boot/efi/EFI/
gummiboot
/
gummibootx64
.efi}} translates to {{ic|/boot/efi}} and {{ic|/EFI/
gummiboot
/
gummibootx64
.efi}} which in turn translate to drive {{ic|/dev/sdX}} -> partition
{{ic|
Y
}}
-> file {{ic|/EFI/
gummiboot
/
gummibootx64
.efi}}.

UEFI uses backward slash as path separator (similar to Windows paths).

UEFI uses backward slash as path separator (similar to Windows paths).

Line 187:

Line 188:

The 'label' is the name of the menu entry shown in the UEFI boot menu. This name is user's choice and does not affect the booting of the system. More info can be obtained from [http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=efibootmgr.git;a=blob_plain;f=README;hb=HEAD efibootmgr GIT README] .

The 'label' is the name of the menu entry shown in the UEFI boot menu. This name is user's choice and does not affect the booting of the system. More info can be obtained from [http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=efibootmgr.git;a=blob_plain;f=README;hb=HEAD efibootmgr GIT README] .



FAT32 filesystem is case-insensitive since it does not use UTF-8 encoding by default. In that case the firmware uses capital 'EFI' instead of small 'efi', therefore using {{ic|\EFI\
arch
\
refind\refindx64
.efi}} or {{ic|\efi\
arch\refind
\
refindx64
.efi}} does not matter (this will change if the filesystem encoding is UTF-8).

+

FAT32 filesystem is case-insensitive since it does not use UTF-8 encoding by default. In that case the firmware uses capital 'EFI' instead of small 'efi', therefore using {{ic|\EFI\
gummiboot
\
gummibootx64
.efi}} or {{ic|\efi\
gummiboot
\
gummibootx64
.efi}} does not matter (this will change if the filesystem encoding is UTF-8).

== Linux Bootloaders for UEFI ==

== Linux Bootloaders for UEFI ==

Show more