-
Using hard drive image files and gparted
I have been doing a lot of fiddling with hard drive image files and gparted and I'd like to share what I've figured out.
You can make an image file of a hard disk with dd like so:
dd if=/dev/hda of=/mnt/a/MYIMAGE.IMG
then you can mount it using a loop device with losetup:
losetup /dev/loop0 /mnt/a/MYIMAGE.IMG
then you can run gparted using that loop device, specifying the devices you would like to use:
so if I'd like to copy partitions between an image file on /dev/loop0 and my hard drive on /dev/sda:
gparted /dev/loop0 /dev/sda
also if you have multiple loop devices you can use:
gparted /dev/loop0 /dev/loop1 /dev/sda
and when you wish to disconnect from the loop device just use:
losetup -d /dev/loop0
One thing I should mention: Knoppix 6.3 seems to require specifying loop.max_part=8 as a kernel parameter on the command line to get gparted to work right. Knoppix 6.2 doesn't seem to require this to work properly. Perhaps the version of gparted with 6.3 is a bit more finicky.
Anyway, have fun imaging and editing with gparted.
Don
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Kingston 32GB 64GB 128GB 256GB USB 3.0 Flash Drive Thumb Memory Stick Pen lot
$285.90

2021 Full Version Office Professional Plus for 1 PC Flash USB Drive
$59.99

Microsoft Windows 11 Pro 64bit - New Sealed – Flash USB 1 PC
$49.99

1/ 10/ 100pcs USB 2.0 2GB, 4GB ,8GB ,16GB ,32GB ,64GB 128GB USB Flash Drives Lot
$269.10

USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack
$826.09

Lot 5/10pcs USB Flash Drive Memory Stick 1MB-64GB Pendrive Thumb Drive 8GB 32GB
$282.00

USB Type-A Flash Drive Metal Memory Stick High Speed USB Drive 128GB 256GB 512GB
$8.47

Wholesale 5/10/100PCS 1MB- 64GB USB 2.0 Flash Drive Memory Stick Jump Drive Lot
$385.00

Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet
$147.00

128GB USB 14-in-1 MacOS bootable Installer repair recovery tech support service
$39.99