Quote:
Hi,
I need save my customized ubuntu maverick (desktop background, same script, ecc..) to img using dd command (on external SD card).
Can I creating image from running system target?
How Can I do?
Thanks,
Michele
You cannot take an image from a running system target. You must boot some other way, mount the target drives in that other operating system, and make your image that way.
If you're using the internal PATA SSD to set up your image, you can boot from SDHC card to do this, if you use the Maverick installer image it will drop you into a shell if you hit "N" when it asks you to destroy the system. The username and password are in the manual (oem/oem). The great thing about the Maverick installer card is it's only 2GB in size, so if you have a 16GB SDHC you can back up all of PATA onto a 14GB partition;
Code:
(logged in as oem:)
sudo parted /dev/mmcblk0
(in parted:)
mkpart primary 2GiB 100%
print
quit
(in shell:)
sudo mkfs.ext4 /dev/mmcblk0p3
sudo mount /dev/mmcblk0p3 /your-mount-point
Simply dd it to your new filesystem. I would not recommend trying to compress it on the Efika, it will take forever with a decent compression tool and you lose accurate accounting of just how long it would take. I believe I installed dcfldd on the installer card, so you can do this:
Code:
sudo dcfldd if=/dev/sda of=/your-mount-point/myssd.backup bs=4M status=on statusinterval=4
And it will give you progress on how many 4M chunks it has done so far (4M just happens to be an ideal transfer size for the SSD or SD card alike)
Just take it to another Linux box and compress it there from the SD card to somewhere safe.
However, I would actually not bother making DD images of your system as they are not flexible and you WILL take filesystem errors with you in the disk image (something a fsck before imaging might fix) and you will also take every "unallocated" block that has random data in it, making your images huge and uncompressable. It is much safer to use a tar archive from the mounted image, and all these scripts are in /home/oem on the Maverick SD card. This is how we install the system (from tar.xz file) so in actual fact you could replace the tar.xz on the SD card with your backup and you will have a custom installer card that will install your nice, configured system. /home/oem/oem-installer is the script to look at to edit for the filenames, and /home/oem/maketarball.sh should make your tarball from the PATA SSD, it has some fairly reasonable arguments, WILL give you a progress bar, and WILL use a selectible compression :)
The reason we provided that stuff was to help people to do exactly what you want to do.