DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default dd: end of device

I'm trying to UFS-format a disk, but whenever I try to use dd, I get this:

Code:
$ sudo dd if=/dev/zero of=/dev/da0 bs=1k count=1
dd: /dev/da0: end of device
1+0 records in
0+0 records out
0 bytes transferred in 0.000768 secs (0 bytes/sec)
It's a PATA drive connected via an IDE-to-USB adapter. What could be wrong?
Reply With Quote
  #2   (View Single Post)  
Old 25th August 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

First of all, why are you trying to zero the device in the first place? that's entirely unrelated to "formatting" a partition with a UFS file system.

As for the dd issue, seems rather obvious... are you sure you're using the correct device node? post your dmesg.
Reply With Quote
  #3   (View Single Post)  
Old 25th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by BSDfan666 View Post
First of all, why are you trying to zero the device in the first place? that's entirely unrelated to "formatting" a partition with a UFS file system.

As for the dd issue, seems rather obvious... are you sure you're using the correct device node? post your dmesg.
I'm trying to zero the device because that's what the handbook says adding disks:

http://www.freebsd.org/doc/en_US.ISO...ks-adding.html
Reply With Quote
  #4   (View Single Post)  
Old 25th August 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

I see now, didn't notice the count argument... it's removing any existing MBR/PBR data.

Regardless, I ask again, are you sure /dev/da0 is the device node you should be using... if it is, it could be a defective USB->IDE controller, I've seen quite a few of them in my time.
Reply With Quote
  #5   (View Single Post)  
Old 25th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by BSDfan666 View Post
I see now, didn't notice the count argument... it's removing any existing MBR/PBR data.

Regardless, I ask again, are you sure /dev/da0 is the device node you should be using... if it is, it could be a defective USB->IDE controller, I've seen quite a few of them in my time.
Hmm. Could it be defective even if I'm able to use it well under Windows?
Reply With Quote
  #6   (View Single Post)  
Old 25th August 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Quote:
Originally Posted by ebzzry View Post
Hmm. Could it be defective even if I'm able to use it well under Windows?
Potentially, some hardware manufactures design their hardware to be supported with vendors implementation of standards, not the standards themselves.. which results in "quirky" hardware.

On OpenBSD, one the first USB enclosures I bought didn't work.. I could read, but not write to devices attached to it.

It did however, work fine on a OS X system.. and the enclosure I bought after, with a JMicron chipset - worked fine.

Again, best post the dmesg... just to be on the safe side.
Reply With Quote
  #7   (View Single Post)  
Old 25th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by BSDfan666 View Post
Potentially, some hardware manufactures design their hardware to be supported with vendors implementation of standards, not the standards themselves.. which results in "quirky" hardware.

On OpenBSD, one the first USB enclosures I bought didn't work.. I could read, but not write to devices attached to it.

It did however, work fine on a OS X system.. and the enclosure I bought after, with a JMicron chipset - worked fine.

Again, best post the dmesg... just to be on the safe side.
OK. Here's the dmesg:

