dos boot before win7 boot

可紊 提交于 2019-12-25 12:45:45

问题


I've got a question for dos & win7 boot process.

Is it possible that dos boot and execute some dos-app before win7 boot without reboot? I mean boot process like win95 or win3.1.

I'll explain more detail.

  1. dos boot ->
  2. execute some dos app ->
  3. cleanup memory ->
  4. load win7 volume boot record into memory 7c00 ->
  5. win7 boot without reboot

Is this possible?


回答1:


The scenario you have described is basically a warm reboot, interrupt 0x19 behaves almost like that, with the exception that it always loads the Master Boot Record (with the partition table). Win3.1 or Win95 were started as normal executables from DOS and not from their boot record. Win7 does not have any DOS phase during boot.

However, I think it's possible, but won't be easy. These are a few options:

  1. The easiest solution would be if you can find an appropriate boot manager software that can do this for you. Take a look at GRUB and GRUB4DOS and this question.

  2. If it is enough (the DOS program you want to run does not strictly require 16-bit DOS environment), I'm not sure, but maybe you can tweak Win7's boot.ini to boot in safe mode with command line and start it from there and then reboot.

  3. In the worst case you must manually write a small DOS program that reads the Win7 boot sector to the address 0000:7C00 and executes it. For this to work you must now exactly where the Win7 boot sector is located in the disk. Be aware that on hardware that supports it, Win7 will prefer EFI boot method instead of the old MBR-based one. You must check what method your Win7 installation uses. There may be other difficulties like how to select active partition or that the DOS partition must reside in the beginning of the disk, and so on.



来源:https://stackoverflow.com/questions/8891884/dos-boot-before-win7-boot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!