I currently have an embedded video server that I developed using embed linux, c and c++. I currently have our assembly line workers flash the ide drives from a usb flash drive like so:
dd if=/dev/sdb1 of=/dev/sda1.
Yesterday, I accidentally erased one of my new versions of the O.S. and software when I reversed IF and OF. Anyhow, I decided to start storing a copy of the firmware to our fileserver so, 1. They don't need to use the usb flash drives anymore (very slow), then they could just use the file server's file in the flash and 2. I don't accidentally erase one of my dev images again.
My question is a simple one. 1st, is there a better way to do this? 2nd, As I am currently doing it, should I use a file extension and what should it be?
Edit
Also, can I do the flash in such a way that it copies over the mbr? I am tired of installing grub on each ide.
In the past I've seen firmware images with
.image
or.img
or.bin
- take your pick. I quite like mailq's suggestion of.dd-image-of-my-system
as it's at least verbose, and file extensions are irrelevant for things likedd
images, and with tab-completion they shouldn't have any issues typing it out.As for storing it on a file server, this sounds like a very wise idea. I assume your file server is backed up and also on RAID? If so, you probably should have been doing that from the beginning.
Next step - make your firmware update itself via FTP so your users don't have to manually interact at all ;)
Common
.img
is used for an disk image of some sort. If the image is smaller than 20GiB you can compress it also on the fly like this;dd if=/dev/SOURCE | gzip > /BACKUP_PATH/image.gz
Pro: a smaller dd image, Con: takes longer to restore
restore the image like this;
gzip -dc /BACKUP_PATH/image.gz | dd of=/dev/SOURCE