View Single Post
  #2   (View Single Post)  
Old 21st June 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,106
Default

The RAMDISK kernel included with installation media does not have a lot of space, so many things are left out of it, including many device special files. They are intended to be created dynamically when needed. Use # cd /dev && sh MAKEDEV sd0 sd1 to create these two sets of device special files for these two disk drives.

rd0 is a the small RAM disk where the OpenBSD system is running from. The root directory /, the /dev directory, /bin, /sbin, /usr, /var, .... are all in RAM. This small kernel and RAM disk are loaded into RAM during boot.

Your USB stick is likely to be sd1, with sd0 being the workstation's hard drive.

When you have determined exactly which of the two devices has the data you want to destroy on it, use the raw device special file for the "c" partition -- rsd0c or rsd1c -- to overlay the data sectors with zeros. The "c" partition is a special partition containing all sectors of the drive. Example: # dd if=/dev/zero of=/dev/rsd0c bs=32m

Please note, dd(1) will only overwrite data sectors addressable by the OS. Sectors that have been set aside as bad by the drive electronics will not be erased. To overwrite the entire drive including non-addressable sectors, the drive's Secure Erase command must be used. On an installed OpenBSD system, this can be performed with the built-in atactl(8) utility for ATA drives.

Last edited by jggimi; 21st June 2020 at 12:48 PM. Reason: ./ changed to sh. MAKEDEV(8) is not an executable file in the RAMDISK kernel.
Reply With Quote