How should I format a USB prior to writing an ISO to it?

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











up vote
4
down vote

favorite












I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:



dd if=debian-*-netinst.iso of=/dev/sdX


  • Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?

  • Does it matter what filesystem is already present on the USB prior to running this command?









share|improve this question

























    up vote
    4
    down vote

    favorite












    I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:



    dd if=debian-*-netinst.iso of=/dev/sdX


    • Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?

    • Does it matter what filesystem is already present on the USB prior to running this command?









    share|improve this question























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:



      dd if=debian-*-netinst.iso of=/dev/sdX


      • Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?

      • Does it matter what filesystem is already present on the USB prior to running this command?









      share|improve this question













      I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this:



      dd if=debian-*-netinst.iso of=/dev/sdX


      • Do I need to delete the contents of the USB prior to running this so that nothing is left at the end of the USB?

      • Does it matter what filesystem is already present on the USB prior to running this command?






      filesystems usb dd






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 12 '13 at 1:19









      Village

      1,66873055




      1,66873055




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          8
          down vote



          accepted










          Writing to the device (/dev/sdX) instead of to a file system (/mount/point) deletes the file system on the device anyway so there's no need for mkfs before.



          There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.






          share|improve this answer



























            up vote
            3
            down vote













            The dd command overwrites everything on the USB device. No preparaton is required.






            share|improve this answer



























              up vote
              2
              down vote













              You don't need to erase the old data first. But you can if you want to.
              Sometimes it's a good idea. Particularly if you're giving it to someone.



              This should do the trick:



              Linux:



              dd if=/dev/zero of=/dev/sdx


              Macintosh:



              dd if=/dev/zero of=/dev/diskx


              diskutil zeroDisk /dev/diskx


              Where sdx or diskx is the target disk. Usually, sda/disk0 is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb/disk1, sdc/disk2, and so on.

              If you have one internal disk (/dev/sda or /dev/disk0), and you connect an external drive via USB; the external drive will be /dev/sdb or /dev/disk1. You get the idea. SD cards are designated names like /dev/mmcblk0 and so on, in a similar fashion.



              Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero can be thought of as being similar to /dev/null; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL (0x00) bytes to whatever process tries to read from it.



              The original filesystem will be overwritten.




              Some additional options that people commonly like to use with dd, to manipulate block size & data read/write speeds follow the syntax:



              bs=512kB count=1 


              Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:



              status=progress



              Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:



              Linux:



              lsblk


              Macintosh:



              diskutil list


              The output will look something like this:



              /dev/disk0 (internal, physical):
              #: TYPE NAME SIZE IDENTIFIER
              0: GUID_partition_scheme *500.3 GB disk0
              1: EFI EFI 209.7 MB disk0s1
              2: Apple_HFS Macintosh HD 499.4 GB disk0s2
              3: Apple_Boot Recovery HD 650.0 MB disk0s3





              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%2f75477%2fhow-should-i-format-a-usb-prior-to-writing-an-iso-to-it%23new-answer', 'question_page');

                );

                Post as a guest






























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                8
                down vote



                accepted










                Writing to the device (/dev/sdX) instead of to a file system (/mount/point) deletes the file system on the device anyway so there's no need for mkfs before.



                There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.






                share|improve this answer
























                  up vote
                  8
                  down vote



                  accepted










                  Writing to the device (/dev/sdX) instead of to a file system (/mount/point) deletes the file system on the device anyway so there's no need for mkfs before.



                  There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.






                  share|improve this answer






















                    up vote
                    8
                    down vote



                    accepted







                    up vote
                    8
                    down vote



                    accepted






                    Writing to the device (/dev/sdX) instead of to a file system (/mount/point) deletes the file system on the device anyway so there's no need for mkfs before.



                    There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.






                    share|improve this answer












                    Writing to the device (/dev/sdX) instead of to a file system (/mount/point) deletes the file system on the device anyway so there's no need for mkfs before.



                    There is also no need to erase data in the non-written area. It is not visible anyway. Linux file systems can without problems be smaller than the block device they live on.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 12 '13 at 1:27









                    Hauke Laging

                    54.3k1283130




                    54.3k1283130






















                        up vote
                        3
                        down vote













                        The dd command overwrites everything on the USB device. No preparaton is required.






                        share|improve this answer
























                          up vote
                          3
                          down vote













                          The dd command overwrites everything on the USB device. No preparaton is required.






                          share|improve this answer






















                            up vote
                            3
                            down vote










                            up vote
                            3
                            down vote









                            The dd command overwrites everything on the USB device. No preparaton is required.






                            share|improve this answer












                            The dd command overwrites everything on the USB device. No preparaton is required.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 12 '13 at 1:26









                            vonbrand

                            14k22444




                            14k22444




















                                up vote
                                2
                                down vote













                                You don't need to erase the old data first. But you can if you want to.
                                Sometimes it's a good idea. Particularly if you're giving it to someone.



                                This should do the trick:



                                Linux:



                                dd if=/dev/zero of=/dev/sdx


                                Macintosh:



                                dd if=/dev/zero of=/dev/diskx


                                diskutil zeroDisk /dev/diskx


                                Where sdx or diskx is the target disk. Usually, sda/disk0 is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb/disk1, sdc/disk2, and so on.

                                If you have one internal disk (/dev/sda or /dev/disk0), and you connect an external drive via USB; the external drive will be /dev/sdb or /dev/disk1. You get the idea. SD cards are designated names like /dev/mmcblk0 and so on, in a similar fashion.



                                Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero can be thought of as being similar to /dev/null; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL (0x00) bytes to whatever process tries to read from it.



                                The original filesystem will be overwritten.




                                Some additional options that people commonly like to use with dd, to manipulate block size & data read/write speeds follow the syntax:



                                bs=512kB count=1 


                                Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:



                                status=progress



                                Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:



                                Linux:



                                lsblk


                                Macintosh:



                                diskutil list


                                The output will look something like this:



                                /dev/disk0 (internal, physical):
                                #: TYPE NAME SIZE IDENTIFIER
                                0: GUID_partition_scheme *500.3 GB disk0
                                1: EFI EFI 209.7 MB disk0s1
                                2: Apple_HFS Macintosh HD 499.4 GB disk0s2
                                3: Apple_Boot Recovery HD 650.0 MB disk0s3





                                share|improve this answer


























                                  up vote
                                  2
                                  down vote













                                  You don't need to erase the old data first. But you can if you want to.
                                  Sometimes it's a good idea. Particularly if you're giving it to someone.



                                  This should do the trick:



                                  Linux:



                                  dd if=/dev/zero of=/dev/sdx


                                  Macintosh:



                                  dd if=/dev/zero of=/dev/diskx


                                  diskutil zeroDisk /dev/diskx


                                  Where sdx or diskx is the target disk. Usually, sda/disk0 is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb/disk1, sdc/disk2, and so on.

                                  If you have one internal disk (/dev/sda or /dev/disk0), and you connect an external drive via USB; the external drive will be /dev/sdb or /dev/disk1. You get the idea. SD cards are designated names like /dev/mmcblk0 and so on, in a similar fashion.



                                  Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero can be thought of as being similar to /dev/null; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL (0x00) bytes to whatever process tries to read from it.



                                  The original filesystem will be overwritten.




                                  Some additional options that people commonly like to use with dd, to manipulate block size & data read/write speeds follow the syntax:



                                  bs=512kB count=1 


                                  Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:



                                  status=progress



                                  Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:



                                  Linux:



                                  lsblk


                                  Macintosh:



                                  diskutil list


                                  The output will look something like this:



                                  /dev/disk0 (internal, physical):
                                  #: TYPE NAME SIZE IDENTIFIER
                                  0: GUID_partition_scheme *500.3 GB disk0
                                  1: EFI EFI 209.7 MB disk0s1
                                  2: Apple_HFS Macintosh HD 499.4 GB disk0s2
                                  3: Apple_Boot Recovery HD 650.0 MB disk0s3





                                  share|improve this answer
























                                    up vote
                                    2
                                    down vote










                                    up vote
                                    2
                                    down vote









                                    You don't need to erase the old data first. But you can if you want to.
                                    Sometimes it's a good idea. Particularly if you're giving it to someone.



                                    This should do the trick:



                                    Linux:



                                    dd if=/dev/zero of=/dev/sdx


                                    Macintosh:



                                    dd if=/dev/zero of=/dev/diskx


                                    diskutil zeroDisk /dev/diskx


                                    Where sdx or diskx is the target disk. Usually, sda/disk0 is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb/disk1, sdc/disk2, and so on.

                                    If you have one internal disk (/dev/sda or /dev/disk0), and you connect an external drive via USB; the external drive will be /dev/sdb or /dev/disk1. You get the idea. SD cards are designated names like /dev/mmcblk0 and so on, in a similar fashion.



                                    Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero can be thought of as being similar to /dev/null; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL (0x00) bytes to whatever process tries to read from it.



                                    The original filesystem will be overwritten.




                                    Some additional options that people commonly like to use with dd, to manipulate block size & data read/write speeds follow the syntax:



                                    bs=512kB count=1 


                                    Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:



                                    status=progress



                                    Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:



                                    Linux:



                                    lsblk


                                    Macintosh:



                                    diskutil list


                                    The output will look something like this:



                                    /dev/disk0 (internal, physical):
                                    #: TYPE NAME SIZE IDENTIFIER
                                    0: GUID_partition_scheme *500.3 GB disk0
                                    1: EFI EFI 209.7 MB disk0s1
                                    2: Apple_HFS Macintosh HD 499.4 GB disk0s2
                                    3: Apple_Boot Recovery HD 650.0 MB disk0s3





                                    share|improve this answer














                                    You don't need to erase the old data first. But you can if you want to.
                                    Sometimes it's a good idea. Particularly if you're giving it to someone.



                                    This should do the trick:



                                    Linux:



                                    dd if=/dev/zero of=/dev/sdx


                                    Macintosh:



                                    dd if=/dev/zero of=/dev/diskx


                                    diskutil zeroDisk /dev/diskx


                                    Where sdx or diskx is the target disk. Usually, sda/disk0 is the first disk, containing the main OS, etc. (i.e. SCSI/SATA Disk A), followed by sdb/disk1, sdc/disk2, and so on.

                                    If you have one internal disk (/dev/sda or /dev/disk0), and you connect an external drive via USB; the external drive will be /dev/sdb or /dev/disk1. You get the idea. SD cards are designated names like /dev/mmcblk0 and so on, in a similar fashion.



                                    Some refer to this as zeroing or low-level formatting. The pseudo-file /dev/zero can be thought of as being similar to /dev/null; but designed to be read from, rather than written to. It will supply a steady stream of ASCII NUL (0x00) bytes to whatever process tries to read from it.



                                    The original filesystem will be overwritten.




                                    Some additional options that people commonly like to use with dd, to manipulate block size & data read/write speeds follow the syntax:



                                    bs=512kB count=1 


                                    Also, I personally like to have a running status/progress report so I can tell what's going on; to do this, just add the following to the tail end of the command:



                                    status=progress



                                    Take care to specify the correct disk. Especially if copying/pasting commands like this directly into a shell. It takes milliseconds to bork the wrong partition table. To list your storage devices, begin with:



                                    Linux:



                                    lsblk


                                    Macintosh:



                                    diskutil list


                                    The output will look something like this:



                                    /dev/disk0 (internal, physical):
                                    #: TYPE NAME SIZE IDENTIFIER
                                    0: GUID_partition_scheme *500.3 GB disk0
                                    1: EFI EFI 209.7 MB disk0s1
                                    2: Apple_HFS Macintosh HD 499.4 GB disk0s2
                                    3: Apple_Boot Recovery HD 650.0 MB disk0s3






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited 8 mins ago

























                                    answered Feb 21 '17 at 20:18









                                    tjt263

                                    5001420




                                    5001420



























                                         

                                        draft saved


                                        draft discarded















































                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f75477%2fhow-should-i-format-a-usb-prior-to-writing-an-iso-to-it%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Bahrain

                                        Postfix configuration issue with fips on centos 7; mailgun relay