Hi Jesus,

comments below.

Jesus Sanchez wrote:
>    I've got some good news. At least now the cloned system boots. There 
> was something related with the modules and therefore with the initrd file.
> 
>    I was using UYOK and not BOEL, sorry, but I tried to add some extra 
> modules in the file /etc/sysconfig/kernel, line starting with 
> INITRD_MODULES, run mkinitrd and repeat the whole process again 
> (si_prepareclient, si_getclient, PXE-booting + autoinstall, reboot, ...)
> 
>    Now I can clone the system and when rebooting it starts using Grub, 
> what I didn't force because finally I didn't add the PREFERED param 
> under the BOOT section of systemconfig.conf file.
> 
>    I check the autoinstall logging and I saw several things:
> 
>    1. The system tries to run lilo but it can't because kernel is too 
> big (at least is what it says):
>     Error: Cannot execute /sbin/lilo.
>     Fatal: Kernel /boot/vmlinux-2.6.22.5-31-default.gz is too big
> 
>     at /usr/lib/systemconfig/Boot.pm line 112

This is a problem with the kernel shipped with your distribution and
lilo, not a systemimager / systemconfigurator issue. To reduce the
kernel size you could try to strip(1) it and re-compress it again, but
this would mean "changing" the kernel provided by the distribution, that
is never a good idea... better to use grub at this point.

> 
>    2. After that it installs grub
> 
>    3. At the end systemconfigurator says it has modified the following 
> files:
>      /etc/lilo.conf
>      /etc/modprobe.conf
>      /etc/modules.conf
>      /etc/sysconfig/network/ifcfg-eth0
> 
> 
>    There are some strange things:
> 
>    1. The lilo.conf file created by systemconfigurator seems to be 
> wrong, it has an orphan parameter which has to do with the root disk 
> partition named by-id ('tor_6L080M0_L26FVVDG-part2'). Here you are both 
> /etc/lilo.conf files, the original of the golden node and the one that 
> generates systemconfigurator
> 
> ----- /etc/lilo.conf of the golden node and the image
> 
> # Modified by YaST2. Last modification on Wed Feb  6 13:51:17 CET 2008
> menu-scheme = Wb:kw:Wb:Wb
> timeout = 80
> lba32
> change-rules
> reset
> read-only
> prompt
> message = /boot/message
> boot = /dev/disk/by-id/scsi-SATA_Maxtor_6L080M0_L26FVVDG-part2
> default = oS_10.3
> 
> image = /boot/vmlinuz-2.6.22.5-31-default
> ###Don't change this comment - YaST2 identifier: Original name: linux###
>      label = oS_10.3
>      append = "resume=/dev/sda1 splash=silent  showopts"
>      vga = 0x314
>      initrd = /boot/initrd-2.6.22.5-31-default
>      root = /dev/disk/by-id/scsi-SATA_Maxtor_6L080M0_L26FVVDG-part2
> 
> image = /boot/vmlinuz-2.6.22.5-31-default
> ###Don't change this comment - YaST2 identifier: Original name: failsafe###
>      label = Failsafe
>      append = "showopts ide=nodma apm=off acpi=off noresume edd=off 3"
>      vga = normal
>      initrd = /boot/initrd-2.6.22.5-31-default
>      root = /dev/disk/by-id/scsi-SATA_Maxtor_6L080M0_L26FVVDG-part2
> 
> image = /boot/memtest.bin
> ###Don't change this comment - YaST2 identifier: Original name: memtest86###
>      label = Memory_Test
> 
> ----- end
> 
> ----- /etc/lilo.conf on the cloned machine (modified by systemconfigurator)
> 
> ##################################################
> # This file is generated by System Configurator. #
> ##################################################
> 
> # Do all the normal things lilo does
> lba32
> map=/boot/map
> install=/boot/boot.b
> vga=normal
> 
> # The number of deciseconds (0.1 seconds) to wait before booting
> prompt
> timeout=50
> 
> # The boot device where lilo installs the boot block
> boot=/dev/sda
> 
> # the default label to boot
> default=suse-10.3
> 
> # Device to be mounted as the root ('/')
> root=/dev/sda2
> #----- Options for KERNEL0 -----#
> image=/boot/vmlinux-2.6.22.5-31-default.gz
>          label=suse-10.3
>          read-only
>          append="auto BOOT_IMAGE=oS_10.3 ro root=/dev/sda2 
> tor_6L080M0_L26FVVDG-part2 resume=/dev/sda1 splash=silent showopts"
>          initrd=/boot/initrd-2.6.22.5-31-default
> 
> ----- end

