[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help! FAT magic number corrupted!



me said
> On Fri, 16 Oct 1998 stick@richnet.net wrote:
> 
> > me said
> > > On Fri, 16 Oct 1998, Stephen J. Carpenter wrote:
> > > 
> > > and exits. fdisk /dev/hda1 won't give me a partition table because it's a
> > > dos disk. 
> > > 
> > Huh.  Fdisk should be able to read the device regardless of what filesystem
> > types are on it.  As far as I know all i386 systems build and use the
> > same partition table formats.  Something else mst be up!
> 
> I should have elaborated. fdisk on /dev/hda1 gives a bunch of errors when
> i try to view the partition table: 
> 
I still think you're missing the difference between /dev/hda and /dev/hda1:
Let me try to clarify (I'm not always good at explaining things in writting...)
When using fdisk (or cfdisk for that matter) you *do* want to use the whole
disk device (ie. /dev/hda).  That utility will allow you to add/change/delete
partitions on the specified drive.  Those partitions are then numbered
/dev/hdax (where x is 1 to whatever).


> Partition X[1,2,3,4] has different logical/physical beginnings|endings
> (non-Linux??)
> and some detail, 
> Partition X does not end on cylinder boundary.
It's not a major problem to have partitions not on cylinder baoundries.
At least I've never seen it make a difference.  I try to make them start
and end on boundries because I don't like looking at those messages...but
I don't think it's a show-stopper.  I'm sure someone will correct me if 
I'm wrong on this.

> It also does lines like
>  /dev/hda13   ?  267356  9609239487290409856   53  Unknown
> 
> <sigh> looks like to me a data table somewhere on /dev/hda1 is corrupt. 
> 
Remember, the partition table is *not* considered part of any particular
partition.  That's why it's accsessed via the /dev/hda device.

The partition table (and part of the boot loader) sit in the drives first
512 bytes - sector 0.  This is why the first partition has to start on
sector 1 (or later).  The "tables" that sit on a particular partition (such
as /dev/hada13) are part of the file-system that reside on that partition.
(Excluding some stuff about extended partitions and boot loaders...)

> > > thanks, yes, this works, and i can run cfdisk fine. cfdisk works fine. I
> > > didn't change anything, but i tried to write the partition table, and
> > > here's the error cfdisk gives:
> > > 
> > > "Wrote partition table, but re-read table failed. Reboot to update table."
> > > 
> > Have you then rebooted to see if the write took place?
> 
> Rebooting in *exactly* the same situation was what got me into kernel
> panic the first time. I haven't done it again because i expect the same
> results. My guess is that the numbers in /dev/hda1 are wacked, and it
> can't re-read them becasue they're invalid.
> 
Actually, I don't think rebooting did anything to whack the drive - rebooting
(and the subsequent kernel panic) are the symptoms.  Changing the partition
table of a drive often *requires* a re-boot to force the system to use the
new parameters.  Not re-booting *can* cause more trouble than you might think.

> > > fsck.msdos on /dev/hda returns:
> > > Currently, only 2 FATs are supported, not 243.
> > > 
> > > fsck.msdos on /dev/hda1 returns:
> > > Currently, only 2 FATs are supported, not 81.
> > > 
> > > Hmm. Why does it think I have 81 FATs on one partition?
> > > 
> > > > As for the Win95 system... 
> > > > you will probablky need to re-install
> > > 
> > That goes without saying, doesn't it!?  Everytime I've heard anyone talk
> > about fixing a win95 issue it always seems to start with "First re-install
> > the OS..."
> 
> not always, but it helps. win95 tends to bug itself up and isn't
> transparent enough to fix easily. (then again, neither is linux if you
> don't know what to look for...)
> 
IMO, Linux is much easier to work with in these cases because there are far
fewer "secrets" to what's going on...

> > > yep, i figured so. but right now I can't even get a Win95 boot floppy to
> > > recognize my C drive (aka /dev/hda1). <sigh>
> > > Could fips help me with that problem?
> > > 
> > Remember, Microsoft fdisk's tend to change partion numbers around - what was
> > once /dev/hda2 could now be /dev/hda1 and vise-versa.  I recommend creating
> > any MSDOS/Win9x partitions on the drive first using MS's fdisk and then using
> > Linux's fdisk/cfdisk to create the others.  (after a re-boot of course...)
> 
> this is what i did, only i used fips to repartition without losing data.
> that's why i suggested that maybe fips was an answer. i'll try it later
> when i'm not at work. 
> 
Fips is a good program.  Things to remember when using it - you must compress
your data so that it's not chopped-off with the new partition size, also, 
the partition will be left with the cluster size of the original drive, which
may be very wastefull if your taking a LARGE partition and making it much
smaller.

One solution to the cluster size issue is to shink the original partition
(and file-system) such that the space left is the size you desire. then
create a new MS-DOS file-system on that partition, re-boot, and copy the data
from the old (now smaller) partition to the new one (that now has an appropriate
cluster size).  Reboot again.  Make sure the data is where you want and then
delete the original partition (DATA WILL BE LOST ON THAT PARTITION).  After
that DOS's FDISK will most likely rename the new partition.

The result of DOS's FDISK fiddeling with partitions names is that /dev/hda2
*may* be physically ahead of /dev/hda1.  This bothers some folks.  

> -Renee Landrum
> slandrum@cs.smith.edu (main)     ----- southern_grrl@iname.com (forwarding)
> 

Chuck

-- 
Chuck Stickelman, Owner			E-Mail:	<stick@richnet.net>
Practical Network Design		Voice:	+1-419-529-3841
9 Chambers Road				FAX:	+1-419-529-3625
Mansfield, OH 44906-1301 USA


Reply to: