On Sun, 13 Sep 2009 09:13:21 +0200, Dirk Heinrichs wrote:

> You can then first take an image of the partition:
> 
> dd if=/dev/sda1 of=firewall.img
> 
> This image can then be mounted and modified as needed:
> 
> mkdir /mnt/firewall
> mount -t ext2 -oloop firewall.img /mnt/firewall
> [do modifications inside /mnt/firewall]
> umount /mnt/firewall
> 
> then write it back to as many other CF cards you need:
> 
> dd if=firewall.img of=/dev/sdX1 (replace X as appropriate)
> 
> There should also be a possibility to copy the MBR with dd, something
> like
> 
> dd if=/dev/sda of=mbr.img count=512 (not sure about the count value,
> though).
> 
> and write it back with
> 
> dd if=mbr.img of=/dev/sda.
> 
> The only thing left is the automatic partitioning.

Alternatively, set everything up as you need to start with, then dd the
entire device, including partitioning and bootloader, with

dd if=/dev/sda of=firewall.img

If you need to make changes to network or other settings for each setup,
do that after you have copied the image to the new disk.

-- 
Neil Bothwick

Microbiology: staph only.

Attachment: signature.asc
Description: PGP signature

Reply via email to