FS#68751 - Add grub back

Attached to Project: Release Engineering
Opened by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 07:58 GMT
Last edited by David Runge (dvzrv) - Thursday, 17 February 2022, 13:36 GMT
Task Type Feature Request
Category ArchISO
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The reason that it got removed was invalid. There's the --boot-directory switch. Chroot was never necessary for grub-install. Also it (wrongly) assumeed that the chroot have the grub package and/or the availability of Internet.
This task depends upon

Closed by  David Runge (dvzrv)
Thursday, 17 February 2022, 13:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  Grub has been added back to the releng profile in https://gitlab.archlinux.org/archlinux/a rchiso/-/commit/2f88ba3cc103aa2b170b8334 94be8722fb0e3d45
Comment by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 08:01 GMT
Not to mention that it's a/the bootloader that can boot kernel on another drive.
Comment by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 08:15 GMT
I don't know much about refind but I doubt that the reason is valid for it either, given that it can do much more than systemd-boot. (i.e. not linux-specific)
Comment by David Runge (dvzrv) - Thursday, 26 November 2020, 09:06 GMT
@tom.ty89: To my knowledge grub has never been installed on the ISO.

Can you please elaborate what exactly you are referring to?
Comment by David Runge (dvzrv) - Thursday, 26 November 2020, 09:12 GMT
Ah, you are referring to "installed as a package", not "made use of in the ISO" (no coffee yet ;-) )?
This has indeed been removed [1].

So, you are saying that `grub-install --boot-directory <path/to/mounted/system>` is able to install the grub images properly.

If this is correct, we can of course add it back!

[1] https://gitlab.archlinux.org/archlinux/archiso/-/commit/32eef254b670b7855bf9480ef22dab58c5f2114f
Comment by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 09:40 GMT
Yes and yes. Please add it back, thanks!
Comment by Doug Newgard (Scimmia) - Thursday, 26 November 2020, 14:42 GMT
The Arch ISO is mainly for installing Arch. Are you really not installing a bootloader package on your system?
Comment by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 15:07 GMT
There isn't exactly a point doing so to be honest. It won't get the bootloader being used updated when the package is updated anyway.

The thing is, even if it's not like "highly likely", there are chances one wants to rescue or whatsoever an Arch or non-Arch/non-Linux system with the ArchISO. I really don't see why it should be omitted (especially when we are not after an ISO that can fit on a CD-R anymore, and there are a lot more "crap for corner-cases (or not even)" (tmux, dnsmasq, mc, openssh...).
Comment by Doug Newgard (Scimmia) - Thursday, 26 November 2020, 15:11 GMT
It's not a matter of "don't see why it should be omitted", it's a matter of "why should it be there". Two very different perspectives.

Honestly, this sounds like system misconfiguration to me. The bootloader should be installed and managed on the system itself, not from outside of the system.
Comment by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 15:35 GMT
Because it's a very useful / featureful bootloader that can be installed / used flexibly to handle different kinds of booting needs (and it has a shell for that). Most importantly, it doesn't necessarily have anything to do with a (new) installation of Arch / Linux system, let alone chrooting.

And it's only misconfiguration to you because you are being subjective (or even stereotyping). One can totally be using and managing a grub on a drive that is used to boot an (Arch) installation on another drive (that can have no bootloader or bootloader package installed at all) and has grub and only grub on it. (And it's not just for fun)

There were even cases that installing grub inside a (arch-)chroot is problematic (although they might be flaws that have been fixed). The point is, chrooting doesn't help the process at all. Even with the most typical case, you can install the package and update the real bootloader later (like you don't need to pacstrap firefox or whatsoever).
Comment by Eli Schwartz (eschwartz) - Thursday, 26 November 2020, 15:44 GMT
I don't really see the necessity, given that installing the package means nothing and does nothing. Bootloader packages are packages providing the functionality of copying the bootloader itself from the package's data files, (potentially modifying it in-flight,) and writing it to outside the OS.

While it might be *useful* to have the bootloader package installed for debugging or editing configuration, it's not necessary -- e.g. I haven't ever changed my grub bootloader in the several years my system has been installed, while the Arch infrastructure rendered itself unbootable because it thought it needed to "manage" and periodically reinstall the bootloader and did so with a buggy version of grub.

> It's not a matter of "don't see why it should be omitted", it's a matter of "why should it be there". Two very different perspectives.

In this case, it was previously there since 2012, the commit message doesn't state why but it's reasonable to assume "so people can use it under diverse conditions".

It seems plausible to add it back, especially given it's less a matter of "why include it", and more "why backpedal on including it using technical arguments that lack perspective".
Comment by Tom Yan (tom.ty89) - Thursday, 26 November 2020, 15:44 GMT
And seriously, it's just word game anyway. It should be there because it shouldn't have been removed / omitted (because of all the reasons).

P.S. Just like what Eli said, the package is for the "admin job", which is way more required on an "admin installation" (i.e. the ISO) than a "user installation". To me, the reasons having the package installed are: 1. so that it pops up on `pacman -Syu` when there's a new build/release (i.e. notification), 2. i *might be* "admin'ting" stuff with my "user installation".
Comment by Doug Newgard (Scimmia) - Thursday, 26 November 2020, 15:46 GMT
Because it's been there before is not a reason to include anything.
Comment by David Runge (dvzrv) - Thursday, 26 November 2020, 15:49 GMT
@tom.ty89: Thanks for the feedback. I'll look into this in a merge request.

@Scimmia: It is entirely possible that our judgement call to remove it has been based on false information.

Besides a few mb in size it doesn't cost us anything to add it back.
Comment by Doug Newgard (Scimmia) - Thursday, 26 November 2020, 16:06 GMT
It's possible it was based on false information, I'm simply saying that the usefulness of having it is...very limited, to say the least.

https://xkcd.com/1172/
Comment by Tom Yan (tom.ty89) - Thursday, 29 April 2021, 10:57 GMT
Ping.

An additional note: just because many people do not know the `--boot-directory` switch of grub-install or how to / that they can write a simple and clean grub.cfg doesn't mean that "it is not supposed to be used like that", which is the only piece of false information with this regard.

In fact as per the purpose of the image, all the bootloader packages are some the least that should be excluded / removed from it.

Loading...