You are not logged in.

#1 2013-10-27 21:09:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

rEFInd: how to boot an image on another partition [solved]

How can I direct a rEFInd menuentry to boot image files that reside on another partition?

Example:

sda
 |--sda1 vfat (efi partition)
 |--sda2 ext4 (boot)
 |--sda3 btrfs (root)

I don't want to copy my kernel images to my efi partition (sda1).  I want them to stay on my "old" /boot partition (sda2).  How can I modify the following refind.conf entry to reflect this?

menuentry "Arch Custom" {
  icon EFI/refind/icons/os_arch.icns
  ostype Linux
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom.img
  options "root=/dev/sda3 rootfstype=btrfs rw systemd.unit=graphical.target"
}

I know this is possible because the autodetection option in rEFInd does it automatically tongue  Thanks!

Last edited by graysky (2013-10-27 23:23:10)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2013-10-27 21:13:39

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

Re: rEFInd: how to boot an image on another partition [solved]

graysky wrote:

How can I direct a rEFInd menuentry to boot image files that reside on another partition?

Example:

sda
 |--sda1 vfat (efi partition)
 |--sda2 ext4 (boot)
 |--sda3 btrfs (root)

I don't want to copy my kernel images to my efi partition (sda1).  I want them to stay on my "old" /boot partition (sda2).  How can I modify the following refind.conf entry to reflect this?

menuentry "Arch Custom" {
  icon EFI/refind/icons/os_linux.icns
  volume KERNELS
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom.img
  options "root=/dev/sda3 rootfstype=btrfs rw systemd.unit=graphical.target"
}

I know this is possible because the autodetection option in rEFInd does it automatically tongue  Thanks!

Copy the ext4 EFI driver from /usr/share/refind/drivers_x64/ext4_x64.efi to <EFISYS>/EFI/refind/drivers_x64 and then use the following config

## Specify location of EFI drivers dir for rEFInd to autoload it
scan_driver_dirs EFI/refind/drivers_x64

menuentry "Arch Custom" {
  volume <FS LABEL of the sda2>
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom.img
  options "root=/dev/sda3 rootfstype=btrfs rw systemd.unit=graphical.target"
}

rEFInd does not yet support FSUUID, PARTUUID and PARTLABEL based volume/partition selection.

Last edited by the.ridikulus.rat (2013-10-27 21:21:28)

Offline

#3 2013-10-27 21:27:30

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

Re: rEFInd: how to boot an image on another partition [solved]

My /EFI/refind/refind.conf

timeout 3
textonly
textmode 1024
resolution 1366 768
showtools mok_tool,about,reboot,shutdown,exit,firmware
scan_driver_dirs EFI/tools/drivers_x64
scanfor manual,internal,external,optical
scan_delay 0
# also_scan_dirs UEFISYS:EFI/arch/core,UEFISYS:EFI/arch/mainline
dont_scan_dirs UEFISYS:EFI/boot
scan_all_linux_kernels
default_selection "Arch Linux Core Kernel"
#include manual.conf

menuentry "Arch Linux Core Kernel" {
    icon /EFI/refind/icons/os_arch.icns
    volume UEFISYS
    loader /EFI/arch/core/vmlinuz-arch-core.efi
    initrd /EFI/arch/core/initramfs-arch-core.img
    options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=graphical.target"
    ostype Linux
    graphics off
}

menuentry "Arch Linux Core Kernel Fallback" {
    icon /EFI/refind/icons/os_arch.icns
    volume UEFISYS
    loader /EFI/arch/core/vmlinuz-arch-core.efi
    initrd /EFI/arch/core/initramfs-arch-core-fallback.img
    options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=graphical.target"
    ostype Linux
    graphics off
}

menuentry "Arch Linux Mainline Kernel" {
    icon /EFI/refind/icons/os_arch.icns
    volume UEFISYS
    loader /EFI/arch/mainline/vmlinuz-arch-mainline.efi
    initrd /EFI/arch/mainline/initramfs-arch-mainline.img
    options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=graphical.target"
    ostype Linux
    graphics off
}

menuentry "Arch Linux Mainline Kernel Fallback" {
    icon /EFI/refind/icons/os_arch.icns
    volume UEFISYS
    loader /EFI/arch/mainline/vmlinuz-arch-mainline.efi
    initrd /EFI/arch/mainline/initramfs-arch-mainline-fallback.img
    options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=graphical.target"
    ostype Linux
    graphics off
}

