fat12 problem or GRUB problem...

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

fat12 problem or GRUB problem...

Post by xyjamepa »

Hi...

last month I implemented fat12 file system,and I was playing with
it last night any way when I make any new folder or a new text file
I can see it from windows and it works perfectly,
but here is the problem...after creating new folder or new text file
and restarting Boch's ,I can't boot again GRUB gives me this message:
Error 16: inconsistaint file system structure...
Did any body have this problem before?
Or do you know what is wrong?

Thanx
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Sounds like windows has b0rked your filesystem: did it implicitly convert it to fat32 or something?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

JamesM wrote:Sounds like windows has b0rked your filesystem: did it implicitly convert it to fat32 or something?
Or put long file names in? (Don't know whether Bochs likes them on FAT12.)


JAL
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

jal wrote:
JamesM wrote:Sounds like windows has b0rked your filesystem: did it implicitly convert it to fat32 or something?
Or put long file names in? (Don't know whether Bochs likes them on FAT12.)


JAL
Bochs?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Tyler wrote:Bochs?
Sorry, mind melt. Grub, of course.

JAL
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

Post by xyjamepa »

So...

what should I do?
:?
how can I figure out the problem?
didn't you guys have this problem before?

Any suggsetions are welcome...

Thanx.
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Have you tried the LFN suggestion by jal? How about the FAT32 suggestion by JamesM? Can Windows continue to read the disk after the first write? Can another OS like Linux, or is the problem specific to GRUB?

What medium is your FS on? I read before that the type of FAT system is based purely on number of sectors, not on the information in the BPB, so it may be worth checking that.

Can you dump parts of the BPB, root and FAT yourself to verify that everything is as you expect?

Cheers,
Adam
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

Post by xyjamepa »

Can Windows continue to read the disk after the first write? Can another OS like Linux, or is the problem specific to GRUB?
Yes windows can read the Disk and I can see my new folder or my new text file and I can read it from windows...
the problem comes after creating new folder or text file and then
rebooting Bochs GRUB can't boot again and gives me this :
Error 16: inconsistaint file system structure
Can you dump parts of the BPB, root and FAT yourself to verify that everything is as you expect?
Yes, and every thing is as I expect...

Thanx.
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Try it on a linux liveCD - see what it gets mounted as (FAT12, FAT32) etc. Also if you go into your floppy drive mountpoint in a terminal on the liveCD (usually mounts at /media/floppy or something) then do an "ls -l", you should see EXACTLY what is on there - sizes, permissions etc.

You will also see any "hidden" or "special system files" windows may have created implicitly (I'm thinking of folders such as Thumbs_DB: That existed on XP and if you're using vista there's probably more of those such things to hold folder setup memories etc). You can also delete them from there ;)

You may want to try "ls -la" instead. The 'a' tells ls to list ALL files (files prefixed with a dot (.) are not shown normally).
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

Post by xyjamepa »

Unfortunatally I don't use linux, I use winxp...

As you know every fat file system has two copies of fat table,
what I do after creating my folder or my file ,I only change the
first copy of fat table and leave the second one without change,
so do you think this might be the problem?
I tried to update the second copy of fat to become identical with the first
one,but nothing changed...
the problem here I'm not sure if I did it in the right way...


Thanx.
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Hi,

If GRUB is complaining about the FAT's being inconsistent, I should imagine that that is almost certainly the cause of the problem. What happens if you start with a clean FAT formatted disk again and write your code to update both FAT's from the outset?

Cheers,
Adam
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Unfortunatally I don't use linux, I use winxp...
That's why we suggested quickly checking using a liveCD: You don't need to install anything, just insert the CD and off you go! When the computer restarts it'll boot back into winXP with no data change.
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

How about download GRUB source, look into it to see why it would possibly signal such an error, and then check that you aren't violating any of the assumptions GRUB makes..
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
Post Reply