March 30th, 2006, 10:12
I wanted to have a full image backup of my WRAP in preparation for upgrading to OpenBSD 3.9 so I did the following on my OpenBSD server:

# nc -l 9000 | dd of=/usr/data/Backups/wrap_backup-210306.img

Then on the wrap:

# dd if=/dev/rwd0a | nc 9000

35 mins later and I have a 977MB image on my server. Next I wanted to check if it was actually OK so I did the following:

# sudo mkdir /mnt/wrap-image

# sudo vnconfig -c /dev/svnd0c /usr/data/Backups/wrap_backup-210306.img

# sudo mount -o ro /dev/svnd0c /mnt/wrap-image/

I could then view the filesystem fine, and all looks OK so to finish up I did:

# sudo umount /dev/svnd0c
# sudo vnconfig -u /dev/svnd0c

The question is, if for any reason my CF card becomes bad/corrupted, can I just dd this image back to a new 1GB CF card and it will boot just as it did before? I don't have a spare at the moment to test this. I should have my hands on one sometime next week.

Cheers z0mbix

March 30th, 2006, 10:31
That should be /dev/rwd0c (entire disk instead of just the a partition) if you want the boot sector, disklabel, etc. but otherwise looks good.

Did you use the entire capacity of the flash when you created the image? I always try to make my image a hair smaller than full capacity just in case the replacement isn't exactly the same size. You might make an image and the disk is actually 128.8Mb but the replacement is 128.3Mb. A 126Mb image would work on either and seems like a safer bet. :wink:

March 30th, 2006, 10:56
I see. I'll try again using /dev/rwd0c and making it a slightly smaller image. Thanks Strog

March 30th, 2006, 11:46
OK, have just tried using /dev/rwd0c and get this on the server:

1335606+1332553 records in
2001888+0 records out
1024966656 bytes transferred in 2079.022 secs (493004 bytes/sec)

and this on the wrap:

dd: /dev/rwd0c: Input/output error
2001888+0 records in
2001888+0 records out
1024966656 bytes transferred in 2073.579 secs (494298 bytes/sec)

Not sure why it errored.