You are not logged in.
Hello,
I am completely new to EFI and just did a clean install. How do I use custom kernel with rEFInd? I have efistub-update.path systemd file to copy /boot files to /boot/efi/EFI/arch but I suppose it only copies stock linux kernel files and not custom kernel files like linux-mainline. I have read wiki but couldn't find information about using multiple kernels, it only says a boot manager should be used to handle multiple kernels. I copied linux-mainline vmlinuz and initramfs files to /boot/efi/EFI/arch but booting using these file took me to rootfs prompt.
Thanks.
Last edited by donniezazen (2012-12-11 07:48:15)
Offline
Have you even looked at the service file you created, and what it does? I think it is pretty self expanitory. In my head, if efistub-update.{path,service} updates the kernel, then another one modfied slightly could do the same for another kernel!!!
Offline
Yes, I have looked into the efistub-update.{path,service}. It copies /boot/vmlinuz-linux to /boot/efi/EFI/arch/vmlinuz-arch.efi. During this copying names are being changed from linux to arch (vmlinuz-linux to vmlinuz-arch). I have tired copying linux-mainline files as they are which took me to rootfs prompt. So, I might need to change some names with linux-mainline too, so I gather. I am not sure about what to change name to and will i have to make changes to other files too. And I don't want to make changes without any logic and create more incompatibility and end up with a system that won't boot at all.
Offline
I am not sure why you think you need to rename the files. rEFInd's autodetect function should detect anything with .efi at the end of it. You should read rod smith's page on configuring rEFInd. But basically it will scan for kernels and matching initramfs names in EFI\* (except EFI\refind) as well as the \ of the ESP. I don't actually use rEFInd, so I am not sure what kind of logic it specifically uses to match kernels and initrds. Again, you should read this for more info.
Personally I use gummiboot, as I find its fully namual configuration and stoopid simple menu to be simply amazing.
Offline
These are the files I use (I use testing/linux and miffe/linux-mainline pkgs in my system) :
/etc/systemd/system/efistub_copy.path
[Unit]
Description=Copy EFISTUB Kernel and Initramfs to UEFISYS Partition
[Path]
PathChanged=/boot/initramfs-linux-fallback.img
PathChanged=/boot/initramfs-linux-mainline-fallback.img
Unit=efistub_copy.service
[Install]
WantedBy=multi-user.target/etc/systemd/system/efistub_copy.service
[Unit]
Description=Copy EFISTUB Kernel and Initramfs to UEFISYS Partition
# Requires=boot-efi.mount
[Service]
Type=oneshot
ExecStart=/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/arch_linux_core/vmlinuz-ARCH-core.efi
ExecStart=/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/arch_linux_core/initramfs-ARCH-core.img
ExecStart=/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/arch_linux_core/initramfs-ARCH-core-fallback.img
ExecStart=/bin/cp -f /boot/vmlinuz-linux-mainline /boot/efi/EFI/arch/arch_linux_mainline/vmlinuz-arch-mainline.efi
ExecStart=/bin/cp -f /boot/initramfs-linux-mainline.img /boot/efi/EFI/arch/arch_linux_mainline/initramfs-arch-mainline.img
ExecStart=/bin/cp -f /boot/initramfs-linux-mainline-fallback.img /boot/efi/EFI/arch/arch_linux_mainline/initramfs-arch-mainline-fallback.img/boot/efi/EFI/refind/refind.conf (only part of the file)
scanfor manual,internal,external,optical
menuentry "Arch Linux Core Kernel" {
icon /EFI/refind/icons/os_arch.icns
loader /EFI/arch/arch_linux_core/vmlinuz-ARCH-core.efi
initrd /EFI/arch/arch_linux_core/initramfs-ARCH-core.img
options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 pcie_aspm=force add_efi_memmap systemd.unit=graphical.target"
ostype Linux
graphics off
}
menuentry "Arch Linux Core Kernel Fallback" {
icon /EFI/refind/icons/os_arch.icns
loader /EFI/arch/arch_linux_core/vmlinuz-ARCH-core.efi
initrd /EFI/arch/arch_linux_core/initramfs-ARCH-core-fallback.img
options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 pcie_aspm=force add_efi_memmap systemd.unit=graphical.target"
ostype Linux
graphics off
}
menuentry "Arch Linux Mainline Kernel" {
icon /EFI/refind/icons/os_arch.icns
loader /EFI/arch/arch_linux_mainline/vmlinuz-arch-mainline.efi
initrd /EFI/arch/arch_linux_mainline/initramfs-arch-mainline.img
options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 pcie_aspm=force add_efi_memmap systemd.unit=graphical.target"
ostype Linux
graphics off
}
menuentry "Arch Linux Mainline Kernel Fallback" {
icon /EFI/refind/icons/os_arch.icns
loader /EFI/arch/arch_linux_mainline/vmlinuz-arch-mainline.efi
initrd /EFI/arch/arch_linux_mainline/initramfs-arch-mainline-fallback.img
options "root=PARTUUID=6f44c56d-d5c2-41ca-8c54-873d8dc5e5e3 rootfstype=ext4 pcie_aspm=force add_efi_memmap systemd.unit=graphical.target"
ostype Linux
graphics off
}Offline