[Voyage-linux] Re: Question about copying Voyage installation on CFs
Gustin Johnson
(spam-protected)
Thu Oct 13 05:19:27 HKT 2011
Also CC'ing the list as this may be useful to some.
The procedure that you listed should have worked if you had
partitioned the new CF card first.
The first 512 bytes of a disk contain the MBR (Master Boot Record) and
partition table. The first 446 bytes contain the MBR while the rest
is the partition table.
If you want the process to be repeatable what I would suggest is to
make your primary partition significantly less (say 50 megabytes or so
to be safe) than the smallest card you are likely to use. Around here
I cannot buy anything smaller than a 4 GB CF card so I make my system
images ~3.9 GB.
At this point there are a couple of slightly different ways to go.
First, you could backup the original card as you described below.
Then you partition the new card with fdisk/cfdisk/parted etc. You
then restore the MBR to the major device name (eg. /dev/sdc) inverting
the command you used to backup the MBR. You then restore the
partition back to the minor device name (eg. /dev/sdc1). At this
point you should be good to go.
The second choice is to simply ddrescue one card over to the other.
If the destination is slightly smaller you may have to repair the
partition table but you should still be able to boot off the imaged
device.
If you do this often enough, something like FOG might be useful to
image these systems with. We used to do this but we now deploy so few
that we just build again from scratch using the latest version of
voyage. We do very little customization as we use the Alix SBCs as
network appliances, so things like the firewall, traffic shaping, and
multipath routing take minutes to install (just bash scripts that we
put in /usr/local/ with symlinks to /etc/init.d) and usually
everything else we need is already on the system.
Hope this helps!
On Tue, Oct 11, 2011 at 4:33 PM, Emilio Arrufat <emilio at lagalera.org> wrote:
> Dear Gustin,
> my name is Emilio Arrufat, from Spain. I would apologize for any
> inconvenience for sending to you this message, but I would want to ask
> you about a procedure you wrote I have found on internet about
> duplicating Voyage in CF cards of different sizes.
>
> It solves many problems I was wondering about, in particular when I
> tried to duplicate a whole, say 1GB, card to another 1GB one I found
> what you mentioned: "If you want to backup the whole drive and you are
> sure that the drives are exactly the same (even though they are both 8
> GB, they may not be exactly the same, down to the last byte), I
> usually just use ddrescue." My cards had different geometry and
> duplication did not work. So when I read from you "What I do is backup
> the MBR and partitions separately. " it sounded to me as my solution.
>
> However I have tried several times with no luck. Let me tell what I
> did and ask you if you can give me any advice:
>
> say my CF is /dev/sdc. First of all I formatted the first card with a
> size slightly minor than 1GB, not ocuppying the whole card, to avoid
> restoring on cards with a few less capacity. Installed Voyage and test
> it.
>
> Second I follow your procedure: 1) backed up the card MBR: dd
> if=/dev/sdc of=/path/to/alix.MBR.img count=1 bs=446 and 2) backed up
> the partition where Voyage is installed: ddrescue /dev/sdc1
> /path/to/alix.sda1.img
>
> Third: I partitioned the second card with a partition expanding to the
> whole capacity (hope bigger size than first card) and restored the
> MBR: dd if=/path/to/alix.MBR.img of=/dev/sdc count=1 bs=446 and the
> partition of Voyage: ddrescue /path/to/alix.sda1.img /dev/sdc1
>
> The restoring ended with no errors, but the OS does not boot up. I
> have tested it several times.
>
> Do you have any clue?
>
> I would appreciate your help,
>
> thanks in advance,
>
> Emilio Arrufat
>
More information about the Voyage-linux
mailing list