Regenerate /boot/grub2/grub.cfg [message #53508] |
Fri, 03 May 2019 07:20 |
javii
Messages: 14 Registered: October 2016
|
Junior Member |
|
|
Hi,
I made some changes to /etc/default/grub and wanted to regenerate /boot/grub2/grub.cfg.
I have used grub2-mkconfig -o /boot/grub2/grub.cfg, but it detects kernels on containers:
[root@xxxx ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-957.10.1.vz7.85.17
Found initrd image: /boot/initramfs-3.10.0-957.10.1.vz7.85.17.img
Found linux image: /boot/vmlinuz-3.10.0-862.20.2.vz7.73.29
Found initrd image: /boot/initramfs-3.10.0-862.20.2.vz7.73.29.img
Found linux image: /boot/vmlinuz-3.10.0-862.11.6.vz7.64.7
Found initrd image: /boot/initramfs-3.10.0-862.11.6.vz7.64.7.img
Found linux image: /boot/vmlinuz-3.10.0-862.9.1.vz7.63.3
Found initrd image: /boot/initramfs-3.10.0-862.9.1.vz7.63.3.img
Found linux image: /boot/vmlinuz-3.10.0-693.21.1.vz7.48.2
Found initrd image: /boot/initramfs-3.10.0-693.21.1.vz7.48.2.img
Found linux image: /boot/vmlinuz-0-rescue-b2e055e14ad046a4aa729806b2a333a5
Found initrd image: /boot/initramfs-0-rescue-b2e055e14ad046a4aa729806b2a333a5.im g
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop10125p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop19562p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop22984p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop23428p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop33199p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop35810p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop46234p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop53660p1
Found Ubuntu 14.04.5 LTS (14.04) on /dev/ploop55076p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop57914p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop59002p1
Found CentOS Linux release 7.6.1810 (Core) on /dev/ploop60186p1
done
Is this a bug or this is not the correct way to regenerate /boot/grub2/grub.cfg?
|
|
|
Re: Regenerate /boot/grub2/grub.cfg [message #53518 is a reply to message #53508] |
Mon, 13 May 2019 11:15 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
Hi,
javii wrote on Fri, 03 May 2019 10:20Is this a bug or this is not the correct way to regenerate /boot/grub2/grub.cfg?
/etc/grub.d/30_os-prober calls /usr/bin/os-prober which detects that ploop devices for running (mounted) Containers contain linux distributives,
so grub2-mkconfig should consider creating a menu entry to it.
But a bit later /etc/grub.d/30_os-prober calls "linux-boot-prober" for ploop devices which detects that ploop devices are not marked a boot devices,
so grub entries are not needed to them.
So, nothing to worry about here: yes, grub detects Linux distro is installed on ploop devices,
but grub is wise enough to check the devices is not bootable and does not create redundant menu entries.
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
|
Re: Regenerate /boot/grub2/grub.cfg [message #53520 is a reply to message #53519] |
Mon, 13 May 2019 14:09 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
i don't see menu entries for ploop devices in your config.
There are multiple menu entries because you have several kernels installed on your node.
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
|
Re: Regenerate /boot/grub2/grub.cfg [message #53522 is a reply to message #53521] |
Mon, 13 May 2019 15:03 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
Ah, right, i just did not expand your previous message, sorry.
Yes, something went wrong here, may be those devices were marked as bootable,
may be something else, need to debug grub scripts to findout the reason.
i tried the same on my test node, no menu entries were generated for ploop devices of running Containers.
So you are welcome to debug grub scripts and find the difference between those ploops which trigger menu entries creation and those which do not.
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
|
Re: Regenerate /boot/grub2/grub.cfg [message #53524 is a reply to message #53523] |
Tue, 14 May 2019 08:14 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
grub scripts are shell scripts, AFAIS,
so just insert "set -x" at the beginning of the script you are interested in and run your command,
it will generate debug output.
Probably you need this script - /etc/grub.d/30_os-prober
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|