<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 21/09/12 15:40, Bryce wrote:
<blockquote cite="mid:505C7C57.7030805@zeniv.linux.org.uk" type="cite">
  <pre wrap="">On 20/09/12 15:00, Lamar Owen wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hmm, I seem to remember some issues around the partitioning under F12 on SPARC.  It was recommended, best I can recall, that you let the installer autopartition; anything else is very unstable and will likely crash anaconda.

Once installed you can set up partitions, move LVM around (I did that with our E6500, taking the defaults at first onto a single drive, and then moving the physical volume (with the LVM tools) to a software RAID5.  Worked fine.) set up RAID, or whatever else.  But it was important, IIRC, to take the defaults during installation.  There is a set of posts in the archives about the installer caveats, and I think it's on the F12Beta page on Fedoraproject.org, or at least it used to be.

I have my own private archive of messages like that to this mailing list, and I can repost if mecessary.
  
    </pre>
  </blockquote>
  <pre wrap="">Mmm auto partitioning works but replace doesn't because for whatever
reason it ignores anaconda/platform.py where _disklabel_types = ['sun']
is set for the sparc platform and decides the disk should be using a
msdos label instead, so the install goes along fine since linux is able
to handle both label types, at the end after you reboot, OBP looks for a
sun label disk and finds msdos garbage which it promptly chokes on.

I think the logic is buried in storage/device.py and
storage/partitioning.py.

Anaconda - a cruel and unusual punishment to make anyone do.

Phil
=--=

_______________________________________________
sparc mailing list
<a class="moz-txt-link-abbreviated"
 href="mailto:sparc@lists.fedoraproject.org">sparc@lists.fedoraproject.org</a>
<a class="moz-txt-link-freetext"
 href="https://admin.fedoraproject.org/mailman/listinfo/sparc">https://admin.fedoraproject.org/mailman/listinfo/sparc</a></pre>
</blockquote>
Ah, I think I see it now.<br>
<br>
storage/formats/disklabel.py<br>
When you ask for a replacement of the existing linux system anaconda
does what I consider to be really bad practices.<br>
It seems to believe that knowing where the partitions are is enough for
it to DELETE the 1st MB of the disk to destroy the partition table. It
then initializes the disklabel and then writes out the partitions in
the exact same place,...<br>
<br>
WHY it thinks it's necessary to do all this russian roulette work
rather than just work with the existing table structure baffles me,
however, I didn't write it so I'm disavowing blame for once.<br>
<br>
Anyway,. tracing shows <br>
<br>
<tt>        log.debug("resetting parted disks...")<br>
        for device in self.devices:<br>
            import pdb; pdb.set_trace()<br>
            if device.partitioned:<br>
                <b>device.format.resetPartedDisk()</b><br>
                if device.originalFormat.type == "disklabel" and \<br>
                   device.originalFormat != device.format:<br>
                    device.originalFormat.resetPartedDisk()</tt><br>
<br>
which leads me into<br>
storage/formats/disklabel.py<br>
<blockquote><tt>class DiskLabel(DeviceFormat):<br>
...<br>
    def __init__(self, *args, **kwargs):<br>
        if not self.exists:<br>
            self._labelType = kwargs.get("labelType", "<b>msdos</b>")<br>
        else:<br>
            self._labelType = None</tt><br>
</blockquote>
So when the disk is nuked, the label can't be found and it assumes
msdos rather than being sensible and looking up the platform data<br>
This is part of why the "Replace linux system option" won't work for
sparc. There seems to be a gaping hole in anaconda where it just make
no effort to remember what the disk label format was. This seems to be
true of anaconda 18 as well, I didn't check whatever is in git, I kinda
expect this to be a problem for PPC folk as well.<br>
<br>
changing <br>
<blockquote><tt>self._labelType = kwargs.get("labelType", "<b>msdos</b>")</tt><br>
</blockquote>
to<tt><br>
</tt>
<blockquote><tt>self._labelType = <b>platform.getPlatform(None)._disklabel_types[0]</b></tt><br>
</blockquote>
alleviates the problem but is <b><i>not</i></b> in any way a true fix
but it will suffice for 80-90% of cases... What
should have happened is that the original label type should have been
noted and returned somehow.<br>
<blockquote>
  <blockquote><tt>(since at least one architecture has two types
assigned, we'll use index [0] as the default)<br>
[root@emerald mnt]# <b>grep _disklabel_types platform.py</b><br>
    _disklabel_types = ["msdos"]<br>
        return self._disklabel_types<br>
    _disklabel_types = ["gpt"]<br>
    _disklabel_types = ["bsd"]<br>
    _disklabel_types = ["mac"]<br>
    _disklabel_types = ["msdos"]<br>
    _disklabel_types = ["sun"]<br>
            self._disklabel_types = ["gpt"]<br>
            <b>self._disklabel_types = ["msdos", "gpt"]</b></tt><br>
  </blockquote>
</blockquote>
<br>
Phil<br>
=--=<br>
</body>
</html>