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

Re: Help! FAT magic number corrupted!



me wrote:
> and exits. fdisk /dev/hda1 won't give me a partition table because it's a
> dos disk. 

Yes, you use fdisk on the whole-disk devices such as /dev/hda and /dev/hdb
while you put file systems on the partition devices such as /dev/hda1 and
/dev/hda3.

> 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."
> 
> This was what it gave me originally when this whole mess started. 

Well, did you reboot?  There's a very good reason fdisk emits that
message.  If you don't reboot before making any file system modifications
(mkfs et.al.) there is a good chance that you hose the wrong part of the
disk, since the kernel's idea of the partition layout is then different
from the actual layout.

Btw.: does anyone know why the re-read fails?  AFAIR, this used to work
fine on my SlackWare system some eons ago, but invariably fails on my
Debian system--seemingly independant of the kernel version used.

> e2fsck on my ext2 drives (/dev/hda3 et al) works fine. e2fsck on /dev/hda1
> of course doesn't work, because it's a non-ext2 partition. e2fsck on
> /dev/hda returns "Couldn't find ext2 superblock, trying backup blocks...
> e2fsck: Bad magic number in super-block while trying to open /dev/hda."
> <what's this superblock thing? I'm not up on the technical details of
> FATs.>

The ext2fs uses the so-called superblock for storing important data about
the file system, such as size, volume label, and reserved blocks
percentage.  The ext2fs superblock is identified by a "magic" number which
ensures that other file systems don't get misidentified as ext2 file
systems.  Since the superblock is absolutely essential for the ext2 file
system, it is duplicated a number of times throughout the file system;
that is what the "trying backup blocks..." above refers to.

Since you are trying to e2fsck a FAT file system, e2fsck doesn't find a
valid ext2 superblock and aborts.

> fsck.msdos on /dev/hda returns:
> Currently, only 2 FATs are supported, not 243.

This won't work, since there is no file system on /dev/hda.

> 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?

It seems that the file system on /dev/hda1 is hosed :-(
 
>> As for the Win95 system... 
>> you will probablky need to re-install
> 
> 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?

Try removing the broken FAT partition with Linux fdisk.  Then boot with
the win95 boot floppy and run DOS fdisk to recreate the FAT
partition--make sure that you have a copy of fdisk.exe on the boot floppy!
It is also a good idea to have a Linux boot floppy handy, just in case...

HTH.
-- 
       /'"`\  zzzZ  | My PGP Public Key is available at:
      ( - - )       | <http://home1.inet.tele.dk/renehl/>
--oooO--(_)--Oooo------------------------------------------ 
 Don't ya just hate it when there's not enough room to fin 


Reply to: