With the command pv it is possible to clone a drive, how do I mount it?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite
2












I was able to backup a drive using the following command.



pv -EE /dev/sda > disk-image.img


This is all well and good, but now I have no way of seeing the files unless I use this command



pv disk-image.img > /dev/sda


This, of course, writes the data back to the disk which is not what I want to do. My question is what can I do to mount the .img file itself instead of just writing back to a disk?




I've tried mounting using loop but it seems to complain about an invalid NTFS.



$ mount -o loop disk-image.img
mount: disk-image.img: can't find in /etc/fstab.
$ mount -o loop disk-image.img /mnt/disk-image/
NTFS signature is missing.
Failed to mount '/dev/loop32': Invalid argument
The device '/dev/loop32' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?









share|improve this question



















  • 1




    What does file disk-image.img tell you?
    – Nick ODell
    2 hours ago






  • 1




    disk-image.img: DOS/MBR boot sector
    – tisaconundrum
    2 hours ago














up vote
4
down vote

favorite
2












I was able to backup a drive using the following command.



pv -EE /dev/sda > disk-image.img


This is all well and good, but now I have no way of seeing the files unless I use this command



pv disk-image.img > /dev/sda


This, of course, writes the data back to the disk which is not what I want to do. My question is what can I do to mount the .img file itself instead of just writing back to a disk?




I've tried mounting using loop but it seems to complain about an invalid NTFS.



$ mount -o loop disk-image.img
mount: disk-image.img: can't find in /etc/fstab.
$ mount -o loop disk-image.img /mnt/disk-image/
NTFS signature is missing.
Failed to mount '/dev/loop32': Invalid argument
The device '/dev/loop32' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?









share|improve this question



















  • 1




    What does file disk-image.img tell you?
    – Nick ODell
    2 hours ago






  • 1




    disk-image.img: DOS/MBR boot sector
    – tisaconundrum
    2 hours ago












up vote
4
down vote

favorite
2









up vote
4
down vote

favorite
2






2





I was able to backup a drive using the following command.



pv -EE /dev/sda > disk-image.img


This is all well and good, but now I have no way of seeing the files unless I use this command



pv disk-image.img > /dev/sda


This, of course, writes the data back to the disk which is not what I want to do. My question is what can I do to mount the .img file itself instead of just writing back to a disk?




I've tried mounting using loop but it seems to complain about an invalid NTFS.



$ mount -o loop disk-image.img
mount: disk-image.img: can't find in /etc/fstab.
$ mount -o loop disk-image.img /mnt/disk-image/
NTFS signature is missing.
Failed to mount '/dev/loop32': Invalid argument
The device '/dev/loop32' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?









share|improve this question















I was able to backup a drive using the following command.



pv -EE /dev/sda > disk-image.img


This is all well and good, but now I have no way of seeing the files unless I use this command



pv disk-image.img > /dev/sda


This, of course, writes the data back to the disk which is not what I want to do. My question is what can I do to mount the .img file itself instead of just writing back to a disk?




I've tried mounting using loop but it seems to complain about an invalid NTFS.



$ mount -o loop disk-image.img
mount: disk-image.img: can't find in /etc/fstab.
$ mount -o loop disk-image.img /mnt/disk-image/
NTFS signature is missing.
Failed to mount '/dev/loop32': Invalid argument
The device '/dev/loop32' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?






mount disk-image pv






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago

























asked 2 hours ago









tisaconundrum

1285




1285







  • 1




    What does file disk-image.img tell you?
    – Nick ODell
    2 hours ago






  • 1




    disk-image.img: DOS/MBR boot sector
    – tisaconundrum
    2 hours ago












  • 1




    What does file disk-image.img tell you?
    – Nick ODell
    2 hours ago






  • 1




    disk-image.img: DOS/MBR boot sector
    – tisaconundrum
    2 hours ago







1




1




What does file disk-image.img tell you?
– Nick ODell
2 hours ago




What does file disk-image.img tell you?
– Nick ODell
2 hours ago




1




1




disk-image.img: DOS/MBR boot sector
– tisaconundrum
2 hours ago




disk-image.img: DOS/MBR boot sector
– tisaconundrum
2 hours ago










2 Answers
2






active

oldest

votes

















up vote
5
down vote













You backed up the whole disk including the MBR (512 bytes), and not a simple partition which you can mount, so you have to skip the MBR.



Please try with:



sudo losetup -o 512 /dev/loop0 disk-image.img
sudo mount -t ntfs-3g /dev/loop0 /mnt





share|improve this answer




















  • Splendid insight!
    – K7AAY
    1 hour ago

















up vote
1
down vote













Install p7zip-full if you don't have it already, then take a look with



sudo 7z /pathtowhereitis/whatever.img





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f468897%2fwith-the-command-pv-it-is-possible-to-clone-a-drive-how-do-i-mount-it%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote













    You backed up the whole disk including the MBR (512 bytes), and not a simple partition which you can mount, so you have to skip the MBR.



    Please try with:



    sudo losetup -o 512 /dev/loop0 disk-image.img
    sudo mount -t ntfs-3g /dev/loop0 /mnt





    share|improve this answer




















    • Splendid insight!
      – K7AAY
      1 hour ago














    up vote
    5
    down vote













    You backed up the whole disk including the MBR (512 bytes), and not a simple partition which you can mount, so you have to skip the MBR.



    Please try with:



    sudo losetup -o 512 /dev/loop0 disk-image.img
    sudo mount -t ntfs-3g /dev/loop0 /mnt





    share|improve this answer




















    • Splendid insight!
      – K7AAY
      1 hour ago












    up vote
    5
    down vote










    up vote
    5
    down vote









    You backed up the whole disk including the MBR (512 bytes), and not a simple partition which you can mount, so you have to skip the MBR.



    Please try with:



    sudo losetup -o 512 /dev/loop0 disk-image.img
    sudo mount -t ntfs-3g /dev/loop0 /mnt





    share|improve this answer












    You backed up the whole disk including the MBR (512 bytes), and not a simple partition which you can mount, so you have to skip the MBR.



    Please try with:



    sudo losetup -o 512 /dev/loop0 disk-image.img
    sudo mount -t ntfs-3g /dev/loop0 /mnt






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 1 hour ago









    Antonio Petricca

    24717




    24717











    • Splendid insight!
      – K7AAY
      1 hour ago
















    • Splendid insight!
      – K7AAY
      1 hour ago















    Splendid insight!
    – K7AAY
    1 hour ago




    Splendid insight!
    – K7AAY
    1 hour ago












    up vote
    1
    down vote













    Install p7zip-full if you don't have it already, then take a look with



    sudo 7z /pathtowhereitis/whatever.img





    share|improve this answer
























      up vote
      1
      down vote













      Install p7zip-full if you don't have it already, then take a look with



      sudo 7z /pathtowhereitis/whatever.img





      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        Install p7zip-full if you don't have it already, then take a look with



        sudo 7z /pathtowhereitis/whatever.img





        share|improve this answer












        Install p7zip-full if you don't have it already, then take a look with



        sudo 7z /pathtowhereitis/whatever.img






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        K7AAY

        221319




        221319



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f468897%2fwith-the-command-pv-it-is-possible-to-clone-a-drive-how-do-i-mount-it%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            What does second last employer means? [closed]

            One-line joke