Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 17 Aug 2018, 13:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Security/Privacy
why SSD is better than HDD in terms of privacy
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
labbe5

Joined: 13 Nov 2013
Posts: 1271
Location: Canada

PostPosted: Sun 15 Jul 2018, 06:49    Post subject:  why SSD is better than HDD in terms of privacy
Subject description: data deleted on HDD can be recovered No such thing with SSD
 

With HDD, accidental delete of data, for example a folder of photographs, was recovered with the help of such apps as photorec, testdisk, scalpel, foremost, etc, since only a logical delete was done. The process was : no rewrite of HDD until all data lost are recovered.

On the other hand, with SSD, logical delete is immedialtely followed with a physical delete, to help with performance, so no apps can retrieve what has been accidentally deleted. Using photorec with SSD, you only will get junk.

So, if you have your precious data on SSD,, even your backups, be careful. When it is gone, it is definitely gone.

On the other hand, there is a positive side. When you willingly delete data, it is most likely definitively gone. No such apps as testdisk can be used to recover your data.

For the purpose of privacy, this is a positive side.

Further reading :
As mentioned in AJ's answer, traditionally when you "delete" a file the operating system (Windows 8 in this case) simply tells the hard drive that the file is no longer needed and the hard drive marks that file as unneeded but doesn't actually remove the data. This is a "logical delete." Actually removing the data is a "physical delete." With file-recovery software you can recover a "logically deleted" file because the data may not be gone yet.

However, SSDs have a featured called TRIM which immediately follows a logical delete with a physical delete. This improves the performance of the SSD, but comes with the cost of making file recovery impossible. I don't use Windows much, but from what I can tell this feature is enabled by default.

Because of this the "files" that were recovered are almost assuredly just filled with junk and there's no remnant of the original data left.

You can check if this feature is currently enabled on Windows 8 by opening a command line and entering the following: fsutil behavior query disabledeletenotify which will tell you the value is either 0 or 1. 0 means TRIM is enabled (the variable name is "disabled", so 0 is NOT disabled).

I've made this mistake too. It's a harsh lesson about the importance of proper backups.

https://photo.stackexchange.com/questions/45941/jpg-images-recovered-immediatelly-after-deleting-from-ssd-but-95-of-files-can
Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 1231
Location: Green Island baby!

PostPosted: Sun 15 Jul 2018, 17:43    Post subject:  

I disagree with this

I had a USB stick (a valid SSD Solid State Device) with 18 pictures on it .
I formatted that
I made a new FAT32 system

I ran Testdisk on that and it gave me no pictures recovered
I put one picture .jpg file on it
I deleted that
I ran Testdisk again

It picked up 19 pictures complete and accurately saved and displayed them .

Last edited by april on Tue 17 Jul 2018, 05:51; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger 
nic007


Joined: 13 Nov 2011
Posts: 2559
Location: Cradle of Humankind

PostPosted: Mon 16 Jul 2018, 03:24    Post subject:  

You recovered something after doing a complete reformat of the filesystem? Impressive.
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 293
Location: Reading UK

PostPosted: Mon 16 Jul 2018, 03:50    Post subject:  

An SSD has no knowledge of the filesystem. Deleting a file does not delete the data, it marks the space as unallocated.

If you mount the device with -o discard, then a linux filesystem driver (not NTFS) can tell the SSD to unmap the LBAs as soon as they are deallocated.
But this is not the default and can be quite tricky to get working through a USB to SATA bridge.

Alternatively if you run fstrim on the device (not VFAT) the linux filesystem driver will tell the SSD to unmap all unallocated LBAs, regardless of whether they are mapped or not.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2559
Location: Cradle of Humankind

PostPosted: Mon 16 Jul 2018, 03:56    Post subject:  

LateAdopter wrote:
An SSD has no knowledge of the filesystem. Deleting a file does not delete the data, it marks the space as unallocated.

If you mount the device with -o discard, then a linux filesystem driver (not NTFS) can tell the SSD to unmap the LBAs as soon as they are deallocated.
But this is not the default and can be quite tricky to get working through a USB to SATA bridge.

Alternatively if you run fstrim on the device (not VFAT) the linux filesystem driver will tell the SSD to unmap all unallocated LBAs, regardless of whether they are mapped or not.


Wouldn't a complete reformat overwrite existing files?
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 293
Location: Reading UK

PostPosted: Mon 16 Jul 2018, 04:08    Post subject:  

No.. You can tell it doesn't write the data because that would take a LONG time. A reformat just rewrites the filesystem.

With VFAT that is the FAT and the root directory. The subdirectories and the files are in the data area and are not touched.

This can rarely cause a problem if you reformat from one filesystem to another. Remnants of the previous filesystem can confuse the filesystem type detection.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2559
Location: Cradle of Humankind

PostPosted: Mon 16 Jul 2018, 05:20    Post subject:  

LateAdopter wrote:
No.. You can tell it doesn't write the data because that would take a LONG time. A reformat just rewrites the filesystem.

With VFAT that is the FAT and the root directory. The subdirectories and the files are in the data area and are not touched.

