8

I recently got my hands on an IBM 340 PC (100MHz Penitum, 16MB of RAM). I'm going to wipe the disk and start fresh, but I wanted to preserve the contents of the disk should I wish to restore it to it's previous state in the future.

I removed the drive and connected it to another machine where I used a windows build of dd to create an image like so:

dd if=\\.\Volume{aef46cf9-3e3d-11de-b8c6-806d6172696f} of=raw.img bs=1M

I've found a way to mount that image in my modern PC and can browse the content and it all looks great. Just to be sure things were as expected I tried converting that raw image to a vhd format so that I could try and boot the drive in Virtualbox.

However, Virtualbox comes up with the standard "Invalid system disk" message you get when a bootable partition isn't found, so my question is whether this is a limitation of Virtualbox with an image of an old FS (I'm assuming it's FAT16) or is it likely that there's something wrong with the image and I should try to create one again before I change anything on the old hard drive?

  • Could you please provide the dd command that you used to capture the image? I can analyse partition tables and boot records to work out what's going wrong, but it's a two-step process: first you need the MBR (sector 1 of the physical drive, NOT volume), then the boot record of the volume in question (variable, determined from the MBR). – John Burger Jul 14 '16 at 1:32
  • Added the command I used (borrowed the volume ID from online).... I'm guessing 'volume' is the key word here meaning I didn't grab the MBR? – Matt Lacey Jul 14 '16 at 1:47
  • 2
    Sorry, yes. The MBR is the first sector of the physical drive, which defines the volumes on the drive. Multiple volumes? Multiple entries in the MBR, which is outside all the volumes. You needed to dd the \\.\PhysicalDrive# (whatever # was). – John Burger Jul 14 '16 at 1:56
  • Yeah that makes sense. I had memories of the paths looking different to the one I used but it had been ages since I played with raw disks in Windows. Will try that tonight! If you can summarise this as an answer I'll readily accept! – Matt Lacey Jul 14 '16 at 1:59
  • Also, I'd be surprised if the blocksize is really 1M for this harddisk, usually it's 512k. If things go wrong, you can miss some blocks at the end if your blocksize is too high. – dirkt Jul 14 '16 at 6:10
9

When you used dd, did you capture it from the first physical sector? Or did you merely grab the volume of interest?

If you did it on \\.\Volume{$$$$$$$$-$$$$-....}, then you only got C:, not the whole disk. You need to do it on \\.\PhysicalDrive# (whatever # it is) to get everything - including the Master Boot Record (MBR) which is in the first physical sector.

  • Just for completeness: using the Windows version of dd resulted in an error at any block size, but only using 512 could I get the full image of the disk. The image doesn't boot in qemu (there's a kernel panic halfway through Win 95 startup) but that means it's good enough for my purposes. – Matt Lacey Jul 18 '16 at 13:19
  • Sanity check to do on that kind of disk image: Will a partitioning tool (eg fdisk) recognize a partition table on the image? – rackandboneman Sep 17 '17 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.