Hi Banita,
First you should check that the iso is ok, cause if it isn't we can't help you. I'm not sure where you stored the .iso. Is it on an external HDD? The method I'm going to outline uses the command line, not the GUI. You need to know or learn a little bit about paths and directory structure to complete it using this method.
Let me assume your iso file is stored on /dev/sda1, and /dev/sda1 is mounted on /media/sda1. So in this example, the filename of your iso would be /media/sda1/USB_backup.iso. Replace this with the correct path to your iso in the examples below.
To check the status of the iso, you need to mount it somewhere then go poke around in the mounted system to make sure all the files you expect to be in the iso, really are in the iso:
Code:
cd # Change to your home directory
mkdir tempMount # Make a temp directory for mounting the iso
sudo mount -o loop /media/sda1/USB_backup.iso tempMount # mount your iso file at the temp directory.
cd tempMount
ls -la # Make sure the files in your iso are ok
You'll need to enter your password at any line with sudo, which executes the command with root priviledges. At this point you should poke around in tempMount to make sure your files are all right. If this step doesn't work, the rest of the stuff below won't work either. After you've confirmed that your files are there, unmount it again:
Code:
cd
sudo umount tempMount
To restore the iso, you need to an empty USB of the same size as the one that you backed up. This USB will be overwritten by the backed-up ISO. When you insert it, Ubuntu will likely auto-mount it. Unmount it from the file-manager window by clicking on the eject icon. Now you need to know the name ubuntu assigns to your USB. Use the fdisk command:
This will give you an overview of all storage devices that ubuntu can find on your system. You need to locate the new USB drive from among these. Don't get this part wrong, because the next step is going to overwrite the storage device you choose. You should also check that the size of your iso file, is the same as the size of the USB device you are trying to restore it to. I'll assume your device is /dev/sdx which is most likely not a real device on your system, but you should replace it with the name of the device that you found with the fdisk command above. If should be something like /dev/sdb or /dev/sdc
Now comes the dangerous part: copying the iso back onto your destination device. You need to be careful you get the destination correct, because it is all too easy to wipe off your internal drive by typing /dev/sda instead of /dev/sdb for example and lose all your data. Be very careful here, you have been warned.
Code:
sudo dd if=/media/sda1/USB_backup.iso of=/dev/sdx
This command copies, byte-for-byte, the contents of USB_backup.iso to the device that ubuntu identifies as /dev/sdx, that you found above using the fdisk. This command will take a long time to complete, could be an hour or more depending on your transfer rates and size of the device you're restoring. I can't overemphasize how careful you need to be before pressing enter to this command. When I do this for big restorations, I sometimes like to check to make sure that it is restoring appropriately and get an update of the progress. The below commands are not necessary, but can be reassuring to know things are proceeding. You can skip it if you don't feel comfortable.
The dd command can receive a signal that will cause it to dump it's progress status, if you give it the appropriate signal. To give the signal you use the kill command, but the kill command needs to know the process id (PID) to send the signal to. Leave the dd command running in one terminal window, and open a second window and type:
pgrep will find and report the PID's for processes with dd in the name. It is likely that there will be more than 1 such process, you need to locate the process and get the ID for the dd command you executed above, which should be an integer greater than zero. Once you have this number you send a signal to dd that will ask it to tell you its progress status with the kill command:
where PID is the ID you found above with pgrep command. Now go back to the window where dd is still running. You'll see some information appeared on the screen that will tell you how much it has copied, and how fast it is going. You can get an estimate of how long it's going to take.
When the dd command is finished, you should have the contents of the backup.iso restored onto the USB device. If your USB was bootable before, you should shut down and be able to reboot your computer from your restored device.
Bookmarks