Dangerous file system / disk problem

Malcolm Kay malcolm.kay at internode.on.net
Mon Jun 7 08:45:04 PDT 2004


On Monday 07 June 2004 04:01, Ben Paley wrote:

> su-2.05b# fdisk ad1
> ******* Working on device /dev/ad1 *******
> parameters extracted from in-core disklabel are:
> cylinders=155061 heads=16 sectors/track=63 (1008 blks/cyl)
>
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=155061 heads=16 sectors/track=63 (1008 blks/cyl)
>
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
>     start 63, size 156296322 (76316 Meg), flag 80 (active)
>         beg: cyl 0/ head 1/ sector 1;
>         end: cyl 1023/ head 254/ sector 63
> The data for partition 2 is:
> sysid 14 (0x0e),(Primary 'big' DOS (>= 32MB, LBA))
>     start 156296385, size 0 (0 Meg), flag 0

Notice the size recorded for this slice is zero.

If the "cylinders=155061 heads=16 sectors/track=63" is somewhere
near the reasonable possible geometry description then virtually 
the entire disk has been allocated to the FreeBSD slice.


>         beg: cyl 1022/ head 0/ sector 1;
>         end: cyl 1022/ head 254/ sector 63
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>
> su-2.05b#
>
> I don't really understand this, frankly: it certainly gives the right
> partition type code for the main partition, but I'm not sure of the
> relevance of the other stuff... does it look ok to you? Or is this
> "partition 2" where the problem is? Partition Magic in Windows sees only
> one partition on that disk. The slice editor in sysinstall shows this for
> ad1:
>
> Offset		Size(ST)		End			Name	PType	Desc		Subtype    Flags
>
> 0			63			62			-		12		unused	0
> 63			156296322		156296384 	ad1s1	8		freebsd	165
> 156296385		5103			156301487		-		12		unused	0

And this agrees that the second slice is almost non-existent -- 2.5Mb --
certainly not enough for windows.

I wonder whether you had the BIOS re-detect the disks after the swap.
Maybe the BIOS still thinks the size is that of the disk previously in that 
position. And sysinstall and windows are both confused by the near zero
apparent size of the windows partition.

What do you believe is the total disk capacity?

Since the slice 2 size is less than 32Mb then sysinstall knows that it can't 
really have a sysid of 14.

Malcolm

>
> > (Which release of FreeBSD do you run?  You used the "bsdlabel" command
> > to display the FreeBSD disk label on /dev/ad1s1.  That suggests you
> > are running FreeBSD 5.x.  In my experience, release 5.x won't recognize
> > FreeBSD disk labels in non FreeBSD slices and won't create special
> > files for the partitions in /dev.  This suggests that your MBR partition
> > type code is actually correct.  I dunno ... but it should be worth
> > checking anyway.)
>
> 5.2-CURRENT. But BSD sees everything ok, it's Windows that's having a
> problem. I don't feel confident making any changes in Windows, however,
> because it seems as though my only option there would be to format the
> partition! Which, from a Windows point of view, would certainly be a
> solution of sorts...
>
> Thanks for your help,
> Ben
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list