Unable to mount a HFS+ image due to error on loop











up vote
0
down vote

favorite












I am trying to mount an image of a macbook pro obtain with dd. I have use this strategy to adapted the syntax of my mount command.



I have use the following process




  • create the image: sudo dd if=/dev/sdc of=ddDisk bs=300M status=progress

  • obtain the property of the image with fdisk -l and testdisk (see below)

  • create an empty directory: mkdir test

  • try to mount the main partition (ddDisk2) with the following command: sudo mount -v -t hfsplus -o sizelimit=498887294976 ddDisk2 test


I obtain the following error message: mount: test: failed to setup loop device for ddDisk2. I am not sure I well understand this message.



Results of fdisk -l



Disk ddDisk: 465,8 GiB, 500107862016 bytes, 976773168 sectors 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C83292DE-1D21-4967-8FCA-2A6C377E6F39

Device Start End Sectors Size Type
ddDisk1 40 409639 409600 200M EFI System
ddDisk2 409640 975503591 975093952 465G Apple Core storage
ddDisk3 975503592 976773127 1269536 619,9M Apple boot


Results of testdisk



TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk ddDisk - 500 GB / 465 GiB - CHS 60802 255 63
Partition Start End Size in sectors
>P EFI System 40 409639 409600 [EFI]
P Mac HFS 409640 974798887 974389248
D Mac HFS 975503592 975765735 262144
D Mac HFS 975503592 976773127 1269536









share|improve this question


























    up vote
    0
    down vote

    favorite












    I am trying to mount an image of a macbook pro obtain with dd. I have use this strategy to adapted the syntax of my mount command.



    I have use the following process




    • create the image: sudo dd if=/dev/sdc of=ddDisk bs=300M status=progress

    • obtain the property of the image with fdisk -l and testdisk (see below)

    • create an empty directory: mkdir test

    • try to mount the main partition (ddDisk2) with the following command: sudo mount -v -t hfsplus -o sizelimit=498887294976 ddDisk2 test


    I obtain the following error message: mount: test: failed to setup loop device for ddDisk2. I am not sure I well understand this message.



    Results of fdisk -l



    Disk ddDisk: 465,8 GiB, 500107862016 bytes, 976773168 sectors 
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: C83292DE-1D21-4967-8FCA-2A6C377E6F39

    Device Start End Sectors Size Type
    ddDisk1 40 409639 409600 200M EFI System
    ddDisk2 409640 975503591 975093952 465G Apple Core storage
    ddDisk3 975503592 976773127 1269536 619,9M Apple boot


    Results of testdisk



    TestDisk 7.0, Data Recovery Utility, April 2015
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    Disk ddDisk - 500 GB / 465 GiB - CHS 60802 255 63
    Partition Start End Size in sectors
    >P EFI System 40 409639 409600 [EFI]
    P Mac HFS 409640 974798887 974389248
    D Mac HFS 975503592 975765735 262144
    D Mac HFS 975503592 976773127 1269536









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to mount an image of a macbook pro obtain with dd. I have use this strategy to adapted the syntax of my mount command.



      I have use the following process




      • create the image: sudo dd if=/dev/sdc of=ddDisk bs=300M status=progress

      • obtain the property of the image with fdisk -l and testdisk (see below)

      • create an empty directory: mkdir test

      • try to mount the main partition (ddDisk2) with the following command: sudo mount -v -t hfsplus -o sizelimit=498887294976 ddDisk2 test


      I obtain the following error message: mount: test: failed to setup loop device for ddDisk2. I am not sure I well understand this message.



      Results of fdisk -l



      Disk ddDisk: 465,8 GiB, 500107862016 bytes, 976773168 sectors 
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: gpt
      Disk identifier: C83292DE-1D21-4967-8FCA-2A6C377E6F39

      Device Start End Sectors Size Type
      ddDisk1 40 409639 409600 200M EFI System
      ddDisk2 409640 975503591 975093952 465G Apple Core storage
      ddDisk3 975503592 976773127 1269536 619,9M Apple boot


      Results of testdisk



      TestDisk 7.0, Data Recovery Utility, April 2015
      Christophe GRENIER <grenier@cgsecurity.org>
      http://www.cgsecurity.org

      Disk ddDisk - 500 GB / 465 GiB - CHS 60802 255 63
      Partition Start End Size in sectors
      >P EFI System 40 409639 409600 [EFI]
      P Mac HFS 409640 974798887 974389248
      D Mac HFS 975503592 975765735 262144
      D Mac HFS 975503592 976773127 1269536









      share|improve this question













      I am trying to mount an image of a macbook pro obtain with dd. I have use this strategy to adapted the syntax of my mount command.



      I have use the following process




      • create the image: sudo dd if=/dev/sdc of=ddDisk bs=300M status=progress

      • obtain the property of the image with fdisk -l and testdisk (see below)

      • create an empty directory: mkdir test

      • try to mount the main partition (ddDisk2) with the following command: sudo mount -v -t hfsplus -o sizelimit=498887294976 ddDisk2 test


      I obtain the following error message: mount: test: failed to setup loop device for ddDisk2. I am not sure I well understand this message.



      Results of fdisk -l



      Disk ddDisk: 465,8 GiB, 500107862016 bytes, 976773168 sectors 
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: gpt
      Disk identifier: C83292DE-1D21-4967-8FCA-2A6C377E6F39

      Device Start End Sectors Size Type
      ddDisk1 40 409639 409600 200M EFI System
      ddDisk2 409640 975503591 975093952 465G Apple Core storage
      ddDisk3 975503592 976773127 1269536 619,9M Apple boot


      Results of testdisk



      TestDisk 7.0, Data Recovery Utility, April 2015
      Christophe GRENIER <grenier@cgsecurity.org>
      http://www.cgsecurity.org

      Disk ddDisk - 500 GB / 465 GiB - CHS 60802 255 63
      Partition Start End Size in sectors
      >P EFI System 40 409639 409600 [EFI]
      P Mac HFS 409640 974798887 974389248
      D Mac HFS 975503592 975765735 262144
      D Mac HFS 975503592 976773127 1269536






      linux hard-drive mount hard-drive-recovery hfs+






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 at 8:58









      Guuk

      1396




      1396






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Mount only the partition, not the whole image.



          losetup -f /dev/loop4 ddDisk -o 209735680
          mount -t hfsplus /dev/loop4 test


          (209735680 is the first byte of the partition)






          share|improve this answer





















          • Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
            – Guuk
            Nov 27 at 9:11










          • Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
            – Ipor Sircer
            Nov 27 at 9:12












          • And make sure loop module is loaded to kernel. (modprobe loop)
            – Ipor Sircer
            Nov 27 at 9:13










          • I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
            – Guuk
            Nov 27 at 9:22










          • modprobe loop returns nothing
            – Guuk
            Nov 27 at 9:23











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378689%2funable-to-mount-a-hfs-image-due-to-error-on-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Mount only the partition, not the whole image.



          losetup -f /dev/loop4 ddDisk -o 209735680
          mount -t hfsplus /dev/loop4 test


          (209735680 is the first byte of the partition)






          share|improve this answer





















          • Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
            – Guuk
            Nov 27 at 9:11










          • Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
            – Ipor Sircer
            Nov 27 at 9:12












          • And make sure loop module is loaded to kernel. (modprobe loop)
            – Ipor Sircer
            Nov 27 at 9:13










          • I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
            – Guuk
            Nov 27 at 9:22










          • modprobe loop returns nothing
            – Guuk
            Nov 27 at 9:23















          up vote
          0
          down vote













          Mount only the partition, not the whole image.



          losetup -f /dev/loop4 ddDisk -o 209735680
          mount -t hfsplus /dev/loop4 test


          (209735680 is the first byte of the partition)






          share|improve this answer





















          • Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
            – Guuk
            Nov 27 at 9:11










          • Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
            – Ipor Sircer
            Nov 27 at 9:12












          • And make sure loop module is loaded to kernel. (modprobe loop)
            – Ipor Sircer
            Nov 27 at 9:13










          • I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
            – Guuk
            Nov 27 at 9:22










          • modprobe loop returns nothing
            – Guuk
            Nov 27 at 9:23













          up vote
          0
          down vote










          up vote
          0
          down vote









          Mount only the partition, not the whole image.



          losetup -f /dev/loop4 ddDisk -o 209735680
          mount -t hfsplus /dev/loop4 test


          (209735680 is the first byte of the partition)






          share|improve this answer












          Mount only the partition, not the whole image.



          losetup -f /dev/loop4 ddDisk -o 209735680
          mount -t hfsplus /dev/loop4 test


          (209735680 is the first byte of the partition)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 27 at 9:08









          Ipor Sircer

          3,43411014




          3,43411014












          • Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
            – Guuk
            Nov 27 at 9:11










          • Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
            – Ipor Sircer
            Nov 27 at 9:12












          • And make sure loop module is loaded to kernel. (modprobe loop)
            – Ipor Sircer
            Nov 27 at 9:13










          • I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
            – Guuk
            Nov 27 at 9:22










          • modprobe loop returns nothing
            – Guuk
            Nov 27 at 9:23


















          • Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
            – Guuk
            Nov 27 at 9:11










          • Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
            – Ipor Sircer
            Nov 27 at 9:12












          • And make sure loop module is loaded to kernel. (modprobe loop)
            – Ipor Sircer
            Nov 27 at 9:13










          • I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
            – Guuk
            Nov 27 at 9:22










          • modprobe loop returns nothing
            – Guuk
            Nov 27 at 9:23
















          Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
          – Guuk
          Nov 27 at 9:11




          Thank you for your reply but I obtain the following error losetup: /dev/loop4: failed to set up loop device: Invalid argument
          – Guuk
          Nov 27 at 9:11












          Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
          – Ipor Sircer
          Nov 27 at 9:12






          Then try lower free loop device, e.g. loop1. (ls /dev/loop*)
          – Ipor Sircer
          Nov 27 at 9:12














          And make sure loop module is loaded to kernel. (modprobe loop)
          – Ipor Sircer
          Nov 27 at 9:13




          And make sure loop module is loaded to kernel. (modprobe loop)
          – Ipor Sircer
          Nov 27 at 9:13












          I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
          – Guuk
          Nov 27 at 9:22




          I have tried on loop0: losetup: /dev/loop0: failed to use backing file: Cannot allocate memory
          – Guuk
          Nov 27 at 9:22












          modprobe loop returns nothing
          – Guuk
          Nov 27 at 9:23




          modprobe loop returns nothing
          – Guuk
          Nov 27 at 9:23


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378689%2funable-to-mount-a-hfs-image-due-to-error-on-loop%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Plaza Victoria

          In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

          How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...