Bug 148461 - kernel-xen und /sbin/update-bootloader
Summary: kernel-xen und /sbin/update-bootloader
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Beta 3
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Gerd Hoffmann
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-06 18:35 UTC by Andreas Gruenbacher
Modified: 2006-02-27 10:56 UTC (History)
2 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
grub config file with xen entry as created by yast2-bootloader (1.01 KB, text/plain)
2006-02-13 16:29 UTC, Gerd Hoffmann
Details
This should add --xen as appropriate. (1.48 KB, patch)
2006-02-27 10:50 UTC, Andreas Gruenbacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Gruenbacher 2006-02-06 18:35:12 UTC
I see that for kernel-xen, the bootloader is not being updated (HEAD:rpm/post.sh):

    case @FLAVOR@ in
        (kdump|um|xen*)
            ;;
        (*)
            if [ -x /sbin/update-bootloader -a \
                 -e /boot/$image.previous -a \
                 -e /boot/initrd.previous ]; then
                echo "updating bootloader configuration"
                /sbin/update-bootloader --previous --add
            fi
            ;;
    esac

This seems wrong to me -- shouldn't kernel-xen be treated like any other kernel package?
Comment 1 Gerd Hoffmann 2006-02-13 11:06:36 UTC
xen is a bit different in respect that it needs a slightly differently looking boot entry.  Not sure whenever update-bootloader can handle that, Jiri?
Comment 2 Andreas Gruenbacher 2006-02-13 11:10:20 UTC
Jack has taken over maintenance of perl-Bootloader.
Comment 3 Joachim Plack 2006-02-13 16:02:31 UTC
Hmh. As you didn´t say _what_ you need, I regret that I cannot give you a perfectly matching answer. So the best answer might be the output of current
'update-bootloader --man'

NAME
       update-bootloader - update/change bootloader configuration using
           Bootloader::Tools perl module

SYNOPSIS
       update-bootloader [operation] [options]

       operation is one of --add, --remove or --refresh.

       valid options are --help, --man, --image <file>, --initrd <file>, --default, --previous, --name <string>, --force.

OPERATIONS
       --add   add an new image section.  Needs a call to --refresh to take effect.

       --remove
               remove the specified image section.  Needs a call to --refresh to take effect.

       --refresh
               activate the new config e.g. write boot loader to disk

PARAMETER
       --help  Print a brief help message and exits.

       --man   Prints the manual page and exits.

       --image file
               specify path to kernel image

       --initrd file
               specify path to initial ramdisk or ramfs

       --default
               let the new section to be added be the default section. Only allowed together with --add operation

       --previous
               set some usuable defaults for image, initrd and name when

       --name string
               specify the name of the section to be added/removed

       --force dont complain, just do the right thing

DESCRIPTION
       update-bootloader will let you modify your bootloader configuration using Bootloader::Tools perl module.

--------------

Please note that you have to call update-bootloader --refresh to activate your
changes to the bootloader config.

Using --force is also a good idea -> be quiet and do not break on errors
Comment 4 Gerd Hoffmann 2006-02-13 16:29:24 UTC
Created attachment 68110 [details]
grub config file with xen entry as created by yast2-bootloader
Comment 5 Gerd Hoffmann 2006-02-13 16:32:51 UTC
additional info: xen uses the boot protocol "multiboot" invented by the grub guys.  "kernel" is xen itself, then two "module" entries follow with xen kernel and initrd.  booting xen with lilo doesn't work.  we have xen on i386 and x86_64 only at the moment.
Comment 7 Joachim Plack 2006-02-23 16:46:46 UTC
had to change the interface in Tools.pm and the usage of update-bootloader.
This is still under debugging as it does not work right yet.

However the interface has settled. I the xen case updat-bootloader will be used right as for a regular image section but one has to give an additional
--xen option in the call.

Please add that option to the appropriate places and assign the bug to me
afterwards for a final perl-bootloader commit.
Comment 8 Joachim Plack 2006-02-23 18:42:56 UTC
with a few more changes it seems to work now. Tested sucessfully:

./update-bootloader --xen --add --image /boot/vmlinuz-xen \
    --initrd /boot/initrd-xen --name XEN

./update-bootloader --xen --remove --image /boot/vmlinuz-xen

Thus it´s done from my side.
Comment 9 Gerd Hoffmann 2006-02-24 09:51:52 UTC
Puzzled by the *two* update-bootloader calls in post.sh, especially the one outside "case @flavor@ ... esac".  agruen?
Comment 10 Andreas Gruenbacher 2006-02-27 10:50:56 UTC
Created attachment 70367 [details]
This should add --xen as appropriate.
Comment 11 Andreas Gruenbacher 2006-02-27 10:56:09 UTC
One of the calls is for the *.previous symlinks; the other is for the kernel being installed. I noticed that the --add call in postun.sh is unneeded as well now (the main bootloader entry is never removed).