×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

writing over mbr

writing over mbr

writing over mbr

(OP)
hey,
i have a school project to do.  i have to write a bootsector that restarts the computer.  i got that done, using nasm, but now i need some way to write the bootsector to the mbr. so instead of the computer booting into windows, my bootsec gets loaded.  Can someone show me how this might be done?  the computer for the project is an old 486, and has no security/anti-virus programs on it.  its running win95.  can i write a nasm program that will do this?  i assume i am using asm to do this.

RE: writing over mbr

I advise you to only change bootsectors on floppies, especially if you don't know how to restore the original bootsector (in another way than formatting the entire disk, that is).
Using debug you can specify an address when writing to a disk drive, or you can make an extra program that reads/writes the bootsector using INT 13h.


Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://www.geocities.com/thevhbcompany/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: writing over mbr

(OP)
ive been fooling around with floppies for awhile.  i know ur not supposed to mess with the mbr, but this is for school, and the computer were using is going to be reformatted regardless.  
so i could use debug and write the bootsec to 07c0:0000?

RE: writing over mbr

Yes you can probably use debug for that.

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

RE: writing over mbr

(OP)
appearently windows dosent let debug directly access the hard drive, so ive heard.  so i would like to try writing mi own assembly program using int 13h to write to the mbr.  can comeone give me an example, or point me to a good tutorial.  ive been tryin to find one, cant!

RE: writing over mbr

Try pressing F8 when Win95's booting (at the "Windows is now starting..." message).  Then select MS-DOS mode and go ask debug to do it.

Tough luck if you're using WinXP though hahaha

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

RE: writing over mbr

i am now involved in developing my own os. can any one of u tell me what to write in a bootsector program and how to load it in the bootsector.

thank u
aruna

RE: writing over mbr

concerning absolute disk access (mbr, boot rec etc) - my favorite tool is diskedit from old good norton utilites 7 (for dos). just read the binary image file on de clipboard and paste over target. dont forget to apply changes!
under win9x one WILL NEED use LOCK command to get direct disk access. but personally i prefer to boot to dos in any way i can do it.

alex

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close