*BSD News Article 33794


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!library.ucla.edu!news.mic.ucla.edu!news.bc.net!newsserver.sfu.ca!sfu.ca!vanepp
From: vanepp@fraser.sfu.ca (Peter Van Epp)
Newsgroups: comp.os.386bsd.questions
Subject: Re: FreeBSD - disklabeling sd1 and sd2
Date: 28 Jul 94 14:48:38 GMT
Organization: Simon Fraser University
Lines: 64
Message-ID: <vanepp.775406918@sfu.ca>
References: <317bt8$mst@linda.teleport.com>
NNTP-Posting-Host: fraser.sfu.ca

bmk@teleport.com (bmk) writes:

...

>What I'd also like to do is make my third drive visible to FreeBSD as
>a single large DOS partition (I only need to do this so I can tar all
>the files off before I nuke the DOS partition).  I had played around
>with this a few months ago, first partitioning the disk under DOS,  and
>then disklabeling this disk under FreeBSD.  Here's where I ran into the
>dilemma:  DOS FDISK would wipe out FreeBSD's disklabel, and disklabel
>corrupted the partition table in the MBR.  No problem, since at the time
>there wasn't any data on the drive.  Well, the time has come to try again,
>and I'm not too worried about screwing up the partition table, because I
>intend on backing up that disk prior to disklabeling.  However, I don't
>understand how to disklabel a disk with ONLY a DOS partition.  Can someone
>clue me in?

	You need to provide a 1 cylinder "a" partition on the third disk to 
contain the BSD disk label otherwise (as you have discovered) it overwrites
the partition table when you label the drive. Below is a pfdisk printout
of the partition table on my first drive (FreeBSD is booted by bootmenu from
the second IDE) and the disklabel on it:

pfdisk> # Partition table on device: 0
geometry 1009 6 55 (cyls heads sectors)
#  ID   First(cyl)  Last(cyl)  Name     #    start,   length (sectors)
1   7     391       1008       OS/2     #   129030,   203940
2   6       3        390       DOS      #      990,   128040
3 165       1          2       FreeBSD  #      330,      660
4   0       0          0       (empty)  #        0,        0
active: 2  
display: y
pfdisk> 

# /dev/wd0a:
type: ST506
disk: internal_170
label: 
flags:
bytes/sector: 512
sectors/track: 55
tracks/cylinder: 6
sectors/cylinder: 330
cylinders: 1010
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:      330      330    4.2BSD     1024  8192     0 	# (Cyl.    1 - 1)
  c:      660      330    unused        0     0       	# (Cyl.    1 - 2)
  d:   333300        0    unused        0     0       	# (Cyl.    0 - 1009)
  h:   128040      990     MSDOS                    	# (Cyl.    3 - 390)



Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada