Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 1997 12:25:40 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        Tony Jones <tony@rtd.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: SCSI Q: invalid primary partition table: no magic
Message-ID:  <Pine.BSF.3.96.971023121123.2937Q-100000@gdi.uoregon.edu>
In-Reply-To: <199710151719.KAA26741@seagull.rtd.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 15 Oct 1997, Tony Jones wrote:

> I just moved a SCSI disk that I was using for Windoze over to FreeBSD, didn't 
> have any major problems in creating the FS but each time I mount it, 
> "sd3: invalid primary partition table: no magic" is displayed on the console.
> 
> To create the disk I did:
>         format
>         zero label (dd)
>         disklabel -rw sd3 auto ; disklabel -e sd3
>         newfs sd3
>  
> Which is fairly close to section "2.3. Making Dedicated Mode Disks Using the 
> Command Line" in Doug White's disk tutorial (except I didn't do the 
> 'disklabel | disklabel -R' part - what exactly is the intent of this since 
> the old label was just zeroed ?).

That procedure is one I've seen earlier and tried, but the system
complained about using the `auto' disktype on my IDE disks, so I abandoned
that procedure.  The one I put in the tutorial was a part of my
message-ball on doing quick disk setup, and it actually worked on that
disk.  I was going for generality and didn't want to split it into SCSI
and non-SCSI disks.  It's confusing enough as it is.  

To explain the disklabel | disklabel line, The first part of the pipe
extracts the in-core disklabel, which is what FreeBSD thinks the disklabel
should be, if it really had a disklabel.  The second half of the pipe
writes that disklabel to the disk, so you end up with a disklabel with the
proper numbers.  It's a bit magical, but it does work.  

I think it'll be made clear if you wipe the disk again, run `disklabel
sd3' and look at the output. 

The error message is extraneous and in fact has been disabled in -CURRENT
due to confusion.  Of course there's no magic; you just deleted it!  ;-) 

> Is the problem that I didn't initialise the FDISK slice table ? Right now it
> contains garbage. I downloaded Greg Lemeys disk chapter from his ftp site and 
> noticed that under 'doing it the hard way' he first does the FDISK stuff.

It's easier to use DOS FDISK to split the slices up as you like, then work
within that.  Putting it gently, the FreeBSD FDISK utility needs to be
replaced. That's why there are sections in the tutorial on how to use the
beautiful visual editor built into sysinstall. :-)

Hope this helps.  

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971023121123.2937Q-100000>