This can rarely cause a problem if you reformat from one filesystem to another. Remnants of the previous filesystem can confuse the filesystem type detection.

Not necessarily a long time. For instance some delete programs (like CCleaner) can delete files so that it can not be recovered (for normal drives that is, not sure about SSD but I guess that would include SSD drives). But I get your point ablout reformating (although I have never been able to recover files on a non-SSD drive after a complete format not just a quick format/erase).
Back to top
View user's profile Send private message 
Moat


Joined: 16 Jul 2013
Posts: 859
Location: Mid-mitten, USA

PostPosted: Mon 16 Jul 2018, 20:01    Post subject:  

I recall reading Trim is part of an SSD's onboard firmware, and USB flash drives normally don't (ever?) have and/or utilize it - which could explain April's above mentioned case.

Bob
Back to top
View user's profile Send private message 
Burn_IT


Joined: 12 Aug 2006
Posts: 3160
Location: Tamworth UK

PostPosted: Tue 17 Jul 2018, 07:08    Post subject:  

Trim usually takes place during long periods of inactivity and while the drive is present. USB Flash drives tend to be transient and formatted as superfloppies so the handling is going to be different.

I always try to change the control bit on all my flash drives so that they ARE treated as hard drives.
There are upsides and downsides to this, though the downsides are easy to overcome.
The upside is that file writes can be buffered and thus free up the OS quicker.
The downside is that you should always either "safely remove" or "eject" the drive from the OS and wait for the acknowledgement before removing the drive or data will be lost. It is always better to do this anyway.

_________________
"Just think of it as leaving early to avoid the rush" - T Pratchett
Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 1231
Location: Green Island baby!

PostPosted: Tue 17 Jul 2018, 17:56    Post subject:  

Burn_IT wrote:
I always try to change the control bit on all my flash drives so that they ARE treated as hard drives.

So what bit do you change and how? Is it a flag?
capture17817Smaller.png
 Description   
 Filesize   206.45 KB
 Viewed   109 Time(s)

capture17817Smaller.png

Back to top
View user's profile Send private message Yahoo Messenger 
Burn_IT


Joined: 12 Aug 2006
Posts: 3160
Location: Tamworth UK

PostPosted: Tue 17 Jul 2018, 18:07    Post subject:  

I use a Windows utility called TOFIXED which I got years ago and haven't looked for since.
_________________
"Just think of it as leaving early to avoid the rush" - T Pratchett
Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 1231
Location: Green Island baby!

PostPosted: Wed 18 Jul 2018, 04:35    Post subject:  

https://duckduckgo.com/?t=palemoon&q=TOFIXED&ia=web
https://duckduckgo.com/?q=TOFIXED+1.5&t=palemoon&ia=web

Not of much help at all.
Back to top
View user's profile Send private message Yahoo Messenger 
Burn_IT


Joined: 12 Aug 2006
Posts: 3160
Location: Tamworth UK

PostPosted: Wed 18 Jul 2018, 07:31    Post subject:  

Try sticking

treat usb like fixed disk

into google

_________________
"Just think of it as leaving early to avoid the rush" - T Pratchett
Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 1231
Location: Green Island baby!

PostPosted: Wed 18 Jul 2018, 17:26    Post subject:  

For those that like to get answers not cryptic "look yourself" remarks here is what I find on the "media bit" on USB drives.

I gather thisis mostly applicable to Windows users where windows insists on writing Trash and Info files Lost Directories and the like and generally wasting your space . Or if you want separate partitions for some purpose.

So for Puppy and Linux users its mostly irrelevant.

Quote:

Treat USB like fixed disk
Converting your USB flash drive from removable media to HDD (fixed hard drive) is particularly useful if you want to add extra partitions to the drive or if you want to make the drive bootable. To force a computer to recognize your USB flash drive as a fixed hard drive, you must flip the USB device's removable media bit. To flip the removable bit on your USB flash drive, you must use a special USB configuration software that will alter the USB's firmware.

Step 1
Download and extract Lexar BootIt. Lexar BootIt is a USB configuration software designed to create bootable USB drives.

Step 2
Insert your USB flash drive into a free USB slot. If necessary, connect a USB hub if you need additional USB slots.

Step 3
Run Lexar BootIt. Click the "Active" button next to "Partition," then click "Flip Removable Bit" to convert your USB drive into an HDD.

Step 4
Right-click "Start," then click "Explore." Remove your USB drive from your computer once the process is complete, then reinsert it. Your USB drive will appear in the list of drives.

Step 5
Right-click your USB drive, then click "Properties." Next to "Type," the USB drive should now read "Fixed Disk" or "Local Disk," rather than "Removable Disk."
Back to top
View user's profile Send private message Yahoo Messenger 
rufwoof

Joined: 24 Feb 2014
Posts: 2431

PostPosted: Wed 18 Jul 2018, 18:14    Post subject:  

Not tried it, but the RMB (removable media bit) is the 7th bit of the first byte. It might be sufficient to just dd if=/dev/zero of=/dev/sdx bs=1 count=1 without consequence on a FAT based USB.
_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Security/Privacy
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0561s ][ Queries: 12 (0.0074s) ][ GZIP on ]