LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2024, 12:38 AM   #1
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Rep: Reputation: 0
how to secure erase Jetson device


Hi,

I need to erase internal eMMC 64 GB and external NVM memory in my jetson AgX Xavier hardware which is flashed with linux for tegra flavour of ubuntu 20.04 focal

Theere no steps for secure erase on the vendor NVIdia website.
They have some documentation link for security features as shown below


https://docs.nvidia.com/jetson/archi.../Security.html

I want to know, if there are any particular steps to complete secure erase my memory eMMC and NVM.

Thanks.
 
Old 04-10-2024, 12:53 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
if I understand well this is encrypted: https://docs.nvidia.com/jetson/archi...ncryption.html
In that case you only need to remove/destroy/forget the encryption key and nobody will be able to find anything on it any more.
 
Old 04-10-2024, 04:08 AM   #3
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks a lot for your response.

Quote:
Originally Posted by pan64 View Post
if I understand well this is encrypted: https://docs.nvidia.com/jetson/archi...ncryption.html
It is not encrypted still, but they have the option for disk encryption as per that link.We haven't tried it.

Quote:
Originally Posted by pan64 View Post
In that case you only need to remove/destroy/forget the encryption key and nobody will be able to find anything on it any more.

You mean we can use disk Encryption method as a substitute/alternative method for Secure erase?

I am not sure, if we would be able to convince our customer to agree for disk encryption instead of secure erase.

Not sure after disk encryption, will it ask for the password each time, if you try to mount/copy the contents from the disk. We need to check on this.
 
Old 04-10-2024, 04:20 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
disk encryption will make the disk useless without the key, there is no need to wipe it (if encrypted).
disk can be unlocked at boot (or mount), there is no need to type password every time you use it. But obviously it can be different if it is an external disk (for example).
It depends how do you to configure it.
Anyway, you only need to overwrite the whole disk with random numbers (or just with anything, like zero) to erase the content completely.
 
Old 04-10-2024, 07:23 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,637

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Nagesh_accord View Post
Thanks a lot for your response. It is not encrypted still, but they have the option for disk encryption as per that link.We haven't tried it.
So it's not encrypted; what then have you actually TRIED to achieve your goals??? Have you done anything??? The nVidia site has ample documentation on how to re-flash/format the device...did you try putting "how to format nvidia jetson" into a search engine???
Quote:
You mean we can use disk Encryption method as a substitute/alternative method for Secure erase? I am not sure, if we would be able to convince our customer to agree for disk encryption instead of secure erase. Not sure after disk encryption, will it ask for the password each time, if you try to mount/copy the contents from the disk. We need to check on this.
In order to find out more, you'll actually have to DO something. Related to this thread?
https://www.linuxquestions.org/quest...em-4175735565/

Again: you need to have taken some action, done something, or have some actionable information to work with. Posting things full of speculation without any effort is pointless...until you try something, have some hard information, or know details, there's zero anyone can tell you.
 
Old 04-10-2024, 11:50 PM   #6
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
disk encryption will make the disk useless without the key, there is no need to wipe it (if encrypted).
disk can be unlocked at boot (or mount), there is no need to type password every time you use it.

It depends how do you to configure it.

Anyway, you only need to overwrite the whole disk with random numbers (or just with anything, like zero) to erase the content completely.
ok. understood.

Quote:
Originally Posted by pan64 View Post

But obviously it can be different if it is an external disk (for example).
Now, that we came to know from our hardware team that our external NVM SSD drive supports( but internal eMMC memory does not support as its NVidia jetson product, they have only jetson security feature like secure boot, disk encryption etc ) inbuilt Secure erase feature, we only need to execute there OpCode( 80h - Format nvm) as per the NVM drive vendor's data sheet to erase the NVM drive securely.

I have some queries regarding the same:

1) Suppose this secure erase is triggered with a button connected via a GPIO pin state change, how can we handle this from the user space.
although i have below sample shell script code to check the state of gpio pin as shown below:

Quote:
gpio_value=$(cat /sys/class/gpio/PBB.02/value)
while true; do
value=$(cat /sys/class/gpio/PBB.02/value)
if [[ $gpio_value != $value ]]; then
gpio_value=$value
echo "$(date +'%T.%N') value changed to $gpio_value"
fi
done

2) Any idea how to call the NVM drive tool provided by the vendor from inside this shell script? so that we can execute the oPcode - 80h - from that NVM drive tool/terminal to initiate secure erase.
Any thoughts on this.

Note: I would be running this script infinitely on boot each time in the background by calling this script inside/etc/rc.local file.

Thanks in advance.
 
Old 04-11-2024, 12:20 AM   #7
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
So it's not encrypted; what then have you actually TRIED to achieve your goals??? Have you done anything???
Our earlier requirement was just normal flash so I have done normal flash as per the documentation provided by NVidia. Now this new requirement of secure erase has creeped in from the customer, so trying to figure out if Jetson security supports this secure erase inbuilt feature on there ineternal memories like eMMC ( in my case of Jetson AGX Xavier Industrial module).
I have been parallelly discussing with nvidia experts and moderators in there developer forums to gather more information on this.

Quote:
Originally Posted by TB0ne View Post
The nVidia site has ample documentation on how to re-flash/format the device...did you try putting "how to format nvidia jetson" into a search engine???
I have been working on this project from 6 months now referring to NVidia documentation. They have flashing option, but there it not straight forward erase or data recovery tool options. I have tried searching through google also and have gathered information about the same.

Quote:
Originally Posted by TB0ne View Post
In order to find out more, you'll actually have to DO something. Related to this thread?
https://www.linuxquestions.org/quest...em-4175735565/
sorry. Dont get confused. that thread is completely a new project based of data recording with NAS support, which I am bit new to it.
This thread is for a Nvidia based Jetson device project.

Quote:
Originally Posted by TB0ne View Post
Again: you need to have taken some action, done something, or have some actionable information to work with. Posting things full of speculation without any effort is pointless...until you try something, have some hard information, or know details, there's zero anyone can tell you.
Sure. In coming days, I will try to put more hands on technical information like scripts/code and ask root level doubts than high level which dont have more clarity.

Thanks for all the support.
 
Old 04-11-2024, 08:22 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,637

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Nagesh_accord View Post
Our earlier requirement was just normal flash so I have done normal flash as per the documentation provided by NVidia. Now this new requirement of secure erase has creeped in from the customer, so trying to figure out if Jetson security supports this secure erase inbuilt feature on there ineternal memories like eMMC ( in my case of Jetson AGX Xavier Industrial module). I have been parallelly discussing with nvidia experts and moderators in there developer forums to gather more information on this.
Since this is an nVidia device under support, dealing with them will get you the answers. And since your 'customer' is paying you to do this, why are you asking us to do your job for you???
Quote:
I have been working on this project from 6 months now referring to NVidia documentation. They have flashing option, but there it not straight forward erase or data recovery tool options. I have tried searching through google also and have gathered information about the same.
If it's taken you six months to contact nVidia about a supported device, there isn't much we can do to help you at all.
Quote:
sorry. Dont get confused. that thread is completely a new project based of data recording with NAS support, which I am bit new to it. This thread is for a Nvidia based Jetson device project. Sure. In coming days, I will try to put more hands on technical information like scripts/code and ask root level doubts than high level which dont have more clarity.
Not confused at all, but again you seem to have lots of 'requirements', but little information to share. We can try to help with actual problems, but you're essentially telling us that you can't understand the documentation from the people who built the device, and that you'd like us to read it and explain it to you. If you're dealing with nVidia directly, then nVidia support can easily help you with something as simple as formatting/erasing a disk.
 
Old 04-18-2024, 12:45 AM   #9
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Since this is an nVidia device under support, dealing with them will get you the answers. And since your 'customer' is paying you to do this, why are you asking us to do your job for you???
Since the Operating system flashed on Nvidia SOM is Linux for tegra which is again a flavour of Ubunutu 20.04 Focal LTS which is again a type of linux distribution, I am asking this query in this linux platform forum.

Quote:
Originally Posted by TB0ne View Post
If it's taken you six months to contact nVidia about a supported device, there isn't much we can do to help you at all.
I did not taken six months to work on this secure erase feature. This requirement popped up few days back, thats when I posted a query here.
In 6 months i have worked on GPIO,
CAN, Audio, Camera, Serial, Ethernet and other features.

Quote:
Originally Posted by TB0ne View Post
Not confused at all, but again you seem to have lots of 'requirements', but little information to share.
I dont have lot of requirements for this secure erase.


Quote:
Originally Posted by TB0ne View Post
We can try to help with actual problems, but you're essentially telling us that you can't understand the documentation from the people who built the device, and that you'd like us to read it and explain it to you.
I posted that link just for reference not essentially to read completely and explain me. Just in case, you may have some idea about this secure erase.

Quote:
Originally Posted by TB0ne View Post
If you're dealing with nVidia directly, then nVidia support can easily help you with something as simple as formatting/erasing a disk.
With lot of study and interaction with our NVM SSD drive vendor, we came to know, we can perform SECURE ERASE on NVM drive.
Nvidia Jetson does not support Secure erase on there inbuilt eMMC memory inside there SOM.


Below are few steps to perform Secure erase on a NVM SSD drive:

1) Install nvme-cli tool first with
$sudo apt install nvme-cli

2) Next list out all the nvme device on your hardware using below command:
$sudo nvme list

3) Next execute the below erase command to perform secure erase
$sudo nvme format -s1 /de/nvm30n1
 
Old 04-18-2024, 06:55 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,637

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Nagesh_accord View Post
Since the Operating system flashed on Nvidia SOM is Linux for tegra which is again a flavour of Ubunutu 20.04 Focal LTS which is again a type of linux distribution, I am asking this query in this linux platform forum.
It is not a 'flavor of Ubuntu'...it is heavily customized by nVidia for that device specifically. There are a LOT of things based on Linux.
Quote:
I did not taken six months to work on this secure erase feature. This requirement popped up few days back, thats when I posted a query here. In 6 months i have worked on GPIO, CAN, Audio, Camera, Serial, Ethernet and other features.
Great...so since it cropped up as a 'requirement',have you (AGAIN) contacted nVidia and asked them for support on their device???
Quote:
I dont have lot of requirements for this secure erase.
So following the documentation you can easily find on their website. Also, it's odd that you claim to not have a lot of 'requirements', yet seem to have completed the product and shipped it to a customer:

https://forums.developer.nvidia.com/...trial/288457/6

...where you also got a good deal of advice from the people who built it.
Quote:
I posted that link just for reference not essentially to read completely and explain me. Just in case, you may have some idea about this secure erase.
Again: this is a PROPRIETARY DEVICE...not a standard Linux PC.
Quote:
With lot of study and interaction with our NVM SSD drive vendor, we came to know, we can perform SECURE ERASE on NVM drive. Nvidia Jetson does not support Secure erase on there inbuilt eMMC memory inside there SOM. Below are few steps to perform Secure erase on a NVM SSD drive:

1) Install nvme-cli tool first with
$sudo apt install nvme-cli

2) Next list out all the nvme device on your hardware using below command:
$sudo nvme list

3) Next execute the below erase command to perform secure erase
$sudo nvme format -s1 /de/nvm30n1
...which can easily work if you put the NVME drive into an external caddy. Or you can use the existing dd command to write random junk to the mounted disk easily, or do any number of other things to render the device unrecoverable. But you either say you have no 'requirements', or you have several...which is it???
 
Old 04-19-2024, 12:38 AM   #11
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
It is not a 'flavor of Ubuntu'...it is heavily customized by nVidia for that device specifically. There are a LOT of things based on Linux.
Ok. Thanks for the updates.

Quote:
Originally Posted by TB0ne View Post
Great...so since it cropped up as a 'requirement',have you (AGAIN) contacted nVidia and asked them for support on their device???
yes

Quote:
Originally Posted by TB0ne View Post
So following the documentation you can easily find on their website. Also, it's odd that you claim to not have a lot of 'requirements', yet seem to have completed the product and shipped it to a customer:
I meant I asked only secure erase query here and not any other requirements here.


