Boot records Intel Architecture

R

Ravi

Hi,

Is there any way to capture the boot record information on the disk?
For example, assume that I have 3 different operating systems installed
on a hard drive. I want to be able to run a program/utility and get the
boot record information, like address on the drive or contents at that
specific location, for all the 3 operating systems.

Is this possible using C?

Thanks in advance,
Ravi
 
R

Rvde

Ravi said:
Hi,

Is there any way to capture the boot record information on the disk?
For example, assume that I have 3 different operating systems
installed
on a hard drive. I want to be able to run a program/utility and get
the
boot record information, like address on the drive or contents at
that
specific location, for all the 3 operating systems.

Is this possible using C?

Thanks in advance,
Ravi

That's more of an operating system question than a C question.
Under Linux you would just open /dev/hda (replace hda with the device
name of the drive you want to look at) as a file and start reading
from it.
 
R

Ravi

Can't we program that using assembly language and C?
I want capture the boot record binary into a variable. In Linux
everything is a file. So it is easy there to get that information. Let
us talk about Windows. How can I do it in Windows?
 
W

Walter Roberson

Can't we program that using assembly language and C?

Perhaps, but assembly language is not C and this is a C newgroup.
You mention "Intel Architecture" in your subject heading, but you
should realize that Intel makes hundreds of different CPUs
with different assembly languages.
I want capture the boot record binary into a variable. In Linux
everything is a file.

Urr, no it isn't. You cannot, for example, create a new
file by simply appending something to a directory -- something which
you would be able to do if "everything is a file" since then
a directory would be a file.

Most of /proc are *pseudo-files* rather than files.
So it is easy there to get that information. Let
us talk about Windows. How can I do it in Windows?

That would seem to me more appropriate to ask in a Windows newsgroup.
 
A

Alan Balmer

Can't we program that using assembly language and C?
I want capture the boot record binary into a variable. In Linux
everything is a file. So it is easy there to get that information. Let
us talk about Windows. How can I do it in Windows?

Why don't you ask on a Windows programming group?
 
J

jacob navia

Ravi said:
Can't we program that using assembly language and C?
I want capture the boot record binary into a variable. In Linux
everything is a file. So it is easy there to get that information. Let
us talk about Windows. How can I do it in Windows?
Under windows you can do the same thing. Open the disk as a raw device
and read from it. You should go to the Microsoft site and search the
documentation. Specifically look for the API CreateFile and look at
the documentation for Physical Disks and Volumes in there.
 
K

Kenny McCormack

Hi,

Is there any way to capture the boot record information on the disk?
For example, assume that I have 3 different operating systems installed
on a hard drive. I want to be able to run a program/utility and get the
boot record information, like address on the drive or contents at that
specific location, for all the 3 operating systems.

Is this possible using C?

Everyone will tell you that this is OT for this newsgroup, but there is
a simple, concise, on-topic, accurate and all-inclusive answer to your
question. The answer is given below...

SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE
SPOILER SPACE

Yes.
 
M

Malcolm

Ravi said:
Can't we program that using assembly language and C?
I want capture the boot record binary into a variable. In Linux
everything is a file. So it is easy there to get that information. Let
us talk about Windows. How can I do it in Windows?
The answer is that ANSI C doesn't allow this sort of low-level interaction
with the disk drive. However typically C compilers come with libraries of
platform-specific functions which can do all sorts of useful things.
Assemblers generally allow you to do even more. You need to ask in a group
devoted to your platform about this, not here.
 
R

Ravi

Oops.....I did not even think about all these responses. Malcolm's
answer was simple and straight forward....anyways...thanks guys....

Ravi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top