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?
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?