Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 1997 16:04:27 -0700
From:      Scott Blachowicz <scott@apple.statsci.com>
To:        Kristian Kennaway <kkennawa@physics.adelaide.edu.au>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Corrupted disk slice 
Message-ID:  <m0wKB5R-0006uMC@apple.statsci.com>
In-Reply-To: Your message of "Thu, 24 Apr 1997 02:23:11 %2B0930." <9704231653.AA13169@bragg> 
References:  <9704231653.AA13169@bragg> 

next in thread | previous in thread | raw e-mail | index | archive | help
Kristian Kennaway <kkennawa@physics.adelaide.edu.au> wrote:

> Okay, so what you are saying is that the fact that I had a freebsd 
> partition on wd1s4, with dos partitions on wd1s1 and wd1s5, could not 
> have been the single cause of the now-missing partition? Since sysinstall 
> was the one who decided to put my partition on wd1s4, I'd think this is 
> the case.

Actually, from what fdisk says I'd say that there's nothing in the "partition
3" (aka wd1s4).

> 
> The following may help:
> 
> [morden] 1:46 ~ fdisk wd1
> ******* Working on device /dev/rwd1 *******
> parameters extracted from in-core disklabel are:
> cylinders=621 heads=128 sectors/track=63 (8064 blks/cyl)
> 
> parameters to be used for BIOS calculations are:
> cylinders=621 heads=128 sectors/track=63 (8064 blks/cyl)
> 
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 0 is:
> sysid 6,(Primary 'big' DOS (> 32MB))
>     start 63, size 2048193 (1000 Meg), flag 0
>         beg: cyl 0/ sector 1/ head 1;
>         end: cyl 253/ sector 63/ head 127

That was wd1s1...a slice containing a DOS file system.

> The data for partition 1 is:
> sysid 5,(Extended DOS)
>     start 2048256, size 2048256 (1000 Meg), flag 0
>         beg: cyl 254/ sector 1/ head 0;
>         end: cyl 507/ sector 63/ head 127

That was wd1s2...a slice containing an extended DOS partition with some number
of "logical" partitions within.  FreeBSD would start naming the logical slices
as wd1s5, wd1s6, etc.

> The data for partition 2 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>     start 4096512, size 911232 (444 Meg), flag 80
>         beg: cyl 508/ sector 1/ head 0;
>         end: cyl 620/ sector 63/ head 127

That was wd1s3...a slice containing BSD file system(s).  A disklabel command
on wd1s3 should show some BSD partitions of that BSD slice.

> The data for partition 3 is:
> <UNUSED>

That's wd1s4...an unused slice.

Do the sizes of those partitions (1000 + 1000 + 444 = 2444MB) add up to your
whole disk?

> I'm assuminbg partition 3 here is the one which I used to have but no 
> longer do. partition 1 is on wd1s5, 2 is on wd1s3.

I can't tell what's happened to your partition 3/slice 4. Are you sure it
wasn't just a 2nd partition within the FreeBSD wd1s3 slice?

> Trying to disklabel the invalid partition gives me this:
> 
> [morden] 1:54 /dev disklabel -r rwd1s4e
> disklabel: /dev/rwd1s4e: Invalid argument

Does the /dev/rwd1s4e device file exist?  If not, you would need to create the
BSD partition device files with something like:

	cd /dev
	./MAKEDEV wd1s3h

to create the a-h partition files fo wd1s3*.  Then, the disklabel command can
go like this:

   % disklabel wd0s4e
   # /dev/rwd0s4e:
   type: ESDI
   disk: wd0s4
   label: 
   flags:
   bytes/sector: 512
   sectors/track: 63
   tracks/cylinder: 128
   sectors/cylinder: 8064
   cylinders: 52
   sectors/unit: 419328
   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 bps/cpg]
     a:    71680        0    4.2BSD        0     0     0   # (Cyl.    0 - 8*)
     c:   419328        0    unused        0     0         # (Cyl.    0 - 51)
     e:   347648    71680    4.2BSD        0     0     0   # (Cyl.    8*- 51*)

which shows that my wd0s4 has an "a" and an "e" partition. Hmmm...found disk
space! I don't seem to have that "a" partition in my /etc/fstab file any
more...have to check into THAT! Aha! It looks like wd0s4 is apparently the
same as my wd0 (being the first BSD slice on my boot disk).  Shouldn't the
system have just prevented me from doing fsck on /dev/rwd0s4a while
/dev/wd0a was mounted? (it let me do it).

Scott Blachowicz  Ph: 206/283-8802x240   Mathsoft (Data Analysis Products Div)
                                         1700 Westlake Ave N #500
scott@statsci.com                        Seattle, WA USA   98109
Scott.Blachowicz@seaslug.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0wKB5R-0006uMC>