Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Destroying data down to the 13th level??? Post 18920 by Perderabo on Thursday 4th of April 2002 08:17:40 AM
Old 04-04-2002
Quote:
Originally posted by LivinFree
I know it would be taxing on the disk, and possibly the entire system, but for curiosity sake, would it work?
I am not sure of what urandom is, so I must pass on that. Using dd to copy /dev/zero to a disk special file will work in all cases if you use the default block sizes as you are doing.

You don't specify whether you are using a block special file or a character special file to access the disk. That cat would be expensive but would work if you use a block special file.

It is not guaranteed to work if you use a character special file, but it might depending on the disk driver, the disk hardware, and block size used for physical writes by the cat command. A raw disk device requires i/o to be aligned on a DEV_BSIZE boundary. But it's not guaranteed to fail if you don't do that.

The second smartest way to do this would be to use dd to copy /dev/zero to the raw device but using a very large block size that is a multiple of DEV_BSIZE.

But HP-UX has mediainit and SunOS has format. Instead of zeros on every pass, they use various patterns chosen by hardware experts to really test the disk. If you need more security than that, you need to use sledge hammers and blow torches.
 

4 More Discussions You Might Find Interesting

1. AIX

destroying the OS

Hi Guys I have a cool job to do and that's to destroy aix5.1 on two of my servers. I need to get rid of all information. I have thought of a way of doing this and wondered if any of you had any ideas!! Get the machine into maint mode and run the dd cmd! (7 Replies)
Discussion started by: animata
7 Replies

2. Solaris

Difference between run level & init level

what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies

3. Shell Programming and Scripting

Replace a value after 13th comma in a string

Suppose b=50,0,0,40,1,0,5000,gold,0,0,0,0,32,9,2,0,10000,0,0,0,0,0,0,0,0,0,BSNL_SMS_Bundle ,null,null,null,null,null,null,null,null,null,0,0,0,0,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,0,null,null,0,0,405564245,0 c=11 After 13th comma, the value of 9 needs to be changed and to be filled by another... (4 Replies)
Discussion started by: karan23kohli
4 Replies

4. Red Hat

SSL certificate generation on OS level or application level

We have a RHEL 5.8 server at the production level and we have a Java application on this server. I know of the SSL certificate generation at the OS (RHEL) level but it is implemented on the Java application by our development team using the Java keytool. My doubt is that is the SSL generation can... (3 Replies)
Discussion started by: RHCE
3 Replies
RAW(8)							      System Manager's Manual							    RAW(8)

NAME
raw - bind a Linux raw character device SYNOPSIS
raw /dev/raw/raw<N> <major> <minor> raw /dev/raw/raw<N> /dev/<blockdev> raw -q /dev/raw/raw<N> raw -qa DESCRIPTION
raw is used to bind a Linux raw character device to a block device. Any block device may be used: at the time of binding, the device driver does not even have to be accessible (it may be loaded on demand as a kernel module later). raw is used in two modes: it either sets raw device bindings, or it queries existing bindings. When setting a raw device, /dev/raw/raw<N> is the device name of an existing raw device node in the filesystem. The block device to which it is to be bound can be specified either in terms of its major and minor device numbers, or as a path name /dev/<blockdev> to an existing block device file. The bindings already in existence can be queried with the -q option, with is used either with a raw device filename to query that one device, or with the -a option to query all bound raw devices. Unbinding can be done by specifying major and minor 0. Once bound to a block device, a raw device can be opened, read and written, just like the block device it is bound to. However, the raw device does not behave exactly like the block device. In particular, access to the raw device bypasses the kernel's block buffer cache entirely: all I/O is done directly to and from the address space of the process performing the I/O. If the underlying block device driver can support DMA, then no data copying at all is required to complete the I/O. Because raw I/O involves direct hardware access to a process's memory, a few extra restrictions must be observed. All I/Os must be cor- rectly aligned in memory and on disk: they must start at a sector offset on disk, they must be an exact number of sectors long, and the data buffer in virtual memory must also be aligned to a multiple of the sector size. The sector size is 512 bytes for most devices. OPTIONS
-q Set query mode. raw will query an existing binding instead of setting a new one. -a With -q , specifies that all bound raw devices should be queried. -h provides a usage summary. BUGS
The Linux dd (1) command should be used without bs= option or the blocksize needs to be a multiple of the sector size of the device (512 bytes usually) otherwise it will fail with "Invalid Argument" messages (EINVAL). Raw I/O devices do not maintain cache coherency with the Linux block device buffer cache. If you use raw I/O to overwrite data already in the buffer cache, the buffer cache will no longer correspond to the contents of the actual storage device underneath. This is deliberate, but is regarded either a bug or a feature depending on who you ask! AUTHOR
Stephen Tweedie (sct@redhat.com) AVAILABILITY
The raw command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. Version 0.1 Aug 1999 RAW(8)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy