|
Memberlist | Forum Rules | Search | Today's Posts | Mark Forums Read |
Search Forums: | Click here to use Advanced Search |
|
Thread Tools | Display Modes |
26-07-2004, 05:31 AM | #1 | ||
|
HOWTO: creating a dos-hdimage, booting it from an NTFS parti
Hello
I'd líke to contribute to this site in some way, and so I am writing down a howto for creating bootable ms-dos hdimages and booting them from NTFS partitions. In order to get some "exotic" dos games to work, I've created a 100mb FAT16-hd-image containing MS-DOS 6.22, including sound drivers, cdrom drivers and slowdown utilities. I used it to get "Settlers 2 Gold" running on my computer. Unfortunately, there's one big disadvantage: Since the hard disk image is loaded into RAM via memdisk, changes to the hard disk image (e.g. savegames) are lost after rebooting, so you have to copy your savegames to a floppy disk. If I get tcp/ip to work under ms-dos, I'll write a program which uploads hard disk changes onto a specified ftp server (or maybe onto a windows share). If you are interested in my dos-hdimage, please note that due to traffic/bandwith limitations, I don't want to publish download links here, but as long as I have free capacities, I could send PMs with a download link. In the following, I'll explain how to create your own dos-hdimage. It's a bit tricky, so I recommend reading the documentation of the utilities I used. 1. Download bochs, the pentium emulator, from : http://bochs.sf.net 2. Get a dos bootdisk, e.g. from http://www.bootdisk.com. The unofficial ms-dos 6.22 bootdisk there contains atapi-cdrom drivers, EMM386 and QBasic If you don't have a real floppy drive, use theVirtual Floppy Driver in order to write the disk into a virtual floppy image. 3. Create a dos image using "bximage" I've used Cylindes=64, Heads=64, Sectors=63 for my image. That's 64*64*63*512 bytes = 132120576 bytes. In a unix environment (e.g. linux/*bsd/cygwin...), you can alternatively type "dd if=/dev/zero of=hdimage.img count=258048" (64*64*63=258048) and partition it using "fdisk -C 64 -H 64 -S 63 hdimage.img" 4. run bochs and configure it: Disk Options ([3],[8]): Boot from floppy. Floppy drive: "a:" or the path to the virtual floppy image Primary IDE: hard disk, Cylinders 64, Heads 64, Sectors 63 (or the values you like...) 5. Start the simulation, it should start a dos system from the specified boot disk. You can install your dos partition using the dos commands "fdisk" and "format c: /Q" (/Q menas quick format, that's important because bochs doesn't seem to like "slow"-format ). When everything worked, you can install the dos boot sector with "sys c:" onto the hd. Create your autoexec.bat and config.sys using "edit" (or something similar...). There are several ways to transfer files onto the virtual dos drive : - Way #1.: creating a virtual cdrom image and copying it to the hard disk using bochs (see disk options) - Way #2.: using the loopback device under linux (root priviliges required) : losetup -o ##### /dev/loop0 hdimage.img (##### = SectorsPerTrack*512, e.g. 63*512=32256) mkdir /mnt/loop mount -t msdos /dev/loop0 /mnt/loop - Way #3.: using mtools (unix/cygwin environment required). See http://mtools.linux.lu you can use "grub" (bootloader) and "memdisk" to boot the disk image. (memdisk is a "ramdisk" kernel, you only need the "memdisk" file) There is a grub installer for windows with ntfs support which can be found here: http://www.geocities.com/lode_leroy/grubinstall/ Create "c:\boot\menu.lst" : Code:
title=MS-DOS Image root (hd0,0) kernel /boot/memdisk initrd (hd0,0)/boot/freedos.img grubinstall -d (hd0,0) -1 C:\boot\stage1 -2 C:\boot\stage2 (the MBR is not changed, there is no risk). (hd0,0) means first harddisk, first partition. Then, Customize C:\BOOT.INI : Code:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect C:\boot\stage1="GRUB" |
||
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dosbox 0.73 and Vista [Basic howto] | dosraider | Tutorials | 7 | 10-07-2009 10:34 PM |
Dosbox 0.73 and XP [Basic howto] | dosraider | Tutorials | 0 | 28-05-2009 03:27 PM |
How To Create Isos | MdaG | Tech Corner | 4 | 12-10-2005 04:17 PM |
Ever Wanted To Create A Classic Game? | Kenney | Programming | 23 | 04-10-2005 05:21 PM |
HOWTO: creating a dos-hdimage, booting it from an NTFS partition :) | FreeFreddy | Troubleshooting | 8 | 03-06-2005 09:27 PM |
Thread Tools | |
Display Modes | |
|
|
||
  |