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.

dsaj34v
  • 177
  • 2
  • 14

1 Answers1

2

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.

sourcejedi
  • 50,249
  • Very Thanks for your answer!, you think on the answer from a0f3dd13 should i create this directory ? – dsaj34v Sep 30 '19 at 09:26
  • ....and very Thanks for my English correction.. – dsaj34v Sep 30 '19 at 09: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 '19 at 09:40
  • thanks!, I wish your a nice Day! – dsaj34v Sep 30 '19 at 09: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 '19 at 09:45
  • Thanks for the correction , I don't knew it...because my English is very Bad , I use the Tool grammarly and some time it not working very well.. – dsaj34v Sep 30 '19 at 10:09