Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Boot records Intel Architecture

Reply
Thread Tools

Boot records Intel Architecture

 
 
Ravi
Guest
Posts: n/a
 
      05-18-2005
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

 
Reply With Quote
 
 
 
 
Rvde
Guest
Posts: n/a
 
      05-18-2005

"Ravi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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.



 
Reply With Quote
 
 
 
 
Ravi
Guest
Posts: n/a
 
      05-18-2005
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?

 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      05-18-2005
In article <(E-Mail Removed). com>,
Ravi <(E-Mail Removed)> wrote:
>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.

--
Look out, there are llamas!
 
Reply With Quote
 
Alan Balmer
Guest
Posts: n/a
 
      05-18-2005
On 18 May 2005 09:57:26 -0700, "Ravi" <(E-Mail Removed)>
wrote:

>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?

--
Al Balmer
Balmer Consulting
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      05-18-2005
Ravi wrote:

> 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.

 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      05-18-2005
In article <(E-Mail Removed) .com>,
Ravi <(E-Mail Removed)> wrote:
>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.

 
Reply With Quote
 
Malcolm
Guest
Posts: n/a
 
      05-18-2005
"Ravi" <(E-Mail Removed)> wrote
>
> 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.


 
Reply With Quote
 
Ravi
Guest
Posts: n/a
 
      05-19-2005
Oops.....I did not even think about all these responses. Malcolm's
answer was simple and straight forward....anyways...thanks guys....

Ravi

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
collocated architecture versus distributed architecture apngss@yahoo.com C Programming 3 09-29-2005 07:44 AM
collocated architecture versus distributed architecture apngss@yahoo.com Java 3 09-29-2005 07:44 AM
collocated architecture versus distributed architecture apngss@yahoo.com C++ 4 09-29-2005 07:44 AM
ON Linux Platform: How can we build binaries for another architecture from 0x86 architecture rashmi C Programming 2 07-05-2005 02:31 PM
how can I use a signal defined in one Architecture to another Architecture Muhammad Khan VHDL 4 07-10-2003 06:14 PM



Advertisments