can Linux dd copy a single file from an ext4 formatted partition to an NTFS partition?











up vote
0
down vote

favorite












1)
I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?



2)
If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in:
bcdedit /set {long id here} path C:linux.bin
where dd's if= is a sector of 512 bytes.)



TimDaniels










share|improve this question







New contributor




TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    0
    down vote

    favorite












    1)
    I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?



    2)
    If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in:
    bcdedit /set {long id here} path C:linux.bin
    where dd's if= is a sector of 512 bytes.)



    TimDaniels










    share|improve this question







    New contributor




    TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      1)
      I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?



      2)
      If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in:
      bcdedit /set {long id here} path C:linux.bin
      where dd's if= is a sector of 512 bytes.)



      TimDaniels










      share|improve this question







      New contributor




      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      1)
      I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?



      2)
      If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in:
      bcdedit /set {long id here} path C:linux.bin
      where dd's if= is a sector of 512 bytes.)



      TimDaniels







      dd






      share|improve this question







      New contributor




      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 19 at 3:27









      TimDaniels

      6




      6




      New contributor




      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      TimDaniels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote














          1) I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?




          dd does not care about partitions or filesystems. Its input and output are ordinary files, and the only thing it does is copy data, byte-by-byte (or chunk-by-chunk) from its input to its output.



          In your situation, dd isn't any more useful than regular cp or even cat. After you have mounted both the source ext4 partition and the destination NTFS partition on Linux, you can just... copy the files using cp or other regular tools or even using a graphical file manager.



          To mount an NTFS filesystem with read/write features, install ntfs-3g. No special options are needed from the Linux side (generally), but if this is an internal disk, you do need to make sure Windows has fully unmounted it during shutdown – i.e. hasn't gone into 'hibernate' or 'hybrid' or 'fast startup' mode.



          (For example, you can use shutdown /s /t 0 from Windows in order to begin a full shutdown.)




          2) If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in: bcdedit /set {long id here} path C:linux.bin where dd's if= is a sector of 512 bytes.)




          Same answer as before. dd does not understand filesystems; it just copies files. So if the output needs to be a file on NTFS, you must mount the NTFS filesystem within Linux itself, and then dd will simply write to the file you give it.



          So just mount the NTFS partition like you did in part 1 above, and use dd if=/dev/xxx of=/mnt/windows/linux.bin bs=... count=... to copy the bootcode.



          The sector size is irrelevant to the final data. It only tells dd how large a chunk to read at once – e.g. reading a single 512-byte chunk is much faster than reading 512 one-byte chunks, but the resulting data will be identical either way.



          (That is, dd if=A of=B bs=1 count=512 and dd if=A of=B bs=512 count=1 will create identical files, just doing it at different speeds.



          In fact, head -c 512 A > B will create an identical file to both.)






          share|improve this answer



















          • 1




            Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
            – Kamil Maciorowski
            2 days ago










          • Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
            – TimDaniels
            2 days ago










          • Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
            – TimDaniels
            2 days ago










          • @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
            – grawity
            2 days ago






          • 1




            @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
            – grawity
            2 days ago











          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
          });


          }
          });






          TimDaniels is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376592%2fcan-linux-dd-copy-a-single-file-from-an-ext4-formatted-partition-to-an-ntfs-part%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
          3
          down vote














          1) I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?




          dd does not care about partitions or filesystems. Its input and output are ordinary files, and the only thing it does is copy data, byte-by-byte (or chunk-by-chunk) from its input to its output.



          In your situation, dd isn't any more useful than regular cp or even cat. After you have mounted both the source ext4 partition and the destination NTFS partition on Linux, you can just... copy the files using cp or other regular tools or even using a graphical file manager.



          To mount an NTFS filesystem with read/write features, install ntfs-3g. No special options are needed from the Linux side (generally), but if this is an internal disk, you do need to make sure Windows has fully unmounted it during shutdown – i.e. hasn't gone into 'hibernate' or 'hybrid' or 'fast startup' mode.



          (For example, you can use shutdown /s /t 0 from Windows in order to begin a full shutdown.)




          2) If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in: bcdedit /set {long id here} path C:linux.bin where dd's if= is a sector of 512 bytes.)




          Same answer as before. dd does not understand filesystems; it just copies files. So if the output needs to be a file on NTFS, you must mount the NTFS filesystem within Linux itself, and then dd will simply write to the file you give it.



          So just mount the NTFS partition like you did in part 1 above, and use dd if=/dev/xxx of=/mnt/windows/linux.bin bs=... count=... to copy the bootcode.



          The sector size is irrelevant to the final data. It only tells dd how large a chunk to read at once – e.g. reading a single 512-byte chunk is much faster than reading 512 one-byte chunks, but the resulting data will be identical either way.



          (That is, dd if=A of=B bs=1 count=512 and dd if=A of=B bs=512 count=1 will create identical files, just doing it at different speeds.



          In fact, head -c 512 A > B will create an identical file to both.)






          share|improve this answer



















          • 1




            Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
            – Kamil Maciorowski
            2 days ago










          • Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
            – TimDaniels
            2 days ago










          • Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
            – TimDaniels
            2 days ago










          • @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
            – grawity
            2 days ago






          • 1




            @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
            – grawity
            2 days ago















          up vote
          3
          down vote














          1) I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?




          dd does not care about partitions or filesystems. Its input and output are ordinary files, and the only thing it does is copy data, byte-by-byte (or chunk-by-chunk) from its input to its output.



          In your situation, dd isn't any more useful than regular cp or even cat. After you have mounted both the source ext4 partition and the destination NTFS partition on Linux, you can just... copy the files using cp or other regular tools or even using a graphical file manager.



          To mount an NTFS filesystem with read/write features, install ntfs-3g. No special options are needed from the Linux side (generally), but if this is an internal disk, you do need to make sure Windows has fully unmounted it during shutdown – i.e. hasn't gone into 'hibernate' or 'hybrid' or 'fast startup' mode.



          (For example, you can use shutdown /s /t 0 from Windows in order to begin a full shutdown.)




          2) If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in: bcdedit /set {long id here} path C:linux.bin where dd's if= is a sector of 512 bytes.)




          Same answer as before. dd does not understand filesystems; it just copies files. So if the output needs to be a file on NTFS, you must mount the NTFS filesystem within Linux itself, and then dd will simply write to the file you give it.



          So just mount the NTFS partition like you did in part 1 above, and use dd if=/dev/xxx of=/mnt/windows/linux.bin bs=... count=... to copy the bootcode.



          The sector size is irrelevant to the final data. It only tells dd how large a chunk to read at once – e.g. reading a single 512-byte chunk is much faster than reading 512 one-byte chunks, but the resulting data will be identical either way.



          (That is, dd if=A of=B bs=1 count=512 and dd if=A of=B bs=512 count=1 will create identical files, just doing it at different speeds.



          In fact, head -c 512 A > B will create an identical file to both.)






          share|improve this answer



















          • 1




            Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
            – Kamil Maciorowski
            2 days ago










          • Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
            – TimDaniels
            2 days ago










          • Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
            – TimDaniels
            2 days ago










          • @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
            – grawity
            2 days ago






          • 1




            @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
            – grawity
            2 days ago













          up vote
          3
          down vote










          up vote
          3
          down vote










          1) I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?




          dd does not care about partitions or filesystems. Its input and output are ordinary files, and the only thing it does is copy data, byte-by-byte (or chunk-by-chunk) from its input to its output.



          In your situation, dd isn't any more useful than regular cp or even cat. After you have mounted both the source ext4 partition and the destination NTFS partition on Linux, you can just... copy the files using cp or other regular tools or even using a graphical file manager.



          To mount an NTFS filesystem with read/write features, install ntfs-3g. No special options are needed from the Linux side (generally), but if this is an internal disk, you do need to make sure Windows has fully unmounted it during shutdown – i.e. hasn't gone into 'hibernate' or 'hybrid' or 'fast startup' mode.



          (For example, you can use shutdown /s /t 0 from Windows in order to begin a full shutdown.)




          2) If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in: bcdedit /set {long id here} path C:linux.bin where dd's if= is a sector of 512 bytes.)




          Same answer as before. dd does not understand filesystems; it just copies files. So if the output needs to be a file on NTFS, you must mount the NTFS filesystem within Linux itself, and then dd will simply write to the file you give it.



          So just mount the NTFS partition like you did in part 1 above, and use dd if=/dev/xxx of=/mnt/windows/linux.bin bs=... count=... to copy the bootcode.



          The sector size is irrelevant to the final data. It only tells dd how large a chunk to read at once – e.g. reading a single 512-byte chunk is much faster than reading 512 one-byte chunks, but the resulting data will be identical either way.



          (That is, dd if=A of=B bs=1 count=512 and dd if=A of=B bs=512 count=1 will create identical files, just doing it at different speeds.



          In fact, head -c 512 A > B will create an identical file to both.)






          share|improve this answer















          1) I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command in Ubuntu do that? What "mount" commands might be needed to do that?




          dd does not care about partitions or filesystems. Its input and output are ordinary files, and the only thing it does is copy data, byte-by-byte (or chunk-by-chunk) from its input to its output.



          In your situation, dd isn't any more useful than regular cp or even cat. After you have mounted both the source ext4 partition and the destination NTFS partition on Linux, you can just... copy the files using cp or other regular tools or even using a graphical file manager.



          To mount an NTFS filesystem with read/write features, install ntfs-3g. No special options are needed from the Linux side (generally), but if this is an internal disk, you do need to make sure Windows has fully unmounted it during shutdown – i.e. hasn't gone into 'hibernate' or 'hybrid' or 'fast startup' mode.



          (For example, you can use shutdown /s /t 0 from Windows in order to begin a full shutdown.)




          2) If the source is a block of bytes rather than a file, can "dd" transfer those bytes to a file format in the NTFS-formatted partition? (I'm trying to set up the "linux.bin" file with Window's BCDedit to dual-boot to Ubuntu, as in: bcdedit /set {long id here} path C:linux.bin where dd's if= is a sector of 512 bytes.)




          Same answer as before. dd does not understand filesystems; it just copies files. So if the output needs to be a file on NTFS, you must mount the NTFS filesystem within Linux itself, and then dd will simply write to the file you give it.



          So just mount the NTFS partition like you did in part 1 above, and use dd if=/dev/xxx of=/mnt/windows/linux.bin bs=... count=... to copy the bootcode.



          The sector size is irrelevant to the final data. It only tells dd how large a chunk to read at once – e.g. reading a single 512-byte chunk is much faster than reading 512 one-byte chunks, but the resulting data will be identical either way.



          (That is, dd if=A of=B bs=1 count=512 and dd if=A of=B bs=512 count=1 will create identical files, just doing it at different speeds.



          In fact, head -c 512 A > B will create an identical file to both.)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered 2 days ago









          grawity

          227k35476539




          227k35476539








          • 1




            Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
            – Kamil Maciorowski
            2 days ago










          • Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
            – TimDaniels
            2 days ago










          • Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
            – TimDaniels
            2 days ago










          • @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
            – grawity
            2 days ago






          • 1




            @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
            – grawity
            2 days ago














          • 1




            Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
            – Kamil Maciorowski
            2 days ago










          • Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
            – TimDaniels
            2 days ago










          • Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
            – TimDaniels
            2 days ago










          • @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
            – grawity
            2 days ago






          • 1




            @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
            – grawity
            2 days ago








          1




          1




          Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
          – Kamil Maciorowski
          2 days ago




          Upvoted, one problem though: while specifying count you may not get identical files. You will be surprised if dd reads a partial input block. This will still count as a successful read but it will provide less than ibs data. In effect, when you reach count you will not reach the amount of data you wanted. I have never seen this while reading from a local filesystem, but in general (pipes, named pipes, network mounts?, FUSE?) you need iflag=fullblock. Proof of concept: </dev/zero dd bs=1 | dd bs=4M count=2 | wc -c.
          – Kamil Maciorowski
          2 days ago












          Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
          – TimDaniels
          2 days ago




          Apparently dd does not need a source to be a named file, but it also can take just a block of hex code from a physical location identified only by its sector no. and write it into a file of a format that corresponds to the destination file system, adding metadata and record structure in the process. True? False?
          – TimDaniels
          2 days ago












          Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
          – TimDaniels
          2 days ago




          Is ntfs-3g included as part of Ubuntu 18.04 or must it be downloaded from an online repository? Once ntfs-3g is installed and the proper "mount" commands executed, then, dd can copy the MBR, known only by its location at the beginning of disc, or a partition boot record known only by its location at the beginning of the partition, directly to a file in an NTFS partition (such as Windows) without using an intermediary shared FAT32 partition?
          – TimDaniels
          2 days ago












          @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
          – grawity
          2 days ago




          @TimDaniels: It is part of the core repositories, although I'm not sure whether it is part of the "base" installation. Is there some other reason, besides ntfs-3g support, that you're asking whether an intermediary partition would be needed?
          – grawity
          2 days ago




          1




          1




          @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
          – grawity
          2 days ago




          @TimDaniels: The source in dd if=…, as well as the destination, is always a named file. It might be a virtual "device" file provided by the kernel, but as far as dd knows, it's still just a file. dd never adds any metadata. dd never adds any record structure. dd does not understand filesystems. The only way to make dd create a file on NTFS is to mount the NTFS filesystem globally.
          – grawity
          2 days ago










          TimDaniels is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          TimDaniels is a new contributor. Be nice, and check out our Code of Conduct.













          TimDaniels is a new contributor. Be nice, and check out our Code of Conduct.












          TimDaniels is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376592%2fcan-linux-dd-copy-a-single-file-from-an-ext4-formatted-partition-to-an-ntfs-part%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

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          RAC Tourist Trophy