Code:
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-RELEASE #0: Fri Aug  1 00:04:38 PHT 2008
    root@ecs2.decorp.com.ph:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) M processor 1.60GHz (1596.01-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6d8  Stepping = 8
  Features=0xafe9fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE>
  Features2=0x180<EST,TM2>
  AMD Features=0x100000<NX>
real memory  = 1063780352 (1014 MB)
avail memory = 1027358720 (979 MB)
ACPI APIC Table: <INTEL  ALVISO  >
ioapic0: Changing APIC ID to 1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
hptrr: HPT RocketRAID controller driver v1.1 (Aug  1 2008 00:04:08)
acpi0: <PTLTD Ohlone00> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x17> port 0x62,0x66 on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
cpu0: <ACPI CPU> on acpi0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
acpi_acad0: <AC Adapter> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
battery1: <ACPI Control Method Battery> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x4800-0x4807 mem 0xb0080000-0xb00fffff,0xc0000000-0xcfffffff,0xb0000000-0xb003ffff irq 16 at device 2.0 on pci0
agp0: <Intel 82915GM (915GM GMCH) SVGA controller> on vgapci0
agp0: detected 7932k stolen memory
agp0: aperture size is 256M
vgapci1: <VGA-compatible display> at device 2.1 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 17 at device 28.0 on pci0
pci2: <ACPI PCI bus> on pcib1
mskc0: <Marvell Yukon 88E8053 Gigabit Ethernet> port 0x6000-0x60ff mem 0xb4000000-0xb4003fff irq 16 at device 0.0 on pci2
msk0: <Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x01> on mskc0
msk0: Ethernet address: 00:03:25:1c:0f:eb
miibus0: <MII bus> on msk0
e1000phy0: <Marvell 88E1111 Gigabit PHY> PHY 0 on miibus0
e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX-FDX, auto
mskc0: [FILTER]
uhci0: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-A> port 0x4820-0x483f irq 23 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-B> port 0x4840-0x485f irq 22 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-C> port 0x4860-0x487f irq 21 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
uhci3: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-D> port 0x4880-0x489f irq 21 at device 29.3 on pci0
uhci3: [GIANT-LOCKED]
uhci3: [ITHREAD]
usb3: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-D> on uhci3
usb3: USB revision 1.0
uhub3: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb3
uhub3: 2 ports with 2 removable, self powered
ehci0: <Intel 82801FB (ICH6) USB 2.0 controller> mem 0xb0040000-0xb00403ff irq 23 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: <Intel 82801FB (ICH6) USB 2.0 controller> on ehci0
usb4: USB revision 2.0
uhub4: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb4
uhub4: 8 ports with 8 removable, self powered
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci6: <ACPI PCI bus> on pcib2
cbb0: <TI6411 PCI-CardBus Bridge> at device 2.0 on pci6
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb0: [ITHREAD]
fwohci0: <1394 Open Host Controller Interface> mem 0xb8006000-0xb80067ff,0xb8000000-0xb8003fff irq 18 at device 2.2 on pci6
fwohci0: [FILTER]
fwohci0: OHCI version 1.10 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:03:25:21:51:00:06:7e
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:03:25:00:06:7e
fwe0: Ethernet address: 02:03:25:00:06:7e
fwip0: <IP over FireWire> on firewire0
fwip0: Firewire address: 00:03:25:21:51:00:06:7e @ 0xfffe00000000, S400, maxrec 2048
sbp0: <SBP-2/SCSI over FireWire> on firewire0
dcons_crom0: <dcons configuration ROM> on firewire0
dcons_crom0: bus_addr 0x14ec000
fwohci0: Initiate bus reset
fwohci0: BUS reset
fwohci0: node_id=0xc000ffc0, gen=2, CYCLEMASTER mode
pci6: <mass storage> at device 2.3 (no driver attached)
pci6: <base peripheral> at device 2.4 (no driver attached)
pci6: <network> at device 9.0 (no driver attached)
pcm0: <Intel ICH6 (82801FB)> port 0x5000-0x50ff,0x48c0-0x48ff mem 0xb0040800-0xb00409ff,0xb0040400-0xb00404ff irq 20 at device 30.2 on pci0
pcm0: [ITHREAD]
pcm0: <Avance Logic ALC250 AC97 Codec>
pci0: <simple comms, generic modem> at device 30.3 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH6M SATA150 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x48b0-0x48bf at device 31.2 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcefff,0xe0000-0xe17ff pnpid ORM0000 on isa0
ppc0: parallel port not found.
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250 or not responding
sio0: [FILTER]
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ugen0: <vendor 0x08ff Fingerprint Sensor, class 255/255, rev 1.10/6.21, addr 2> on uhub1
Timecounter "TSC" frequency 1596009803 Hz quality 800
Timecounters tick every 1.000 msec
hptrr: no controller detected.
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
fwohci0: phy int
acd0: CDRW <HL-DT-STCD-RW/DVD DRIVE GCC-4244N/GW01> at ata0-master UDMA33
ad2: 38154MB <FUJITSU MHV2040AT 000000A0> at ata1-master UDMA100
Trying to mount root from ufs:/dev/ad2s1a
mskc0: Uncorrectable PCI Express error
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
umass0: <Super Top USB 2.0  IDE DEVICE, class 0/0, rev 2.00/2.01, addr 2> on uhub4
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <WDC WD40 0BB-00DEA0 \\0000\\0000> Fixed Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: 38166MB (78165360 512 byte sectors: 255H 63S/T 4865C)
mskc0: Uncorrectable PCI Express error
drm0: <Intel i915GM> on vgapci0
info: [drm] AGP at 0xc0000000 256MB
info: [drm] Initialized i915 1.5.0 20060119
drm0: [ITHREAD]
Reply With Quote
  #8   (View Single Post)  
Old 25th August 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

But it also states 0 bytes were transfered, which sort of leads me to believe the write was unsuccessful.

Agreed? be a little nicer.
Reply With Quote
  #9   (View Single Post)  
Old 25th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by BSDfan666 View Post
But it also states 0 bytes were transfered, which sort of leads me to believe the write was unsuccessful.

Agreed? be a little nicer.
Most likely. It could really be a defective adapter.

What do you mean by "be a little nicer"?
Reply With Quote
Old 25th August 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Sorry...

richardpl, a member here.. posted and then deleted it.. he said something like "You obviously never read the dd man page." in a smug disrespectful way.
Reply With Quote
Old 25th August 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Quote:
Originally Posted by ebzzry View Post
What do you mean by "be a little nicer"?
That was related directly to me. (I removed post because of my stupid reading mistake).

Oh, nice, my stupidity can be found in google cache .
Reply With Quote
Old 25th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by BSDfan666 View Post
Sorry...

richardpl, a member here.. posted and then deleted it.. he said something like "You obviously never read the dd man page." in a smug disrespectful way.
Oh. OK. I'll try getting another adapter, or get a drive enclosure and see if it works.
Reply With Quote
Old 25th August 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Quote:
Originally Posted by ebzzry View Post
Oh. OK. I'll try getting another adapter, or get a drive enclosure and see if it works.
First, test if it works in linux, or in some other unix clone - just to make sure that it is not FreeBSD bug.
Reply With Quote
Old 25th August 2008
Weaseal's Avatar
Weaseal Weaseal is offline
Package Pilot
 
Join Date: May 2008
Location: East Coast, US
Posts: 177
Default

Are you sure you don't need /dev/da0s1 or something?
__________________
FreeBSD addict since 4.2-RELEASE.
My FreeBSD wiki.
Reply With Quote
Old 25th August 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

What happens if you vary the size of the block (bs=512) or the count (count=2)? It could just be that the block size you specify doesn't match with the block size of the USB transfer and/or the SCSI/atapicam transfer and/or the block size of the HD.

In the various gmirror how-tos, it specifies bs=512 and count=10, which overwrites the first 5 KB of the disk. Lots more than the MBR and boot blocks.

However, you don't really need to zero those out to add a new disk to a system. Just slice it (and/or partition it), and format it as needed
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 26th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by richardpl View Post
First, test if it works in linux, or in some other unix clone - just to make sure that it is not FreeBSD bug.
OK.
Reply With Quote
Old 26th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by Weaseal View Post
Are you sure you don't need /dev/da0s1 or something?
Yup.
Reply With Quote
Old 26th August 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default

Quote:
Originally Posted by phoenix View Post
What happens if you vary the size of the block (bs=512) or the count (count=2)? It could just be that the block size you specify doesn't match with the block size of the USB transfer and/or the SCSI/atapicam transfer and/or the block size of the HD.

In the various gmirror how-tos, it specifies bs=512 and count=10, which overwrites the first 5 KB of the disk. Lots more than the MBR and boot blocks.

However, you don't really need to zero those out to add a new disk to a system. Just slice it (and/or partition it), and format it as needed
I haven't tried that yet. It would take me two days to get to that adapter again, but yes I'll try your suggestions. I'll post updates as soon as I get to it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW do I ENABLE the wireless device?? bforest FreeBSD General 2 30th January 2009 05:54 PM
tun device zomo OpenBSD General 24 23rd September 2008 11:19 PM
device name qmemo OpenBSD General 2 4th September 2008 11:51 PM
identifying device associated with USB device? spiderpig OpenBSD General 2 7th July 2008 05:18 AM
fstab and CD/DVD device corneliu FreeBSD General 7 24th May 2008 02:11 AM


All times are GMT. The time now is 02:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick