On Tue, Jun 13, 2006 at 12:14:21PM -0700, Joe wrote: > I've having a problem understanding how to write data to a disk. > I want to wipe an old hard drive before getting rid of it. > I have attached the hard drive to my system via usb. > > Normally, this would work (in different OS's): > > # dd if=/dev/urandom of=/dev/sd0
Specify the slice (i.e. /dev/rsd0c to access the entire disk) > > However, this command creates a file /dev/sd0 and fills it with random > data. I want to write this data to the disk instead. > > The same thing happens when I use /dev/rsd0. > > Any help would be appreciated. > > > > > OpenBSD 3.9 (GENERIC) #617: Thu Mar 2 02:26:48 MST 2006 > [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC > cpu0: Intel(R) Pentium(R) 4 CPU 3.00GHz ("GenuineIntel" 686-class) 3 GHz > cpu0: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,CNXT-ID > real mem = 2146140160 (2095840K) > avail mem = 1952206848 (1906452K) > using 4278 buffers containing 107409408 bytes (104892K) of memory > mainbus0 (root) > bios0 at mainbus0: AT/286+(00) BIOS, date 01/21/04, BIOS32 rev. 0 @ 0xf0010 > apm0 at bios0: Power Management spec V1.2 > apm0: AC on, battery charge unknown > apm0: flags 30102 dobusy 0 doidle 1 > pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000 > pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf3d40/208 (11 entries) > pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801EB/ER LPC" rev 0x00) > pcibios0: PCI bus #3 is the last bus > bios0: ROM list: 0xc0000/0xf800 > cpu0 at mainbus0 > pci0 at mainbus0 bus 0: configuration mode 1 (no bios) > pchb0 at pci0 dev 0 function 0 "Intel 82875P Host" rev 0x02 > ppb0 at pci0 dev 1 function 0 "Intel 82875P AGP" rev 0x02 > pci1 at ppb0 bus 1 > vga1 at pci1 dev 0 function 0 "NVIDIA Quadro4 NVS" rev 0xc1 > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) > wsdisplay0: screen 1-5 added (80x25, vt100 emulation) > ppb1 at pci0 dev 3 function 0 "Intel 82875P PCI-CSA" rev 0x02 > pci2 at ppb1 bus 2 > em0 at pci2 dev 1 function 0 "Intel PRO/1000CT (82547EI)" rev 0x00: irq > 10, address 00:11:11:b3:77:c6 > uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: irq 11 > usb0 at uhci0: USB revision 1.0 > uhub0 at usb0 > uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: irq 5 > usb1 at uhci1: USB revision 1.0 > uhub1 at usb1 > uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1 > uhub1: 2 ports with 2 removable, self powered > uhci2 at pci0 dev 29 function 2 "Intel 82801EB/ER USB" rev 0x02: irq 10 > usb2 at uhci2: USB revision 1.0 > uhub2 at usb2 > uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1 > uhub2: 2 ports with 2 removable, self powered > uhci3 at pci0 dev 29 function 3 "Intel 82801EB/ER USB" rev 0x02: irq 11 > usb3 at uhci3: USB revision 1.0 > uhub3 at usb3 > uhub3: Intel UHCI root hub, rev 1.00/1.00, addr 1 > uhub3: 2 ports with 2 removable, self powered > ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: irq 9 > usb4 at ehci0: USB revision 2.0 > uhub4 at usb4 > uhub4: Intel EHCI root hub, rev 2.00/1.00, addr 1 > uhub4: 8 ports with 8 removable, self powered > ppb2 at pci0 dev 30 function 0 "Intel 82801BA AGP" rev 0xc2 > pci3 at ppb2 bus 3 > emu0 at pci3 dev 1 function 0 "Creative Labs SoundBlaster Live" rev > 0x07: irq 11 > ac97: codec id 0x83847608 (SigmaTel STAC9708/11) > ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D > audio0 at emu0 > "Creative Labs PCI Gameport Joystick" rev 0x07 at pci3 dev 1 function 1 > not configured > ichpcib0 at pci0 dev 31 function 0 "Intel 82801EB/ER LPC" rev 0x02 > pciide0 at pci0 dev 31 function 1 "Intel 82801EB/ER IDE" rev 0x02: DMA, > channel 0 configured to compatibility, channel 1 configured to compatibility > wd0 at pciide0 channel 0 drive 0: <ST3120022A> > wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 > atapiscsi0 at pciide0 channel 1 drive 0 > scsibus0 at atapiscsi0: 2 targets > cd0 at scsibus0 targ 0 lun 0: <SONY, CD-ROM CDU5212, 5YS1> SCSI0 5/cdrom > removable > cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 > pciide1 at pci0 dev 31 function 2 "Intel 82801EB SATA" rev 0x02: DMA, > channel 0 configured to native-PCI, channel 1 configured to native-PCI > pciide1: using irq 10 for native-PCI interrupt > wd1 at pciide1 channel 0 drive 0: <Maxtor 6L300S0> > wd1: 16-sector PIO, LBA48, 286188MB, 586114704 sectors > wd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5 > ichiic0 at pci0 dev 31 function 3 "Intel 82801EB/ER SMBus" rev 0x02: irq 3 > iic0 at ichiic0 > adt0 at iic0 addr 0x2e: emc6d10x (ADT7460) rev 65 > isa0 at ichpcib0 > isadma0 at isa0 > pckbc0 at isa0 port 0x60/5 > pckbd0 at pckbc0 (kbd slot) > pckbc0: using irq 1 for kbd slot > wskbd0 at pckbd0: console keyboard, using wsdisplay0 > pcppi0 at isa0 port 0x61 > midi0 at pcppi0: <PC speaker> > spkr0 at pcppi0 > lpt0 at isa0 port 0x378/4 irq 7 > npx0 at isa0 port 0xf0/16: using exception 16 > pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 > fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec > biomask ff6d netmask ff6d ttymask ffef > pctr: user-level cycle counter enabled > uhub5 at uhub4 port 1 > uhub5: Standard Microsystems product 0xa700, rev 2.00/0.00, addr 2 > uhub5: 4 ports with 4 removable, self powered, multiple transaction > translators > uhidev0 at uhub5 port 1 configuration 1 interface 0 > uhidev0: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM), rev > 1.10/3.00, addr 3, iclass 3/1 > ums0 at uhidev0: 3 buttons and Z dir. > wsmouse0 at ums0 mux 0 > uhidev1 at uhub5 port 2 configuration 1 interface 0 > uhidev1: Microsoft Natural, rev 2.00/2.07, addr 4, iclass 3/1 > ukbd0 at uhidev1: 8 modifier keys, 6 key codes > wskbd1 at ukbd0 mux 1 > wskbd1: connecting to wsdisplay0 > dkcsum: wd0 matches BIOS drive 0x80 > dkcsum: wd1 matches BIOS drive 0x81 > root on wd0a > rootdev=0x0 rrootdev=0x300 rawdev=0x302 > umass0 at uhub5 port 3 configuration 1 interface 0 > umass0: JMicron USB to ATA/ATAPI Bridge, rev 2.00/1.00, addr 5 > umass0: using SCSI over Bulk-Only > scsibus1 at umass0: 2 targets > sd0 at scsibus1 targ 1 lun 0: <IC35L020, SVPTV153100, A45A> SCSI2 > 0/direct fixed > sd0: 19458MB, 19458 cyl, 64 head, 32 sec, 512 bytes/sec, 39851760 sec total