0

I am trying to recover data from my hard drive and then mount it, with the first part I have cleared up more or less, I will do it with ddrescue, with the second not so much ... I found a solution to mount, but I have some difficulties to understand it:

losetup -f # this will print the first available loop device ex:/dev/loop0
losetup /dev/loop0 /path/file.iso #associate loop0 with the specified file
mount /dev/loop0 /mnt/dir #It may be necessary specify the type (-t iso9660)

My problem is with last line:

mount /dev/loop0 /mnt/dir #It may be necessary specify the type (-t iso9660)

The question is with dir, what would it mean to say here, my iso image or the name that I would give it, or is it a file that the person does not say, I have to do it before, for example with sudo mkdir /mnt/dir

Please explain my mistake in easy words.

1

The question is with "dir", what would it mean to say here, my "iso" image or the name that I would give it, or is it a file that the person does not say, I have to do it before, for example with sudo mkdir /mnt/dir

"/mnt/dir" is not the ISO image or disk image. "/mnt/dir" needs to be an empty directory.

Your Linux install should have created "/mnt" as an empty directory. It is meant to be used for temporary mounts like this. If "/mnt" is empty, you can just use "/mnt".

Sometimes "/mnt" might not be empty. For example, if you have directories inside it like "/mnt/usb" and "/mnt/dvd". If so, then you can create an empty directory for example with sudo mkdir /mnt/recover. Then you can use the directory you created in the mount command.

  • Very Thanks for your answer!, you think on the answer from a0f3dd13 should i create this directory ? – dsaj34v Sep 30 at 9:26
  • ....and very Thanks for my English correction.. – dsaj34v Sep 30 at 9:30
  • @dsaj34v If ls /mnt shows there are no files or directories in /mnt, you could use /mnt. But, you can create /mnt/dir or for example /mnt/recovery instead if you like. Creating and using /mnt/dir should not cause any problem. – sourcejedi Sep 30 at 9:40
  • thanks!, I wish your a nice Day! – dsaj34v Sep 30 at 9:43
  • @dsaj34v The words "recover my hard drive" suggest you are not having a very good day. But I wish you a good one too! – sourcejedi Sep 30 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.