Difference between revisions of "Image Special Drives"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(Created page with " killall udiskie Use a filesystem with CRC Checking. sudo dd if=/dev/sdc of=DEVICE.IMAGE bs=64M iflag=dsync oflag=dsync")
 
(Mount Loop Image)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
Use a filesystem with CRC Checking.
 
Use a filesystem with CRC Checking.
 
  sudo dd if=/dev/sdc of=DEVICE.IMAGE bs=64M iflag=dsync oflag=dsync
 
  sudo dd if=/dev/sdc of=DEVICE.IMAGE bs=64M iflag=dsync oflag=dsync
 +
 +
Make more then one image, then sha512sum the images to make sure you have the good data.
 +
 +
=Mount Loop Image=
 +
*read/write
 +
losetup --partscan --find --show disk.img
 +
*read only
 +
losetup --partscan --find --show --read-only disk.img
 +
*mount
 +
mount /dev/loop0p1 /media/temp
 +
 +
*remove loop device
 +
losetup -d /dev/loop0
 +
 +
=Save and Restore Partition Tables=
 +
pacman -Sv gptfdisk
 +
*backup
 +
sgdisk --backup=<file> <device>
 +
*restore
 +
sgdisk --load-backup=<file> <device>
 +
*list
 +
gdisk -l <device>

Latest revision as of 17:43, 22 November 2014

killall udiskie

Use a filesystem with CRC Checking.

sudo dd if=/dev/sdc of=DEVICE.IMAGE bs=64M iflag=dsync oflag=dsync

Make more then one image, then sha512sum the images to make sure you have the good data.

Mount Loop Image

  • read/write
losetup --partscan --find --show disk.img
  • read only
losetup --partscan --find --show --read-only disk.img
  • mount
mount /dev/loop0p1 /media/temp
  • remove loop device

losetup -d /dev/loop0

Save and Restore Partition Tables

pacman -Sv gptfdisk
  • backup
sgdisk --backup=<file> <device> 
  • restore
sgdisk --load-backup=<file> <device>
  • list
gdisk -l <device>