Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi.
i am running linux in a cf card (4GB) for an embedded system. that system has partitions in that cf card.
i would like to make a backup in .img of the whole cf so in case of disaster to create a new cf with the .img
the cf appears as /dev/sdb in my system.
could someone help me to create the .img backup, please?
# Zero free space:
mount /dev/sdb /some/path && dd if=/dev/zero of=/some/path/.deleteme
rm -f /some/path/.deleteme; umount /some/path
# Create a hash for the drive first:
md5sum /dev/sdb > /path/to/sdb.md5
# Now dump disk contents to file:
dd if=/dev/sdb of=/path/to/sdb.dd
# Compare hashes to ensure you got it all:
md5sum /path/to/sdb.dd
cat /path/to/sdb.md5
# Finally compress the disk image:
bzip2 /path/to/sdb.dd
# Writing back then would be:
bzcat /path/to/sdb.dd.bz2 > /dev/some/device
Hi. it seems to work for me really good.
the only issue that i mentioned is that the original cf might be 2gb and the replacement card will be bigger size (eg 8gb). how could i make full use of the extra space? it would be really nice to resize the partitions in an easy way.
I'd remove the cf from the system to do all of this. I wouldn't use your embedded to load the OS use a different system on a cf card reader.
If you originally had a 2G it may be possible to dd or clone it to a larger drive. You can maybe just burn it and test to see if it will work. In almost all cases you need to run check file program on the cloned drive. Knowing what filesystem would help to select the correct app.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.