Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[grub] setting grub user is broken #2482

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pob0111
Copy link

@pob0111 pob0111 commented Mar 15, 2024

The script /etc/grub.d/01_users generated from the corresponding template etc/grub/01_users.j2 is using an unsafe tail command with an absolute number to print out a portion of itself.
Now there has been added additional comments to the head of the template some time ago. The result is that the output of the grub script contains some garbage.
As a result, calling update-grub is outputing error messages, e.g.

Generating grub configuration file ...
/etc/grub.d/01_users: 10: -exec: not found
/etc/grub.d/01_users: 13: password_pbkdf2: not found
Found linux image: /boot/vmlinuz-6.1.0-21-amd64
Found initrd image: /boot/initrd.img-6.1.0-21-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

This leads to an empty user section in /boot/grub/grub.cfg:

...
### BEGIN /etc/grub.d/01_users ###
### END /etc/grub.d/01_users ###
...

This patch fixes this.

@pob0111 pob0111 requested a review from drybjed as a code owner March 15, 2024 08:41
@pob0111 pob0111 changed the title fix issue in 01_users script with tail command [grub] setting grub user is broken May 31, 2024
@pob0111
Copy link
Author

pob0111 commented May 31, 2024

I've updated my comment and subject because I realized that it's actually a bug and that the grub user is not set anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant