使用DiskGenuis进行刻录
插入一个U盘,在DiskGenuis中的磁盘列表中,右键选择”加载虚拟硬盘”,选择在虚拟机中安装的MS-DOS系统的虚拟磁盘,加载完成后,在工具中找到”克隆硬盘”的选项,源磁盘选择MS-DOS的虚拟磁盘,目的磁盘选择U盘,克隆完成后即可使用U盘在物理机中启动DOS系统。
导出IMG文件进行刻录
需要在linux系统下进行,详见参考资料中How to Convert a VMDK to an ISO File的部分,制备完成后使用rufus进行刻录。
高级:使用UltraISO进行原始制备
该方法需要已经制备好的可运行的MSDOS镜像,使用该方案的主要优点在于可以制备符合用户分区大小需求的MS-DOS镜像(分区大小依旧固定)。
打开UltraISO,打开已经制备好的MSDOS镜像,将文件全部复制到用户自定的文件夹。
打开UltraISO,新建一个硬盘映像,引导选择ms dos 6.22,大小不小于16M,镜像大小根据自身需求进行调整,在UltraISO下方的文件浏览器中找到复制好的MSDOS镜像文件的文件夹,先将IO.SYS和MSDOS.SYS复制到硬盘映像内,点击保存,然后将其他所有文件复制到硬盘映像内,再点击保存。
OS.SYS的LBA务必为2,MSDOS.SYS的LBA务必紧跟OS.SYS后面。
制备完成后使用rufus进行刻录。
参考资料
- MS-DOS操作系统引导过程学习笔记
-
Here’s a short post showing a little trick that I found.
Recently, I was trying out PureDarwin, and I wanted to run their Xmas release (shipping with X11) on native hardware. Problem is, I needed to copy the files onto a hard disk, but the only thing that I could find was a VMware disk image. You can’t easily extract the files from an image of this type, but luckily in two commands I was able to create an ISO file which I could mount in OS X and then copy files from. This took some experimentation, but I guessed (correctly!) that UNIX’s legendary dd tool could create an ISO file from the raw disk images which QEMU can create (don’t get anything unless you try, right?).
This was easy because I’d installed QEMU earlier on my system via Homebrew, so it was easy to convert the VMDK (the VMware disk image) to a RAW image image:
qemu-img convert -f vmdk puredarwinxmas.vmdk pd.raw
This captures the contents of the VMware image into a raw image in some (unbeknownst to me) format. You can then write this to an ISO file:
dd if=pd.raw of=pd.iso
That’s it. You can then mount this ISO, put it up for download, or whatever. This shouldn’t be limited to PureDarwin, and should work for most VMware disk images as long as it is stored as a VMDK file.