“Linux kernel must be loaded before initrd” error with Autoyast in SLES SP1

Something odd that may save some people time to figure out…The same autoyast files that worked fine with SLES 10 suddenly started generating “Linux kernel must be loaded before initrd” grub errors when I was using SLES10 SP1 install sources. Easy enough to fix interactively (insert a line specifying where the kernel is), but why is it happening, and how to automate? (All systems administration really gets to the point where you are just automating things. You don’t want to have to rely on people to DO things, or you will be disappointed.)

Rather than go and pore through the release notes in the hope that I could glean what may have changed, I just did a manual install over the network, and compared the generated reference autoyast file to the one I was serving from my boot server. This is what I found:

In the bootloader section of your autoyast.xml file, rather than

<section>
        <append>resume=/dev/sda1  splash=silent showopts pnpacpi=off</append>
        <initial>1</initial>
        <initrd>/boot/initrd</initrd>
        <kernel>/boot/vmlinuz</kernel>
        <lines_cache_id>1</lines_cache_id>
        <name>SUSE Linux Enterprise Server 10</name>
        <original_name>linux</original_name>
        <root>/dev/sda2</root>
        <type>image</type>
      </section>

just add a line

        <image>/boot/vmlinuz</image>

before the kernel line.

That will get your installation to complete, but not to boot correctly after the install. For that, you also need these lines:

      <activate>true</activate>
      <boot_root>true</boot_root>

in the global section of the bootloader section.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word