This is a bug of si_prepareclient that doesn't resolve non-standard
symlinks created by udev. In terms of "portability" it would be better
to resolve this name in the standard name. If you have potentially
heterogeneous clients, using a device naming policy based on hardware
informations, like vendor ID, etc. could be a problem because different
clients that have a different hardware could use the same image.

For this I think the following patch could fix the problem. Could you
test it?

---
Index: sbin/si_prepareclient
===================================================================
--- sbin/si_prepareclient       (revision 4415)
+++ sbin/si_prepareclient       (working copy)
@@ -75,6 +75,7 @@
 use lib "USR_PREFIX/lib/systemimager/perl";
 use strict;
 use Carp;
+use Cwd 'abs_path';
 use POSIX;
 use File::Copy;
 use File::Path;
@@ -746,6 +747,14 @@
         $boot_dev =~ s/p[0-9]+$//;
     }
 
+    # Resolve non-standard symlink names created by udev.
+    if (-l $boot_dev) {
+        $boot_dev = abs_path(readlink($boot_dev));
+    }
+    if (-l $root_dev) {
+        $root_dev = abs_path(readlink($root_dev));
+    }
+
     # OK, we've all the info needed by systemconfigurator! Write the
     # configuration file.
     open(OUT, ">$sc_config_file") or
---

> 
>    2. The system boots using grub but the file menu.lst has not been 
> modified. At least the labels are the ones from the previous 
> installation of openSUSE 10.1 of the golden node. Obviously it works 
> because of the links of the /boot directory to the right versionof the 
> kernel and initrd.

systemconfigurator should modify menu.lst, but since lilo has been
detect before, grub installation is not performed (even if lilo fails).
Are you using a post-install script to install grub?

Anyway adding the PREFERED option to systemconfig.conf could be a way to
force grub installation via systemconfigurator.

And looking at the full output of systemconfigurator would help to
confirm if this hypothesis is correct.

> 
> ----- /boot/grub/menu.lst on the golden node, the image and the clone system
> 
> # Modified by YaST2. Last modification on Wed Oct 18 16:28:13 CEST 2006
> color white/blue black/light-gray
> default 0
> timeout 8
> gfxmenu (hd0,1)/boot/message
> 
> ###Don't change this comment - YaST2 identifier: Original name: linux###
> title SUSE Linux 10.1
>      root (hd0,1)
>      kernel /boot/vmlinuz root=/dev/sda2 vga=0x314    resume=/dev/sda1 
> splash=silent showopts
>      initrd /boot/initrd
> 
> ###Don't change this comment - YaST2 identifier: Original name: failsafe###
> title Failsafe -- SUSE Linux 10.1
>      root (hd0,1)
>      kernel /boot/vmlinuz root=/dev/sda2 vga=normal showopts ide=nodma 
> apm=off acpi=off noresume edd=off 3
>      initrd /boot/initrd
> 
> ###Don't change this comment - YaST2 identifier: Original name: memtest86###
> title Memory Test
>      kernel (hd0,1)/boot/memtest.bin
> 
> ----- end
> 
> 
> ----- /boot directory initrd and vmlinuz files
> 
> lrwxrwxrwx  1 root root      26 Feb 26 22:12 initrd -> 
> initrd-2.6.22.5-31-default
> -rw-r--r--  1 root root 4544722 Feb 26 17:45 initrd-2.6.22.5-31-default
> -rwxr-xr-x  1 root root 1960389 Sep 24 21:09 vmlinux-2.6.22.5-31-default.gz
> lrwxrwxrwx  1 root root      27 Feb 26 22:12 vmlinuz -> 
> vmlinuz-2.6.22.5-31-default
> -rw-r--r--  1 root root 1594088 Sep 24 21:02 vmlinuz-2.6.22.5-31-default
> 
> ----- end
> 
> What should I do to be able to run /sbin/lilo? Trying using UYOK to 
> reduce the size of the kernel? Modifying manually the existing 
> /etc/lilo.conf on the image?

No. See above.

> 
> And regarding Grub, what is being used accidentally, does 
> systemconfigurator modify the menu.lst config file? Can I change the 
> labels of the file directly on the image?

See above.

-Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to