*BSD News Article 26234


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!pipex!uknet!doc.ic.ac.uk!cc.ic.ac.uk!jensting
From: jensting@ic.ac.uk (Jens Tingleff)
Subject: Re: PCFS on Harddisks ?
Message-ID: <1994Jan19.101516.29866@cc.ic.ac.uk>
Nntp-Posting-Host: dinghy.ee
Organization: Elec. Eng. Imperial College, London
References: <2hdnlq$fqb@news.cs.tu-berlin.de> <JKH.94Jan17222631@whisker.lotus.ie> <2hgd9r$86l@news.cs.tu-berlin.de>
Date: Wed, 19 Jan 94 10:15:16 GMT
Lines: 70

In article <2hgd9r$86l@news.cs.tu-berlin.de>, nuggets@cs.tu-berlin.de (Lars Hentschke) writes:
> Jordan K. Hubbard (jkh@whisker.lotus.ie) wrote:
> : In article <2hdnlq$fqb@news.cs.tu-berlin.de> nuggets@cs.tu-berlin.de (Lars Hentschke) writes:
> :    (1.0 only mounts floppys)
> 
> : Das ist aber nicht wahr! :-)

Hmm, in that caes the man page is out of date (but then again, this *is* noted
somewhere.

> hmmm...sorry, someone told me, that i must write a DiskLabel onto DOS-disk
> (the entire sd2 is dos.)

Indeed. You *must* have a 'a' partition for FreeBSD to get the disklabel
correctly, even if that partition doesn't hold anything else. So, a DOS harddisk
with only one partition (which is all DOS) will fail, since FreeBSD will expect
to find a disklabel where there isn't any.

Here is the blurp I wrote for inclusion in the FAQ
===================================================================
One kinky problem that almost got me was when I tried to disklabel my
second drive in order to use the DOS partition on it, and use the rest
as swap for BSD (FreeBSD-1.0 Eps, SCSI drive on an AHA1542B, to be
exact). The DOS partition was visible from UNIX, but *not* from DOS.

What I tried to do was
	Using PFDISK (from DOS), make one big DOS partition at the
	start and use the rest for a BSD partition (type 165).
	Something that came out like
		  1    6    0	69 DOSbi # ..
		  2    165  70	98 unkno
	for a 99 cyl drive.

	
	Using BSD disklabel generate disk describtion/label as
	documented in the FAQ. Make only 'c' (total BSD DOS part), 'd'
	(complete disk) and 'b' (intended swap) BSD partitions.

Problem
	When writing label, disklabel would ask about overwriting DOS
	partition table. Whether I said y or n, the DOS partition table
	was screwed up, as seen from DOS (BSD saw the DOS file system
	very nicely indeed).

Cause, solution
       BSD disklabel wants to write the label to the start of the 'a'
       partition; I had *not* defined an 'a' partition (since I was
       ony using the disk for swap). Disklabel then writes the label
       at the start of the drive, which is why it talks about
       overwriting (aha!); this is *bad* for the DOS partition
       table.. The solution is to have a non-empty (e.g. one cylinder)
       'a' BSD partition at the start of the BSD part of the disk, and
       resize the 'b' swap partition accordingly. Now everyting works 
       just fine.

Reference
	The following post in 386bsd.questions, by Bruce Evans

From: bde@kralizec.zeta.org.au (Bruce Evans)
Newsgroups: comp.os.386bsd.questions
Subject: Re: FreeBSD - sio (com) and DOS HD problems
Date: 22 Sep 1993 09:33:18 +1000
Message-ID: <27o2vuINNt51@kralizec.zeta.org.au>
=======================================================================

-- 
Mr Jens Tingleff, M.Sc.EE. PhD student at 
     Imperial College, Dept of EE,  Exhibition Road, London SW7 2BT, England
jensting@ic.ac.uk or jensting@dinghy.ee.ic...  (used to be jensting@diku.dk) 
"It took more than one man to change my name to Shanghai Lily" 'Shanghai Expr.'