Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 4F8052259DD for <~alpine/users@lists.alpinelinux.org>; Fri, 5 Jan 2024 09:43:21 +0000 (UTC) Received: by mail-ua1-x935.google.com with SMTP id a1e0cc1a2514c-7cc1053d7f7so506095241.3 for <~alpine/users@lists.alpinelinux.org>; Fri, 05 Jan 2024 01:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704447799; x=1705052599; darn=lists.alpinelinux.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bf8x0nETh7mP7wZolANn0B0CDNW3s6rjlfPn/QBbPn0=; b=XLN0sTJW9rn4Ge1HEzNX52NFgfTz69+CHPXoqsYcTVlnpZflH4EOGIuyo5Z+ulBLBz qDEKrQtanjFhTikryC5s30Vy5BFmuFEJWFir1HJqMfkh9NVRtQDwMhAe432B3AapR86s UOvsChJImiRPvytwjgWBsWKm8v8JS4FvOHksmZyEemQtIxlChzqmWxBD0EBQFpgH9ij+ P9u3x/X/pwUw1iZFoZdq/ZUiXVl6t+vyBAIMsrxqxDsFBOv14IfwSMeMB21/L504Tftx kFRiS1OaKxa022Ca3yJh/AGopHjeG63Dh7opXbhPwMSWbboE0WAKxZVjImxYk0DSxW2e B6pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704447799; x=1705052599; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bf8x0nETh7mP7wZolANn0B0CDNW3s6rjlfPn/QBbPn0=; b=UAMzJEArqIdgHJSIDW+Mp82mn0IxaUZvr6IRgfl2DiYFSXOsJiPIrO3tgLrRfq5oLU lxs+WJGFDEcxpkvhgoQ7u09wpu+52qxSXjRIVQIqkiAGKO5JY4lEYhmpFfrEYGZkp3bX DyFIlkrKtnANJBKSc3MbyB1DrZxLPrZ1Rv31rxmwFZIndlRX99UJx4s8FFr/96RJwDA/ TxR6qxUG3mUNQ2L4jPDeyDi+VV5TzWYKmOGu1THwfnqZh6oyT7G0TEFC9lSnX4TNJ7X3 CbyWJRZKalKpzdVpbZMxanu1bOoDEIwd1QPL0H/UpUQ7T7i4NoITU3FUHiBq7zG1I0Kj ETJg== X-Gm-Message-State: AOJu0YzLeEnuIvGiL9QdB0xVt1JCTJ8AFj0Jw/yjVtd6GZByY63iCPis 6D+oxKiLtCbTBzKVe/YR87+F1zUk4QKLmv4/GDg= X-Google-Smtp-Source: AGHT+IETSc7O7zLcaKPvpGzMqiy/2hx01xPbuCEwYd6KdptUFcmgxAA1W8yzmBsWoJvjgt410Oe8qsQPkUiUcPYRa+g= X-Received: by 2002:a05:6102:2b9b:b0:467:ba53:4665 with SMTP id ib27-20020a0561022b9b00b00467ba534665mr125446vsb.51.1704447799583; Fri, 05 Jan 2024 01:43:19 -0800 (PST) MIME-Version: 1.0 References: <20240104203052.36f29d01@blueselene.com> In-Reply-To: <20240104203052.36f29d01@blueselene.com> From: Konstantin Kulikov Date: Fri, 5 Jan 2024 12:43:08 +0300 Message-ID: Subject: Re: GRUB 2.12 hell on x86_64 To: Alex Cc: ~alpine/users@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Looking at upgrade MR[1] here's what i want to say - switch to limine[2]. There is no reason for a bootloader to require 20+ patches to work. [1]: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/57927/di= ffs [2]: https://github.com/limine-bootloader/limine/ On Thu, Jan 4, 2024 at 10:31=E2=80=AFPM Alex wrote: > > If you're unlucky like me and, after the GRUB 2.12 upgrade in Edge, you > had a non-working GRUB, read on: > > So, if after an upgrade of GRUB, you boot the computer only to find > some text saying "Welcome to GRUB!" flash on the screen and an instant > reboot into the UEFI firmware settings, congratulations, your GRUB > installation is broken! Hopefully you have an install of > SystemRescue handy for this one. > > Insert your CD/DVD/USB drive with SystemRescue and boot it. We're > going to reinstall GRUB. > > Once on SystemRescue, open a terminal (if using a GUI) and run > "mountall". This script mounts all drives on the system and also > bind-mounts SystemRescue's /dev, /proc and /sys into the filesystem of > your drives if it finds them on the drives[1]. This is a necessary > step, so make sure you mount the drives using "mountall"=C2=B7. > > Next, chroot into your EXT4 (or whatever filesystem you use) partition. > Once there, run "mount -a". This will use your /etc/fstab (on your > drive) to mount the rest of your filesystems on the chroot, most > importantly your boot partition. > > To reinstall GRUB, run "grub-install --efi-directory=3D/boot/ --no-nvram > --disable-shim-lock" in the chroot. --disable-shim-lock is necessary, > otherwise GRUB will appear to work, but if you boot into Alpine Linux > it will complain about missing "grub_is_shim_lock_enabled" symbols and > fail. This I fixed thanks to [2]. Next, you'll want to copy the > grubx64.efi file it generates into the alpine and boot folders (for > this last one rename it to bootx64.efi). Run "apk fix grub" so that APK > regenerates the GRUB configuration just in case. Reboot and you should > have a working GRUB once again! At least I did. > > CCing Timo Ter=C3=A4s, maintainer of GRUB on Alpine, since this should've > been handled by APK automatically IMO, without requiring manual > intervention like this. > > [1]: https://www.system-rescue.org/scripts/mountall/ > [2]: > https://github.com/NixOS/nixpkgs/issues/243026#issuecomment-1644078833 > > -- > Current PGP KeyID: 0AFB427F1800FD89751C4035292228735AE707FF > > https://blueselene.com/pgp-archive/0AFB427F1800FD89751C4035292228735AE707= FF/key.pub