Wipeing RAM before shutdown

Discussion in 'MacBook Pro' started by ClassyPhillip, May 15, 2014.

  1. ClassyPhillip macrumors newbie

    Joined:
    May 15, 2014
    #1
    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?
     
  2. Merode macrumors 6502

    Merode

    Joined:
    Nov 5, 2013
    Location:
    Warszawa, Poland
    #2
    You do realise that RAM is wiped as soon as you power off your Mac because of the way RAM works?
     
  3. simonsi macrumors 601

    simonsi

    Joined:
    Jan 3, 2014
    Location:
    Auckland
    #3
    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?
     
  4. AndyK macrumors 65816

    AndyK

    Joined:
    Jan 10, 2008
  5. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #5
    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.
     

Share This Page