1 |
On Sun, 13 Sep 2009 09:13:21 +0200, Dirk Heinrichs wrote: |
2 |
|
3 |
> You can then first take an image of the partition: |
4 |
> |
5 |
> dd if=/dev/sda1 of=firewall.img |
6 |
> |
7 |
> This image can then be mounted and modified as needed: |
8 |
> |
9 |
> mkdir /mnt/firewall |
10 |
> mount -t ext2 -oloop firewall.img /mnt/firewall |
11 |
> [do modifications inside /mnt/firewall] |
12 |
> umount /mnt/firewall |
13 |
> |
14 |
> then write it back to as many other CF cards you need: |
15 |
> |
16 |
> dd if=firewall.img of=/dev/sdX1 (replace X as appropriate) |
17 |
> |
18 |
> There should also be a possibility to copy the MBR with dd, something |
19 |
> like |
20 |
> |
21 |
> dd if=/dev/sda of=mbr.img count=512 (not sure about the count value, |
22 |
> though). |
23 |
> |
24 |
> and write it back with |
25 |
> |
26 |
> dd if=mbr.img of=/dev/sda. |
27 |
> |
28 |
> The only thing left is the automatic partitioning. |
29 |
|
30 |
Alternatively, set everything up as you need to start with, then dd the |
31 |
entire device, including partitioning and bootloader, with |
32 |
|
33 |
dd if=/dev/sda of=firewall.img |
34 |
|
35 |
If you need to make changes to network or other settings for each setup, |
36 |
do that after you have copied the image to the new disk. |
37 |
|
38 |
-- |
39 |
Neil Bothwick |
40 |
|
41 |
Microbiology: staph only. |