menuentry "Arch Linux x86_64 Archboot" {
    icon /EFI/refind/icons/os_arch.icns
    volume UEFISYS
    loader /EFI/arch/archboot/vmlinuz-archboot.efi
    initrd /EFI/arch/archboot/initramfs-archboot.img
    options "rw loglevel=7 efi_no_storage_paranoia add_efi_memmap"
    ostype Linux
    graphics off
}

menuentry "UEFI Shell x86_64 v2" {
    icon /EFI/refind/icons/os_hwtest.icns
    volume UEFISYS
    loader /EFI/tools/shellx64_v2.efi
    graphics off
}

menuentry "UEFI Shell x86_64 v1" {
    icon /EFI/refind/icons/os_hwtest.icns
    volume UEFISYS
    loader /EFI/tools/shellx64_v1.efi
    graphics off
}

My /boot/refind_linux.conf

"Boot into Graphics mode"    "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=graphical.target initrd=/initramfs-linux-fallback.img initrd=/initramfs-linux-mainline-fallback.img"
"Boot into Terminal mode"    "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=multi-user.target initrd=/initramfs-linux-fallback.img initrd=/initramfs-linux-mainline-fallback.img"
"Boot into Rescue mode"      "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 rw loglevel=6 printk.time=y pcie_aspm=force i915.i915_enable_rc6=1 nouveau.nofbaccel=1 add_efi_memmap systemd.unit=rescue.target initrd=/initramfs-linux-fallback.img initrd=/initramfs-linux-mainline-fallback.img"

Offline

#4 2013-10-27 21:46:37

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: rEFInd: how to boot an image on another partition [solved]

OK, this has been very helpful, thank you.  One question remains... why does an entry pointing to my grubx64.efi exist?

/boot/efi/EFI/refind/refind.conf

timeout 20
resolution 2560 1440

menuentry "Arch Custom" {
  icon EFI/refind/icons/os_arch.icns
  volume boot
  ostype Linux
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom.img
  options "root=/dev/sda3 rootfstype=btrfs rw quiet systemd.unit=graphical.target"
}

menuentry "Arch Custom Fallback" {
  icon EFI/refind/icons/os_arch.icns
  volume boot
  ostype Linux
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom-fallback.img
  options "root=/dev/sda3 rootfstype=btrfs rw quiet systemd.unit=graphical.target"
}

menuentry "Arch Mini" {
  icon EFI/refind/icons/os_arch.icns
  volume mini
  ostype Linux
  loader /boot/vmlinuz-linux
  initrd /boot/initramfs-linux.img
  options "root=/dev/sdb3 rootfstype=ext4 rw systemd.unit=graphical.target"
}

When rEFInd boots up, I am presented with 4 Arch icons:

[Boot EFI\arch\grubx64.efi from 98 MiB FAT volumn] [Arch Custom] [Arch Custom FB] [Mini]

Last edited by graysky (2013-10-27 21:47:03)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-10-27 21:55:25

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: rEFInd: how to boot an image on another partition [solved]

Do you actually have the file \EFI\arch\grubx64.efi?  If so, then I would imagine that it is just the autoscan that is still running.  I think taht you have to explicitly disable the autoscan if you want to rely solely on the manual stanzas.

Offline

#6 2013-10-27 23:13:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: rEFInd: how to boot an image on another partition [solved]

@WW - Yes, it is a backup until I am confident that rEFInd is 100 %.  This works:

timeout 5
resolution 2560 1440

showtools shell,memtest,reboot,shutdown
scanfor optical,manual
default_selection "Arch Custom"

menuentry "Arch Custom" {
  icon EFI/refind/icons/os_arch.icns
  volume boot
  ostype Linux
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom.img
  options "root=/dev/sda3 rootfstype=btrfs rw quiet systemd.unit=graphical.target"
}

menuentry "Arch Custom Fallback" {
  icon EFI/refind/icons/os_gummiboot.icns
  volume boot
  ostype Linux
  loader /vmlinuz-linux-custom
  initrd /initramfs-linux-custom-fallback.img
  options "root=/dev/sda3 rootfstype=btrfs rw quiet systemd.unit=graphical.target"
}

menuentry "Arch Mini" {
  icon EFI/refind/icons/os_arch.icns
  volume mini
  ostype Linux
  loader /boot/vmlinuz-linux
  initrd /boot/initramfs-linux.img
  options "root=/dev/sdb3 rootfstype=ext4 rw systemd.unit=graphical.target"
}

menuentry "Grub" {
  icon EFI/refind/icons/os_linux.icns
  loader /EFI/arch/grubx64.efi
}

Last edited by graysky (2013-10-27 23:18:24)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB