You are not logged in.
According to https://wiki.archlinux.org/index.php/UE … ng_Systemd
The recent (and current) version of refind-efi auto-detects efi kernels in /boot and that wiki article says that it is no longer necessary to sync files from /boot/ to /boot/efi/EFI/arch/
Does that mean when first installing arch in a uefi system then it is also no longer necessary to copy the vmlinuz and initramfs files to the EFI /arch/ directory at all? Or is it necessary only once as indicated in the wiki? i.e. is the wiki fully up to date?
Secondly does the Beginners Guide at https://wiki.archlinux.org/index.php/Beginners%27_Guide need the section on "Efistub" updating to reflect the same change for using refind-efi?
Thanks
Last edited by mcloaked (2013-02-04 15:16:40)
Mike C
Offline
According to https://wiki.archlinux.org/index.php/UE … ng_Systemd
The recent (and current) version of refind-efi auto-detects efi kernels in /boot and that wiki article says that it is no longer necessary to sync files from /boot/ to /boot/efi/EFI/arch/
I would be somewhat cautious about this. Perhaps I missed it, but I don't see where this guide explains what you need to do for this to work e.g. that /boot must use a supported filesystem and that any drivers needed must be installed where rEFInd can find them. As far as I know, the automated scanning won't work otherwise.
Does that mean when first installing arch in a uefi system then it is also no longer necessary to copy the vmlinuz and initramfs files to the EFI /arch/ directory at all? Or is it necessary only once as indicated in the wiki? i.e. is the wiki fully up to date?
It is not necessary at all if things are set up so that it is not necessary. That is, it makes no difference that it is the first time - either the kernel etc. need to be copied or they don't. It depends on the details of your set up.
Secondly does the Beginners Guide at https://wiki.archlinux.org/index.php/Beginners%27_Guide need the section on "Efistub" updating to reflect the same change for using refind-efi?
That section deals with other boot methods, too. So it won't do to remove the copying for the general case and it will only work for the rEFInd case on some systems and with some configurations. Since the guide links to the more detailed article on rEFInd, I'd tend to leave it as it is. But that's just me. I figure much less damage is done by copying unnecessarily than not copying when it is necessary. And the guide is supposed to be aimed at beginners, after all. (Fairly sophisticated beginners, I grant you, but still.) My general view of the BG is that there is a slight tendency for people to want to add every option possible and forget that the rest of the wiki is also available to beginners!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I had an efi archlinux installed on my virtual machine (under my Arch).
In order to be able to reply to your question, I changed my /etc/fstab settings to mount the efi partition on the /boot directory, copied vmlinuz-linux initramfs-linux.img and refind-linux.conf to the root of the efi partition, and removed the /EFI/arch drectory.
After reboot rEFInd found the arch and let me choose and start it.
This way
(1) a separate boot partition is not necessary; a combined BOOT and EFI partition is enough
(2) I know that rEFInd finds what's needed
(3) no special methods are necessary after reinstaling the kernel
I tried
codemkinitcpio -p linux
and the machine was able to reboot alright.
The efi partition has to have a supported file system. In my case it is FAT32, but I read that ext4 is also OK (unless you boot Windows too).
Offline
The efi partition has to have a supported file system. In my case it is FAT32, but I read that ext4 is also OK (unless you boot Windows too).
No, using ext4fs is NOT OK on the ESP. According to the EFI spec, the ESP must be FAT32. In practice, any filesystem that the EFI can read will work, but that's usually limited to FAT12, FAT16, or FAT32. In order for ext4fs to work, you'd need an EFI with built-in ext4fs support. Although an ext4fs driver for EFI is available, it's not built into any production EFI implementation, AFAIK. This means that the ext4fs driver must be loaded from somewhere, and that "somewhere" is the ESP, leading to an insoluble recursive problem if you wanted to use ext4fs on the ESP itself. Apple's EFI variant supports HFS+, and I've heard of Macs that have HFS+ "ESPs," but as the EFI spec is quite explicit in stating that the ESP must be FAT32, that makes these partitions not technically ESPs.
What you can do is put an ext4fs (or other filesystem) driver on the ESP and use that to give your EFI boot loader access to your Linux root (/) or /boot partition so as to load the kernel from there. This is convenient in many cases, but if you plan to mount the ESP as /boot, it's unnecessary.
Offline
Thank you for the replies.
I have my hard drives partitioned with GPT partition tables, and I have set up a FAT32 partition which will be on the same physical drive as the / partition (which is ext4) - the FAT32 partition will be mounted as /boot and has been set with the bootable flag according to the advice that I read in the wiki. So I hope that this ESP will work as planned for the uefi boot under refind-efi.
What I was planning to be doing is to run an install next, and once I had advice from this forum to hopefully run the commands necessary to install refind-efi but not to set up the copy and file sync to the EFI/arch/ directory but to leave the kernel and initial ram image file in the default place in /boot - I gather from the reply from srs5694 (whom I know is an expert in this area) that with the efi system partition (ESP) being one of the supported partition types (FAT32) that this should in principle work? I presume that the refind.conf file will still be necessary in the /boot directory but not copied across to the EFI/arch/ directory which need not exist at all?
Since this will be a brand new install - if it fails I can always start again but it would be nice to get my own knowledge base up to the point that I hope it will work out and reboot to the arch system under EFI after the initial install is completed. I already have the UEFI bootable usbkey with the archiso on it, which I have booted on that system and checked that the efi vars directory is populated once the efivars module is loaded.
I will be keeping notes of my progress as I try this out - but any further advice on this particular area is really appreciated. I have done a clean install with the January 2013 archiso for a BIOS boot system so the rest of the install I am familiar with including the issues that arise from the network interface naming changes - but uefi is completely new to me - so in that area I am very much a green newbie!
Thanks
Mike C
Offline
By the way I have just seen this news item which will be of immediate interest to any Samsung laptop owners thinking of booting uefi:
http://www.h-online.com/open/news/item/ … 93958.html
My own system is an Intel motherboard so hopefully will not be subject to this problem.
Mike C
Offline
Your plan seems basically sound to me. I do have one comment:
I presume that the refind.conf file will still be necessary in the /boot directory but not copied across to the EFI/arch/ directory which need not exist at all?
There are two rEFInd configuration files, both of which are optional and one of which may appear multiple times:
refind.conf -- This is the main rEFInd configuration files that holds global rEFInd options and manual boot stanzas. If you use it at all, it must appear in the same directory as the rEFInd binary (usually refind_x64.efi).
refind_linux.conf -- This file holds options for booting Linux kernels. Each line consists of two parts: A name and one or more kernel options that are passed to the kernel by rEFInd. This file is more-or-less necessary if you use rEFInd's auto-detection mechanism to launch a Linux kernel, and it must exist in the same directory as the kernel, which should not be the same directory that holds the rEFInd binary. If you use a manual boot stanza, this file is not necessary.
Thus, given your configuration, you'd put refind_linux.conf in /boot and refind.conf somewhere else (probably /boot/EFI/refind or /boot/EFI/arch/refind, depending on how you set things up).
Offline
Your plan seems basically sound to me. I do have one comment:
mcloaked wrote:I presume that the refind.conf file will still be necessary in the /boot directory but not copied across to the EFI/arch/ directory which need not exist at all?
There are two rEFInd configuration files, both of which are optional and one of which may appear multiple times:
refind.conf -- This is the main rEFInd configuration files that holds global rEFInd options and manual boot stanzas. If you use it at all, it must appear in the same directory as the rEFInd binary (usually refind_x64.efi).
refind_linux.conf -- This file holds options for booting Linux kernels. Each line consists of two parts: A name and one or more kernel options that are passed to the kernel by rEFInd. This file is more-or-less necessary if you use rEFInd's auto-detection mechanism to launch a Linux kernel, and it must exist in the same directory as the kernel, which should not be the same directory that holds the rEFInd binary. If you use a manual boot stanza, this file is not necessary.
Thus, given your configuration, you'd put refind_linux.conf in /boot and refind.conf somewhere else (probably /boot/EFI/refind or /boot/EFI/arch/refind, depending on how you set things up).
Thank you very much indeed for this advice - it was one area where I was very unsure about what was necessary and why - your explanation is really spot on and I will follow that advice when I do my install (probably in the next couple of days).
I really value the help given in this forum - thanks again. I will come back and add a note here once I have done the install so will know how it went.
Mike
Mike C
Offline
dif wrote:The efi partition has to have a supported file system. In my case it is FAT32, but I read that ext4 is also OK (unless you boot Windows too).
No, using ext4fs is NOT OK on the ESP. According to the EFI spec, the ESP must be FAT32. In practice...
I found the web site where I read about it. It's on this web site. See sub-section "Adjusting refind_linux.conf", the first bullet point. But you are right it only says about the /boot directory file system. Whereas the question was about the file system of ESP (or of the partition that EFI is on). And I tired a partition combining EFI and BOOT mounted on /boot, so it has to be FAT32.
Perhaps I will try ext4 combined with rEFInd on my virtual machine anyhow, but I do not advise such experiments on a real system.
Offline
srs5694 == rodsbooks
Offline
srs5694 == rodsbooks
Ha!
So, all we can do is thank srs5694 for the excellent piece of software that rEFInd is.
Thank you.
Offline
srs5694 wrote:Your plan seems basically sound to me. I do have one comment:
mcloaked wrote:I presume that the refind.conf file will still be necessary in the /boot directory but not copied across to the EFI/arch/ directory which need not exist at all?
There are two rEFInd configuration files, both of which are optional and one of which may appear multiple times:
refind.conf -- This is the main rEFInd configuration files that holds global rEFInd options and manual boot stanzas. If you use it at all, it must appear in the same directory as the rEFInd binary (usually refind_x64.efi).
refind_linux.conf -- This file holds options for booting Linux kernels. Each line consists of two parts: A name and one or more kernel options that are passed to the kernel by rEFInd. This file is more-or-less necessary if you use rEFInd's auto-detection mechanism to launch a Linux kernel, and it must exist in the same directory as the kernel, which should not be the same directory that holds the rEFInd binary. If you use a manual boot stanza, this file is not necessary.
Thus, given your configuration, you'd put refind_linux.conf in /boot and refind.conf somewhere else (probably /boot/EFI/refind or /boot/EFI/arch/refind, depending on how you set things up).
Thank you very much indeed for this advice - it was one area where I was very unsure about what was necessary and why - your explanation is really spot on and I will follow that advice when I do my install (probably in the next couple of days).
I really value the help given in this forum - thanks again. I will come back and add a note here once I have done the install so will know how it went.
Mike
I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
Mike C
Offline
I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
Well, since partitioning is a matter of personal choice, I can tell how I did it.
Boot is on the root partitions, so Grub2 in my case is installed in the dir. boot on root.
I have a /boot/efi partition.
Now you want to know why!, well like I said personal choice! But, my probably invalid argument was, to keep EFI and Grub separated and only EFI applications ISO files on the '/boot/efi' partition.
So, in this case if you are using EFI and you have a separate boot partition, all Grub(in my case) and EFI related would be on it!
Hope this helps you.)
Offline
mcloaked wrote:I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
Well, since partitioning is a matter of personal choice, I can tell how I did it.
Boot is on the root partitions, so Grub2 in my case is installed in the dir. boot on root.
I have a /boot/efi partition.
Now you want to know why!, well like I said personal choice! But, my probably invalid argument was, to keep EFI and Grub separated and only EFI applications ISO files on the '/boot/efi' partition.
So, in this case if you are using EFI and you have a separate boot partition, all Grub(in my case) and EFI related would be on it!
Hope this helps you.)
Well I am planning to use refind and not use grub - but I just wasn't sure if mounting the /dev/sdXY partition as /boot (which is a separate partition on the mSATA drive) is OK or not - the wiki says to mount it as /boot/efi - and I didn't know if that would make any difference compared to mounting it as /boot and having a /boot/efi directory within /boot would be important or not, or would make any difference to booting with UEFI using refind?
Mike C
Offline
I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
As qinohe says it's a matter of your personal preferrance... But I've made another setup to check what options you may have.
I separated the ESP and BOOT partitions again and tried the following setup
ESP=/dev/sda1 mounted on /boot/efi with the FAT32 file system
BOOT=/dev/sda2 mounted on /boot ext2
ROOT=/dev/sda3 mounted on / ext4
HOME=/dev/sda4 mounted on /home ext4
I set up two sets of kernel files:
(1) the first one on /boot/efi/EFI/arch/ exactly the way ArchWiki suggest
(2) the second one on /boot
The files in /boot are the normal files creaded by mkinintcpio. Additionally I put refind_linux.conf in /boot copied from /boot/efi/EFI/arch/.
In order for the second kernel to work I created /boot/efi/EFI/tools/drivers_x64/ and copied there the files ext2_x64.efi and ext4_x64.efi from /usr/lib/refind/drivers_x64/.
Finally, I modified /boot/efi/EFI/refind/refind.conf, changing
#scan_driver_dirs EFI/tools/drivers,drivers
into
scan_driver_dirs EFI/tools/drivers_x64
so that rEFInd can look on /boot with ext2 or ext4 file systems.
After reboot rEFIned showed two linuxes (or is it "linuces"?) to choose from. The one from EFI/arch has a nice ArchLinux icon. The one from /boot has a penguin icon. Both use the same root directory ("/").
The second set of initramfs+kernel files (the one on the /boot has this nice property that it is always regenerated with each kernel update.
The first set of initramfs+kernel files (on /boot/efi/EFI/arch/) is not necessary and can be removed. In my opinion you don't need to create it during the installation process.
Offline
mcloaked wrote:I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
As qinohe says it's a matter of your personal preferrance... But I've made another setup to check what options you may have.
I separated the ESP and BOOT partitions again and tried the following setup
ESP=/dev/sda1 mounted on /boot/efi with the FAT32 file system BOOT=/dev/sda2 mounted on /boot ext2 ROOT=/dev/sda3 mounted on / ext4 HOME=/dev/sda4 mounted on /home ext4
I set up two sets of kernel files:
(1) the first one on /boot/efi/EFI/arch/ exactly the way ArchWiki suggest
(2) the second one on /bootThe files in /boot are the normal files creaded by mkinintcpio. Additionally I put refind_linux.conf in /boot copied from /boot/efi/EFI/arch/.
In order for the second kernel to work I created /boot/efi/EFI/tools/drivers_x64/ and copied there the files ext2_x64.efi and ext4_x64.efi from /usr/lib/refind/drivers_x64/.
Finally, I modified /boot/efi/EFI/refind/refind.conf, changing
#scan_driver_dirs EFI/tools/drivers,drivers
into
scan_driver_dirs EFI/tools/drivers_x64
so that rEFInd can look on /boot with ext2 or ext4 file systems.After reboot rEFIned showed two linuxes (or is it "linuces"?) to choose from. The one from EFI/arch has a nice ArchLinux icon. The one from /boot has a penguin icon. Both use the same root directory ("/").
The second set of initramfs+kernel files (the one on the /boot has this nice property that it is always regenerated with each kernel update.
The first set of initramfs+kernel files (on /boot/efi/EFI/arch/) is not necessary and can be removed. In my opinion you don't need to create it during the installation process.
That is what I was hoping! i.e. that only /boot is necessary with refind_linux.conf in the same directory as the initramfs and kernel files generated automatically when new kernels are installed. But I am still unsure whether this is sufficient and whether there is no need to have /boot/efi as well? If I have only /boot with the refind_linux.conf and the initramfs and kernel files - and the refind.conf in the directory with the binary - but no /boot/efi at all will it boot? i.e. does /boot become the ESP?
In your case you said the the initramfs and kernel files can be removed from /boot/efi/EFI/arch/ and are not necessary - but can you remove the /boot/efi directory entirely?
I hope this doesn't sound too naive! I am just trying to interpret the available info....
Mike C
Offline
dif wrote:mcloaked wrote:I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
As qinohe says it's a matter of your personal preferrance... But I've made another setup to check what options you may have.
I separated the ESP and BOOT partitions again and tried the following setup
ESP=/dev/sda1 mounted on /boot/efi with the FAT32 file system BOOT=/dev/sda2 mounted on /boot ext2 ROOT=/dev/sda3 mounted on / ext4 HOME=/dev/sda4 mounted on /home ext4
I set up two sets of kernel files:
(1) the first one on /boot/efi/EFI/arch/ exactly the way ArchWiki suggest
(2) the second one on /bootThe files in /boot are the normal files creaded by mkinintcpio. Additionally I put refind_linux.conf in /boot copied from /boot/efi/EFI/arch/.
In order for the second kernel to work I created /boot/efi/EFI/tools/drivers_x64/ and copied there the files ext2_x64.efi and ext4_x64.efi from /usr/lib/refind/drivers_x64/.
Finally, I modified /boot/efi/EFI/refind/refind.conf, changing
#scan_driver_dirs EFI/tools/drivers,drivers
into
scan_driver_dirs EFI/tools/drivers_x64
so that rEFInd can look on /boot with ext2 or ext4 file systems.After reboot rEFIned showed two linuxes (or is it "linuces"?) to choose from. The one from EFI/arch has a nice ArchLinux icon. The one from /boot has a penguin icon. Both use the same root directory ("/").
The second set of initramfs+kernel files (the one on the /boot has this nice property that it is always regenerated with each kernel update.
The first set of initramfs+kernel files (on /boot/efi/EFI/arch/) is not necessary and can be removed. In my opinion you don't need to create it during the installation process.That is what I was hoping! i.e. that only /boot is necessary with refind_linux.conf in the same directory as the initramfs and kernel files generated automatically when new kernels are installed. But I am still unsure whether this is sufficient and whether there is no need to have /boot/efi as well? If I have only /boot with the refind_linux.conf and the initramfs and kernel files - and the refind.conf in the directory with the binary - but no /boot/efi at all will it boot? i.e. does /boot become the ESP?
In your case you said the the initramfs and kernel files can be removed from /boot/efi/EFI/arch/ and are not necessary - but can you remove the /boot/efi directory entirely?
I hope this doesn't sound too naive! I am just trying to interpret the available info....
Oh and my /boot would be the mount point for a simple FAT32 partition with the bootable flag set.
Mike C
Offline
mcloaked wrote:dif wrote:As qinohe says it's a matter of your personal preferrance... But I've made another setup to check what options you may have.
I separated the ESP and BOOT partitions again and tried the following setup
ESP=/dev/sda1 mounted on /boot/efi with the FAT32 file system BOOT=/dev/sda2 mounted on /boot ext2 ROOT=/dev/sda3 mounted on / ext4 HOME=/dev/sda4 mounted on /home ext4
I set up two sets of kernel files:
(1) the first one on /boot/efi/EFI/arch/ exactly the way ArchWiki suggest
(2) the second one on /bootThe files in /boot are the normal files creaded by mkinintcpio. Additionally I put refind_linux.conf in /boot copied from /boot/efi/EFI/arch/.
In order for the second kernel to work I created /boot/efi/EFI/tools/drivers_x64/ and copied there the files ext2_x64.efi and ext4_x64.efi from /usr/lib/refind/drivers_x64/.
Finally, I modified /boot/efi/EFI/refind/refind.conf, changing
#scan_driver_dirs EFI/tools/drivers,drivers
into
scan_driver_dirs EFI/tools/drivers_x64
so that rEFInd can look on /boot with ext2 or ext4 file systems.After reboot rEFIned showed two linuxes (or is it "linuces"?) to choose from. The one from EFI/arch has a nice ArchLinux icon. The one from /boot has a penguin icon. Both use the same root directory ("/").
The second set of initramfs+kernel files (the one on the /boot has this nice property that it is always regenerated with each kernel update.
The first set of initramfs+kernel files (on /boot/efi/EFI/arch/) is not necessary and can be removed. In my opinion you don't need to create it during the installation process.That is what I was hoping! i.e. that only /boot is necessary with refind_linux.conf in the same directory as the initramfs and kernel files generated automatically when new kernels are installed. But I am still unsure whether this is sufficient and whether there is no need to have /boot/efi as well? If I have only /boot with the refind_linux.conf and the initramfs and kernel files - and the refind.conf in the directory with the binary - but no /boot/efi at all will it boot? i.e. does /boot become the ESP?
In your case you said the the initramfs and kernel files can be removed from /boot/efi/EFI/arch/ and are not necessary - but can you remove the /boot/efi directory entirely?
I hope this doesn't sound too naive! I am just trying to interpret the available info....
Oh and my /boot would be the mount point for a simple FAT32 partition with the bootable flag set.
Maybe I can clarify by adding - if I set up as indicated then can I have a directory within /boot (which is the only mount point associated with booting) - with a directory within it being /boot/EFI but not a mountpoint, and within that put /boot/EFI/refind/refind.conf and /boot/EFI/refind/refind_x64.efi
but put the refind_linux.conf and initramfs+kernel into /boot/ so in this case the only mount point is /boot as a FAT32 partition. (the root and opt partitions are mounted separately)
I had thought (hoped!) that this would work but of course I don't know till I do the install - but hoping someone can say here if this sounds like it is OK - as it is different to the setup that anyone else seems to have!
Thanks
Last edited by mcloaked (2013-01-31 22:03:12)
Mike C
Offline
Please learn to use the edit button and not keep uneccessarily bumping your thread
https://wiki.archlinux.org/index.php/Fo … te#Bumping
Offline
mcloaked wrote:I have one more question - in the beginner's guide it is recommended to mount the ESP partition (/dev/sdXY to /boot/efi whereas in the past I mount the old /boot on /dev/sdXY - can you advise if the mount should indeed be to /boot/efi ? Thanks in advance.
As qinohe says it's a matter of your personal preferrance... But I've made another setup to check what options you may have.
I separated the ESP and BOOT partitions again and tried the following setup
ESP=/dev/sda1 mounted on /boot/efi with the FAT32 file system BOOT=/dev/sda2 mounted on /boot ext2 ROOT=/dev/sda3 mounted on / ext4 HOME=/dev/sda4 mounted on /home ext4
I set up two sets of kernel files:
(1) the first one on /boot/efi/EFI/arch/ exactly the way ArchWiki suggest
(2) the second one on /bootThe files in /boot are the normal files creaded by mkinintcpio. Additionally I put refind_linux.conf in /boot copied from /boot/efi/EFI/arch/.
In order for the second kernel to work I created /boot/efi/EFI/tools/drivers_x64/ and copied there the files ext2_x64.efi and ext4_x64.efi from /usr/lib/refind/drivers_x64/.
Finally, I modified /boot/efi/EFI/refind/refind.conf, changing
#scan_driver_dirs EFI/tools/drivers,drivers
into
scan_driver_dirs EFI/tools/drivers_x64
so that rEFInd can look on /boot with ext2 or ext4 file systems.After reboot rEFIned showed two linuxes (or is it "linuces"?) to choose from. The one from EFI/arch has a nice ArchLinux icon. The one from /boot has a penguin icon. Both use the same root directory ("/").
The second set of initramfs+kernel files (the one on the /boot has this nice property that it is always regenerated with each kernel update.
The first set of initramfs+kernel files (on /boot/efi/EFI/arch/) is not necessary and can be removed. In my opinion you don't need to create it during the installation process.
I guess another option is to mount the ESP as /boot/efi on its own partition and put the binary, refind.conf and driver files into its subdirectories as you did - and then have /boot as a directory within my separate root (/) partition (which will be ext4). Then put the initramfs+kernel+refind_linux.conf into /boot which is then simply a directory under / - i.e. then only having /boot/efi (FAT32) and / (ext4) as the main separate partitions and not mounting a separate /boot partition at all but just having it as a directory within the root partition? I am hoping that refind will still work without /boot being a partition on its own that would suit me too - but I just don't know if the way it works depends on having the boot stuff on separate partitions but not part of the root or other (/home /opt etc) partitions.
Maybe the only rigid restriction is that the ESP "MUST" be mounted as a separate mount point if I am interpreting the rules correctly?
(yes "linuxes" or "linuces" indeed - perhaps "two sets of linux boot files" - !!)
(my apologies jasonwryan - I will do that - )
Last edited by mcloaked (2013-01-31 22:18:21)
Mike C
Offline
The way the topic is being discussed in the last few posts suggests some subtle misconceptions about what's going on and what's important, so I'd like to address them.
From the EFI's perspective, Linux mount points are 100% irrelevant. The EFI doesn't care if you mount the ESP at /boot, at /boot/efi, or at any other location. The EFI does care about the filesystem on the ESP and about where files go within that partition. Most notably, the EFI spec says that boot loaders reside in subdirectories of a directory called "EFI" on the ESP, such as EFI/BOOT and EFI/arch. How Linux, or any other OS, puts files there is unimportant.
From a Linux perspective, the assignment of partitions to mount points is mainly important in that files get placed in reasonable locations as far as Linux utilities are concerned. EFI/Linux interactions are new enough that there's no firm standard about where EFI boot loaders should reside; however, most distributions mount the ESP at /boot/efi by default. In Arch, and to some extent in some other distributions, mounting the ESP at /boot is a viable alternative that can simplify certain tasks such as getting the kernel into a location where the EFI can read it. (Note that mounting the ESP at /boot ends up putting the kernel in the root of the ESP. If the kernel has an EFI stub loader and is therefore a boot loader, this technically violates the EFI spec's recommendations, but not in a way that's likely to cause any real problems.)
If you set aside a separate partition to serve as a /boot partition, you should not also mount the ESP at /boot -- that is, each mount point should have precisely one partition mounted on it.
It's perfectly valid to have /boot be a regular directory inside your root (/) filesystem, in which case you'd probably want to mount your ESP at /boot/efi.
There are many ways to configure your mount points and partitions, each of which has its advantages and disadvantages; however, in many cases the advantages and disadvantages are very minor or apply only to specific configurations, such as a computer that uses LVM or an installation that uses Btrfs on root (/). Thus, it's impossible to say with certainty what will work best. Two options that will almost always work (at least with Arch) are mounting the ESP at /boot and using a separate FAT, ext2fs, ext3fs, ext4fs, ReiserFS, or HFS+ /boot partition with the ESP mounted at /boot/efi. The latter option works better with rEFInd than with some other boot programs because rEFInd can load filesystem drivers and read boot loaders from any readable partition. (Note that this statement that rEFInd works well with a particular mount point setup is a partial violation of my first point above about the EFI not caring about mount points. The reason is that the mount point configuration determines where critical boot files -- namely Linux kernels -- reside, and therefore from where they can be read.)
Offline
I guess another option is to mount the ESP as /boot/efi on its own partition and put the binary, refind.conf and driver files into its subdirectories as you did - and then have /boot as a directory within my separate root (/) partition (which will be ext4). Then put the initramfs+kernel+refind_linux.conf into /boot which is then simply a directory under / - i.e. then only having /boot/efi (FAT32) and / (ext4) as the main separate partitions and not mounting a separate /boot partition at all but just having it as a directory within the root partition? I am hoping that refind will still work without /boot being a partition on its own that would suit me too - but I just don't know if the way it works depends on having the boot stuff on separate partitions but not part of the root or other (/home /opt etc) partitions.
Maybe the only rigid restriction is that the ESP "MUST" be mounted as a separate mount point if I am interpreting the rules correctly? ...
My knowledge is too limited, so I am only speculating.
I think that the only rigid restriction is that ESP has to have the FAT32 file system.
Perhaps it would be possible to make one gigantic partition with /EFI placed directly in root "/", but who would want that?
The option "-l" of the command efibootmgr lets you put refind/ anywhere in ESP, but I'm afraid it is very easy to get in trouble modifying the "-l path". If possible at all, such a change would require a lot of modifications in refind.conf. And you might not be able to boot into other systems if you plan to have any. Only srs5694 can reliably answer that.
My advice is to keep as closely to the ArchWiki as possible in case something bad should happen after an update. Then it will be easier to fix the problem.
One thing I would definitely advise to have is the kernel and initramfs + refind_linux.conf kept in /boot. But I can see that you have already decided to go for this option.
Woops! srs5694 has already replied.
Last edited by dif (2013-01-31 23:13:30)
Offline
The way the topic is being discussed in the last few posts suggests some subtle misconceptions about what's going on and what's important, so I'd like to address them.
From the EFI's perspective, Linux mount points are 100% irrelevant. The EFI doesn't care if you mount the ESP at /boot, at /boot/efi, or at any other location. The EFI does care about the filesystem on the ESP and about where files go within that partition. Most notably, the EFI spec says that boot loaders reside in subdirectories of a directory called "EFI" on the ESP, such as EFI/BOOT and EFI/arch. How Linux, or any other OS, puts files there is unimportant.
From a Linux perspective, the assignment of partitions to mount points is mainly important in that files get placed in reasonable locations as far as Linux utilities are concerned. EFI/Linux interactions are new enough that there's no firm standard about where EFI boot loaders should reside; however, most distributions mount the ESP at /boot/efi by default. In Arch, and to some extent in some other distributions, mounting the ESP at /boot is a viable alternative that can simplify certain tasks such as getting the kernel into a location where the EFI can read it. (Note that mounting the ESP at /boot ends up putting the kernel in the root of the ESP. If the kernel has an EFI stub loader and is therefore a boot loader, this technically violates the EFI spec's recommendations, but not in a way that's likely to cause any real problems.)
If you set aside a separate partition to serve as a /boot partition, you should not also mount the ESP at /boot -- that is, each mount point should have precisely one partition mounted on it.
It's perfectly valid to have /boot be a regular directory inside your root (/) filesystem, in which case you'd probably want to mount your ESP at /boot/efi.
There are many ways to configure your mount points and partitions, each of which has its advantages and disadvantages; however, in many cases the advantages and disadvantages are very minor or apply only to specific configurations, such as a computer that uses LVM or an installation that uses Btrfs on root (/). Thus, it's impossible to say with certainty what will work best. Two options that will almost always work (at least with Arch) are mounting the ESP at /boot and using a separate FAT, ext2fs, ext3fs, ext4fs, ReiserFS, or HFS+ /boot partition with the ESP mounted at /boot/efi. The latter option works better with rEFInd than with some other boot programs because rEFInd can load filesystem drivers and read boot loaders from any readable partition. (Note that this statement that rEFInd works well with a particular mount point setup is a partial violation of my first point above about the EFI not caring about mount points. The reason is that the mount point configuration determines where critical boot files -- namely Linux kernels -- reside, and therefore from where they can be read.)
Thank you so much for this very clear description of how the partitions and mount points can/are used for EFI. I will indeed stick with the convention by having a FAT32 partition which I will mount at /boot/efi and put the EFI directory within that, and separately have a directory within my ext4 root (/) partition called /boot and put the kernel etc in that - which looks like it should be simpler to manage during kernel upgrades.
I guess that if there is an update to the refind package, that the refind binary will need to be copied into the ESP if it changes in the future? Just something to keep an eye out for and be aware would be necessary to do manually. Maybe it is possible to automate that with some systemd tricks?
Thanks again for the replies - next action is to do my uefi based install - though since the latest archiso is being generated today I will wait and use the February file - should be interesting doing the install. I will report back on how it worked out when I have the new system up and running.
Last edited by mcloaked (2013-02-01 09:52:49)
Mike C
Offline
I guess that if there is an update to the refind package, that the refind binary will need to be copied into the ESP if it changes in the future? Just something to keep an eye out for and be aware would be necessary to do manually. Maybe it is possible to automate that with some systemd tricks?
Et voilà: https://wiki.archlinux.org/index.php/UE … Automation
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
mcloaked wrote:I guess that if there is an update to the refind package, that the refind binary will need to be copied into the ESP if it changes in the future? Just something to keep an eye out for and be aware would be necessary to do manually. Maybe it is possible to automate that with some systemd tricks?
Et voilà: https://wiki.archlinux.org/index.php/UE … Automation
That's perfect - thanks.
Mike C
Offline