You are not logged in.

#1 2013-04-03 04:25:16

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

[SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Hello,

The following command runs without problem or any output. It wouldn't create any entry. Also my refind.conf is not being followed. rEFInd is able to detect kernels and boot fine from /boot

efibootmgr -c -g -d /dev/sda -p 1 -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'

Information

efibootmgr 0.6.0-1
refind-efi 0.6.8-1
Linux 3.8.4-1-ARCH
sudo efibootmgr
BootCurrent: 000A
Timeout: 0 seconds
BootOrder: 0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0012,0013
Boot0000  Setup
Boot0001  Boot Menu
Boot0002  Diagnostic Splash Screen
Boot0003  Startup Interrupt Menu
Boot0004  ME Configuration Menu
Boot0005  Rescue and Recovery
Boot0006* USB CD
Boot0007* USB FDD
Boot0008* ATAPI CD0
Boot0009* ATA HDD2
Boot000A* ATA HDD0
Boot000B* ATA HDD1
Boot000C* USB HDD
Boot000D* PCI LAN
Boot000E* ATAPI CD1
Boot000F* ATAPI CD2
Boot0010  Other CD
Boot0011* ATA HDD3
Boot0012* ATA HDD4
Boot0013  Other HDD
Boot0014* IDER BOOT CDROM
Boot0015* IDER BOOT Floppy
Boot0016* ATA HDD
Boot0017* ATAPI CD:
Boot0018* PCI LAN
ls -R /boot
/boot:
EFI  initramfs-linux-fallback.img  initramfs-linux.img  refind_linux.conf  vmlinuz-linux

/boot/EFI:
boot  refind  tools

/boot/EFI/boot:
bootx64.efi  icons  refind.conf

/boot/EFI/boot/icons:
*** Icons

/boot/EFI/refind:
icons  refind.conf  refind_x64.efi

/boot/EFI/refind/icons:
*** icons

/boot/EFI/tools:
drivers  shells

/boot/EFI/tools/drivers:
ext2_x64.efi  ext4_x64.efi  hfs_x64.efi  iso9660_x64.efi  reiserfs_x64.efi

/boot/EFI/tools/shells:
Shell.efi  Shell_Full.efi
cat /boot/refind_linux.conf
"Boot to X"		"root=PARTUUID=5416f920-35fc-42a8-8a34-564c8c332bfe ro rootfstype=ext4 add_efi_memmap systemd.unit=graphical.target"
"Boot to Console"	"root=PARTUUID=5416f920-35fc-42a8-8a34-564c8c332bfe ro rootfstype=ext4 add_efi_memmap systemd.unit=multi-user.target"
#
# refind.conf
# Configuration file for the rEFInd boot menu
#

# Timeout in seconds for the main menu screen. Setting the timeout to 0
# disables automatic booting (i.e., no timeout).
#
timeout 5

# Hide user interface elements for personal preference or to increase
# security:
#  banner      - the rEFInd title banner (built-in or loaded via "banner")
#  label       - boot option text label in the menu
#  singleuser  - remove the submenu options to boot Mac OS X in single-user
#                or verbose modes; affects ONLY MacOS X
#  safemode    - remove the submenu option to boot Mac OS X in "safe mode"
#  hwtest      - the submenu option to run Apple's hardware test
#  arrows      - scroll arrows on the OS selection tag line
#  hints       - brief command summary in the menu
#  editor      - the options editor (+, F2, or Insert on boot options menu)
#  all         - all of the above
# Default is none of these (all elements active)
#
#hideui singleuser
#hideui all

# Set the name of a subdirectory in which icons are stored. Icons must
# have the same names they have in the standard directory. The directory
# name is specified relative to the main rEFInd binary's directory. If
# an icon can't be found in the specified directory, an attempt is made
# to load it from the default directory; thus, you can replace just some
# icons in your own directory and rely on the default for others.
# Default is "icons".
#
#icons_dir myicons

# Use a custom title banner instead of the rEFInd icon and name. The file
# path is relative to the directory where refind.efi is located. The color
# in the top left corner of the image is used as the background color
# for the menu screens. Currently uncompressed BMP images with color
# depths of 24, 8, 4 or 1 bits are supported, as well as PNG images.
#
#banner hostname.bmp
#banner mybanner.png

# Custom images for the selection background. There is a big one (144 x 144)
# for the OS icons, and a small one (64 x 64) for the function icons in the
# second row. If only a small image is given, that one is also used for
# the big icons by stretching it in the middle. If only a big one is given,
# the built-in default will be used for the small icons.
#
# Like the banner option above, these options take a filename of an
# uncompressed BMP image file with a color depth of 24, 8, 4, or 1 bits,
# or a PNG image. The PNG format is required if you need transparency
# support (to let you "see through" to a full-screen banner).
#
#selection_big   selection-big.bmp
#selection_small selection-small.bmp

# Set the font to be used for all textual displays in graphics mode.
# The font must be a PNG file with alpha channel transparency. It must
# contain ASCII characters 32-126 (space through tilde), inclusive, plus
# a glyph to be displayed in place of characters outside of this range,
# for a total of 96 glyphs. Only monospaced fonts are supported. Fonts
# may be of any size, although large fonts can produce display
# irregularities.
# The default is rEFInd's built-in font, Luxi Mono Regular 12 point.
#
#font myfont.png

# Use text mode only. When enabled, this option forces rEFInd into text mode.
# Passing this option a "0" value causes graphics mode to be used. Pasing
# it no value or any non-0 value causes text mode to be used.
# Default is to use graphics mode.
#
#textonly
textonly

# Set the EFI text mode to be used for textual displays. This option
# takes a single digit that refers to a mode number. Mode 0 is normally
# 80x25, 1 is sometimes 80x50, and higher numbers are system-specific
# modes. Mode 1024 is a special code that tells rEFInd to not set the
# text mode; it uses whatever was in use when the program was launched.
# If you specify an invalid mode, rEFInd pauses during boot to inform
# you of valid modes.
# CAUTION: On VirtualBox, and perhaps on some real computers, specifying
# a text mode and uncommenting the "textonly" option while NOT specifying
# a resolution can result in an unusable display in the booted OS.
# Default is 1024 (no change)
#
#textmode 2
textmode 1024

# Set the screen's video resolution. Pass this option either:
#  * two values, corresponding to the X and Y resolutions
#  * one value, corresponding to a GOP (UEFI) video mode
# Note that not all resolutions are supported. On UEFI systems, passing
# an incorrect value results in a message being shown on the screen to
# that effect, along with a list of supported modes. On EFI 1.x systems
# (e.g., Macintoshes), setting an incorrect mode silently fails. On both
# types of systems, setting an incorrect resolution results in the default
# resolution being used. A resolution of 1024x768 usually works, but higher
# values often don't.
# Default is "0 0" (use the system default resolution, usually 800x600).
#
#resolution 1024 768
#resolution 3
resolution 1024 768

# Launch specified OSes in graphics mode. By default, rEFInd switches
# to text mode and displays basic pre-launch information when launching
# all OSes except OS X. Using graphics mode can produce a more seamless
# transition, but displays no information, which can make matters
# difficult if you must debug a problem. Also, on at least one known
# computer, using graphics mode prevents a crash when using the Linux
# kernel's EFI stub loader. You can specify an empty list to boot all
# OSes in text mode.
# Valid options:
#   osx     - Mac OS X
#   linux   - A Linux kernel with EFI stub loader
#   elilo   - The ELILO boot loader
#   grub    - The GRUB (Legacy or 2) boot loader
#   windows - Microsoft Windows
# Default value: osx
#
#use_graphics_for osx,linux

# Which non-bootloader tools to show on the tools line, and in what
# order to display them:
#  shell           - the EFI shell (requires external program; see rEFInd
#                    documentation for details)
#  gptsync         - the (dangerous) gptsync.efi utility (requires external
#                    program; see rEFInd documentation for details)
#  apple_recovery  - boots the Apple Recovery HD partition, if present
#  mok_tool        - makes available the Machine Owner Key (MOK) maintenance
#                    tool, MokManager.efi, used on Secure Boot systems
#  about           - an "about this program" option
#  exit            - a tag to exit from rEFInd
#  shutdown        - shuts down the computer (a bug causes this to reboot
#                    EFI systems)
#  reboot          - a tag to reboot the computer
# Default is shell,apple_recovery,mok_tool,about,shutdown,reboot
#
#showtools shell, mok_tool, about, reboot, exit
showtools shell, mok_tool, about, reboot, exit

# Directories in which to search for EFI drivers. These drivers can
# provide filesystem support, give access to hard disks on plug-in
# controllers, etc. In most cases none are needed, but if you add
# EFI drivers and you want rEFInd to automatically load them, you
# should specify one or more paths here. rEFInd always scans the
# "drivers" and "drivers_{arch}" subdirectories of its own installation
# directory (where "{arch}" is your architecture code); this option
# specifies ADDITIONAL directories to scan.
# Default is to scan no additional directories for EFI drivers
#
#scan_driver_dirs EFI/tools/drivers,drivers
scan_driver_dirs /boot/EFI/tools/drivers,drivers

# Which types of boot loaders to search, and in what order to display them:
#  internal      - internal EFI disk-based boot loaders
#  external      - external EFI disk-based boot loaders
#  optical       - EFI optical discs (CD, DVD, etc.)
#  hdbios        - BIOS disk-based boot loaders
#  biosexternal  - BIOS external boot loaders (USB, eSATA, etc.)
#  cd            - BIOS optical-disc boot loaders
#  manual        - use stanzas later in this configuration file
# Note that the legacy BIOS options require firmware support, which is
# not present on all computers.
# On UEFI PCs, default is internal,external,optical,manual
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
#
#scanfor internal,external,optical,manual
scanfor internal,external,optical,manual

# Delay for the specified number of seconds before scanning disks.
# This can help some users who find that some of their disks
# (usually external or optical discs) aren't detected initially,
# but are detected after pressing Esc.
# The default is 0.
#
#scan_delay 5

# When scanning volumes for EFI boot loaders, rEFInd always looks for
# Mac OS X's and Microsoft Windows' boot loaders in their normal locations,
# and scans the root directory and every subdirectory of the /EFI directory
# for additional boot loaders, but it doesn't recurse into these directories.
# The also_scan_dirs token adds more directories to the scan list.
# Directories are specified relative to the volume's root directory. This
# option applies to ALL the volumes that rEFInd scans UNLESS you include
# a volume name and colon before the directory name, as in "myvol:/somedir"
# to scan the somedir directory only on the filesystem named myvol. If a
# specified directory doesn't exist, it's ignored (no error condition
# results). The default is to scan the "boot" directory in addition to
# various hard-coded directories.
#
#also_scan_dirs boot,ESP2:EFI/linux/kernels

# Partitions to omit from scans. You must specify a volume by its
# label, which you can obtain in an EFI shell by typing "vol", from
# Linux by typing "blkid /dev/{devicename}", or by examining the
# disk's label in various OSes' file browsers.
# The default is "Recovery HD".
#
#dont_scan_volumes "Recovery HD"

# Directories that should NOT be scanned for boot loaders. By default,
# rEFInd doesn't scan its own directory or the EFI/tools directory.
# You can "blacklist" additional directories with this option, which
# takes a list of directory names as options. You might do this to
# keep EFI/boot/bootx64.efi out of the menu if that's a duplicate of
# another boot loader or to exclude a directory that holds drivers
# or non-bootloader utilities provided by a hardware manufacturer. If
# a directory is listed both here and in also_scan_dirs, dont_scan_dirs
# takes precedence. Note that this blacklist applies to ALL the
# filesystems that rEFInd scans, not just the ESP, unless you precede
# the directory name by a filesystem name, as in "myvol:EFI/somedir"
# to exclude EFI/somedir from the scan on the myvol volume but not on
# other volumes.
#
#dont_scan_dirs ESP:/EFI/boot,EFI/Dell

# Files that should NOT be included as EFI boot loaders (on the
# first line of the display). If you're using a boot loader that
# relies on support programs or drivers that are installed alongside
# the main binary or if you want to "blacklist" certain loaders by
# name rather than location, use this option. Note that this will
# NOT prevent certain binaries from showing up in the second-row
# set of tools. Most notably, MokManager.efi is in this blacklist,
# but will show up as a tool if present in certain directories. You
# can control the tools row with the showtools token.
# The default is shim.efi,TextMode.efi,ebounce.efi,GraphicsConsole.efi,MokManager.efi,HashTool.efi,HashTool-signed.efi
#
#dont_scan_files shim.efi,MokManager.efi

# Scan for Linux kernels that lack a ".efi" filename extension. This is
# useful for better integration with Linux distributions that provide
# kernels with EFI stub loaders but that don't give those kernels filenames
# that end in ".efi", particularly if the kernels are stored on a
# filesystem that the EFI can read. When uncommented, this option causes
# all files in scanned directories with names that begin with "vmlinuz"
# or "bzImage" to be included as loaders, even if they lack ".efi"
# extensions. The drawback to this option is that it can pick up kernels
# that lack EFI stub loader support and other files. Passing this option
# a "0" value causes kernels without ".efi" extensions to NOT be scanned;
# passing it alone or with any other value causes all kernels to be scanned.
# Default is to NOT scan for kernels without ".efi" extensions.
#
scan_all_linux_kernels

# Set the maximum number of tags that can be displayed on the screen at
# any time. If more loaders are discovered than this value, rEFInd shows
# a subset in a scrolling list. If this value is set too high for the
# screen to handle, it's reduced to the value that the screen can manage.
# If this value is set to 0 (the default), it's adjusted to the number
# that the screen can handle.
#
#max_tags 0

# Set the default menu selection.  The available arguments match the
# keyboard accelerators available within rEFInd.  You may select the
# default loader using:
#  - A digit between 1 and 9, in which case the Nth loader in the menu
#    will be the default. 
#  - Any substring that corresponds to a portion of the loader's title
#    (usually the OS's name or boot loader's path).
#
#default_selection 1
default_selection "vmlinuz-linux"

# Include a secondary configuration file within this one. This secondary
# file is loaded as if its options appeared at the point of the "include"
# token itself, so if you want to override a setting in the main file,
# the secondary file must be referenced AFTER the setting you want to
# override. Note that the secondary file may NOT load a tertiary file.
#
#include manual.conf

# Sample manual configuration stanzas. Each begins with the "menuentry"
# keyword followed by a name that's to appear in the menu (use quotes
# if you want the name to contain a space) and an open curly brace
# ("{"). Each entry ends with a close curly brace ("}"). Common
# keywords within each stanza include:
#
#  volume    - identifies the filesystem from which subsequent files
#              are loaded. You can specify the volume by label or by
#              a number followed by a colon (as in "0:" for the first
#              filesystem or "1:" for the second).
#  loader    - identifies the boot loader file
#  initrd    - Specifies an initial RAM disk file
#  icon      - specifies a custom boot loader icon
#  ostype    - OS type code to determine boot options available by
#              pressing Insert. Valid values are "MacOS", "Linux",
#              "Windows", and "XOM". Case-sensitive.
#  graphics  - set to "on" to enable graphics-mode boot (useful
#              mainly for MacOS) or "off" for text-mode boot.
#              Default is auto-detected from loader filename.
#  options   - sets options to be passed to the boot loader; use
#              quotes if more than one option should be passed or
#              if any options use characters that might be changed
#              by rEFInd parsing procedures (=, /, #, or tab).
#  disabled  - use alone or set to "yes" to disable this entry.
#
# Note that you can use either DOS/Windows/EFI-style backslashes (\)
# or Unix-style forward slashes (/) as directory separators. Either
# way, all file references are on the ESP from which rEFInd was
# launched.
# Use of quotes around parameters causes them to be interpreted as
# one keyword, and for parsing of special characters (spaces, =, /,
# and #) to be disabled. This is useful mainly with the "options"
# keyword. Use of quotes around parameters that specify filenames is
# permissible, but you must then use backslashes instead of slashes,
# except when you must pass a forward slash to the loader, as when
# passing a root= option to a Linux kernel.

# Below are several sample boot stanzas. All are disabled by default.
# Find one similar to what you need, copy it, remove the "disabled" line,
# and adjust the entries to suit your needs.

# A sample entry for a Linux 3.3 kernel with its new EFI boot stub
# support on a filesystem called "KERNELS". This entry includes
# Linux-specific boot options and specification of an initial RAM disk.
# Note uses of Linux-style forward slashes, even in the initrd
# specification. Also note that a leading slash is optional in file
# specifications.
menuentry Linux {
	icon EFI/refind/icons/os_linux.icns
	volume KERNELS
	loader bzImage-3.3.0-rc7
	initrd initrd-3.3.0.img
	options "ro root=UUID=5f96cafa-e0a7-4057-b18f-fa709db5b837"
	disabled
}

# A sample entry for loading Ubuntu using its standard name for
# its GRUB 2 boot loader. Note uses of Linux-style forward slashes
menuentry Ubuntu {
	loader /EFI/ubuntu/grubx64.efi
	icon /EFI/refined/icons/os_linux.icns
	disabled
}

# A minimal ELILO entry, which probably offers nothing that
# auto-detection can't accomplish.
menuentry "ELILO" {
	loader \EFI\elilo\elilo.efi
	disabled
}

# Like the ELILO entry, this one offers nothing that auto-detection
# can't do; but you might use it if you want to disable auto-detection
# but still boot Windows....
menuentry "Windows 7" {
	loader \EFI\Microsoft\Boot\bootmgfw.efi
	disabled
}

# EFI shells are programs just like boot loaders, and can be
# launched in the same way. You can pass a shell the name of a
# script that it's to run on the "options" line. The script
# could initialize hardware and then launch an OS, or it could
# do something entirely different.
menuentry "Windows via shell script" {
	icon \EFI\refind\icons\os_win.icns
	loader \EFI\tools\shell.efi
	options "fs0:\EFI\tools\launch_windows.nsh"
	disabled
}

# Mac OS is normally detected and run automatically; however,
# if you want to do something unusual, a manual boot stanza may
# be the way to do it. This one does nothing very unusual, but
# it may serve as a starting point. Note that you'll almost
# certainly need to change the "volume" line for this example
# to work.
menuentry "My Mac OS X" {
	icon \EFI\refind\icons\os_mac.icns
	volume "OS X boot"
	loader \System\Library\CoreServices\boot.efi
	disabled
}
cat /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/sda2
UUID=7b92a840-4747-43b7-b2cf-02cbf92afce7	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda4
UUID=72f64fd4-a3f1-424c-8fe3-cdf7751a84e0	/home     	ext4      	rw,relatime,data=ordered	0 2

# /dev/sda1
# UUID=5447-7409      	/boot 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2
UUID=5447-7409               /boot         vfat          noatime          0    2

# /dev/sda3
UUID=1e11bea5-41db-4969-a8fa-a461734b71ac	none      	swap      	defaults  	0 0

This is a clean install using April 01 ISO with minimal or no modifications. I have tried to follow wiki as precisely as possible. I am not sure what I am missing. Thanks.

EDIT1: Updated and cleaned the post to better reflect current structure and added /etc/fstab.
EDIT2: @swordfish Removed /boot/EFI/arch.

Last edited by donniezazen (2013-04-04 06:37:07)

Offline

#2 2013-04-03 06:35:25

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

I'll see if I can help you here. If you entered the efibootmgr command just like you posted:

efibootmgr -c -g -d /dev/sdX -p Y -w -L "rEFInd" -l '\EFI\refind\refind_<arch>.efi'

Then that may be the problem. If I assume that your EFI partition is at /dev/sda1, then the correct command would be as follows:

efibootmgr -c -g -d /dev/sda -p 1 -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'

See if that helps. If not, could you post the contents of /etc/fstab. Everything else seems to be OK, other than that seems to be an excessive amount of Boot entries already in your UEFI boot menu. For example, mine looks like this:

sudo efibootmgr
BootCurrent: 0001
Timeout: 3 seconds
BootOrder: 0001,0000,0003,0004
Boot0000* Windows Boot Manager
Boot0001* rEFInd
Boot0003* Hard Drive
Boot0004* CD/DVD Drive

Last edited by sidneyk (2013-04-03 06:45:59)

Offline

#3 2013-04-03 07:41:32

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

@sidneyk I did make sure to change X and Y, originally, like your second line but that didn't help.

I removed /boot/EFI/boot [1]. And my system directly went to boot menu without any boot manager entry. So, I am able to boot using /boot/EFI/boot and /boot/EFI/refind is being ignored.

This seems to be an efibootmgr error as I used it to generate UEFI Shell entry and nothing.

echo 'root=UUID=7b92a840-4747-43b7-b2cf-02cbf92afce7 ro rootfstype=ext4 add_efi_memmap initrd=\EFI\arch\initramfs-arch.img' | iconv -t ucs2 | efibootmgr -c -g -d /dev/sda -p 1 -L "Arch Linux" -l '\boot\vmlinuz-linux' -@ -

Thanks.

[1]

7. (Optional) As a fallback, in case efibootmgr created boot entry does not work, copy refind_x64.efi to /boot/efi/EFI/boot/bootx64.efi as follows:
# cp -r /boot/efi/EFI/refind/* /boot/efi/EFI/boot/
# mv /boot/efi/EFI/boot/refind_x64.efi /boot/efi/EFI/boot/bootx64.efi

Last edited by donniezazen (2013-04-03 08:03:35)

Offline

#4 2013-04-03 08:55:49

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

For some systems efibootmgr does not write the correct entry into the NVRAM in the motherboard chip for BIOS/UEFI - that was the case for my own system - there is an alternate way to write the NVRAM entry by booting UEFI shell v2 from a usbkey and using the bcfg command from the uefi shell to write the entry instead.

https://wiki.archlinux.org/index.php/Un … rface#bcfg

That was the way I had to go to get my own system booting - the files and entries in the /boot and ESP areas can be perfectly correct but unless the NVRAM entries are written correctly the system won't even get as far as properly executing the files on the hard drive. Hope this helps.


Mike C

Offline

#5 2013-04-03 09:07:40

swordfish
Member
Registered: 2012-01-14
Posts: 160

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Some ideas - you've got a pretty complicated setup tongue

1. Are you invoking efibootmgr as root or with sudo? Otherwise it won't work.

2. Your setup is contradictory. If you want to boot from /boot/vmlinuz-linux you don't need the directory /boot/EFI/arch

3. Maybe you would like to clean out /boot except the vmlinuz* and initramfs* files and follow https://wiki.archlinux.org/index.php/UE … ing_rEFInd


Arch_x64 on Thinkpad Edge E520 (Intel Core i5, 4 GB RAM, 128 GB Crucial M4 SSD) + ITX-Desktop (Asrock H77M-ITX, Intel Core i3-2120T, 8GB RAM, 64 GB Samsung 830 SSD)

Offline

#6 2013-04-03 09:10:51

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

So, OK it looks like your ESP is on /dev/sda1 and you're mounting it at /boot. Per the Beginner's Guide:

"Warning: The fstab file should always be checked after generating it. If you made an EFI system partition earlier, then genfstab has incorrectly added options to your EFI system partition. This will in fact prevent your computer from booting from that drive, so you need to remove all options for the EFI partition except for noatime. For the other partitions that use it, be sure to replace "codepage=cp437" with "codepage=437" or else when you next reboot, any mounts with this option will fail and systemd will halt and drop into recovery mode. This should be fixed by linux 3.8"

So you need to change the /etc/fstab entry to this:

# /dev/sda1
UUID=5447-7409      	/boot 	vfat      	noatime	0 2

I also have the last item there, the fsck priority option (2) set to (0) on my setup. Also, I don't know if you were indicating that you used this:

7. (Optional) As a fallback, in case efibootmgr created boot entry does not work, copy refind_x64.efi to /boot/efi/EFI/boot/bootx64.efi as follows:
# cp -r /boot/efi/EFI/refind/* /boot/efi/EFI/boot/
# mv /boot/efi/EFI/boot/refind_x64.efi /boot/efi/EFI/boot/bootx64.efi

But, I don't see from the output of "ls -R /boot" that you even have a /boot/efi directory, so for you the command would be this:

7. (Optional) As a fallback, in case efibootmgr created boot entry does not work, copy refind_x64.efi to /boot/EFI/boot/bootx64.efi as follows:
# cp -r /boot/EFI/refind/* /boot/EFI/boot/
# mv /boot/EFI/boot/refind_x64.efi /boot/EFI/boot/bootx64.efi

Also, since you're mounting your ESP at /boot, you don't even need the /EFI/arch/ directory at all, unless you still have something setup that is copying stuff over to there, such as systemd service or mkinitcpio hook or something else. Per your refind.conf, refind can find your kernels at /boot without them being renamed, you'll just get a generic icon for them if you use refind's graphical menu.

The problem still is you aren't getting an entry in the UEFI firmware for rEFInd. If you can, make the changes above and reboot. Then, run this:

# ls -1 /sys/firmware/efi/vars/

You should see a long string of variables if you are actually booted in UEFI mode. If you get nothing, then you haven't booted in UEFI mode. If you are indeed booted in UEFI mode and verified that EFI is mounted in your /boot directory, then try again this:

# mkdir -p /boot/efi/EFI/refind
# cp /usr/lib/refind/refind_x64.efi /boot/EFI/refind/refind_x64.efi
# cp /usr/lib/refind/config/refind.conf /boot/EFI/refind/refind.conf
# cp -r /usr/share/refind/icons /boot/EFI/refind/icons

And, then again, this:

# efibootmgr -c -g -d /dev/sda -p 1 -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'

That should put the refind entry into the EFI boot manager. You may have to go into your firmware setup to make it the default choice, if desired. If that doesn't work, then it could be that you already have too many entries for your firmware and will need to clean some up.

Last edited by sidneyk (2013-04-03 09:27:49)

Offline

#7 2013-04-03 10:10:40

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

@mcloaked I have used UEFI with refind entry generated by efibootmgr on this system before. So, it does work. I am not sure why its not working right now.

@swordfish I am of course using basic precautions like sudo or root. I did use sudo and have already used root during installation. I have /boot/EFI/arch because I have had trouble using refind to find kernel in /boot, so, I do have redundancy. rEFInd is able to find kernel in /boot. I went ahead and cleaned /boot to bare minimum.

@sidneyk Thanks I made changes to /etc/fstab. I don't have /boot/efi and I have appropriately changed all commands to /boot/EFI. When I installed this on my system did use commands like you posted above.  I have updated ls -R command and it should be not have any redundancy or mistakes. I apologize for any miscommunication. I have always had many boot entries and refind has worked fine in earlier cases. I am booting in UEFI as I have legacy boot disabled in BIOS. If it gets too cumbersome I will just wipe everything and go back to BIOS-Grub-Legacy-Boot when I get time.

Thanks everyone.

Offline

#8 2013-04-03 13:44:52

dhaines
Member
From: Boston, Massachusetts
Registered: 2011-01-07
Posts: 19

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

I think that I'm having the same problem. I was able to fix things by booting off of the Arch ISO (on a USB flash drive) and running efibootmgr from there. For some reason, though, I can't get efibootmgr to work from my actual install; it doesn't give an error, but it certainly doesn't work either.

Edit: I also have found the following in my journal: Apr 03 09:52:43 sirius kernel: efivars: set_variable() failed: status=8000000000000009

Edit again: I blacklisted the nvidia module and I am now able to use efibootmgr. It looks like NVIDIA's EFI support is even worse than I thought.

Yet another edit: I unblacklisted the nvidia module, but I'm still able to use efibootmgr. Could this be due to the fact that I'm doing this remotely? I'm so confused.

Last edited by dhaines (2013-04-03 14:08:33)

Offline

#9 2013-04-03 14:22:11

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

@donniezazen: For statistical purposes, could you please provide your machine model and UEFI-BIOS versions? If you've got a desktop, what motherboard do you have?


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#10 2013-04-03 14:24:30

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Just to add credence to what others have said see my post about the silent fails in 0.6.0 while the exact same code works in 0.5.4.

Offline

#11 2013-04-03 16:24:33

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

dhaines wrote:

I think that I'm having the same problem. I was able to fix things by booting off of the Arch ISO (on a USB flash drive) and running efibootmgr from there. For some reason, though, I can't get efibootmgr to work from my actual install; it doesn't give an error, but it certainly doesn't work either.

Edit: I also have found the following in my journal: Apr 03 09:52:43 sirius kernel: efivars: set_variable() failed: status=8000000000000009

Edit again: I blacklisted the nvidia module and I am now able to use efibootmgr. It looks like NVIDIA's EFI support is even worse than I thought.

Yet another edit: I unblacklisted the nvidia module, but I'm still able to use efibootmgr. Could this be due to the fact that I'm doing this remotely? I'm so confused.

I've used rEFInd with both nvidia and nouveau drivers without issues on my Asus Sabertooth 990FX UEFI board and GTX260 video card. The nouveau seems cleaner and doesn't throw the errors regarding frame buffers that nvidia does plus it has KMS. That is also a good way to rescue a system, especially a freshly installed system, by using the install medium disk as long as you mount what is needed properly first. I'm guessing you may have just had a boot with nvidia that didn't go as planned and a reboot or 2 may have cleared it up because if you are using the default kernel (at least as long as the EFISTUB support has been built in) then the efi variables should have loaded as long as things were set up right to start with.

Offline

#12 2013-04-03 16:34:58

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

donniezazen wrote:

@mcloaked I have used UEFI with refind entry generated by efibootmgr on this system before. So, it does work. I am not sure why its not working right now.

@swordfish I am of course using basic precautions like sudo or root. I did use sudo and have already used root during installation. I have /boot/EFI/arch because I have had trouble using refind to find kernel in /boot, so, I do have redundancy. rEFInd is able to find kernel in /boot. I went ahead and cleaned /boot to bare minimum.

@sidneyk Thanks I made changes to /etc/fstab. I don't have /boot/efi and I have appropriately changed all commands to /boot/EFI. When I installed this on my system did use commands like you posted above.  I have updated ls -R command and it should be not have any redundancy or mistakes. I apologize for any miscommunication. I have always had many boot entries and refind has worked fine in earlier cases. I am booting in UEFI as I have legacy boot disabled in BIOS. If it gets too cumbersome I will just wipe everything and go back to BIOS-Grub-Legacy-Boot when I get time.

Thanks everyone.

Well, good luck then. I've given you what works on my Asus Sabertooth 990FX board with Nvidia GTX260 video card. I'm not going to question why you have so many boot options, I just have no understanding of why one would need so many options. Even if you had 50 Linux distros installed, they could all be handled by the one rEFInd boot manager, along with Windows boot manager if you use Windows and the UEFI boot manager could handle all the other possible device boot options. My point was that there is only so much space in the nvram and that the possibility exists, with many entries in there, to maybe fill it up or not have room left for another entry. I'm not saying that this IS your issue, just that it is something to consider.

Offline

#13 2013-04-03 18:34:05

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

@dhave I have a Thinkpad T420i with Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz. Here is lshw http://pastebin.com/dWFCw9Jd .

sudo dmidecode -s bios-version
83ET69WW (1.39 )

@sidneyk Thanks. I have always had that many boot entry show up with efibootmgr, and work fine, but I only have 2-4 actual boot entries in boot menu depending on if I have bootable OS on disk and usb, etc.

Maybe I should file a bug.

Thanks all.

Offline

#14 2013-04-03 20:53:44

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Just a sidenote - I was just experimenting on my system, trying to run efibootmgr, as root, to create an entry for directly booting with the kernel from the firmware boot manager instead of rEFInd or anything else. I, also, was not able to get it to work from within my installed, normally booted, Gnome 3.6 system. I had to boot up the Arch install medium (mine is from 030113) and mount everything and chroot into the installed system. Then, I was finally able to get efibootmgr to add an entry in the firmware boot manager. I thought I had done it from within a running system before, but maybe I didn't. I now have the option to boot the kernel directly from my firmware boot manager (using F8 at boot to access it). I made a copy of vmlinuz-linux in /boot and renamed it to vmlinuz-linux.efi and used this, just to avoid any complication of the firmware not running anything without an .efi extension.

[EDIT] Another thing to mention, the install medium I used included a 3.7.x kernel, whereas my running system uses a 3.8.5-1 kernel. Maybe there is something up with the the newer kernel when using efibootmgr.

Last edited by sidneyk (2013-04-03 21:05:41)

Offline

#15 2013-04-03 23:49:21

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

I used March ISO instead of April ISO and it worked flawlessly. There is some problem with April ISO where efibootmgr and UEFI Shell1/2 fail with ASSERT_EFI_ERROR (status = device error).

I have removed both /boot/EFI/boot and /boot/EFI/arch. I now have two entries one on vmlinuz-linux on 1024 Fat 32 partition which works and second one boot/vmlinuz-linux on 20G / partition which fails and takes me to rootfs. Also refind isn't showing UEFI shells that  I have in /boot/EFI/tools/Shells.

ls -R /boot
/boot:
EFI  initramfs-linux-fallback.img  initramfs-linux.img  refind_linux.conf  vmlinuz-linux

/boot/EFI:
drivers  refind  tools

/boot/EFI/drivers:
ext2_x64.efi  ext4_x64.efi  hfs_x64.efi  iso9660_x64.efi  reiserfs_x64.efi

/boot/EFI/refind:
icons  refind.conf  refind_x64.efi

/boot/EFI/refind/icons:
### Icons

/boot/EFI/tools:
Shell.efi
#
# refind.conf
# Configuration file for the rEFInd boot menu
#

# Timeout in seconds for the main menu screen. Setting the timeout to 0
# disables automatic booting (i.e., no timeout).
#
timeout 5

# Hide user interface elements for personal preference or to increase
# security:
#  banner      - the rEFInd title banner (built-in or loaded via "banner")
#  label       - boot option text label in the menu
#  singleuser  - remove the submenu options to boot Mac OS X in single-user
#                or verbose modes; affects ONLY MacOS X
#  safemode    - remove the submenu option to boot Mac OS X in "safe mode"
#  hwtest      - the submenu option to run Apple's hardware test
#  arrows      - scroll arrows on the OS selection tag line
#  hints       - brief command summary in the menu
#  editor      - the options editor (+, F2, or Insert on boot options menu)
#  all         - all of the above
# Default is none of these (all elements active)
#
#hideui singleuser
#hideui all

# Set the name of a subdirectory in which icons are stored. Icons must
# have the same names they have in the standard directory. The directory
# name is specified relative to the main rEFInd binary's directory. If
# an icon can't be found in the specified directory, an attempt is made
# to load it from the default directory; thus, you can replace just some
# icons in your own directory and rely on the default for others.
# Default is "icons".
#
#icons_dir myicons

# Use a custom title banner instead of the rEFInd icon and name. The file
# path is relative to the directory where refind.efi is located. The color
# in the top left corner of the image is used as the background color
# for the menu screens. Currently uncompressed BMP images with color
# depths of 24, 8, 4 or 1 bits are supported, as well as PNG images.
#
#banner hostname.bmp
#banner mybanner.png

# Custom images for the selection background. There is a big one (144 x 144)
# for the OS icons, and a small one (64 x 64) for the function icons in the
# second row. If only a small image is given, that one is also used for
# the big icons by stretching it in the middle. If only a big one is given,
# the built-in default will be used for the small icons.
#
# Like the banner option above, these options take a filename of an
# uncompressed BMP image file with a color depth of 24, 8, 4, or 1 bits,
# or a PNG image. The PNG format is required if you need transparency
# support (to let you "see through" to a full-screen banner).
#
#selection_big   selection-big.bmp
#selection_small selection-small.bmp

# Set the font to be used for all textual displays in graphics mode.
# The font must be a PNG file with alpha channel transparency. It must
# contain ASCII characters 32-126 (space through tilde), inclusive, plus
# a glyph to be displayed in place of characters outside of this range,
# for a total of 96 glyphs. Only monospaced fonts are supported. Fonts
# may be of any size, although large fonts can produce display
# irregularities.
# The default is rEFInd's built-in font, Luxi Mono Regular 12 point.
#
#font myfont.png

# Use text mode only. When enabled, this option forces rEFInd into text mode.
# Passing this option a "0" value causes graphics mode to be used. Pasing
# it no value or any non-0 value causes text mode to be used.
# Default is to use graphics mode.
#
#textonly
textonly

# Set the EFI text mode to be used for textual displays. This option
# takes a single digit that refers to a mode number. Mode 0 is normally
# 80x25, 1 is sometimes 80x50, and higher numbers are system-specific
# modes. Mode 1024 is a special code that tells rEFInd to not set the
# text mode; it uses whatever was in use when the program was launched.
# If you specify an invalid mode, rEFInd pauses during boot to inform
# you of valid modes.
# CAUTION: On VirtualBox, and perhaps on some real computers, specifying
# a text mode and uncommenting the "textonly" option while NOT specifying
# a resolution can result in an unusable display in the booted OS.
# Default is 1024 (no change)
#
#textmode 2
textmode 1024

# Set the screen's video resolution. Pass this option either:
#  * two values, corresponding to the X and Y resolutions
#  * one value, corresponding to a GOP (UEFI) video mode
# Note that not all resolutions are supported. On UEFI systems, passing
# an incorrect value results in a message being shown on the screen to
# that effect, along with a list of supported modes. On EFI 1.x systems
# (e.g., Macintoshes), setting an incorrect mode silently fails. On both
# types of systems, setting an incorrect resolution results in the default
# resolution being used. A resolution of 1024x768 usually works, but higher
# values often don't.
# Default is "0 0" (use the system default resolution, usually 800x600).
#
#resolution 1024 768
#resolution 3
resolution 1024 768

# Launch specified OSes in graphics mode. By default, rEFInd switches
# to text mode and displays basic pre-launch information when launching
# all OSes except OS X. Using graphics mode can produce a more seamless
# transition, but displays no information, which can make matters
# difficult if you must debug a problem. Also, on at least one known
# computer, using graphics mode prevents a crash when using the Linux
# kernel's EFI stub loader. You can specify an empty list to boot all
# OSes in text mode.
# Valid options:
#   osx     - Mac OS X
#   linux   - A Linux kernel with EFI stub loader
#   elilo   - The ELILO boot loader
#   grub    - The GRUB (Legacy or 2) boot loader
#   windows - Microsoft Windows
# Default value: osx
#
#use_graphics_for osx,linux

# Which non-bootloader tools to show on the tools line, and in what
# order to display them:
#  shell           - the EFI shell (requires external program; see rEFInd
#                    documentation for details)
#  gptsync         - the (dangerous) gptsync.efi utility (requires external
#                    program; see rEFInd documentation for details)
#  apple_recovery  - boots the Apple Recovery HD partition, if present
#  mok_tool        - makes available the Machine Owner Key (MOK) maintenance
#                    tool, MokManager.efi, used on Secure Boot systems
#  about           - an "about this program" option
#  exit            - a tag to exit from rEFInd
#  shutdown        - shuts down the computer (a bug causes this to reboot
#                    EFI systems)
#  reboot          - a tag to reboot the computer
# Default is shell,apple_recovery,mok_tool,about,shutdown,reboot
#
#showtools shell, mok_tool, about, reboot, exit
showtools shell, about, reboot, exit

# Directories in which to search for EFI drivers. These drivers can
# provide filesystem support, give access to hard disks on plug-in
# controllers, etc. In most cases none are needed, but if you add
# EFI drivers and you want rEFInd to automatically load them, you
# should specify one or more paths here. rEFInd always scans the
# "drivers" and "drivers_{arch}" subdirectories of its own installation
# directory (where "{arch}" is your architecture code); this option
# specifies ADDITIONAL directories to scan.
# Default is to scan no additional directories for EFI drivers
#
#scan_driver_dirs EFI/tools/drivers,drivers
scan_driver_dirs EFI/tools/drivers,drivers

# Which types of boot loaders to search, and in what order to display them:
#  internal      - internal EFI disk-based boot loaders
#  external      - external EFI disk-based boot loaders
#  optical       - EFI optical discs (CD, DVD, etc.)
#  hdbios        - BIOS disk-based boot loaders
#  biosexternal  - BIOS external boot loaders (USB, eSATA, etc.)
#  cd            - BIOS optical-disc boot loaders
#  manual        - use stanzas later in this configuration file
# Note that the legacy BIOS options require firmware support, which is
# not present on all computers.
# On UEFI PCs, default is internal,external,optical,manual
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
#
#scanfor internal,external,optical,manual
scanfor internal,external,optical,manual

# Delay for the specified number of seconds before scanning disks.
# This can help some users who find that some of their disks
# (usually external or optical discs) aren't detected initially,
# but are detected after pressing Esc.
# The default is 0.
#
#scan_delay 5

# When scanning volumes for EFI boot loaders, rEFInd always looks for
# Mac OS X's and Microsoft Windows' boot loaders in their normal locations,
# and scans the root directory and every subdirectory of the /EFI directory
# for additional boot loaders, but it doesn't recurse into these directories.
# The also_scan_dirs token adds more directories to the scan list.
# Directories are specified relative to the volume's root directory. This
# option applies to ALL the volumes that rEFInd scans UNLESS you include
# a volume name and colon before the directory name, as in "myvol:/somedir"
# to scan the somedir directory only on the filesystem named myvol. If a
# specified directory doesn't exist, it's ignored (no error condition
# results). The default is to scan the "boot" directory in addition to
# various hard-coded directories.
#
#also_scan_dirs boot,ESP2:EFI/linux/kernels

# Partitions to omit from scans. You must specify a volume by its
# label, which you can obtain in an EFI shell by typing "vol", from
# Linux by typing "blkid /dev/{devicename}", or by examining the
# disk's label in various OSes' file browsers.
# The default is "Recovery HD".
#
#dont_scan_volumes "Recovery HD"

# Directories that should NOT be scanned for boot loaders. By default,
# rEFInd doesn't scan its own directory or the EFI/tools directory.
# You can "blacklist" additional directories with this option, which
# takes a list of directory names as options. You might do this to
# keep EFI/boot/bootx64.efi out of the menu if that's a duplicate of
# another boot loader or to exclude a directory that holds drivers
# or non-bootloader utilities provided by a hardware manufacturer. If
# a directory is listed both here and in also_scan_dirs, dont_scan_dirs
# takes precedence. Note that this blacklist applies to ALL the
# filesystems that rEFInd scans, not just the ESP, unless you precede
# the directory name by a filesystem name, as in "myvol:EFI/somedir"
# to exclude EFI/somedir from the scan on the myvol volume but not on
# other volumes.
#
#dont_scan_dirs ESP:/EFI/boot,EFI/Dell

# Files that should NOT be included as EFI boot loaders (on the
# first line of the display). If you're using a boot loader that
# relies on support programs or drivers that are installed alongside
# the main binary or if you want to "blacklist" certain loaders by
# name rather than location, use this option. Note that this will
# NOT prevent certain binaries from showing up in the second-row
# set of tools. Most notably, MokManager.efi is in this blacklist,
# but will show up as a tool if present in certain directories. You
# can control the tools row with the showtools token.
# The default is shim.efi,TextMode.efi,ebounce.efi,GraphicsConsole.efi,MokManager.efi,HashTool.efi,HashTool-signed.efi
#
#dont_scan_files shim.efi,MokManager.efi

# Scan for Linux kernels that lack a ".efi" filename extension. This is
# useful for better integration with Linux distributions that provide
# kernels with EFI stub loaders but that don't give those kernels filenames
# that end in ".efi", particularly if the kernels are stored on a
# filesystem that the EFI can read. When uncommented, this option causes
# all files in scanned directories with names that begin with "vmlinuz"
# or "bzImage" to be included as loaders, even if they lack ".efi"
# extensions. The drawback to this option is that it can pick up kernels
# that lack EFI stub loader support and other files. Passing this option
# a "0" value causes kernels without ".efi" extensions to NOT be scanned;
# passing it alone or with any other value causes all kernels to be scanned.
# Default is to NOT scan for kernels without ".efi" extensions.
#
scan_all_linux_kernels

# Set the maximum number of tags that can be displayed on the screen at
# any time. If more loaders are discovered than this value, rEFInd shows
# a subset in a scrolling list. If this value is set too high for the
# screen to handle, it's reduced to the value that the screen can manage.
# If this value is set to 0 (the default), it's adjusted to the number
# that the screen can handle.
#
#max_tags 0

# Set the default menu selection.  The available arguments match the
# keyboard accelerators available within rEFInd.  You may select the
# default loader using:
#  - A digit between 1 and 9, in which case the Nth loader in the menu
#    will be the default. 
#  - Any substring that corresponds to a portion of the loader's title
#    (usually the OS's name or boot loader's path).
#
#default_selection 1

# Include a secondary configuration file within this one. This secondary
# file is loaded as if its options appeared at the point of the "include"
# token itself, so if you want to override a setting in the main file,
# the secondary file must be referenced AFTER the setting you want to
# override. Note that the secondary file may NOT load a tertiary file.
#
#include manual.conf

# Sample manual configuration stanzas. Each begins with the "menuentry"
# keyword followed by a name that's to appear in the menu (use quotes
# if you want the name to contain a space) and an open curly brace
# ("{"). Each entry ends with a close curly brace ("}"). Common
# keywords within each stanza include:
#
#  volume    - identifies the filesystem from which subsequent files
#              are loaded. You can specify the volume by label or by
#              a number followed by a colon (as in "0:" for the first
#              filesystem or "1:" for the second).
#  loader    - identifies the boot loader file
#  initrd    - Specifies an initial RAM disk file
#  icon      - specifies a custom boot loader icon
#  ostype    - OS type code to determine boot options available by
#              pressing Insert. Valid values are "MacOS", "Linux",
#              "Windows", and "XOM". Case-sensitive.
#  graphics  - set to "on" to enable graphics-mode boot (useful
#              mainly for MacOS) or "off" for text-mode boot.
#              Default is auto-detected from loader filename.
#  options   - sets options to be passed to the boot loader; use
#              quotes if more than one option should be passed or
#              if any options use characters that might be changed
#              by rEFInd parsing procedures (=, /, #, or tab).
#  disabled  - use alone or set to "yes" to disable this entry.
#
# Note that you can use either DOS/Windows/EFI-style backslashes (\)
# or Unix-style forward slashes (/) as directory separators. Either
# way, all file references are on the ESP from which rEFInd was
# launched.
# Use of quotes around parameters causes them to be interpreted as
# one keyword, and for parsing of special characters (spaces, =, /,
# and #) to be disabled. This is useful mainly with the "options"
# keyword. Use of quotes around parameters that specify filenames is
# permissible, but you must then use backslashes instead of slashes,
# except when you must pass a forward slash to the loader, as when
# passing a root= option to a Linux kernel.

# Below are several sample boot stanzas. All are disabled by default.
# Find one similar to what you need, copy it, remove the "disabled" line,
# and adjust the entries to suit your needs.

# A sample entry for a Linux 3.3 kernel with its new EFI boot stub
# support on a filesystem called "KERNELS". This entry includes
# Linux-specific boot options and specification of an initial RAM disk.
# Note uses of Linux-style forward slashes, even in the initrd
# specification. Also note that a leading slash is optional in file
# specifications.
menuentry Linux {
	icon EFI/refind/icons/os_linux.icns
	volume KERNELS
	loader bzImage-3.3.0-rc7
	initrd initrd-3.3.0.img
	options "ro root=UUID=5f96cafa-e0a7-4057-b18f-fa709db5b837"
	disabled
}

# A sample entry for loading Ubuntu using its standard name for
# its GRUB 2 boot loader. Note uses of Linux-style forward slashes
menuentry Ubuntu {
	loader /EFI/ubuntu/grubx64.efi
	icon /EFI/refined/icons/os_linux.icns
	disabled
}

# A minimal ELILO entry, which probably offers nothing that
# auto-detection can't accomplish.
menuentry "ELILO" {
	loader \EFI\elilo\elilo.efi
	disabled
}

# Like the ELILO entry, this one offers nothing that auto-detection
# can't do; but you might use it if you want to disable auto-detection
# but still boot Windows....
menuentry "Windows 7" {
	loader \EFI\Microsoft\Boot\bootmgfw.efi
	disabled
}

# EFI shells are programs just like boot loaders, and can be
# launched in the same way. You can pass a shell the name of a
# script that it's to run on the "options" line. The script
# could initialize hardware and then launch an OS, or it could
# do something entirely different.
menuentry "Windows via shell script" {
	icon \EFI\refind\icons\os_win.icns
	loader \EFI\tools\shell.efi
	options "fs0:\EFI\tools\launch_windows.nsh"
	disabled
}

# Mac OS is normally detected and run automatically; however,
# if you want to do something unusual, a manual boot stanza may
# be the way to do it. This one does nothing very unusual, but
# it may serve as a starting point. Note that you'll almost
# certainly need to change the "volume" line for this example
# to work.
menuentry "My Mac OS X" {
	icon \EFI\refind\icons\os_mac.icns
	volume "OS X boot"
	loader \System\Library\CoreServices\boot.efi
	disabled
}

Thanks for suggesting to try older ISO.

UPDATE:- Most recent ls -R /boot and my refind.conf. Reading over Rod Smith's rEFInd documentation has helped me clean up a little more and set up a good boot manager with automatic kernel detection and shell. I do want to get rid of drivers list that shows itself up along with kernel. Next is to tackle menu entry. Thanks.

Last edited by donniezazen (2013-04-04 06:43:16)

Offline

#16 2013-09-09 20:30:37

sinfree
Member
Registered: 2013-09-09
Posts: 10

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Gentoo says in http://wiki.gentoo.org/wiki/EFI_stub_kernel that UEFI does not support loading a separate initramfs for your kernel.
And effectively, my kernel boots when applying their advice (cpio initramfs).

Offline

#17 2013-09-09 20:42:49

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

sinfree wrote:

Gentoo says in http://wiki.gentoo.org/wiki/EFI_stub_kernel that UEFI does not support loading a separate initramfs for your kernel.
And effectively, my kernel boots when applying their advice (cpio initramfs).

Thats not true. AFAIK most of the firmwares support passing arguments to the loader (EFI app) if the boot entry includes them.

# efibootmgr -c -d /dev/sda -p 1 -l /EFI/arch/core/vmlinuz-arch-core.efi -L "Arch_Core_Kernel" -u "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw gpt loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 efi_pstore.pstore_disable=1 efi_no_storage_paranoia add_efi_memmap systemd.unit=multi-user.target initrd=/EFI/arch/core/initramfs-arch-core-fallback.img"

Boot0019* Arch_Core_Kernel	HD(1,800,200000,f5e1ef99-752e-4041-855d-aca8a7cc0d03)File(\EFI\arch\core\vmlinuz-arch-core.efi)r.o.o.t.=.P.A.R.T.U.U.I.D.=.6.f.4.4.c.5.6.d.-.d.5.c.2.-.4.1.c.a.-.8.c.5.4.-.8.7.3.d.8.d.c.5.e.5.e.3. .r.o.o.t.f.s.t.y.p.e.=.e.x.t.4. .r.w. .g.p.t. .l.o.g.l.e.v.e.l.=.6. .p.r.i.n.t.k...t.i.m.e.=.y. .p.c.i.e._.a.s.p.m.=.f.o.r.c.e. .i.9.1.5...i.9.1.5._.e.n.a.b.l.e._.r.c.6.=.1. .n.o.u.v.e.a.u...n.o.f.b.a.c.c.e.l.=.1. .e.f.i._.p.s.t.o.r.e...p.s.t.o.r.e._.d.i.s.a.b.l.e.=.1. .e.f.i._.n.o._.s.t.o.r.a.g.e._.p.a.r.a.n.o.i.a. .a.d.d._.e.f.i._.m.e.m.m.a.p. .s.y.s.t.e.m.d...u.n.i.t.=.m.u.l.t.i.-.u.s.e.r...t.a.r.g.e.t. .i.n.i.t.r.d.=./.E.F.I./.a.r.c.h./.c.o.r.e./.i.n.i.t.r.a.m.f.s.-.a.r.c.h.-.c.o.r.e.-.f.a.l.l.b.a.c.k...i.m.g.
# efibootmgr -c -d /dev/sda -p 1 -L Arch_Mainline_Kernel -l /EFI/arch/mainline/vmlinuz-arch-mainline.efi -u "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw gpt loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 efi_pstore.pstore_disable=1 efi_no_storage_paranoia add_efi_memmap systemd.unit=multi-user.target initrd=/EFI/arch/mainline/initramfs-arch-mainline-fallback.img"

Boot001A* Arch_Mainline_Kernel	HD(1,800,200000,f5e1ef99-752e-4041-855d-aca8a7cc0d03)File(\EFI\arch\mainline\vmlinuz-arch-mainline.efi)r.o.o.t.=.P.A.R.T.U.U.I.D.=.6.f.4.4.c.5.6.d.-.d.5.c.2.-.4.1.c.a.-.8.c.5.4.-.8.7.3.d.8.d.c.5.e.5.e.3. .r.o.o.t.f.s.t.y.p.e.=.e.x.t.4. .r.w. .g.p.t. .l.o.g.l.e.v.e.l.=.6. .p.r.i.n.t.k...t.i.m.e.=.y. .p.c.i.e._.a.s.p.m.=.f.o.r.c.e. .i.9.1.5...i.9.1.5._.e.n.a.b.l.e._.r.c.6.=.1. .n.o.u.v.e.a.u...n.o.f.b.a.c.c.e.l.=.1. .e.f.i._.p.s.t.o.r.e...p.s.t.o.r.e._.d.i.s.a.b.l.e.=.1. .e.f.i._.n.o._.s.t.o.r.a.g.e._.p.a.r.a.n.o.i.a. .a.d.d._.e.f.i._.m.e.m.m.a.p. .s.y.s.t.e.m.d...u.n.i.t.=.m.u.l.t.i.-.u.s.e.r...t.a.r.g.e.t. .i.n.i.t.r.d.=./.E.F.I./.a.r.c.h./.m.a.i.n.l.i.n.e./.i.n.i.t.r.a.m.f.s.-.a.r.c.h.-.m.a.i.n.l.i.n.e.-.f.a.l.l.b.a.c.k...i.m.g.
# efibootmgr -c -d /dev/sda -p 1 -L Archboot -l /EFI/arch/archboot/vmlinuz-archboot.efi -u "rw gpt loglevel=7 efi_pstore.pstore_disable=1 efi_no_storage_paranoia add_efi_memmap initrd=/EFI/arch/archboot/initramfs-archboot.img"

Boot001B* Archboot	HD(1,800,200000,f5e1ef99-752e-4041-855d-aca8a7cc0d03)File(\EFI\arch\archboot\vmlinuz-archboot.efi)r.w. .g.p.t. .l.o.g.l.e.v.e.l.=.7. .e.f.i._.p.s.t.o.r.e...p.s.t.o.r.e._.d.i.s.a.b.l.e.=.1. .e.f.i._.n.o._.s.t.o.r.a.g.e._.p.a.r.a.n.o.i.a. .a.d.d._.e.f.i._.m.e.m.m.a.p. .i.n.i.t.r.d.=./.E.F.I./.a.r.c.h./.a.r.c.h.b.o.o.t./.i.n.i.t.r.a.m.f.s.-.a.r.c.h.b.o.o.t...i.m.g.

I used https://aur.archlinux.org/packages/efib … jones-git/ (after switching to efivarfs) to create these entries.

Offline

#18 2013-09-11 20:00:10

sinfree
Member
Registered: 2013-09-09
Posts: 10

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Hello the.ridiculus.rat,

can you tell me how you connect your efibootmgr stansa to rEFInd?
More over, what is the difference between your efibootmgr from AUR and the default efibootmgr?

Best regards,
A novice turtle.

Offline

#19 2013-09-12 15:41:10

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

sinfree wrote:

Hello the.ridiculus.rat,

can you tell me how you connect your efibootmgr stansa to rEFInd?
More over, what is the difference between your efibootmgr from AUR and the default efibootmgr?

Best regards,
A novice turtle.

This efibootmgr supports efivarfs. It is also available now in [testing]. To understand efibootmgr and refind etc. you need to thoroughly read the UEFI and UEFI_Bootloaders pages in Archwiki.

Offline

#20 2013-09-17 14:57:38

sinfree
Member
Registered: 2013-09-09
Posts: 10

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

After some tests, I can see that options can be transmitted by refind to the kernel (for root partition for example).
My kernel boots when initramfs is attached as indicated in the gentoo advice quoted previously (it seems to correspond to mkinitcpio in archlinux).
But after booting, the PARTUUID partition is not found and I cannot specify another partition as there is no keyboard reaction.

Have any clue?

Offline

#21 2013-09-17 16:02:13

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

First, I want to be sure you know the difference between two different ways to specify a filesystem:

  • UUID= -- This option specifies a filesystem's UUID value. This value is embedded in the filesystem, and so applies to filesystems on GPT or MBR disks, in LVM setups, and on unpartitioned hard disks.

  • PARTUUID= -- This option specifies a partition's GUID. This value is stored as part of the data on GPT disks, so it's not available on MBR disks, on logical volumes in an LVM, or on unpartitioned hard disks. (I've heard there are plans to create a "fake" PARTUUID for some of these cases, but I'm not sure if this support exists in shipping kernels yet.)

You can find both values for a partition by using "blkid", as in:

# blkid /dev/sda2
/dev/sda2: LABEL="/boot" UUID="c607bd95-8edf-4eb1-aa93-12db8f0e66a2" TYPE="ext2" PARTLABEL="/boot" PARTUUID="053eca6f-f0d4-41d3-9ee3-9f0155c6183e"

You must be sure to use the correct value (or the correct label). If that fails, you could fall back to using a device filename, as in "root=/dev/sda2". This is simpler to type, and in many cases it works just fine. The main problem is that the device filename can change if you repartition the disk or add or remove a disk. (Sometimes even plugging in or unplugging an external disk can change the device filename.)

Offline

#22 2013-09-17 18:35:46

sinfree
Member
Registered: 2013-09-09
Posts: 10

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

It is Ok for PARTUUID and UUID.
For root=/dev/sda2 for instance I tested also and the partition is not found neighter.

Offline

#23 2013-09-17 21:19:55

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] efibootmgr not generating boot loader (rEFInd, etc.) entry.

Sinfree, it could be that your hardware isn't supported by your kernel. I just realized that you're not the thread-starter, and this is an old thread. It's generally best to start your own thread for your own problem rather than "hijack" an existing one (even an old one). Thus, I recommend you start a new thread. Clearly state your current problem and give details of your software (especially the kernel version) and hardware (such as the chipset used on your motherboard).

Offline

Board footer

Powered by FluxBB