DongInn Kim wrote:
> Hi Erich,
> 
> Thank you.
> Basically, I got this question when I looked for some instructions about 
> updating kernel on the OSCAR cluster in the OSCAR admin manual. 
> http://svn.oscar.openclustergroup.org/trac/oscar/wiki/AdminGuide/Commands#ManagingRepositories
> As you can see in the manual, all my purpose of running "systemconfigurator 
> --configrd" is make the new initrd of the updated kernel available on 
> oscarimage before deploying the oscarimage to the client node.

Actually, as Erich said, instead of running systemconfigurator in the
chrooted image on the image server the solution is to simply add
"CONFIGRD = yes" in etc/systemconfig/systemconfig.conf into the image.

In this way the "systemconfigurator --configrd" will be executed at the
end of the imaging.

> 
> So, do you think this manual has something wrong and we need to fix it? If 
> so, can you please revise the document properly?
> 

The wiki must be fixed I think.

>> Please post your systemconfig.conf. That one should contain something like
>> CONFIGRD = YES
>> at the beginning.
> ==========================================
> [EMAIL PROTECTED] ~]# cat /etc/systemconfig/systemconfig.conf
> [BOOT]
> ROOTDEV = /dev/sda9
> BOOTDEV = /dev/sda
> DEFAULTBOOT = systemimager
> 
> [KERNEL0]
> LABEL = systemimager
> PATH = /boot/vmlinuz-2.6.9-55.ELsmp
> INITRD = /boot/initrd-2.6.9-55.ELsmp.img
> APPEND = ro root=LABEL=/12 rhgb quiet console=tty0
> [EMAIL PROTECTED] ~]# chroot /var/lib/systemimager/images/oscarimage
> [EMAIL PROTECTED] ~]# cat /etc/systemconfig/systemconfig.conf 
> # systemconfig.conf written by systeminstaller.
> CONFIGBOOT = YES
> CONFIGRD = YES
> 
> [BOOT]
>         ROOTDEV = /dev/sda6
>         BOOTDEV = /dev/sda
>         DEFAULTBOOT = 2.6.9-55.ELsmp
> 
> [KERNEL0]
>         PATH = /boot/vmlinuz-2.6.9-55.ELsmp
>         LABEL = 2.6.9-55.ELsmp
> 
> [KERNEL1]
>         PATH = /boot/vmlinuz-2.6.9-55.EL
>         LABEL = 2.6.9-55.EL
> 
> [EMAIL PROTECTED] ~]# 
> 
> ==========================================
> 
> Yes, it does have the option on the systemconfig.conf of oscarimage.
> 
> Regards,
>  
> - DongInn

BTW DongInn have you tried to test this with Debian/Ubuntu? It seems
systemconfigurator is still using the old mkinitrd command (instead of
the new update-initramfs or mkinitramfs).

Erich, I think the patch below should be included (but I need to test it
before).

-Andrea

Index: lib/Initrd/Debian.pm
===================================================================
--- lib/Initrd/Debian.pm        (revision 712)
+++ lib/Initrd/Debian.pm        (working copy)
@@ -32,10 +32,14 @@
 
 sub footprint {
     my $class = shift;
-    my $exe = "/usr/sbin/mkinitrd";
-    my $debconf = "/etc/mkinitrd/mkinitrd.conf";
-    if(-f $exe && -e $debconf) {
-        return 1;
+    my @exe = ('/usr/sbin/mkinitrd',
+               '/usr/sbin/update-initramfs');
+    my @debconf = ('/etc/mkinitrd/mkinitrd.conf',
+                   '/etc/initramfs-tools/update-initramfs.conf');
+    for (my $i = 0; $i < $#exe + 1; $i++) {
+        if(-f $exe[$i] && -e $debconf[$i]) {
+            return 1;
+        }
     }
     return 0;
 }
@@ -44,8 +48,14 @@
     my ($class, $kernel) = @_;
     my $version = kernel_version($kernel);
     my $outfile = initrd_file($version);
-    
-    my $cmd = "mkinitrd -o $outfile /lib/modules/$version";
+
+    my $cmd;
+    if (-f '/usr/sbin/update-initramfs') {
+        $cmd = "/usr/sbin/update-initramfs -k $version -u";
+    } else {
+        $cmd = "mkinitrd -o $outfile /lib/modules/$version";
+    }
+
     my $rc = system($cmd);
     if($rc != 0) {
         carp("Debian style ramdisk generation failed.");

-------------------------------------------------------------------------
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
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to