Disk images with dd
David Woyciesjes
woyciesjes at sbcglobal.net
Wed Apr 12 17:01:00 UTC 2006
Antony Gelberg wrote:
> Daniel Carrera wrote:
>
>>Hello all,
>>
>>Alright, I've made an OEM installation I'm happy with. The next step is
>>to make a disk image, and figure out how to apply it to other disks.
>>
>>1) Make a disk image:
>>This is the easy part.
>>
>>dd if=/dev/hda1 | gzip -c > ubuntu_oem.img.gz
>>
>>2) Put the image into another hard disk.
>>This is the hard part.
>>
>>gzip -c -d < ubuntu_oem.img.gz | dd of=/dev/hdb1
>>
>>Questions:
>>* What if the partition hdb1 is not identical to hda1?
>
>
> Indeed. You have made a partiton image by the way, not a disk image.
> dd is not necessarily the best tool for this.
>
>
>>* I still need to make the swap by hand with fdisk, right?
>>* What about the MBR in hdb? (remember, hdb is destined for another
>>computer).
>>
>>Help?
>
>
> You can use aptitude (or apt-cache) to search the package repository.
> aptitude search image reveals (amongst other thing) systemimager. You
> might like it.
>
The dd command copies every bit, including empty space. I would use
something like Norton Ghost or partimge to create an image file of the
whole drive. Both I believe allow you to increase the size of the
partitions as you restore the image to a new drive.
--
--- Dave Woyciesjes
--- ICQ# 905818
--- AIM - woyciesjes
More information about the ubuntu-users
mailing list