How to used losetup with two external hard disks

sorry for my English…

I rescue data(Films) from my external hard disks with ddrescue and it has now to be called rescue.img it is stored on an external hard disk.

Now I will mount rescue.img as here

losetup -f
losetup /dev/loop0 /path/rescue.img
mount /dev/loop0 /mnt/dir

Because my rescue.img has 2TB and my external hard disk has only 3TB, I will it to mount to other external hard disks.

My question, how to mount my rescue.img to the other external hard disk?

Can Please someone to explain to me, how to does it with easy words, Thanks!

Hello!

You should mount the bigger disk and then mount the loop device to it.

I don’t know which OS you’re using, but it’s some kind of Unix, so this should work:

  1. Connect the external drive.
  2. Check if the disk is mounted. If it is, then copy the path it’s mounted, otherwise mount it. To check if the device is mounted, run lsblk and find the disk that matches (should have a similar capacity).
  3. To mount the external drive (if not mounted), run:
sudo mkdir /mnt/external
sudo mount /dev/sdb1 /mnt/external

This assumes your drive has only one partition and the device is sdb, which depends on how many drives you have.

  1. Create a folder under the external drive: sudo mkdir /mnt/external/rescue
  2. To mount the rescue disk:
sudo losetup /dev/loop0 rescue.img
sudo mount /dev/loop0 /mnt/external/rescue

Now you should have access to the data. The steps may vary depending on Your OS and how it’s configured, but it should give You some hints :smiley:.

@bbwd345
You can do this to mount your rescue.img image.

mkdir /mnt/disk
mount -o loop rescue.img /mnt/disk
cd /mnt/disk/

Then you will see your files. Copy them to a place where you have enough space.

Thanks for you answer!, sorry because bevore not answer your, but forget this question…

1 Like