Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying the Boot Sector in DEBUG

Status
Not open for further replies.

caplan8293

Programmer
Sep 13, 2000
7
0
0
US
Hi everyone, you all helped me out A LOT with my last problem so I figure I would throw another one out at you. This one is a little more complicated though...

I run 4 operating systems on my machine: Windows 98 #1, Windows 98 #2, Linux, and Windows 2000. Both Windows installations and Linux are on Primary partitions and Windows 2000 is on a logical partition.

I use a program called BootMagic to manage them all. However, since Windows 2000 is on a logical partition, I cannot boot to it directly from BootMagic and I have to use the generic Windows Bootloader to boot Windows 2000. This bootloader is on the Windows 98 #1 Installation because the Windows bootloader must be installed on a primary partition.

Now that you have enough background info, here is my situation: In Bootmagic, I can directly boot Linux and Windows 98 #2, but whenever I choose Windows 98 #1 or Windows 2000, I am taken to the Windows Bootloader where I again have to choose the operating system to boot to. (It is a text menu where I use the arrow keys to select the operating system and enter to choose.)

In DEBUG, can I modify the boot sector so that if I choose Windows 98 #1, BootMagic will automatically hit ENTER for me on the second menu to boot Windows 98 #1 and if I choose Windows 2000, BootMagic will automatically hit the DOWN ARROW key and then ENTER to boot Windows 2000 so I will never see the second menu?

I don't think it would be all that difficult actually putting the commands in, because I think I would just be inserting a Line Feed / Carriage Return and a Down Arrow / Line Feed / Carriage Return. What I think is going to be very difficult is finding out where to insert them.

Does anyone know how I would go about doing this? Is it even feasable? If you need me to explain what I want more clearly, just ask. Thanks a lot!

Chuck Caplan
caplan8293@duq.edu [sig][/sig]
 
I understand it. but i think you may use System Commander to manage all OS instead of modifying boot sector.In this way you can get what you need easily!

Of course if you really want to change the boot record it is another story.here i will give some suggestion which have not been tested!!!

1.dump boot record
eg. #dd if=/dev/hda of=/bootsect1 bs=512 count=1
2.disassemble it (i donnt know how ^_^)
3.write back your boot sector
rg. #dd if=/bootsect1 of=/dev/hda bs=512 count=1

keep in mind it is very dangerous.if you arenot sure donnot do it!


Regards!
[sig][/sig]
 
I agree with zallen on two points: 1) what you are proposing isn't a do-it-yourself project and 2) it is very dangerous.

It is a simple matter to change the boot record in such a way that you will need to perform an unconditional format before you will be able to use it again. It is a very difficult matter to recover the data from a drive that has been trashed by a small error during an experiment.

Don't laugh. If you plan to experiment with the boot record (I've said it before and I'll probably say it again) make sure you do it on a drive you won't mind throwing away or formatting over and over and over again.

Chuck, I admire your ambition and persistence but I think this project should be shelved until you are really, really ready to tackle it. Don't try to learn the science of brain surgery by practicing on your friends and family... dissect a few dead frogs before you move on to live subjects. I hope that makes sense.
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
 
Heh, thanks for the advice. I particularly liked your brain surgery analogy Alt255 :)

zallen - Could System Commander solve my problem? I wasn't aware that it could boot Windows 2000 on a logical drive without running the Windows 2000 Bootloader on a primary drive first... I'll have to do some research.

Thanks!

[sig][/sig]
 
Sorry!i donnot use System Commander to boot win2k.If you get result ,i will be glad to share with you !

Regards! [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top