Quote:
Originally Posted by TB0ne View Post
https://forums.developer.nvidia.com/...trial/288457/6

...where you also got a good deal of advice from the people who built it.
yes


Quote:
Originally Posted by TB0ne View Post
Again: this is a PROPRIETARY DEVICE...not a standard Linux PC.

...which can easily work if you put the NVME drive into an external caddy. Or you can use the existing dd command to write random junk to the mounted disk easily, or do any number of other things to render the device unrecoverable.
OK.I understand that nvme format command does the same dd command stuff inside and/or cryptographic key erase inside the disk which results in secure erase.


Quote:
Originally Posted by TB0ne View Post
But you either say you have no 'requirements', or you have several...which is it???
In this thread, I have asked about only secure erase requirement.

I have one more query:
1) Do you have any idea about any commands/method, to recover the data from a secure erased NVMe. so that we can fail in that process and get confirmed that secure erase has happened successfully.
 
Old 04-19-2024, 07:19 AM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
ifyou wantt oeras eyour machi netoh ideit fromu sthet hreel etter agenc ieswe willr eadit anywa yxxxx
 
Old 04-19-2024, 08:34 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,637

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Nagesh_accord View Post
Ok. Thanks for the updates.
I meant I asked only secure erase query here and not any other requirements here.
OK.I understand that nvme format command does the same dd command stuff inside and/or cryptographic key erase inside the disk which results in secure erase.
In this thread, I have asked about only secure erase requirement.

I have one more query:
1) Do you have any idea about any commands/method, to recover the data from a secure erased NVMe. so that we can fail in that process and get confirmed that secure erase has happened successfully.
Sorry, but at what point are you actually going to do the job you were hired to do by your customers???

You need to think about what a 'secure erased' drive is, which will then tell you why your question is pointless. You can then take some of the money they're paying you, and YOU, PERSONALLY, can build a test for YOUR CUSTOMER. Go do your own research on how to do a secure erase, and look up how to test such things.
 
Old 04-20-2024, 08:39 AM   #14
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sundialsvcs View Post
ifyou wantt oeras eyour machi netoh ideit fromu sthet hreel etter agenc ieswe willr eadit anywa yxxxx
I dont understand this language
 
Old 04-20-2024, 08:49 AM   #15
Nagesh_accord
LQ Newbie
 
Registered: Nov 2023
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Sorry, but at what point are you actually going to do the job you were hired to do by your customers???
I am not doing customer job, but it is our duty to meet there requirements and implement them.


Quote:
Originally Posted by TB0ne View Post
You need to think about what a 'secure erased' drive is, which will then tell you why your question is pointless.

I have a point in my question. I know once we secure erase, there was nothing left on the NVMe drive and I even remounted it once again to access it after secure erase.

But in order to more deeply prove, that no one in this world can recover any data from the securely erased NVMe drive, I was asking if any experts have some idea.

Also read in some documentation that we have "hexdump" command to check on the secured erase drive and it should display all ZEROS. I tried this command on my secure erased NVMe, but found initally some zeros, but deep down there were some non zero values as it was 2 TB SD drive.

Quote:
Originally Posted by TB0ne View Post
You can then take some of the money they're paying you, and YOU, PERSONALLY, can build a test for YOUR CUSTOMER. Go do your own research on how to do a secure erase, and look up how to test such things.
ok. I will try to reasearch outside this forum as per your advise, if there are no experts to answer about recovery methods/tools/commands. Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Secure Deleting Files in Linux? Overwriting files with bits to secure erase? d9esco Linux - Newbie 9 09-02-2015 10:18 AM
Secure Erase causes HDD to stop being detected galapogos Linux - Hardware 4 07-16-2010 10:17 PM
Secure erase HDD from within itself paddyrooney Linux - Security 4 12-16-2009 04:20 PM
Best method to secure erase an external hard drive xri Linux - Hardware 1 01-16-2009 11:40 PM
Secure Erase Tool? subaruwrx General 5 08-14-2004 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration