Aan
Aan

Reputation: 12890

Can I determine OS installed in hard disk using sectors level data?

I would ask about the possibility of determining which operating system is installed in a hard drive using direct read of sectors information? If, what sector should I read and how can I specify a sector and then read data from it programatically (useful APIs)?

Also, can I write a code works to do that even if its host system is working in a virtual machine?

Upvotes: 1

Views: 1051

Answers (1)

Greg Hewgill
Greg Hewgill

Reputation: 992737

You can get a pretty good guess by reading the master boot record and looking at the partition type.

See the question Direct access to harddrive? for pointers to information about reading raw sectors directly.

Upvotes: 2

Related Questions