1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Installed non-Sun hard drive into Sun Blade 100

Discussion in 'Sun Hardware' started by ohaya, Mar 24, 2006.

  1. ohaya

    ohaya Guest

    Hi,

    I replaced the original 15GB hard drive in my Sun Blade 100 with a new
    120GB Seagate drive (IDE). I then installed Solaris 9, and everything
    is working.

    However, something that is bothering me is that I keep getting a WARNING
    msg when I boot the system:

    WARNING: ..... (dad0)
    Corrupt label - wrong magic number

    I understand that this is happening because the disk was not originally
    "labelled", so I've been trying to label the drive using
    format->partition, then label, etc., but despite everything I tried, I
    still keep getting the same warning, and it seems like something is
    really messed up here :(.

    I even went into cdrom/single user mode, and completely reconfigured the
    slices/partitions using format->partition and label, making sure that
    there weren't any overlaps, etc.

    I then rebooted, and still got the same warning.

    I've also tried setting the format->partition so that cylinder 0 was not
    used by any slice except for 'backup', but still no joy.

    I'm wondering, are there some cases of specific hard drives that, for
    some reason, just CANNOT be labelled properly by Solaris?

    Jim
     
    ohaya, Mar 24, 2006
    #1
    1. Advertisements

  2. ohaya

    ohaya Guest


    Hi,

    This is the exact msg:

    Here's the exact text of the msg:

    WARNING: /[email protected],0/[email protected]/[email protected],0 (dad0):
    corrupt label - wrong magic number

    Someone has pointed out to me that this msg might be because of a
    problem with the CDROM drive, rather than the hard drive?

    How can I tell if this msg is referring to the IDE hard drive or the
    CDROM drive?

    Thanks,
    Jim
     
    ohaya, Mar 25, 2006
    #2
    1. Advertisements

  3. ohaya

    Steve Sigman Guest

    This is the exact msg:
    I'm not sure of the IDE assignments on the blade so try 'probe ide' from
    the ok prompt. You should be able to see what drives are at which
    addresses. A quick google search makes it look like it is the primary
    hard drive though :-(

    Steve
     
    Steve Sigman, Mar 25, 2006
    #3
  4. ohaya

    ohaya Guest


    Steve,

    Thanks. Yes, it does look like this warning is for the IDE drive.
    Also, when I do "format", it lists the drive as "[email protected],0", so I'm pretty
    sure it's the hard drive and not the CDROM drive.

    Do you or anyone else know why I can't seem to label this drive?

    Thanks,
    Jim
     
    ohaya, Mar 25, 2006
    #4
  5. ohaya

    Steve Sigman Guest

    Steve,
    Have you tried label from the format menu ? I've never seen that not work.
     
    Steve Sigman, Mar 25, 2006
    #5
  6. ohaya

    ohaya Guest


    Hi,

    I have tried 'format->label', many, many times. I've even tried
    clearing the beginning of the drive with "dd -of=/dev/rdsk/c0t0d0s0" and
    then doing a format->label.

    It almost looks like Solaris, or format, or something can't write to the
    area of the drive where the label is suppose to go?

    Jim
     
    ohaya, Mar 25, 2006
    #6
  7. ohaya

    ohaya Guest


    Hi,

    Ok, this is a strange one!!

    I installed Solaris 9 9/05 onto the 120GB drive. Then, when I boot
    Solaris 9 9/05 off of the hard drive OR off of the 9 9/05 CDROM, I get
    the "corrupted label" warning.

    If I boot a Solaris 10 1/06 CDROM, I *DON'T* get the "corrupt label"
    warning.

    If I boot a Solaris 9 12/03 CDROM, I *DO* get the "corrupt label"
    warning.

    If I go by the Solaris 10 test, the hard drive IS properly labelled, but
    if I go by either Solaris 9 9/05 or 12/03, the hard drive gives the
    "corrupt label" warning.

    In all cases, when I go into format->partition-print, the
    partitions/slices look all right.

    Any guesses as to what might be going on?

    Jim
     
    ohaya, Mar 25, 2006
    #7
  8. ohaya

    ohaya Guest

    Hi,

    I've been continuing to figure out why this new Seagate 120GB drive
    doesn't seem to be behaving "properly" and giving me the "corrupt label"
    warning.

    In the process of doing that, I've been doing things like:

    dd if=/dev/zero of=/dev/rdsk/c0t0d0s0 bs=512 count=100

    dd if=/dev/rdsk/c0t0d0s0 of=jim.bin bs=512 count=100

    od -x jim.bin

    and I can verify that I am able to write zeroes to /dev/rdsk/c0t0d0s0.

    But, even after that, if I do:

    prtvtoc /dev/dsk/c0t0d0s0

    or

    format -> partition -> print

    it is STILL saying that there's a valid drive there that is labelled!

    I've even used format -> analyze -> verify to 'scrub' the entire drive,
    and after that when I do a dd to dump the contents of the drive, I can
    see that it is putting garbage onto the drive.

    BUT, EVEN THEN, when I do the prtvtoc or format->partition->print, it
    STILL shows the ORIGINAL partitioning/slices.

    So, I'm wondering, WHERE is Solaris really looking for the VTOC/label?

    Shouldn't what I've done above blow away the VTOC/label area, and
    shouldn't 'format' then say that it can't find a proper Solaris drive
    and ask me to label the drive??

    Please, if anyone out there has any idea about what's going on with this
    drive, can you give me some ideas?

    Sorry, this is just frustrating :(!! And my apologies for
    cross-posting, but I really hope that I can understand what's going on
    with this drive (BTW, it's a Seagate ST3120814A, per
    http://www.seagate.com/cda/products/discsales/marketing/detail/0,1081,715,00.html).

    Thanks,
    Jim
     
    ohaya, Mar 25, 2006
    #8
  9. First sector of the drive on sparc, second sector of the Solaris
    FDISK partion on x86.

    There are also backup labels on the drive, IIRC, stored on the
    first sector of each track in the last cylinder of the drive
    (or Solaris FDISK partion on x86). The notion of tracks and
    cylinders of course bears no relation to the drive's real track
    and cylinder layout. I don't believe the backups are ever used
    by the OS, only by format(1M), but I haven't investigated this
    in detail.
    Does s0 include the first sector?
    Well, it's asking the OS, which read it in and may have cached it.
    Rewriting the label using the DKIO iotcls as format(1M)/fmthard(1M)
    do is likely to refresh any cache in the OS, whereas dd'ing over it
    might not, but I'm just guessing.
     
    Andrew Gabriel, Mar 25, 2006
    #9
  10. the man page says its slice 2 not 0 but I suspect thats not the
    problem.
    How about a screen dump of prtvtoc... : /

    I have to guess its an EFI labelled drive.
    A prtvtoc dump of an EFI labelled disk will appear something like this:

    * Unallocated space:
    * First Sector Last
    * Sector Count Sector
    * 312544575 20816 312565390
    * First Sector Last
    * Partition Tag Flags Sector Count Sector Mount
    Directory
    0 2 00 34 312544541 312544574 /ion_160
    8 11 00 312565391 16384 312581774

    Note partition 8. I suggest using format -e to get more drive info.
    You can switch between EFI and "standard" labels that way.
     
    [email protected], Mar 25, 2006
    #10
  11. ohaya

    ohaya Guest


    Andrew,

    SMALL WORLD!!

    I was just about to try to post a msg for you specifically :)!

    I found this old post from you:

    http://groups.google.com/group/comp.unix.solaris/msg/3df2eb8822a6213a

    In that, you said:

    "On sparc you are stuffed if the label is vaguely plausable but
    corrupt as disk driver won't allow any access whatsoever - I take
    the disk out and put it in an x86 machine at this point to zap it."

    I'm wondering if THAT (a "vaguely plausable (sp?) but corrupt" label) is
    what I'm encountering?

    I'm thinking that if your old msg is correct, that format->partition is
    ACTING like it's writing a new label to the Seagate drive, but then it's
    not REALLY writing the new label. And so, when I boot the next time,
    the label is still "bad" i.e., the magic number is still wrong.

    This still doesn't fully explain the problem, because if I change the
    swap slice to include cylinder 0, and "dd" to wipe out part of cylinder
    0, I DO get an error when trying to start format again, but then right
    after that, format DOES recognize the drive and present it to me as "0"
    choice.

    I am SO confused :(...

    Jim
     
    ohaya, Mar 25, 2006
    #11
  12. ohaya

    ohaya Guest


    Gerryt,

    Thanks for taking an interest in this. I'm guessing this problem only
    seems to be a worrisome thing to me :(, because the drive seems to be
    working, but I keep thinking that this warning is telling me that there
    is still something wrong with the drive (and I bought it just for my
    SB100).

    Anyway, the machine/drive is in the midst of being unuseable right now,
    so I can't get a current prtvtoc, but here's one from earlier:

    # prtvtoc /dev/rdsk/c0t0d0s0
    * /dev/rdsk/c0t0d0s0 (volume "abc") partition map
    *
    * Dimensions:
    * 512 bytes/sector
    * 255 sectors/track
    * 16 tracks/cylinder
    * 4080 sectors/cylinder
    * 57461 cylinders
    * 57459 accessible cylinders
    *
    * Flags:
    * 1: unmountable
    * 10: read-only
    *
    * Unallocated space:
    * First Sector Last
    * Sector Count Sector
    * 0 4080 4079
    * 8204880 18446744073709539376 8192639
    * 234428640 4080 234432719
    *
    * First Sector Last
    * Partition Tag Flags Sector Count Sector Mount Directory
    0 2 00 8192640 205754400 213947039 /
    1 3 01 4080 8200800 8204879
    2 5 00 0 234432720 234432719
    7 8 00 213947040 20481600 234428639 /export/home

    There's no slice 8?

    Also, I'm doing a lot of this in single-user mode, so don't know how to
    post output from that, unless I retype everything manually.

    I'll try the "-e" to see what it says in a bit. Right now, I'm trying a
    format->analyze->verify (with "rewrite label" set to "no") to try to see
    if I can scrub the entire drive to see if that helps.

    Jim
     
    ohaya, Mar 25, 2006
    #12
  13. ohaya

    ohaya Guest

    Hi,

    I've been referring to this 120GB drive as a new drive, but I was just
    thinking about what I've done with it, and it occurs to me it's now new
    now.

    What I mean is here's the history:

    - I bought the drive a couple of weeks ago, mainly because I needed to
    do some testing with Solaris 10 zones

    - I installed the out-of-the-box new drive into my SB100, and then
    installed Solaris 10 1/06.

    - I got done with my Solaris 10 testing, so I wanted to go back to
    Solaris 9

    - I installed Solaris 9 9/05, and began getting the "corrupt label"
    warning on boot


    In one of the posts earlier, I wrote that I've tried booting to
    cdrom/single-user with the Solaris 10 1/06 CD, and I don't get the
    "corrupt label" warning.

    I'm starting to wonder if, because I FIRST did the Solaris 10 1/06
    installation on the drive, that maybe Solaris 10 did SOMETHING (I have
    no idea what) that might be causing Solaris 9 to think that there's a
    corrupt label, and which for some reason (again, I have no idea what),
    Solaris 9 can't "undo" whatever it is that the Solaris 10 installation
    did???

    Has anyone happened to had this same scenario:

    - New non-Sun drive
    - Install Solaris 10, then
    - Install Solaris 9

    Jim
     
    ohaya, Mar 25, 2006
    #13
  14. ohaya

    Trinean Guest

    This is the exact msg:
    According to the handbook the device paths are like so:

    PCI Slot 1 /[email protected],0/[email protected]/<device>@2,* 33mhz-32bit-5V
    PCI Slot 2 /[email protected],0/[email protected]/<device>@1,* 33mhz-32bit-5V
    PCI Slot 3 /[email protected],0/[email protected]/<device>@0,* 33mhz-32bit-5V
    primary ide master /[email protected],0/[email protected]/[email protected],0 (default boot)
    primary ide slave /[email protected],0/[email protected]/<device>@1,0 (default cdrom)
    secondary ide master /[email protected],0/[email protected]/[email protected],0
    secondary ide slave /[email protected],0/[email protected]/<device>@3,0
    env.monitor & card reader /[email protected],0/[email protected]/<path>
    proms /[email protected],0/[email protected],3/<usb device>
    internal graphics /[email protected],0/SUNW,[email protected]
    USB ports /[email protected],0/[email protected],3/<usb device>

    so unless something is cabled wrong, then /[email protected],0/[email protected]/[email protected],0 is the
    primary ide master as well as being the default boot device.

    Trinean
     
    Trinean, Mar 25, 2006
    #14
  15. I wonder if it's formatted with an EFI label and Solaris 9 doesn't
    recognise that? I don't recall when EFI labels first appeared.
     
    Andrew Gabriel, Mar 25, 2006
    #15
  16. No. In that case the magic number and VToC checksum have to be
    correct, but the VToC has to be clearly wrong for the disk (like
    for a much bigger disk, or a CD-ROM VToC copied onto a hard drive
    which is how I initially stumbled over this).
    No. With this problem, the disk driver on sparc won't even let
    format(1M) or fmthard(1M) open the device file to write a new
    label. You have to remove the disk and zap the label on a non-
    sparc system. On x86 you can use the p0 device, but sparc doesn't
    have that.
    In the prtvtoc output in your other posting, s2 was the only slice
    which includes sector 0.
     
    Andrew Gabriel, Mar 25, 2006
    #16
  17. ohaya

    Steve Guest

    Worth trying 'format -e'? Saved me more than once during my *bsd
    experimenting days.....

    I'm having a beer so it's safe to ignore me!

    Steve
     
    Steve, Mar 25, 2006
    #17
  18. ohaya

    ohaya Guest

    Trinean,

    Thanks for that info...

    Jim
     
    ohaya, Mar 25, 2006
    #18
  19. ohaya

    ohaya Guest


    Andrew,

    That's an interesting thought!

    If you're right, then I wouldn't even be able to see (I think someone
    mentioned that I should look for a slice 8 if it's EFI?) that it's got
    an EFI label if I booted from a Solaris 9 CD. Is that correct?

    What if I then booted with a Solaris 10 CD and did a format->partition
    and/or prtvtoc? Would I be able to tell if it's an EFI label? Is just
    having a slice 8 a positive indication that it's got an EFI label?

    Jim
     
    ohaya, Mar 25, 2006
    #19
  20. ohaya

    ohaya Guest


    Steve,

    I tried a "format -e" (after booting from a Solaris 9 CD into
    single-user mode). It didn't look any different than with a "format"
    without the "-e".

    What should I look for?

    Jim
     
    ohaya, Mar 25, 2006
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.