LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disk image to USB (https://www.linuxquestions.org/questions/linux-newbie-8/disk-image-to-usb-915497/)

JRinKC 11-25-2011 08:57 AM

Disk image to USB
 
I have Peppermint running on my Aspire, and I want to make a disk image of my current installation. I don't have a CD attached. Can I use DD or some other utility to make a .ISO on a USB drive?

Remember, I'm new to Linus, so I need pretty specific instructions...

Thanks!

MS3FGX 11-25-2011 09:19 AM

You can make an image of the entire drive to a file, though keep in mind that you wont be able to open that image easily later on. If you want to make a backup that you can mount later and get files out of, you will need to image just individual partitions. A "dd" backup of the entire drive is only good for completely restoring the machine to a previous state.

Also, you can't make an image of a running system and expect to then be able to recover from that image later. There are many files that are in a different state when the machine is running than when it is shut down, and files are constantly being modified while the machine is in operation anyway. To get a usable backup, you will need to boot the machine to a live environment first so that the OS is shut down and nothing is changing.

If you don't have a CD drive, then things are a little more complicated. I would normally say to boot into a live CD and write the image that way, but it looks like in your case you will need to boot to one USB drive and write to a second one. Performance of this setup is probably going to be pretty bad due to the shared bandwidth nature of USB devices.

JRinKC 11-25-2011 10:03 AM

Ok, I understand that. My aim is to have an image that I can restore later, if I hose my current setup.

I don't have a CD handy that I can attach, but I do have an external USB HD attached, where I store all my files, just in case I need to replace the OS. I also have USB sticks available. So, I can boot from a USB, and write to the HD. I can then transfer the .ISO file from the HD to my network, and can use unetbootin to make a bootable USB version of my current system. Or, just restore it, correct?

jschiwal 11-25-2011 10:44 AM

It won't be an image of a CD (iso 6990 image), but an image of the hard drive. If the image is larger than 2GB, make sure you don't use the FAT32 filesystem to save the image file.

sudo dd if=/dev/sda of=/mnt/usbdrive/aspire.img

You may want options for a larger block size, to speed things up.
Another program you could use is ddrescue:
sudo /bin/dd_rescue /dev/sda /mnt/usbdrive/aspire.img

It seems to run fast, and if there is an error reading a block on your hard drive, it will reduce the block size, and it won't abort.

Doc CPU 11-25-2011 11:50 AM

Hi there,

Quote:

Originally Posted by jschiwal (Post 4533762)
It won't be an image of a CD (iso 6990 image), but an image of the hard drive.

you said this to point out that .iso isn't an adequate file extension, I guess. Then you missed the point. ;-)

Quote:

Originally Posted by jschiwal (Post 4533762)
If the image is larger than 2GB, make sure you don't use the FAT32 filesystem to save the image file.

The file size limit of FAT32 is 4GB, not 2GB. But that hardly matters - most HDD partitions will probably be larger than 4GB anyway.

[X] Doc CPU

JRinKC 11-25-2011 02:53 PM

I don't suppose there is some nice GUI app that will let me do this? I can boot Peppermint from a thumb drive, and send the image to a USB hard drive. I'm only copying the SSD in the Aspire.

jefro 11-25-2011 04:51 PM

Would be nice to have a small gui that asks where from and where to and then asks for a compression level.

Basically the command line is "dd" (copy) "if" (is from) "of" (is to)

If you want at the end you can include a | (pipe) gzip

That means, while you copy (dd) I want you to compress the file so I don't end up with a large file..

Might post a question on programming for this. I'd think that someone would be able to make a small app in a few minutes that does this.

I will say this however. I would suggest you boot to a usb flash drive. Then use dd or some app to copy data off to a second flash drive. Clonezilla can be put on a flash drive that may be fine for your use.


All times are GMT -5. The time now is 06:38 AM.