Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mkinitrd: add config to SUSE /sbin/installkernel
Without copying the config file anyone using SUSE who has installed
xen from source, and built their own kernel won't get xen picked up
by the perl-bootloader [0] update-bootloader. The requirement for the
config file comes from upstream grub2 /etc/grub.d/20_linux_xen [1] which
will only add xen as an instance to your grub.cfg if and only if it
finds in your config file either of:

CONFIG_XEN_DOM0=y
CONFIG_XEN_PRIVILEGED_GUEST=y

Without this a user compiling and installing their own kernel with
proper support for xen *and* with the xen hypervisor present will
not get update-bootloader to pick up the xen instance.

I've tested with both:

	1) sudo make modules_install install
        2) update-bootloader --refresh

1) was done using the latest Linux kernel sources after applying this
patch, and 2) was done by simply copying over manually the config file
manually.

[0] https://github.com/openSUSE/perl-bootloader
[1] http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub.d/20_linux_xen.in

Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
  • Loading branch information
mcgrof committed Mar 11, 2014
1 parent 8ab312b commit 56f8a20
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sbin/installkernel
Expand Up @@ -15,6 +15,7 @@
KERNEL_VERSION=$1
BOOTIMAGE=$2
MAPFILE=$3
CONFIGFILE=config-$KERNEL_VERSION

case "$(uname -m)" in
s390|s390x)
Expand Down Expand Up @@ -56,12 +57,19 @@ if [ -f $INSTALL_PATH/System.map-$KERNEL_VERSION ]; then
$INSTALL_PATH/System.map-$KERNEL_VERSION.old;
fi


if [ -f $INSTALL_PATH/$CONFIGFILE ]; then
mv $INSTALL_PATH/$CONFIGFILE \
$INSTALL_PATH/$CONFIGFILE.old;
fi

#
# Install new files
#

cp -fp $BOOTIMAGE $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION
cp -fp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION
cp -fp .config $INSTALL_PATH/$CONFIGFILE

KERNTYPES=$(dirname $MAPFILE)/init/kerntypes.o
if [ -e $KERNTYPES ]; then
Expand Down

0 comments on commit 56f8a20

Please sign in to comment.