This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computing:storage:disk_images [2012/12/10 11:28] gcooper |
computing:storage:disk_images [2019/10/25 09:02] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Working with Disk Images ====== | + | ====== Working with Disk Images |
- | See also: [[computing: | + | See also: **[[computing: |
===== RSYNC To Download ISO Images ===== | ===== RSYNC To Download ISO Images ===== | ||
Line 40: | Line 40: | ||
</ | </ | ||
- | ==== View Disk Partitions ==== | + | ===== View Disk Partitions |
To view disk and USB pen drive partitions, log in as root and enter. | To view disk and USB pen drive partitions, log in as root and enter. | ||
Line 54: | Line 54: | ||
Floppy Images | Floppy Images | ||
- | ==== Create an image of a floppy disk ==== | + | ===== Create an image of a floppy disk ===== |
< | < | ||
Line 66: | Line 66: | ||
</ | </ | ||
- | ==== CD/DVD (ISO) Images ==== | + | ===== CD/DVD (ISO) Images |
To mount an ISO image | To mount an ISO image | ||
Line 94: | Line 94: | ||
</ | </ | ||
- | ==== To make an ISO image from files on your hard drive ==== | + | ===== To make an ISO image from files on your hard drive ===== |
Create a directory which holds the files you want. Then use the mkisofs command. | Create a directory which holds the files you want. Then use the mkisofs command. | ||
Line 104: | Line 104: | ||
This results in a file called '' | This results in a file called '' | ||
- | ==== To verify an ISO image file to a CD disk ==== | + | ===== To verify an ISO image file to a CD disk ===== |
Use the md5sum command. Note that a difference in the md5sums does NOT guarantee a failed burn, but if the md5sums are the same, it is most probably a good disk/image. To improve your chances of a successful disk-to-image comparison, be sure to fully erase CD/RW disks (not ' | Use the md5sum command. Note that a difference in the md5sums does NOT guarantee a failed burn, but if the md5sums are the same, it is most probably a good disk/image. To improve your chances of a successful disk-to-image comparison, be sure to fully erase CD/RW disks (not ' | ||
Line 124: | Line 124: | ||
For more info, see the man pages for mkisofs, losetup, and dd, or see the CD-Writing-HOWTO at http:// | For more info, see the man pages for mkisofs, losetup, and dd, or see the CD-Writing-HOWTO at http:// | ||
- | ==== DVD (ISO) Images ==== | + | ===== DVD (ISO) Images |
You can back up a DVD (even a movie) to your hard drive and restore it easily from the Linux command line. | You can back up a DVD (even a movie) to your hard drive and restore it easily from the Linux command line. | ||
Line 154: | Line 154: | ||
</ | </ | ||
- | ==== Compact Flash or USB Key ==== | + | ===== Compact Flash or USB Key ===== |
- | === Unmount the Filesystem === | + | ==== Unmount the Filesystem |
Many newer linux distributions will automatically mount flash media once it's been inserted. You may have to unmount the media first before imaging. If you see the flash card mounted on the desktop GUI, try right clicking on the icon and selecting " | Many newer linux distributions will automatically mount flash media once it's been inserted. You may have to unmount the media first before imaging. If you see the flash card mounted on the desktop GUI, try right clicking on the icon and selecting " | ||
Line 172: | Line 172: | ||
You can usually determine the proper device name to use with '' | You can usually determine the proper device name to use with '' | ||
- | === Backup an Existing Device === | + | ==== Backup an Existing Device |
This command assumes you have a flash device ''/ | This command assumes you have a flash device ''/ | ||
Line 180: | Line 180: | ||
</ | </ | ||
- | === Restore the Device === | + | ==== Restore the Device |
You might issue the following command as root to write an image onto the CF or USB key: | You might issue the following command as root to write an image onto the CF or USB key: | ||
Line 196: | Line 196: | ||
Warning, if you are not sure where your CF device is, you could easily overwrite all data on another disk drive in your system! | Warning, if you are not sure where your CF device is, you could easily overwrite all data on another disk drive in your system! | ||
- | ==== DD Rescue ==== | + | ===== DD Rescue |
DD Rescue is a tool for disk data recovery. More info is [[computing: | DD Rescue is a tool for disk data recovery. More info is [[computing: | ||
- | ==== DD Command ==== | + | ===== DD Command |
The dd command copies data from one place to another. Sometimes cat can do the same thing (with redirection), | The dd command copies data from one place to another. Sometimes cat can do the same thing (with redirection), | ||
Line 210: | Line 210: | ||
Since dd can be easily used to munge a hard drive, it (hopefully) is a superuser-only tool. | Since dd can be easily used to munge a hard drive, it (hopefully) is a superuser-only tool. | ||
- | === Examples === | + | ==== Examples |
- | == Creating and Restoring a hard drive backup image == | + | === Creating and Restoring a hard drive backup image === |
The main options to be concerned about are if= (input file) and of= (output file). By default, dd reads from stdin and writes to stdout. Here is an example of a use for dd: | The main options to be concerned about are if= (input file) and of= (output file). By default, dd reads from stdin and writes to stdout. Here is an example of a use for dd: | ||
Line 239: | Line 239: | ||
</ | </ | ||
- | ==== Backing up your Master Boot Record (MBR) ==== | + | ===== Backing up your Master Boot Record (MBR) ===== |
You should do this before you edit your partition table so that you can put it back if you mess things up. | You should do this before you edit your partition table so that you can put it back if you mess things up. | ||
Line 253: | Line 253: | ||
</ | </ | ||
- | ==== Getting around file size limitations using split ==== | + | ===== Getting around file size limitations using split ===== |
When making images, it's possible to run up against the operating system (filesystem) file size limitations. One way to work around a given file size limitation is to use the split command. | When making images, it's possible to run up against the operating system (filesystem) file size limitations. One way to work around a given file size limitation is to use the split command. |