Partitions Detection

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
~
Member
Member
Posts: 1228
Joined: Tue Mar 06, 2007 11:17 am
Libera.chat IRC: ArcheFire

Partitions Detection

Post by ~ »

I am currently working on partitions detection for the hard disks installed in the system. I have 2 questions, to begin with:

- Is it enough to copy the partition table in the MBR and keep track of the drive it belongs to, as an effective way of accessing the data in that drive?

- Does somebody has some actual information for the correct sequence to detect partitions from unused and standard ones, from nonstandard ones (i.e., secondary partitions/"virtual" drives, like ones of MS' Scandisk)?
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

I think it would be a little more efficient to stick the MBR data into a structure in your partition manager... but it is up to you how you do that.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

I think that the correct way is to read the partition type id from the table and look it up in some sort of list. Then after that you hand that partition off to some sort of file system driver that verifies if that partition is really the type it says it is.

Here is a list of some of the partition ids:
http://www.nondot.org/sabre/os/files/Pa ... nTypes.txt

You can look in Ralph Brown's interrupt listing for more.
Post Reply