Am 20.05.2010 13:47, schrieb Antje Bendrich:
Am 20.05.2010 11:04, schrieb Hans-Joachim Ehlers:
Hm , i think i missed the grub section to mention - sorry
[..]
So IMO you must configure the kernel section AND the grub section. Thus grub knows what to start.
The bootloader-section is unconfigured so far.
I'll play around with it and see what happens and whether I can handle it
gracefully for new kernel versions as they come up in our installation
repository. I'll give you results later after thinking and testing ;)
Just for the record, here's what I configured:
<bootloader>
<global>
[..]
<default>openSUSE 11.2 - Desktop</default>
</global>
grub
<sections config:type="list">
<image>(hd0,5)/vmlinuz</image>
<initrd>(hd0,5)/initrd</initrd>
<name>openSUSE 11.2 - Desktop</name>
linux
<type>image</type>
<vgamode>0x314</vgamode>
<configfile>1</configfile>
[..]
</sections>
</bootloader>
and
<scripts>
<chroot-scripts config:type="list">
<script>
<debug config:type="boolean">true</debug>
<chrooted config:type="boolean">true</chrooted>
<filename>0050_stage1_link_kernel_for_grub.sh</filename>
<source><![CDATA[#!/bin/sh
# The <bootloader>-section makes the kernel that is linked to /boot/vmlinuz the
# default. So we need to set that link correctly before the first reboot.
# Ugly, not fault-tolerant, but works good enough for testing.
echo 'Setting links for the newest desktop kernels:'
if [ -f "$(ls -tr /boot/vmlinuz*-desktop | tail -n1)" ]
then
ln -sfv $(ls -tr /boot/vmlinuz*-desktop | tail -n1) /boot/vmlinuz
ln -sfv $(ls -tr /boot/initrd*-desktop | tail -n1) /boot/initrd
else
echo 'ERROR: Kein passender Kernel unter /boot/vmlinuz*-desktop gefunden.'
fi
]]></source>
</script>
</chroot-scripts>
</scripts>
The script works fine, both according to its log and the resulting links.
On the finished installation, the /boot/grub/menu.lst ends up to boot not
/boot/vmlinuz, but rather /boot/vmlinuz-2.6.31.12-0.2-desktop and the name
differs from the one set in the bootloader-section as well. But as long as my
problem with stage2 using the wrong kernel is gone, I frankly don't care ;)
Antje
--
Antje Bendrich (Team IT-Services), Phone +49 40 808077-642
DFN-CERT Services GmbH, https://www.dfn-cert.de/, Phone +49 40 808077-555
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
Sachsenstraße 5, 20097 Hamburg/Germany, CEO: Dr. Klaus-Peter Kossakowski