Discussion:
Bad magic number
(too old to reply)
Drew Chen
2005-04-08 14:19:54 UTC
Permalink
My paging runs, but
whenever i restart
bochs i get this
error message


Bad magic number (0)
for PFAT filesystem
Failed to mount /c
filesystem

I was wondering why
that might be, if i
make clean && make
again, it runs fine,
but once i re-run
bochs w/o remaking,
it errors.
Tom Brubaker
2005-04-08 14:47:58 UTC
Permalink
The magic number is a fixed but arbitrary value defined by PFAT and placed
at the beginning of the disk device so that the software can detect whether
a PFAT partition really is present before it starts trying to parse for PFAT
data structures.

It looks like your code is overwriting the magic number with a zero. Also,
I think the magic number is at the very beginning of the filesystem, so you
are probably also writing to index zero.

I don't think the Block_Device* dev in struct Paging_Device is dedicated to
the file, rather it is the device which contains the paging file. In that
case, you'll need to use startSector in your computations of where to write.

That said, I haven't actually implemented this yet, but that's what I plan
to do. Hope it helps

-Tom-
Post by Drew Chen
My paging runs, but
whenever i restart
bochs i get this
error message
Bad magic number (0)
for PFAT filesystem
Failed to mount /c
filesystem
I was wondering why
that might be, if i
make clean && make
again, it runs fine,
but once i re-run
bochs w/o remaking,
it errors.
Loading...