Hello,
After an update of teh kernel. the file: /boot/grub2/grub.cfg is updated. However thsi file is not update properly.
How? In which way is it not updated "properly"?
Prior to installing a new kernel, you could save a copy of grub.cfg, install a new kernel package, and then run diff on the old and new grub.cfg. What do you get?
If I run: grub2-mkconfig -o /boot/grub2/grub.cfg then the file is OK.
Define "OK".
grub2-mkconfig rewrites grub.cfg from scratch and under consideration of template files, such as those in /etc/grub.d, and add-on tools such as os-prober.
On the contrary, grubby (as run via the kernel packages) only inserts a new boot entry into the existing file. It does not recreate the file completely.
OK, I understand, my point is that the inserted part is wrong! This is wrong: linux /vmlinuz-3.14.3-200.fc20.x86_64 root=/dev/mapper/VolGrpSys_DK0-root
It should be DK1 (not DK0). How does it get this information?
Thank.
Somebody can tell me what is going on?
You haven't given enough details.
users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire de Physico-Chimie de l'Atmosphère | | Université du Littoral-Côte d'Opale | | Tel. (33)-(0)3 28 23 76 12 | | Fax: 03 28 65 82 44 189A, avenue Maurice Schumann | | 59140 Dunkerque, France ===========================================================================
On Sun, 18 May 2014 18:09:32 +0200 Patrick Dupre wrote:
How does it get this information?
I always thought grubby just copied the entry for the current kernel and replaced the vmlinuz and initrd with the new names it just installed, but it may be more complicated than that.
On Sun, 18 May 2014 18:09:32 +0200, Patrick Dupre wrote:
OK, I understand, my point is that the inserted part is wrong! This is wrong: linux /vmlinuz-3.14.3-200.fc20.x86_64 root=/dev/mapper/VolGrpSys_DK0-root
It should be DK1 (not DK0). How does it get this information?
/sbin/new-kernel-pkg is a shell script. It is run from within the kernel package scriptlets (via /bin/kernel-install). One part of it is:
# get the root filesystem to use rootdevice=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/fstab 2>/dev/null) if [ "$rootdevice" = "" ]; then rootdevice=`grep -o -P "(?<=root=)\S+" /proc/cmdline` fi
It passes on this device to grubby. A little bit of debugging might lead to something. What is found in /etc/fstab and /proc/cmdline for your machine?
On May 18, 2014, at 10:14 AM, Tom Horsley horsley1953@gmail.com wrote:
On Sun, 18 May 2014 18:09:32 +0200 Patrick Dupre wrote:
How does it get this information?
I always thought grubby just copied the entry for the current kernel and replaced the vmlinuz and initrd with the new names it just installed, but it may be more complicated than that.
Check the grubby source code if you're brave. It has a bunch of test cases built into it. But I don't at all understand the reason why Red Hat / Fedora depend on it and no other distribution does, they just regenerate the grub.cfg after a kernel update. Grubby's fussiness came up a lot during the grub2 transition because the syntax was constantly changing in the grub.cfg format, and this would trip up grubby. And it also is presently incompatible with Btrfs subvolumes (Gene Czarcinski has patches submitted to upstream and there are test builds of this version of grubby somewhere in the Fedora build system).
Chris Murphy