rpowersau at gmail.com
rpowersau at gmail.com
Thu Apr 13 13:25:12 UTC 2006
I dd the MBR onto the new drive first (with the bootloader).
Then use fdisk to create the partition (only modifies the partition tables).
Then mkfs.ext2 the new partition.
Tar up the partition I want to copy.
Untar it onto the new partition.
On 4/13/06, Daniel Carrera <daniel.carrera at zmsl.com> wrote:
> I've been working more on getting disk images, and it's not very
> straight forward. All the software available seems designed for data
> recovery, whereas what I want to do is copy a disk image onto an
> entirely new disk.
> First, the use scenario:
> An OEM wants to sell computers with Ubuntu Linux pre-installed. They
> setup one computer with Ubuntu's OEM installation. Then they make an
> image of that computer's disk and put it on many computers to sell.
> Attempted solutions:
> 1) A first attempt was to use 'dd'.
> dd if=/dev/hda of=oem_ubuntu.img
> Then put that image on every other disk. This doesn't work because the
> other disks are not necessarily identical. In fact, they generally
> aren't, they're just "similar". I tried this and the only part that
> worked was the MBR. Even if this worked, we're talking about several
> hours of copy time because dd copies all the 0 bytes.
> 2) Next attempt is to use partimage.
> Partimage actually understands the filesystem and makes an image of the
> actual files inside a partition. This has the advantage that it can deal
> with different disk geometries and disk sizes. The problem now is that
> partimage doesn't create partitions, and it doesn't copy the MBR, so the
> machine won't boot.
> 3) Next attempt: a combination of dd and partimage
> Use dd to make an image of the MBR and partimage for the filesystem.
> This is an improvement. But the MBR also includes partition information,
> not just the bootloader. And the partition information may not be
> applicable (different disk geometry). Also, we still need to actually
> create and format those partitions.
> 4) Next attempt: ??????? (suggestions?)
> I'm thinking that I might use fdisk to create the partitions. And
> perhaps use mke2fs too. But I still need a boot loader on the MBR. So
> one option is:
> * Use 'dd' to copy the bootloader.
> * Then use fdisk to create/fix the partitions.
> But this means that fdisk will have to fix a broken partition table. I
> don't know if that would work.
> Another issue is that fdisk is an interactive program. I'd need a
> non-interactive counterpart so I can write a script that automates all
> of this.
> If anyone has any ideas, please give a shout.
> /\/`) http://opendocumentfellowship.org
> /\/_/ A life? Sounds great!
> \/_/ Do you know where I could download one?
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users