From owner-freebsd-questions Thu Oct 23 12:25:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA21235 for questions-outgoing; Thu, 23 Oct 1997 12:25:51 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA21228 for ; Thu, 23 Oct 1997 12:25:44 -0700 (PDT) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.7/8.8.5) with SMTP id MAA03076; Thu, 23 Oct 1997 12:25:40 -0700 (PDT) Date: Thu, 23 Oct 1997 12:25:40 -0700 (PDT) From: Doug White Reply-To: Doug White To: Tony Jones cc: questions@FreeBSD.ORG Subject: Re: SCSI Q: invalid primary partition table: no magic In-Reply-To: <199710151719.KAA26741@seagull.rtd.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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