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

Task ipv6 grub disable fails for grub1 #8

Open
ferdinand-it opened this issue Sep 28, 2022 · 6 comments
Open

Task ipv6 grub disable fails for grub1 #8

ferdinand-it opened this issue Sep 28, 2022 · 6 comments

Comments

@ferdinand-it
Copy link

The task notified in


fails because we don't have grub2-command on the servers.

Do you have a nice solution to execute the ansible.builtin.command "update-grub ; grub-mkconfig -o /boot/grub/grub.cfg" instead of "grub2-mkconfig -o /boot/grub2/grub.cfg" instead in https://github.com/juju4/ansible-ipv6/blob/master/handlers/main.yml#L32 if there is no grub2 installed?

@juju4
Copy link
Owner

juju4 commented Oct 1, 2022

Per https://www.gnu.org/software/grub/grub-legacy.htmlM
"GRUB Legacy is not actively developed any longer. Only bugfixes will be made so that GRUB Legacy can stil be used for older systems."

Which environment are you using?

You can set/keep ipv6_grub_disable to false and handle specifics in your own playbook if really requiring grub-legacy but advise to update to current grub2

@MichaelRoosz
Copy link

MichaelRoosz commented Oct 17, 2022

In Ubuntu 22.04 LTS (which is pretty new), there seems to the only "grub-mkconfig" , but not "grub2-mkconfig"

grub-mkconfig --version
grub-mkconfig (GRUB) 2.06-2ubuntu7

but it looks like its v2 anyway?

@juju4
Copy link
Owner

juju4 commented Nov 5, 2022

yes, it seems I missed a change
from quick look to pkgs.org, it seems only redhat family is using grub2-mkconfig and alpine/ubuntu grub-mkconfig
https://centos.pkgs.org/7/centos-aarch64/grub2-tools-2.02-0.86.el7.centos.aarch64.rpm.html
https://debian.pkgs.org/11/debian-main-amd64/grub-common_2.06-3~deb11u1_amd64.deb.html

should be fixed with 686a94e
Please confirm.

@juju4
Copy link
Owner

juju4 commented Apr 30, 2023

Closing old issue

@juju4 juju4 closed this as completed Apr 30, 2023
@koshakm5
Copy link

koshakm5 commented May 1, 2023

Ubuntu 22.04

FAILED! => {"changed": true, "cmd": ["grub-mkconfig", "-o", "/boot/grub2/grub.cfg"], "delta": "0:00:01.333525", "end": "2023-05-01 11:33:14.160189", "msg": "non-zero return code", "rc": 2, "start": "2023-05-01 11:33:12.826664", "stderr": "Sourcing file `/etc/default/grub'\nSourcing file `/etc/default/grub.d/init-select.cfg'\n/usr/sbin/grub-mkconfig: 275: cannot create /boot/grub2/grub.cfg.new: Directory nonexistent", "stderr_lines": ["Sourcing file `/etc/default/grub'", "Sourcing file `/etc/default/grub.d/init-select.cfg'", "/usr/sbin/grub-mkconfig: 275: cannot create /boot/grub2/grub.cfg.new: Directory nonexistent"], "stdout": "", "stdout_lines": []}

juju4 added a commit that referenced this issue May 6, 2023
juju4 added a commit that referenced this issue May 6, 2023
@juju4
Copy link
Owner

juju4 commented May 6, 2023

Reviewing this and recent github actions, it seems github runner images have no grub and as the result, this handler is not tested properly when disabling ipv6 at grub level.
Added it in github workflow default-bare and confirmed same issue (https://github.com/juju4/ansible-ipv6/actions/runs/4902164514/jobs/8753845966).

It seems that like binary, folders have been reverted to grub too, probably as no more grub1 package/folder.
/boot/grub2 path is coming from grub package, not the role.
Implemented workaround symlink.
That seems to do the trick.
Please confirm.

@juju4 juju4 reopened this May 6, 2023
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

No branches or pull requests

4 participants