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.
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
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.
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
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.
Edited by pengoau, 18 November 2011 - 01:58 AM.