A few months ago I purchased a Microclient Sr.
I know a thing or two about Linux, but this was an adventure :)
I ended up installing DSL 4.4.10 on the CompactFlash drive.
After reading several posts in this group and the web I managed to get
it all working (yeah).
I have networking up and running and I am looking at ways to duplicate
the CF drive, just in case it fails. And perhaps make an ISO of it
that I can happily reinstall onto new CF cards.
Do any of you have experience with this?
I have available:
source: 1x Microclient Sr.
target:
Apple OSX 10.5 or 10.6;
or a laptop running DSL 4.4.10
What can you recommend to use?
1. dd command together with netcat (nc)?
2. CloneZilla?
3. ....
any links, examples etc would be highly appreciated
Thanks!
/patman
It copies the entire ext2/3 filesystem keeping all metadata intact. As
such it's something in between dd and cp/tar. I use it all the time
for replication. It's faster than dd because it doesn't copy blocks
not-in-use and it's faster than cp/tar because it follows the extfs
disk format, rather than recursing through the directory tree. Don't
be put off by the many tape-archive options you see in the man page,
it's still a good tool even though most of us moved past tape backups.
The dump and restore commands will write to/read from stdout/in
respectively using the -f - option.
Examples of use:
dump -0 -f - /dev/sda1 | bzip2 > sda1.dump.bz2
That's ^ a zero, indicating a level zero (non-incremental) backup.
To restore, you need to mkfs the new partition, mount it, cd into the
root dir and then:
cat sda1.dump.bz2 | bunzip2 | restore -r -f -
Or to clone from one partitition to another:
mkfs /dev/sdb1; mount /dev/sdb1 /mnt; cd /mnt
dump -0 -f - /dev/sda1 | restore -r -f -
This will work fine over netcat/ssh as well.
Hope this is of use.
Best regards,
Bart
> > Nicolas <nicolas...@gmail.com>
No I was talking about my original (fully functional) card,not the spare one.
/patman
On 23 feb 2010, at 19:31, Augusto Bott wrote:
> After copying the entire filesystem contents, did you install a boot
> loader (such as lilo, grub) in the new card?
>
> --
> Augusto Bott
>> --
>> You received this message because you are subscribed to the Google
>> Groups "MicroClient" group.
>> For more options, visit this group at
>> http://groups.google.com/group/microclient?hl=en
--
Augusto Bott
On Tue, Feb 23, 2010 at 09:42, Neef Herbert <neefh...@gmail.com> wrote:
My first thoughts were that the cp route wouldn't get you very far, and
that dd would be the best way to make sure you get the partition table
and MBR. On second though, I second Bart's instructions as using dump
would likely be much more efficient..
Good luck,
Kelvin
I agree. I tested cp -ar and it does the job, but leaves some additional chores to be taken care of.
I have not been able to compile dump. I run DSL 4.4.x.
Installing tcc compiler was not enough, as ./configure indicated
./configure CC=/usr/bin/tcc
...
configure: error: C preprocessor "/lib/cpp" fails sanity check
and now I am lost.
ps Sorry for this since it is not completely related with the Subject of the original message
Dump leaves some things to be done as well, most notably setting up
the boot loader. Grub works with block-offsets in its early stages,
which dd leaves intact, but tools like cp/tar/dump do not. So with the
latter, you'll always need to fix up /boot/grub/devices.lst and re-run
grub-install. Also, if your kernel parameters indicate the root
partition by UUID, you'll have to change that as well, because
whenever you mkfs, a new UUID is generated. Once more dd just copies
that over, which can be convenient.
> I have not been able to compile dump. I run DSL 4.4.x.
> Installing tcc compiler was not enough, as ./configure indicated
>
> ./configure CC=/usr/bin/tcc
>
> ...
> configure: error: C preprocessor "/lib/cpp" fails sanity check
>
> and now I am lost.
I'm afraid I can't help you there, I only use dump on debian
(apt-capable) systems.
Regards,
Bart
Thanks (dank je),
I still use LILO.
I will have a go with 'dd'.
/patman
Obviously restoring to a smaller device is a problem. Restoring to a
larger device is no problem: after I restore the filesystem I resize
it using parted.
One handy trick is to write zeros to the empty space before I compress
the image file. To do that, I mount the image, then create a file full
of zeros:
dd if=/dev/zero of=/mnt/loop/zerofile.zero bs=512
rm -f zerofile.zero
Now all the empty space has zeros in it and it will compress smaller.
If you decide to use the cp command and you are copying the active
filesystem then you should relocate the /dev directory and use the -x
switch:
cd /
mkdir /udev
mount --move /dev /udev
cp -ax / /mnt/backup_device
Remember to move the udev directory back when you are done:
mount --move /udev /dev
later,
andrew.