All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: mike.marciniszyn@intel.com, Michal Marek <mmarek@suse.cz>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	OpenSUSE Kernel Team <opensuse-kernel@opensuse.org>
Subject: Kernel binrpm produces brokes grub2 config
Date: Tue, 29 Jul 2014 12:18:33 +0200	[thread overview]
Message-ID: <53D774F9.3090305@nod.at> (raw)

Hi!

I'm not sure who to blame, but the below commit breaks the kernel binrpm target for me.
It produces a faulty grub2 config.
After installing such a kernel grub2 looks for vmlinuz-XY-rpm and initrd-XY-rpm.
These files are not existing and the machine does no longer boot.
Luckily an addition boot entry without the -rpm suffix exists, if remote access works
one can recover the machine.

My question is, why do we need these copy of vmlinuz anyway?
After calling installkernel on the -rpm variants you delete them again...

This <insert swear word here> happens on openSUSE 13.1, maybe their installkernel script needs fixing.

commit 3c9c7a14b6274074cc3af2b83d56a92547188f27
Author: Mike Marciniszyn <mike.marciniszyn@intel.com>
Date:   Mon Jun 24 10:38:22 2013 -0400

    rpm-pkg: add %post section to create initramfs and grub hooks

    /sbin/installkernel is used to insure grub hooks are
    inserted and the initramfs is created on the
    target system.

    The invokation installkernel will work with any
    kernel as long as:
    - /sbin/installkernel exists
    - the kernel and sysem map files are readable

    Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Michal Marek <mmarek@suse.cz>

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index fdd3fbf..0aa6a24 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -112,6 +112,15 @@ echo ""
 echo "%clean"
 echo 'rm -rf $RPM_BUILD_ROOT'
 echo ""
+echo "%post"
+echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
+echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
+echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
+echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
+echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
+echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
+echo "fi"
+echo ""
 echo "%files"
 echo '%defattr (-, root, root)'
 echo "%dir /lib/modules"

Thanks,
//richard

             reply	other threads:[~2014-07-29 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 10:18 Richard Weinberger [this message]
2014-07-29 12:23 ` Kernel binrpm produces brokes grub2 config Michal Marek
2014-07-29 15:22   ` [opensuse-kernel] " Andrey Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D774F9.3090305@nod.at \
    --to=richard@nod.at \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=mmarek@suse.cz \
    --cc=opensuse-kernel@opensuse.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.