Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ClassyPhillip

macrumors newbie
Original poster
May 15, 2014
1
0
I'm trying to figure out a way to wipe my ram before shutting down, it is difficult to explain why, but it has nothing to do with the possibility of a cold boot attack.

Currently I have a command I run in Terminal before I shutdown my computer

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nomount ram://8388608`; diskutil secureErase freespace 1 /Volumes/RAM\ Disk; diskutil unmount /Volumes/RAM\ Disk; purge; sudo shutdown -h now

This creates a virtual "RAM Disc" and mounts it, after this it passes over the free space of the virtual disc with ones and zeros at random once, then it mounts the disc, purges and then shuts down. Could I improve this command to do more besides doing more passes? Could I make the virtual disc encrypted? Or could I just make a command that passes over the ram once like it does then just shuts down?
 
To be meaningful I think you would need to code such a routine in firmware, the OS can't do this, assuming you want the actual RAM zeroed out rather than a virtual representation of it.

What are you trying to achieve?
 
No need to worry about wiping ram before a shut down. Information stored in ram needs electricity, turn off the computer you remove the electricity and thus the info. To summarize what others stated. You shut it down, the ram gets wiped.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.