Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#44499 - [grub] do not include/generate grub.cfg(.example); better ro/rw fix

Attached to Project: Arch Linux
Opened by Tom Yan (tom.ty89) - Wednesday, 08 April 2015, 05:48 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 13 May 2015, 21:45 GMT
Task Type General Gripe
Category Packages: Core
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The package installs a useless pre-generated grub.cfg. Also grub.install generates a grub.cfg.example with no use. Users could only generate a usable grub.cfg manually. It's better to let the users drop to grub shell if they forgot to run grub-mkconfig instead of confusing them with a generated grub.cfg with wrong UUID.

In the PKGBUILD, a comment told that the grub.cfg is installed "for the backup array". The fact is only /boot/grub is needed make grub-mkconfig works. If the package doesn't include a grub.cfg, it doesn't have to be in the backup array to avoid unintended removal as well.

It is also considerable to include a simple handwritten grub.cfg.example to make user recognise the fact they can write a grub.cfg from scratch and give them a good point to start. An example is attached.


Instead of replacing ro in 10_linux with rw, it is better to remove "ro" and have "rw" in /etc/default/grub to allow the user to toggle the kernel param more easily.


P.S. It would be nice if we can have grub built from git master periodically (like mplayer).
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 13 May 2015, 21:45 GMT
Reason for closing:  None
Additional comments about closing:  Requested by reporter
Comment by Tom Yan (tom.ty89) - Wednesday, 08 April 2015, 07:39 GMT
Still playing with grub.cfg:
https://github.com/tomty89/grub/blob/master/grub.cfg

Just an example. Perhaps only a primitive one should be included.
Comment by Ronald van Haren (pressh) - Wednesday, 08 April 2015, 13:45 GMT
As for the grub.cfg, one can debate if it is desired to let pacman handle the backup of the script upon removal or keep an untracked config file. The main reason the grub.cfg file is there and in the backup array is because if we remove it the grub.cfg file gets removed on existing installations which obviously is not a very good thing to do.

The example file is there just as an example config file that the user can use.

I'll take a look at your last comment at another time.
Comment by Tom Yan (tom.ty89) - Wednesday, 08 April 2015, 15:40 GMT
Okay I see what you mean about the backup array. I wonder if it can be fixed step by step though. Anyway.

Basically the user can't make use of both grub.cfg/.example in most case. The UUID would always/probably be incorrect and, more importantly, if a user need a grub.cfg, they could and should simply run grub-mkconfig.

It's better to include a grub.cfg(.example) with only essential syntax/template, or make use of command like `probe -u "$root" -s "$uuid"` to make it possibly fail-safe under SOME cases.

Actually what I provided might not be appropriate as an example. I'm trying to write a general and "modular" grub.cfg though, heh.

Loading...