Backing up and restoring with dd -
Fascia - 01-22-2020
I have the drive from my O2 in the second disk slot of my Tezro and want to back it up. I just did
Code:
dd if=/dev/dsk/dsk0d2vol of=o2.img
and I get a .img file the size of the disk. But if I reverse those arguments to write the image to a new disk, it seems to just run forever. Am I doing it wrong? I also appear unable to mount the .img file with
Code:
mount -o loop o2.img /o2
but I'm not sure if that's a limitation in IRIX's mount command or an incorrectly made image.
RE: Backing up and restoring with dd -
Fascia - 01-22-2020
As an aside, the drive is from a Phillips CT terminal running MxView. I wasn't expecting there to still be patient data on this thing after 20 years.
RE: Backing up and restoring with dd -
jpstewart - 01-22-2020
Is the new disk you're writing to the exact same make & model as the one you're copying from? If not, then I don't think your dd command will work the way you're expecting.
You're copying the volume header, partition structure, everything from the old disk by using the dsk0d2vol device. So the new disk will have to be an exact match for the old one. If it's not, you're better of following Ian Mapelson's disk cloning guide (
http://www.sgidepot.co.uk/disksfiles.html#CLONE) to properly partition the new disk and create the proper volume header for it. Even if the old and new disks are identical, I'd still recommend following Ian's guide rather than trying to dd raw volumes since his method always works.
And you certainly won't be able to loopback mount the image. I don't think IRIX supports loopback mounts at all. And even on a system that does support them you've got more than one partition (i.e., volume header, swap, and root filesystem for sure, maybe another filesystem too) in the image the way you've created it from the whole disk. You'd need to dd out the individual partitions/filesystems in order loopback mount them. (Or add more mount parameters to specify filesystem offsets and sizes within the whole disk image.)
RE: Backing up and restoring with dd -
Raion - 01-22-2020
xfs_dump can be used to backup data.