Jump to content











Photo

Pengo's guide to making a DOS hard disk boot image


  • Please log in to reply
1 reply to this topic

#1 pengoau

pengoau
  • Members
  • 9 posts
  •  
    Australia

Posted 18 November 2011 - 01:27 AM

G'day

This guide was made possible thru the help of this guide here: PURE MAN'S GUIDE TO MAKING A FREEDOS HD IMAGE, http://reboot.pro/13171/

Below you will find a basic guide on how to go about creating a hdd disk image, that will be bootable and can be used to boot from a PXE menu. Most of the steps are from Pure Man's guide with some modifications. I provide this guide "as-is" and will not be held personally liable for any wrong doing, damage et al that may come of it ;).

I've tried to adapt the "guide" to work for any OS type, so made it in a general sense but I'm not to sure if it will work 100%. Tho it should do. This guide since it is based off pure man's guide is based around making a dos based bootable hdd disk image. As at the time I needed to be able to boot a disk image larger than 2.88mb but not be ISO based. Through the steps detailed in this guide I was able to make a 15mb hdd image that was bootable both via USB and PXE, that booted dos (win98 dos) and launched my program.

Enjoy.

-=-=-=-=-
How to create a bootable disk image (for PXE booting).

Nov 2011. V.0.DRAFT

:: Tools Required:

- Operating System: Windows XP or Windows 7.
This guide is for performing these steps under Windows (XP or 7), as the tools used are for the Windows platform.

- QEMU Manager
http://www.davereyn....etupqemuk70.exe
This is used to test the image, it is a PC Emulator.

- Operating System Bootdisk Image
e.g. Windows 98: http://www.allbootdi...ownload/98.html
A bootdisk image is required so we can boot up in QEMU and setup the virtual hdd the way we want. This can be either a cd iso or floppy disk image, it just needs to be bootable and contain system tools for formatting, partitioning and applying system boot files.

- RMPrepUSB
http://www.rmprepusb.com/
This is used to save the disk image to a USB flash drive to test it on a real system.

:: Optional Tools:

- ImDisk Virtual Disk Driver
http://www.ltr-data....de.html/#ImDisk
This is used to allow us to mount a disk image as a virtual drive and modify it (ie add programs/files) without the need to access it thru a pc emulator like QEMU.


For this guide we will be making a DOS based disk image for booting from a PXE Menu.

--- Make a HDD Image:

Start QEMU, create a new VM (DOS) and add (create) a raw hard drive image, e.g. DOSHD.raw. Set the size of this virtual hdd to the size that you want your disk image to be.

Add to the VM, change boot order to and boot the boot image you are using, for this example it would be the Windows 98 boot disk image (added as a FDD). You can also add a 2nd hdd to your VM that points to a folder or your whole hdd (I would tick the read-only option to prevent data loss). This can come in handy when wanting to populate your disk image with the data you want later on. As you can simply copy from one drive to the other within the VM.

Once booted run FDISK to create an active bootable DOS partition on DOSHD.raw and write a MBR to it.

Run FORMAT to format that partition and write a DOS bootsector to it.

Run SYS to add system files to that partition.

We have now made a bootable (DOS) disk image.

From this point forward, add to the disk partition you have just created and formatted any files you wish to be available in your bootable disk image.


--- Write your bootable disk image onto a USB Flash drive.

Connect your USB flash drive to the computer and then start RMPrepUSB.

Under IMAGE TOOLS section, click the "File -> Drive" button. Point RMPrepUSB to the disk image you wish to write to your USB flash drive. For example we could write the DOSHD.raw disk image that we created previously in this guide to the USB flash drive.

You will be prompted on how to format; accept all defaults by pressing ENTER until a new window pops up stating the drive is about to be formatted.

DONE :)

Edited by pengoau, 18 November 2011 - 01:58 AM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 18 November 2011 - 03:10 PM

A small word of warning.
The BOCHS Bios (used in Qemu) is a very "strict" one.
If you create an image smaller than 512 Mb in it, it will have a HS geometry of 16/63 (instead of the usual 255/63).
This generally does NOT represent a problem, but it is something you should know if you have problems booting from it once it is deployed to the media.

If you are running 2K or XP AND you want to have control on CHS geometry, you may want to use MKIMG/MBRBATCH:
http://reboot.pro/3191/
(the MBR and bootsector used will be those of the OS, but later you can run MBRFIX to have them changed to the DOS/Win9x ones)
or the "simplified" hddimage:
http://reboot.pro/9033/

:cheers:
Wonko




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users