I'd like to clone my old (whopping 80MB) 386's hard disk to a .iso file to be able to launch it in DOSBox. Even though I plan on doing a full low-level format for a fresh dos622/win311 install, it was my childhood computer so I'd like to preserve the setup.
I used dd to clone it on my linux system which has IDE headers, but doing a direct dd if=/dev/sdb of=386hdd.iso doesn't seem to preserve CHS addresses so I can't mount it in DOSBox.
dd should make a complete copy of every byte of the drive, so it should just work. If it doesn't, maybe you're getting read errors that are corrupting the image? It's an old drive after all...
The sync and noerror options will pad read errors with zeroes to keep the image integrity intact even if dd can't read the drive properly. These options are often suggested for making disk images, especially for older/bad disks.
You have to record the CHS values manually if you want to mount a HDD image with DOSBox, they're only automatically pulled from the image file if you're mounting a floppy.
dd should make a complete copy of every byte of the drive, so it should just work. If it doesn't, maybe you're getting read errors that are corrupting the image? It's an old drive after all...
Checked it using chkdsk, 30 years old, 50538 clusters, no errors/bad sectors. Quietly chuffed with that if I'm honest.
jmarsh wrote:
You have to record the CHS values manually if you want to mount a HDD image with DOSBox, they're only automatically pulled from the image file if you're mounting a floppy.
You're on the money here. It would appear I'd calculated the CHS parameters wrong. Recalculated and it just booted. Made sure to use -t hdd and -fs fat too, can't remember if i did this last time or not.
The sync and noerror options will pad read errors with zeroes to keep the image integrity intact even if dd can't read the drive properly. These options are often suggested for making disk images, especially for older/bad disks.
Just in addition to my previous message, the aim is to make a bootable drive. The method I've used means it's not bootable. "Missing Operating System" error. Will try the sync command. Why do you say bs=64k and not 512 though?
The sync and noerror options will pad read errors with zeroes to keep the image integrity intact even if dd can't read the drive properly. These options are often suggested for making disk images, especially for older/bad disks.
Just in addition to my previous message, the aim is to make a bootable drive. The method I've used means it's not bootable. "Missing Operating System" error. Will try the sync command. Why do you say bs=64k and not 512 though?
No real reason, you had specified no block size at all in the OP so I just thought I would increase the block size a bit to speed things up. 😀
But... A full image made with dd includes the boot sector (which is located in the first 512 bytes of the disk) so it should boot. There's no magic to a bootable drive, since you've copied every byte off the disk, everything including the boot sector, bootable flags and partition tables is there. The only thing that isn't, as you discovered, is the drive geometry metadata (C/H/S) which would be stored in BIOS on a real PC.
You should not use -fs fat when trying to boot off a full disk image. Remember that you're dealing with a full disk image, not a partition image. The disk as such does not have a file system, file systems only come into play once you get down to partition level.
I'm not really familiar with the process DOSbox uses to boot whole hd images but reading the docs from here it looks like it should be something like:
No real reason, you had specified no block size at all in the OP so I just thought I would increase the block size a bit to speed things up. 😀
Fair enough, I must have broken something then as I do all that and I get a "Missing Operating System" error, but the iso itself can still be opened as an archive using 7zip. Makes sense about the partition vs drive statements though. Thank you!