*BSD News Article 76422


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!howland.erols.net!news1.erols.com!newsmaster@erols.com
From: Ken Bigelow <kbigelow@www.play-hookey.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Please explain the diff between wd0a and wd0s2a
Date: Mon, 19 Aug 1996 19:44:13 -0700
Organization: Andreas Klemm, 41469 Neuss, Germany
Lines: 67
Message-ID: <3219267D.5F1A@www.play-hookey.com>
References: <lclee.537.021BF8A6@primenet.com>
NNTP-Posting-Host: kenjb05.play-hookey.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.02 (Win16; I)

Larry Lee wrote:
> 
> About two weeks ago I installed FreedBSD 2.1,
> within a day or so after the install I upgraded to 2.1.5.
> 
> The system uses IDE drive which is shared between Win95 and FreeBSD.
> Win95 is in slice 1 and FreeBSD is in slice 2.
> 
> Everything worked well for two weeks, and then the system refused to
> boot. I had recently added mounting the dos partition and had one unsuccessful
> attempt at writing data to /dos, and that may have been the source of the
> errors.
> After examining things in single user mode, I lost quite a fewinodes in the
> root partition. They are sequential from about inode 775about 830 (very
> approximate). Unfortunately these inodes happen toinclude the /dev/wd0s2f
> which is the /usr partition. I fixed everything up in single user mode, until
> fsck ran without errors and then ran mknod to rebuild the corrupted entries.
> /var and/sys were also affected, I patched that as well as I could.  So, I
> synced everything and rebooted. All the same problems came right back, in
> particular the /dev/wd0s2f entry was corrupted! So I figure I have a project
> for Monday.
> 
> There are several things that are not clear to me.
> 
> First there are device entries for wd0c with a major minor of [0,2]
> and there are device entries for wd0s2c with a major minor of [0, 0x30002]
> 
> What is the difference between these and why is / mounted using wd0a and
> /usr mounted using wd0s2f.  My initial thought was that wd0a must refer to
> drives which do not have a DOS fdisk style master boot record. Any insight
> to the nuances between these would be appreciated.
> 
> Obviously if anyone has an explanation of what I might have done to cause this
> or prevent it from happening again, I would appreciate hearing that as well.
> 
> Larry
> 
> PS I've searched usenet and various web pages and can't find the answers
> Please don't refer me to manpages as those are very accessable at the moment!

When you installed FreeBSD, did you by any chance use FIPS to shrink the 
Win95 partition/slice? If so, you can't mount that partition as a DOS 
partition as-is, because the cluster size doesn't get changed when you 
shrink the partition. Result, unless you didn't cross a cluster boundary, 
is that FreeBSD thinks the clusters 'should be' smaller than they really 
are. This translates to chaos.

The only solution I've found (which you won't like): use fdisk to kill 
off the DOS/Win partition, then define it again. Format it from a DOS 
diskette. Then reinstall Win95. You lose all data, but the clusters are 
right. Bummer.

As for the nomenclature, s1, s2, etc refer to the specific slice. Your 
Win95 slice is therefore wd0s1, and your FreeBSD slice is wd0s2. Entries 
without a slice designation refer to the drive as a whole, not a single 
slice (wd0c is the whole darn drive). If you're seeing your / partition 
as wd0a instead of wd0s2a, I would guess that you have done some major 
stomping on that drive. It may now be time for that fdisk treatment I 
mentioned.

Good luck!
-- 
Ken

Are you interested in   |
byte-sized education    |   http://www.play-hookey.com
over the Internet?      |