[Voyage-linux] Cloning a system

Frank Hoeflich (spam-protected)
Thu Mar 8 02:21:07 HKT 2012


Stanislav:
    While I agree that cloning your ro system live ought to work, I didn't spend much time on it.  Once I have a CF that works OK then I clone offline:
host# dd if=/dev/sdb of=mycf.bin bs=512 count=3931200host# eject /dev/sdb<switch CF in /dev/sdb to a new one><format new CF however you like>host# dd if=mycf.bin of=/dev/sdb bs=512 count=3931200host# eject /dev/sdb
Then the new CF works just fine.  You'll have to adjust the count for your device.  Is this good enough for you?
    On my last project we went a step further and modified the SDK to produce a regular file from the gitgo, so you directly produce mycf.bin and then dd it to CF whenever you want to make a copy.  Works great in Voyage 0.6.5 and 0.7.5 once you get past a couple of known grub legacy (v0.97) bugs, haven't verified in 0.8.0 yet ...

--Frank

--- On Wed, 3/7/12, Stanislav Sinyagin <ssinyagin at yahoo.com> wrote:
From: Stanislav Sinyagin <ssinyagin at yahoo.com>
Subject: [Voyage-linux] Cloning a system
To: "voyage-linux at list.voyage.hk" <voyage-linux at voyage.hk>
Date: Wednesday, March 7, 2012, 9:36 AM

hi,
I'm trying to clone a live system to a new CF, and GRUB fails. Please advise, as I'm not a too deep specialist in Grub.
My sequence is as follows. The board is alix2d13 from PC Engines. The new CF card is attached via USB card reader at /dev/sdb.
remountro
/usr/local/sbin/format-cf.sh -t /dev/sdb -b 1 -y
mkdir /tmp/cf
mount /dev/sdb1 /tmp/cf
cd /tmp/cf
dump -f - /dev/hda1 | restore -r -f -


That was easy, and now Grub fails:
root at alix102:~# /usr/sbin/grub-install --root-directory=/tmp/cf /dev/sdb
The file /tmp/cf/boot/grub/stage1 not read correctly.root at alix102:~# ls -al  /tmp/cf/boot/grub/stage1
-rw-r--r-- 1 root root 512 Mar  7 17:31
 /tmp/cf/boot/grub/stage1
root at alix102:~# 


The system is 0.8.0 release.

-----Inline Attachment Follows-----

_______________________________________________
Voyage-linux mailing list
Voyage-linux at list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20120307/1c76197d/attachment.html>


More information about the Voyage-linux mailing list