Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Partition table and Master Boot Record (MBR) on a FAT system

Status
Not open for further replies.

kostbill

Full Member level 1
Joined
Dec 7, 2004
Messages
97
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
885
Hello.

In the specification for FAT 12/16/32 from microsoft, there is an explanation of the MBR. That is all fine written and understandable.

It sais in there that the MBR is the first sector of the volume, also clear.

The only problem is that there is no information about the partition table. For example, I have three cards (C.F.), 32 MB, 128 MB and 256 MB. In the 256 MB CF, there is no partition table and the first sector of the volume is actually the LBA(0) of the CF. In the other cards, the first sector of the drive is the partition table.

So, my questions are these:

1) Why there is not a partition table in all of the drives?
2) How can I know in what drive there is not a partition table? One way is to read the LBA(0) and check if the first byte is 0xEB. If it is, then it is the MBR and there is only one partition in the drive, what do you think of this solution?

Thanks a lot.

Regards, Bill.
 

Re: Partition table and Master Boot Record (MBR) on a FAT sy

a partition table will only be there if the volume you use has one

if its not partitioned using fdisk etc it wont have one
hence it wont be there


try to add a partition to the disk

then go looking for the table

the mbr {master boot record }will contain a factory made record of the disks geometry
all the partition table does is give referance to the starting block of the next partition within its volume


a tip is a handy command incase you get a problem with partitons

remove any partitions
use fdisk /mbr to restore the factory master boot record to any disk
i dont know how this goes with smart media
as i assume the master boot record is written there by the disks interface firmware

so it should still work

if forinstance you have a disk

and accidently remove the partition table
the drive wont know where your data stops and starts

if you know the partition size you used
you can fdisk and restore the table by just creating the partiton info again
and the data will magicaly be accesable again

so... without a partition the data wont be accessbile
a primary partition only {one big volume} makes no partition table

and i think that cf disks arent too hard to partition {ive done it before}

so try that then look for the table data my pal
 

Re: Partition table and Master Boot Record (MBR) on a FAT sy

Hello and thanks for your quick reply.

I don't have a problem if I don't have a partition table in my CD. My problem is to make my program understand if any disk has a partition table.

Any ideas on how to do that?

Thanks a lot.

Regards, Bill.

Added after 6 minutes:

Sorry, I mean my CF, not my CD :).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top