wtautz wrote:
> Andrea Righi wrote:
>> wtautz wrote:
>>   
>>> The answer is /boot/grub/menu.lst is not update corrected by update-grub
>>> if menu.1st has a line of the form:
>>> IF #  kopt=root=UUID=d401f1eb-681d-41f8-bf63-62d8da629044 ro
>>>
>>> In my case the UUID was from the golden client which is different from
>>> the client I installed
>>> to. Only after I edited the line to say root=/dev/hda6 and rerun
>>> update-grub did the
>>> correct UUID get substituted. Of course this behaviour is incorrect
>>> since humans are
>>> suppose to edit this line and not have it be overwritten (and this seems
>>> to hold depending
>>> one what one puts in the line). I guess I'll report this as a bug.
>>>     
>> Which filesystem are you using on /dev/hda6? AFAIK the UUIDs should work fine
>> with systemimager 3.8.2 (but I suppose only for ext2/ext3)...
>>   
> 
> Andrea,
> 
> The problem isn't with UUID. It's a problem with the update-grub
> program that comes from debian. Basically there is a line
> in '/boot/grum/menu.1st that # kopt=root=UUID=xxxxxxxx ro
> 
> which apparently does NOT get updated when update-grub
> runs. I fixed the goldenclient and now I have no problems getting
> the other client to boot, i.e., Systemimager works.
> 
> Here is the bug report in Ubuntu: 
> https://bugs.launchpad.net/ubuntu/+source/grub/+bug/62195
> 

I don't think it's the only problem. I mean, who should call update-grub?
SystemImager doesn't call it directly, maybe you could use a post-install script
to run update-grub in ubuntu/debian distros (and only if you're using grub),
but, in general, this is not the right approach.

I was able to reproduce the problem using reiserfs. The point is that if you
have a specific UUID in the autoinstallscript.conf (cloned from the golden
client) you should use *that* UUID in your imaged clients.

I resolved using the following patch (that enables UUID support for reiserfs).
I'll check it in the trunk soon.

Thanks for reporting it,
-Andrea

Index: make.d/reiserfsprogs.rul
===================================================================
--- make.d/reiserfsprogs.rul    (revision 4174)
+++ make.d/reiserfsprogs.rul    (working copy)
@@ -10,6 +10,7 @@
 REISERFSPROGS_URL := 
http://download.systemimager.org/pub/reiserfsprogs/$(REISERFSPROGS_TARBALL)
 REISERFSPROGS_PATCHES := $(shell ls $(PATCH_DIR)/reiserfsprogs.*.patch 
2>/dev/null | sort)
 MKREISERFS_BINARY := $(SRC_DIR)/$(REISERFSPROGS_DIR)/mkreiserfs/mkreiserfs
+REISERFSTUNE_BINARY := $(SRC_DIR)/$(REISERFSPROGS_DIR)/tune/reiserfstune
 
 ALL_SOURCE += $(SRC_DIR)/$(REISERFSPROGS_TARBALL)
 
@@ -27,7 +28,7 @@
 PHONY += reiserfsprogs
 reiserfsprogs: $(MKREISERFS_BINARY)
 
-$(MKREISERFS_BINARY):  $(SRC_DIR)/$(REISERFSPROGS_TARBALL)
+$(MKREISERFS_BINARY) $(REISERFSTUNE_BINARY):   
$(SRC_DIR)/$(REISERFSPROGS_TARBALL)
        [ -d $(SRC_DIR)/$(REISERFSPROGS_DIR) ] || \
          ( cd $(SRC_DIR) && tar xvfz $(REISERFSPROGS_TARBALL) && \
            (cd $(REISERFSPROGS_DIR) && \
Index: make.d/boel_binaries.inc
===================================================================
--- make.d/boel_binaries.inc    (revision 4174)
+++ make.d/boel_binaries.inc    (working copy)
@@ -34,6 +34,7 @@
                                $(UTIL_LINUX_DIR).build \
                                $(MDADM_BINARIES) \
                                $(MKREISERFS_BINARY) \
+                               $(REISERFSTUNE_BINARY) \
                                $(MKJFS_BINARY) \
                                $(MKXFS_BINARY) \
                                $(CTCS_BINARY) \
@@ -63,6 +64,7 @@
        install -m 755 --strip $(UTIL_LINUX_BINARIES)   
$(BOEL_BINARIES_DIR)/sbin/
        install -m 755 --strip $(MDADM_BINARIES)                
$(BOEL_BINARIES_DIR)/sbin/
        install -m 755 --strip $(MKREISERFS_BINARY)     
$(BOEL_BINARIES_DIR)/sbin/mkreiserfs
+       install -m 755 --strip $(REISERFSTUNE_BINARY)   
$(BOEL_BINARIES_DIR)/sbin/reiserfstune
        install -m 755 --strip $(MKJFS_BINARY)                  
$(BOEL_BINARIES_DIR)/sbin/
        install -m 755 --strip $(OPENSSH_BINARIES)              
$(BOEL_BINARIES_DIR)/usr/bin
        install -m 755 --strip $(OPENSSH_SBINARIES)             
$(BOEL_BINARIES_DIR)/usr/sbin
Index: lib/SystemImager/Server.pm
===================================================================
--- lib/SystemImager/Server.pm  (revision 4175)
+++ lib/SystemImager/Server.pm  (working copy)
@@ -1436,6 +1436,28 @@
                 print $out qq(logmsg "$cmd"\n);
                 print $out "$cmd\n";
 
+                if ($mount_dev) {
+                    # add LABEL if necessary
+                    if ($mount_dev =~ /LABEL=/) {
+                        my $label = $mount_dev;
+                        $label =~ s/LABEL=//;
+
+                        $cmd = "reiserfstune -l $label $real_dev";
+                        print $out qq(logmsg "$cmd"\n);
+                        print $out "$cmd\n";
+                    }
+
+                    # add UUID if necessary
+                    if ($mount_dev =~ /UUID=/) {
+                        my $uuid = $mount_dev;
+                        $uuid =~ s/UUID=//;
+
+                        $cmd = "reiserfstune -u $uuid $real_dev";
+                        print $out qq(logmsg "$cmd"\n);
+                        print $out "$cmd\n";
+                    }
+                }
+
                 # mkdir
                 $cmd = "mkdir -p /a$mp || shellout";
                 print $out qq(logmsg "$cmd"\n);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to