Received: from annualcc.armor-mail.com (unknown [193.29.56.210]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id ADA1F22321C for <~alpine/users@lists.alpinelinux.org>; Mon, 3 Jul 2023 10:19:37 +0000 (UTC) Received: from localhost (sys-firewallx230tinc [10.9.8.9]) by annualcc.armor-mail.com (Postfix) with ESMTPSA id 83D072000E for <~alpine/users@lists.alpinelinux.org>; Mon, 3 Jul 2023 13:12:12 +0300 (MSK) Date: Mon, 3 Jul 2023 18:12:06 +0800 From: RSS To: ~alpine/users@lists.alpinelinux.org Subject: Re: Cannot boot 3.18 with UEFI? Message-ID: <20230703181206.720d6ad6@armor-mail.com> In-Reply-To: <6b9ae3e080c1c10450061f715291a76670343e13.camel@riseup.net> References: <20230630174332.4b38d6d5@nixosX240> <6b9ae3e080c1c10450061f715291a76670343e13.camel@riseup.net> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 30 Jun 2023 12:30:34 +0200 Ralf Mardorf wrote: > on my new PC I'm forced to use UEFI, since the new Intel GPU doesn't > allow to select CSM, for this reason I migrated from syslinux to grub. > I used syslinux from my Arch Linux install and now I'm using grub from > the Arch Linux install. The pitfalls I experienced booting Alpine were > not related to the grub bootloader. > > It's not that terrible as it does sound. Without all those grub > configs for the configs and automation, it's possible to write a > clean syslinux alike config for grub [1]. Thanks for the reply, this inspired me to push on, and I do have progress. I am really stuck on getting to an actual UEFI (eventually default) boot menu item here, as otherwise my kids will never be able to safely boot this machine. (What happens when a six-year old plays with UEFI?: mayhem of the destructive kind. Seen it with my own eyes. ;-) So I am currently getting Alpine started with rEFInd, which I believe will not achieve the above default boot objective. Here are my notes, for posterity and perhaps further comment: -------------------- Do a surgical single-partition install of Alpine on an already busy multi-booting machine, and get it booting via UEFI. The key bit turned out to be in ref 3: `If you're going to use EFI, make sure you mount esp partition on /boot/efi and set BOOTLOADER=grub and USE_EFI=1, and that grub-efi and efibootmgr are installed before running setup-disk.` Where (unspoken!!) `BOOTLOADER=grub and USE_EFI=1` are actually environment variables which must be set prior to running setup-disk. There were then promising "EFI" messages as setup-disk did it's stuff, AND a couple of dodgy looking error messages about not being able to write files to odd looking locations in the EFI partition. This STILL somehow did not result in a working UEFI boot entry, but rEFInd (already installed during earlier struggles) picked it up and is how I currently boot Alpine. Ref 5 says this: `Note: The loader and initrd file arguments are relative to the EFI partition. In a default installation, alpine places these files in /boot/, while EFI is mounted to /boot/efi/. You can either update fstab to mount EFI at /boot/, or manually copy them to /boot/efi/.` But, I have tried copying initramfs-lts & vmlinuz-lts into /boot/efi/ to no effect, still no working UEFI boot menu item for Alpine. Mounting the EFI partition on /boot/ makes me nervous, what bad things then happen to grub? Refs: 1. https://docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html 2. https://wiki.alpinelinux.org/wiki/Installation 3. https://wiki.alpinelinux.org/wiki/Setting_up_disks_manually 4. https://wiki.alpinelinux.org/wiki/Dualbooting 5. https://wiki.alpinelinux.org/wiki/Bootloaders