Difference between revisions of "Talk:UEFI Bootloaders"

From ArchWiki
Jump to: navigation, search
(Merging with Bootloaders page)
(Merged Talk pages)
Line 1: Line 1:
== Why so overly complicated? ==
+
#REDIRECT [[Talk:Boot_Loaders]]
Why not just use the EFI system partition as /boot? This makes setting up direct boot via efistub as easy as <code>efibootmgr -c -l /vmlinuz-linux -u "$(cat /proc/cmdline)"</code> (assuming the ESP is on /dev/sda1). [[User:Creshal|Creshal]] ([[User talk:Creshal|talk]]) 16:44, 17 August 2013 (UTC)
+
: This would be great if it worked reliably. Unfortunately there are too many consumer boards at market right now with NVRAM issues, and I think efibootmgr has rather famously bricked boards in the past. UEFI just isn't that reliable yet. On the other hand, direct firmware boot-loading is nice, and rEFInd is tiny and pretty, so I think it's a good compromise. Also, most Linux users are used to a configurable bootloader so it fits.
+
: Also, your solution, as elegant as it is, doesn't allow for much organization of multiple installs, and you neglected to mention the obligatory {{ic|/etc/fstab}} entry.
+
: Still, I think you're right. I've never understood the need for special scripts and services either. {{ic|/etc/fstab}} is proven, simple, and portable and can easily handle transparently mounting our {{ic|/boot}} for us. And of course, UEFI has already imposed the esp on us so we might as well use it, right?
+
: Yesterday I added the '''/etc/fstab bind mount''' section under '''Sync EFISTUB Kernel'''. It assumes a separate bootloader, and specifically mentions rEFInd in examples, but requires only an initial configuration and is afterwards managed the same as any other installation would be.
+
: In a nut shell:
+
: {{ic|$ mkdir -p /esp<nowiki>; mount -L {,/}esp</nowiki>}}
+
: {{ic|$ mkdir -p /esp/EFI/boot/''new_system/''<nowiki>; mv /boot/* $_; mount --bind $_ /boot</nowiki>}}
+
: {{ic|$ cat <<&apos;EOF&apos; >/etc/fstab<br />LABEL&#61;''new_rootfs'' / ''fstype'' defaults 0 0<br />LABEL&#61;esp /esp vfat defaults 0 0<br />/esp/EFI/boot/''new_system'' /boot none defaults,bind 0 0<br />EOF}}
+
: {{ic|$ sed -ri <nowiki>'s/root=[^ ]*/root=LABEL=</nowiki>''new_rootfs''/g&apos; /boot/refind_linux.conf}}
+
: Probably that code works. Anyway, it's as simple as mounting your ESP somewhere on your filesystem, creating a separate folder on your ESP for the current install, then bind mounting that folder to {{ic|/boot}}. Reflect the config in {{ic|/etc/fstab}} and your ''bootloader.conf'' and you're done. For good.
+
: [[User:Mikeserv|Mikeserv]] ([[User talk:Mikeserv|talk]]) 06:50, 30 September 2013 (UTC)
+
 
+
== Issue with the Systemd Automation script ==
+
 
+
Beta990 has some reason questioning the '''Systemd Automation''' script's line:
+
  cp -r /usr/{share/refind/*,lib/refind/*$arch*} $refind_dir/  && ## update bin and dirs
+
As it is on the wiki, it just prints this when launched:
+
  /usr/lib/systemd/scripts/refind_name_patchv2: ligne31: « update-efi-dir » : identifiant non valable
+
[in English: unvalid identifier].
+
Unfortunately editing that single line as follow changes nothing:
+
  cp -r /usr/{share/refind/*,lib/refind/refind_*$arch*.efi} $refind_dir/ && ## update bin and dirs
+
 
+
Next in the wiki, there might be a typo at the end of the systemctl command (see the « ; »):
+
  Tip: Enable the systemd path unit by running :
+
  # systemctl enable refind_update.path;
+
[[User:Kozaki|kozaki]] ([[User talk:Kozaki|talk]]) 23:31, 3 February 2013 (UTC)
+
 
+
: There are at least 2 further issues with these instructions. First, the unit files should really not be installed in /usr. The systemd unit files, for example, should go in /etc/systemd/system/. Second, this won't work any more now rEFInd is entirely in /usr/share/refind rather than split with /usr/lib. Since I don't use any of this, I'm reluctant to change it, though. (I do use systemd units but not the ones here and not with any script.) Could somebody who uses it go through and update it and then test the result? --[[User:Margali|cfr]] ([[User talk:Margali|talk]]) 02:25, 25 July 2013 (UTC)
+
 
+
== MKinitcpio update hook not working ==
+
 
+
The mkinitcpio auto-update hook does not work. I get the following output: "Synced  to /boot/efi/EFI/arch", along with some cp errors. Obviously, the parameters are not passed.
+
 
+
If i replace the script with the static cp commands from incron, i get the following output, indicating that the image is copied BEFORE the new one is written:
+
 
+
      -> Running build hook: [efistub-update]
+
    Synced new kernel and initrd to EFIStub.
+
    ==> Generating module dependencies
+
    ==> Creating gzip initcpio image: /boot/initramfs-linux.img
+
    ==> Image generation successful
+
 
+
As a result, my scripts now look as follows:
+
 
+
    /usr/lib/initcpio/install/efistub-update   
+
----
+
    #!/bin/sh
+
   
+
    build() {
+
        /usr/local/sbin/efistub-update &
+
    }
+
   
+
    help() {
+
        cat <<HELPEOF
+
    This hook simply waits for mkinitcpio to finish and copies the finished ramdisk and kernel to UEFI
+
    HELPEOF
+
    }
+
 
+
and
+
 
+
    /usr/local/sbin/efistub-update
+
----
+
    #!/bin/sh
+
   
+
    while [ [ -d "/proc/$PPID" ]]; do
+
        sleep 1
+
    done
+
   
+
    /bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/EFIStub/vmlinuz-arch.efi
+
    /bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/EFIStub/initramfs-arch.img
+
    /bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/EFIStub/initramfs-arch-fallback.img
+
   
+
    echo "Synced new kernel and initrd to EFIStub."
+
 
+
 
+
 
+
Also, the watch.sh does not get chmod +x'ed in the existing example.
+
 
+
--[[User:Denoyse|Denoyse]] ([[User talk:Denoyse|talk]]) 16:08, 15 February 2013 (UTC)
+
 
+
== Mkinitcpio update hook inefficiency ==
+
 
+
I updated the scripts reflecting [[User:Denoyse|Denoyse's]] suggestions, but the scripts still copy all of the files twice: first after building the regular image and again after building the fallback image. Is there a way to make it only run once, or to have different hooks for each image?
+
 
+
[[User:Silverhammermba|Silverhammermba]] ([[User talk:Silverhammermba|talk]]) 04:14, 1 March 2013 (UTC)
+
 
+
== Sync EFISTUB Kernel scripts need to be updated because of the move to /usr/bin ==
+
 
+
Hi everyone,
+
 
+
I think the '''sync EFISTUB Kernel''' scripts should be updated. All of them point to /bin/cp, but since the move to /usr/bin they should be pointing to /usr/bin/cp.
+
 
+
I can do it but I was just wondering if it would be agood idea to add a warning somewhere to tell people to update their scripts.
+
 
+
Cheers
+
[[User:Femtomatic|Femtomatic]] ([[User talk:Femtomatic|talk]]) 19:32, 15 June 2013 (UTC)
+
: +1 for a note about the change. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 03:02, 21 June 2013 (UTC)
+
 
+
== Merging with [[Bootloaders]] page ==
+
 
+
With the move of EFISTUB info to its own page, this page is now very small and as the guy who started this page (UEFI Bootloaders) I personally don't mind merging this with [[Bootloaders]] page. Any one objecting to this? -- [[User:The.ridikulus.rat|Keshav Padram Amburay]] ([[User talk:The.ridikulus.rat|talk]]) 13:04, 22 October 2013 (UTC)
+
 
+
:+1, just go for it! -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 00:32, 23 October 2013 (UTC)
+
 
+
:: I merged them. I'm not sure what to do with this talk page, could you handle it? --[[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 11:24, 24 October 2013 (UTC)
+

Revision as of 11:56, 24 October 2013

Redirect to: