[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Wrong LABEL during anaconda install



Hi,

the clearpart --initlabel was the parameter that i'm looking for .
There 's finaly two solutions two solve the problem but i've just test the first one:

go in fsset.py and enter the following lines (simple python code)

   def labelDevice(self, entry, chroot):
       devicePath = entry.device.setupDevice(chroot)
label = labelFactory.createLabel(entry.mountpoint, self.maxLabelChars,
                                        kslabel = entry.label)
+       # Removing "1" character after partitions LABEL if exist
+        if label[len(label)-1:len(label)] == "1":
+            label = label[:len(label)-1]
       rc = iutil.execWithRedirect("/usr/sbin/e2label",

and
   def fstab (self):
       format = "%-23s %-23s %-7s %-15s %d %d\n"
       fstab = ""
       for entry in self.entries:
           if entry.mountpoint:
               if entry.getLabel():
                   device = "LABEL=%s" % (entry.getLabel(),)
+ # Remove the character "1" after partitions LABEL if exist
+                    if device[len(device)-1:len(device)] == "1":
+                        device = device[:len(device)-1]
               else:
                   device = devify(entry.device.getDevice())
+ # Remove character "1" after the partitions LABEL if exist
+                    if device[len(device)-1:len(device)] == "1":
+                        device = device[:len(device)-1]
               fstab = fstab + entry.device.getComment()
               fstab = fstab + format % (device, entry.mountpoint,
                                         entry.fsystem.getName(),
                                         entry.options, entry.fsck,
                                         entry.order)

The second way i've not tested is : modifiy option in partitions.py

+        #self.reinitializeDisks = 0
+        self.reinitializeDisks = 1
       """Should the disk label be reset on all disks?"""

The first solutions works well but i'm going to test the second one b'cause seems to be the better.

Thanks for help

Vincent

As far as i know all you have to do is

clearpart --initlabel

Regards

Kashif Ali

On 05/03/07, *Niels de Vos* < niels devos wincor-nixdorf com <mailto:niels devos wincor-nixdorf com>> wrote:

    Hi Vincent,

    > After installing the system i could see that my fstab goes with
    /tmp1
    > /var1 /home1 LABELs.
    >
    > This occurs when installing on RAID1 DELL servers, but not on no
    RAID
    > servers.

    I think this happens when installing on a system where there are
    already
    partitions with these labels. Even if the partitions will be
    removed/overwritten during installation. You can easily test this by
    removing any partitions on the system and doing a reboot with a clean
    install.

    Niels

    _______________________________________________
    Anaconda-devel-list mailing list
    Anaconda-devel-list redhat com <mailto:Anaconda-devel-list redhat com>
    https://www.redhat.com/mailman/listinfo/anaconda-devel-list
    <https://www.redhat.com/mailman/listinfo/anaconda-devel-list>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]