Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!poisson.EECS.Berkeley.EDU!binwu From: binwu@poisson.EECS.Berkeley.EDU (Bin Wu) Newsgroups: comp.os.386bsd.questions Subject: Re: Disklabel vs. DOS partition table Date: 19 Oct 93 18:10:17 Organization: University of California, Berkeley Lines: 64 Message-ID: <BINWU.93Oct19181017@poisson.EECS.Berkeley.EDU> References: <1993Oct19.145248.22328@alw.nih.gov> NNTP-Posting-Host: poisson.eecs.berkeley.edu In-reply-to: crtb@helix.nih.gov's message of Tue, 19 Oct 1993 14:52:48 GMT In article <1993Oct19.145248.22328@alw.nih.gov> crtb@helix.nih.gov (Chuck Bacon) writes: I've seen numerous posts complaining that the DOS or the BSD filesystem got zapped, either by FDISK or by disklabel. Having just lost both a DOS and a BSD partition while trying to get pcfs to mount, I'd like to get straightened out! Having hosed and *recovered* a dos disk myself, I can certainly relate the frustration you run into. I had to buy a book on PC hard disks and read several chapters before I could understand what I did and how to recover. :) Question 1: What is the relation between the DOS partition table's location (the very first sector on the disk, I think) and that of the disklabel? I.e., where does the disk label get written? Dos partition table(or master boot record, mbr) is the first sector on disk, you need it no matter what operation system(s) you run. The disklabel on the other hand, appears on the 2nd sector of you 386BSD partition (the 1st sector is /usr/mdec/wdboot, and the rest is bootwd, all together totals 16 sectors). Question 2: What is the minimum coordination between the DOS partition table and the disk label which will allow pcfs to mount? I can sort of guess the sequence of access while you ask the computer to mount a pcfs is: mbr, to find 386BSD partition disklabel, to find the dos partition mount it, having known the tracks/sectors/etc. You can't mount a pcfs which resides on a disk w/o a 386 partition. (well, I guess you can if you do some tricks in-core) Question 3: Is the c partition determined by wired-in logic, or does it depend on pc# and oc# values in disktab? This appears to be important, since all the examples in /etc/disktab have defined c partitions, with oc#0. c is the 386BSD partition, and d is the whole disk. Question 4: Just exactly what does disklabel do? With -r, it reads from the disk, and without, it uses an in-core copy. OK. But what's getting edited with -e? Since -w requires a disk name, apparently to look up in /etc/disktab, what's the point of editing? I've apparently edited successfully by editing /etc/disktab, but not by use of -e. -e let you manually edit the disklabel, be it with -r or not. -w write out disklabel according to disktab and bootfiles you provide on the command line. Question 5: I have found that FDISK will place the first DOS partition of the first disk exactly one track in from the beginning of the disk, but it will locate the first DOS partition of the second disk one *cylinder* in. If I use Norton's diskedit, say, to revise this to start the second disk's DOS partition in the second track, will DOS work? And what's the impact on the disk label? it's just a convention. I think you can start it anywhere. no impact on disklabel. remember, disklabel is within 386BSD partition. Hope this helps. -- Chuck Bacon - crtb@helix.nih.gov ( alas, not my 3b1 )-: ABHOR SECRECY - DEFEND PRIVACY