John . wrote:
Hello misc,
I want to install OpenBSD/amd64 on my laptop (a recent Toshiba amd
turon with 3GB RAM) and ONLY have OpenBSD on it, but before I do this,
I need to know how I can image the disk and restore it subsequently.
It has vista on, and I may need to restore vista should I subsequently
need to sell the laptop at some future date.
The hard disk was partitioned and formatted at the manufacturers. The
first primary partition is not visible as usable space - I think this
if from where the OS was prepped.
Has anyone had this scenario, if so, what did you use to image the
data? Have you restored it since?
yep, just did this with my Acer Aspire One...
Isn't it great how computers these days come with:
great gobs of crapware already loaded.
no good way to rebuild the system from scratch as it should be.
but yes, imaging the existing disk is not a big issue:
In my case, I plugged a USB HD into the thing, booted from an OpenBSD
flash drive (think: "live CD", only a lot easier to make, smaller, much
more useful, more rugged, ...), then something like this:
dd if=/dev/rwd0c bs=1m |gzip -o disk.img.gz
You want the 'r' in there, rwd0c is the entire disk. The bs=1m makes it
less painfully slow (it will take a while, but leaving off the bs= line
will really, really hurt you), and since most of your disk is blank
and probably filled with zeros, the compression will rock.
Another very good option is g4u, which will allow you to image off
individual partitions, so rather than pulling down a 250+G disk, you
just pull the 10G restore partition...much faster, and goes over
the 'net.
Also (and I should put this in the FAQ), see gparted. In my case, I
wanted to keep a Windows partition (it's amazing...people looking for
Unix administrators want resumes in Word format. *sigh* OOo is
good, but I don't trust its formatting to look as I expecte when a
document is brought up in Word), gparted allowed me to shrink the
existing windows partition down and put OpenBSD in the freed space.
gparted did a good job of chopping down the Windows partition to a
much smaller size.
Personally, considering the size of a modern disk, I'd just keep
the restore partition on the disk and not worry about it. Still,
having an image available isn't bad in case you alter a little too
much and the restore magic stops working.
btw: another thing to consider is considering the price of a new
huge disk, just pull the existing disk out of the computer, and
replace it. If something goes wrong with the machine, put the
factory disk back in, and now you can say in very clear conscience,
"if it is a software issue, it is YOUR software issue". Putting
that question to rest might be worth the $80. :)
Nick.