How to do secure erase of CF card over USB in Linux?Recover files from a dead SD card in linux? (Possibly...

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Client team has low performances and low technical skills: we always fix their work and now they stop collaborate with us. How to solve?

dbcc cleantable batch size explanation

How much of data wrangling is a data scientist's job?

Is it unprofessional to ask if a job posting on GlassDoor is real?

Are the number of citations and number of published articles the most important criteria for a tenure promotion?

Today is the Center

Convert two switches to a dual stack, and add outlet - possible here?

Important Resources for Dark Age Civilizations?

Do infinite dimensional systems make sense?

Horror movie about a virus at the prom; beginning and end are stylized as a cartoon

What doth I be?

Revoked SSL certificate

LaTeX: Why are digits allowed in environments, but forbidden in commands?

How does one intimidate enemies without having the capacity for violence?

Roll the carpet

Was any UN Security Council vote triple-vetoed?

How to format long polynomial?

What does the "remote control" for a QF-4 look like?

Alternative to sending password over mail?

How much RAM could one put in a typical 80386 setup?

Modeling an IP Address

Why is Minecraft giving an OpenGL error?

Has there ever been an airliner design involving reducing generator load by installing solar panels?



How to do secure erase of CF card over USB in Linux?


Recover files from a dead SD card in linux? (Possibly killed by a Nokia E71)hdparm - how to secure erase SATA SSD over USBWhy does hdparm -I /dev/sdx give an error?Slow USB3 under LinuxTurn off write cache on all USB External Drives (Debian / Ubuntu / Linux)Card/USB flash storage: how to trim/discard/reset after heavy usage?How to un freeze drive in Linux?SSD secure erase on RAID card (Linux)I've used hdparm secure erase on a USB SATA drive. Is it beyond recovery now?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















I have a CF card I'd like to erase. My CF card reader is connected to my Linux machine via USB. How do I do a secure erase (i.e., the ATA Secure Erase functionality) of the CF card?



I have tried hdparm --security-erase NULL /dev/sdc, but I get an error: ERASE_PREPARE: Invalid exchange. In fact, any hdparm command gives me the same error:



# hdparm -I /dev/sdc

/dev/sdc:
HDIO_DRIVE_CMD(identify) failed: Invalid exchange


I read somewhere that hdparm can't do an ATA Secure Erase of a drive that is connected over USB. Is this true? I tried using sdparm, but sdparm doesn't seem to have the capability to send the ATA Secure Erase command to the CF card. So, what is the proper way to do this?










share|improve this question














bumped to the homepage by Community 21 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    2















    I have a CF card I'd like to erase. My CF card reader is connected to my Linux machine via USB. How do I do a secure erase (i.e., the ATA Secure Erase functionality) of the CF card?



    I have tried hdparm --security-erase NULL /dev/sdc, but I get an error: ERASE_PREPARE: Invalid exchange. In fact, any hdparm command gives me the same error:



    # hdparm -I /dev/sdc

    /dev/sdc:
    HDIO_DRIVE_CMD(identify) failed: Invalid exchange


    I read somewhere that hdparm can't do an ATA Secure Erase of a drive that is connected over USB. Is this true? I tried using sdparm, but sdparm doesn't seem to have the capability to send the ATA Secure Erase command to the CF card. So, what is the proper way to do this?










    share|improve this question














    bumped to the homepage by Community 21 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      2












      2








      2








      I have a CF card I'd like to erase. My CF card reader is connected to my Linux machine via USB. How do I do a secure erase (i.e., the ATA Secure Erase functionality) of the CF card?



      I have tried hdparm --security-erase NULL /dev/sdc, but I get an error: ERASE_PREPARE: Invalid exchange. In fact, any hdparm command gives me the same error:



      # hdparm -I /dev/sdc

      /dev/sdc:
      HDIO_DRIVE_CMD(identify) failed: Invalid exchange


      I read somewhere that hdparm can't do an ATA Secure Erase of a drive that is connected over USB. Is this true? I tried using sdparm, but sdparm doesn't seem to have the capability to send the ATA Secure Erase command to the CF card. So, what is the proper way to do this?










      share|improve this question














      I have a CF card I'd like to erase. My CF card reader is connected to my Linux machine via USB. How do I do a secure erase (i.e., the ATA Secure Erase functionality) of the CF card?



      I have tried hdparm --security-erase NULL /dev/sdc, but I get an error: ERASE_PREPARE: Invalid exchange. In fact, any hdparm command gives me the same error:



      # hdparm -I /dev/sdc

      /dev/sdc:
      HDIO_DRIVE_CMD(identify) failed: Invalid exchange


      I read somewhere that hdparm can't do an ATA Secure Erase of a drive that is connected over USB. Is this true? I tried using sdparm, but sdparm doesn't seem to have the capability to send the ATA Secure Erase command to the CF card. So, what is the proper way to do this?







      linux usb security secure-erase






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 9 '11 at 20:51









      D.W.D.W.

      1,03911628




      1,03911628





      bumped to the homepage by Community 21 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 21 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          You'll be all well with a single overwrite, but if you are paranoid, with multiple overwrites (let's say five times).
          I suggest you use the dd command.



          dd if=/dev/urandom of=/dev/<yourdevice> bs=1M count=8000



          Tweak the bs parameters until the operation will be fast enough, then adjust the count (now it is writing 8000 times 1 megabytes of random data). Be very cautious what parameter you give to of, although you can only target unmounted devices, you wouldn't want to randomize a partition that, say, contains all of your works.






          share|improve this answer



















          • 1





            An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

            – D.W.
            Aug 10 '11 at 21:28






          • 3





            Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

            – karatedog
            Aug 26 '11 at 10:58













          • @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

            – sleske
            Dec 26 '14 at 10:15












          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',
          autoActivateHeartbeat: false,
          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%2f321086%2fhow-to-do-secure-erase-of-cf-card-over-usb-in-linux%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









          0














          You'll be all well with a single overwrite, but if you are paranoid, with multiple overwrites (let's say five times).
          I suggest you use the dd command.



          dd if=/dev/urandom of=/dev/<yourdevice> bs=1M count=8000



          Tweak the bs parameters until the operation will be fast enough, then adjust the count (now it is writing 8000 times 1 megabytes of random data). Be very cautious what parameter you give to of, although you can only target unmounted devices, you wouldn't want to randomize a partition that, say, contains all of your works.






          share|improve this answer



















          • 1





            An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

            – D.W.
            Aug 10 '11 at 21:28






          • 3





            Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

            – karatedog
            Aug 26 '11 at 10:58













          • @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

            – sleske
            Dec 26 '14 at 10:15
















          0














          You'll be all well with a single overwrite, but if you are paranoid, with multiple overwrites (let's say five times).
          I suggest you use the dd command.



          dd if=/dev/urandom of=/dev/<yourdevice> bs=1M count=8000



          Tweak the bs parameters until the operation will be fast enough, then adjust the count (now it is writing 8000 times 1 megabytes of random data). Be very cautious what parameter you give to of, although you can only target unmounted devices, you wouldn't want to randomize a partition that, say, contains all of your works.






          share|improve this answer



















          • 1





            An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

            – D.W.
            Aug 10 '11 at 21:28






          • 3





            Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

            – karatedog
            Aug 26 '11 at 10:58













          • @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

            – sleske
            Dec 26 '14 at 10:15














          0












          0








          0







          You'll be all well with a single overwrite, but if you are paranoid, with multiple overwrites (let's say five times).
          I suggest you use the dd command.



          dd if=/dev/urandom of=/dev/<yourdevice> bs=1M count=8000



          Tweak the bs parameters until the operation will be fast enough, then adjust the count (now it is writing 8000 times 1 megabytes of random data). Be very cautious what parameter you give to of, although you can only target unmounted devices, you wouldn't want to randomize a partition that, say, contains all of your works.






          share|improve this answer













          You'll be all well with a single overwrite, but if you are paranoid, with multiple overwrites (let's say five times).
          I suggest you use the dd command.



          dd if=/dev/urandom of=/dev/<yourdevice> bs=1M count=8000



          Tweak the bs parameters until the operation will be fast enough, then adjust the count (now it is writing 8000 times 1 megabytes of random data). Be very cautious what parameter you give to of, although you can only target unmounted devices, you wouldn't want to randomize a partition that, say, contains all of your works.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 9 '11 at 21:39









          karatedogkaratedog

          730511




          730511








          • 1





            An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

            – D.W.
            Aug 10 '11 at 21:28






          • 3





            Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

            – karatedog
            Aug 26 '11 at 10:58













          • @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

            – sleske
            Dec 26 '14 at 10:15














          • 1





            An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

            – D.W.
            Aug 10 '11 at 21:28






          • 3





            Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

            – karatedog
            Aug 26 '11 at 10:58













          • @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

            – sleske
            Dec 26 '14 at 10:15








          1




          1





          An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

          – D.W.
          Aug 10 '11 at 21:28





          An overwrite is a good first start, but an overwrite does not erase remnant data that may be left on bad blocks or on remapped blocks. I understand that there can be a significant amount of data left behind, even after a single overwrite. ATA Secure Erase is designed to address this problem. And every source I've ever read says that for flash-based media, it is very important to use ATA Secure Erase: an overwrite is not secure enough. That's why I'd like to use ATA Secure Erase, instead of an overwrite. So, any suggestions on how to do the ATA Secure Erase?

          – D.W.
          Aug 10 '11 at 21:28




          3




          3





          Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

          – karatedog
          Aug 26 '11 at 10:58







          Let's do some lite Common Criteria then. Do you value the possible damage of a suspected leak of data higher than the CF card? If you do, the simply burn the CF card to ashes.

          – karatedog
          Aug 26 '11 at 10:58















          @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

          – sleske
          Dec 26 '14 at 10:15





          @D.W.: Yes, that is true. However, accessing bad or remapped blocks requires some technical investment. You will have to replace the the card's firmware with a hacked version (if that is possible), or directly access the flash memory chips. This probably involves soldering and intricate knowledge of the card's internals. Very probably doable, but definitely not for a few hundred dollars. The CIA will most likely be able to pull it off - a nosy person poking through the card, most likely not.

          – sleske
          Dec 26 '14 at 10:15


















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f321086%2fhow-to-do-secure-erase-of-cf-card-over-usb-in-linux%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

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...