Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fdisk /dev/sda = Unable to read /dev/sda
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zialien
n00b
n00b


Joined: 27 Jun 2006
Posts: 31
Location: Melbourne, Australia

PostPosted: Sat Feb 02, 2008 10:23 pm    Post subject: fdisk /dev/sda = Unable to read /dev/sda Reply with quote

Hello,
I am attempting to repartition my old 1gig memory stick so that i can use it as a live boot usb for my new toy (eee pc) but I cannot get it to partition.
It currently (to my knowledge) has one partition only as when i put the drive in and look at dev only sda1 is created. On a related note the stick works under windows xp fine, mounts and everything under my gentoo box fine i just cannot use fdisk. Also under Xandros on my eee it does not detect the partition but it does try to mount the device.
When the stick is inserted we get
Code:

usb 1-4: new high speed USB device using ehci_hcd and address 18
usb 1-4: configuration #1 chosen from 1 choice
hub 1-4:1.0: USB hub found
hub 1-4:1.0: 1 port detected
usb 1-4.1: new high speed USB device using ehci_hcd and address 19
usb 1-4.1: configuration #1 chosen from 1 choice
scsi60 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 19
usb-storage: waiting for device to settle before scanning
scsi 60:0:0:0: Direct-Access     USB 2.0  Flash Disk       1.00 PQ: 0 ANSI: 0 CC
S
sd 60:0:0:0: [sda] 2031616 512-byte hardware sectors (1040 MB)
sd 60:0:0:0: [sda] Write Protect is off
sd 60:0:0:0: [sda] Mode Sense: 00 26 00 00
sd 60:0:0:0: [sda] Assuming drive cache: write through
sd 60:0:0:0: [sda] 2031616 512-byte hardware sectors (1040 MB)
sd 60:0:0:0: [sda] Write Protect is off
sd 60:0:0:0: [sda] Mode Sense: 00 26 00 00
sd 60:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 60:0:0:0: [sda] Attached SCSI removable disk
sd 60:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete


When i try a fdisk -l it just makes the memory stick go nuts and dmesg shows
Code:

hub 1-4:1.0: cannot reset port 1 (err = -110)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-4:1.0: cannot disable port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-4:1.0: cannot disable port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-4:1.0: cannot disable port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: cannot reset port 1 (err = -71)
hub 1-4:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-4:1.0: cannot disable port 1 (err = -71)
hub 1-4:1.0: cannot disable port 1 (err = -71)
sd 60:0:0:0: SCSI error: return code = 0x00070000
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
Buffer I/O error on device sda, logical block 1
Buffer I/O error on device sda, logical block 2
Buffer I/O error on device sda, logical block 3
hub 1-4:1.0: hub_port_status failed (err = -71)
sd 60:0:0:0: SCSI error: return code = 0x00070000
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
sd 60:0:0:0: SCSI error: return code = 0x00070000
end_request: I/O error, dev sda, sector 2031608
Buffer I/O error on device sda, logical block 253951
sd 60:0:0:0: SCSI error: return code = 0x00070000
end_request: I/O error, dev sda, sector 2031608
Buffer I/O error on device sda, logical block 253951
sd 60:0:0:0: [sda] READ CAPACITY failed
sd 60:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 60:0:0:0: [sda] Sense not available.
sd 60:0:0:0: [sda] Write Protect is off
sd 60:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 60:0:0:0: [sda] Assuming drive cache: write through
sd 60:0:0:0: [sda] READ CAPACITY failed
sd 60:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 60:0:0:0: [sda] Sense not available.
sd 60:0:0:0: [sda] Write Protect is off
sd 60:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 60:0:0:0: [sda] Assuming drive cache: write through
sd 60:0:0:0: [sda] READ CAPACITY failed
sd 60:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 60:0:0:0: [sda] Sense not available.
sd 60:0:0:0: [sda] Write Protect is off
sd 60:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 60:0:0:0: [sda] Assuming drive cache: write through
sd 60:0:0:0: [sda] READ CAPACITY failed
sd 60:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 60:0:0:0: [sda] Sense not available.
sd 60:0:0:0: [sda] Write Protect is off
sd 60:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 60:0:0:0: [sda] Assuming drive cache: write through


so I'm assuming that the READ CAPACITY failed is a very bad thing. I have tryed simply reformatting the file system by dding /dev/zero then user mkfs.vfat that did not help. I tried to flush the partition table with the other magic dd command and got an error of something like unable to write.

do people have any idea? My system is kernel 2.6.21-gentoo-r4 (as i have not rebooted for 175 days) the rest of my system is fully up to day (within a week of today anyways)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54808
Location: 56N 3W

PostPosted: Sun Feb 03, 2008 2:46 pm    Post subject: Reply with quote

zialien,

Are you sure your memory stick is partitioned at all ?
Many are not - they are organised like floppies with no partition table. Still, fdisk does not throw errors, it just shows rubbish.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zialien
n00b
n00b


Joined: 27 Jun 2006
Posts: 31
Location: Melbourne, Australia

PostPosted: Sun Feb 03, 2008 9:11 pm    Post subject: Reply with quote

Hello NeddySeagoon,

If it is not partitioned then that is strange. I assumed that because it mounted as /dev/sda1 that there was a partition. It would explain the dd error when i tried to wipe the partition table (something like cannot write). This means though that I cannot use it for boot purposes would that be correct? Or will it just mean the whole thing is the one partition and it somehow gets bootable?

Cheers
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54808
Location: 56N 3W

PostPosted: Sun Feb 03, 2008 9:19 pm    Post subject: Reply with quote

zialien,

As long as /dev/sda1 is your USB stick, its partitioned an behaves like a hard drive
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zialien
n00b
n00b


Joined: 27 Jun 2006
Posts: 31
Location: Melbourne, Australia

PostPosted: Mon Feb 04, 2008 9:07 pm    Post subject: Reply with quote

Hello NeddySeagoon,

So I guess this becomes a dead unsolvable topic due to crap hardware?

Thanks Anyways I will just buy another memory stick.
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Mon Feb 04, 2008 9:18 pm    Post subject: Reply with quote

Don't run to the store just yet. :wink:

Are you trying this as an ordinary user or as root? You need to be root to repartition a drive, because you need read/write access to the whole-disk device (/dev/sda in your case). A regular user ordinarily has full access only to the partition device(s) (/dev/sda1), which is insufficient.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
zialien
n00b
n00b


Joined: 27 Jun 2006
Posts: 31
Location: Melbourne, Australia

PostPosted: Tue Feb 05, 2008 7:03 am    Post subject: Reply with quote

It was all done as root. I don't run sudo before you ask.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54808
Location: 56N 3W

PostPosted: Tue Feb 05, 2008 6:44 pm    Post subject: Reply with quote

zialien,

A couple of things. The kernel has found the partition table - so its there.
Can dd read it?

Code:
dd if=/dev/sda of=/dev/null count=1 bs=512
any errors ?

What is the Vendor and Device ID of the memory stick from lsusb ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zialien
n00b
n00b


Joined: 27 Jun 2006
Posts: 31
Location: Melbourne, Australia

PostPosted: Tue Feb 05, 2008 9:12 pm    Post subject: Reply with quote

dd:
Code:
dd if=/dev/sda of=/dev/null count=1 bs=512
dd: reading `/dev/sda': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.05568 s, 0.0 kB/s

lsusb:
Code:
Bus 001 Device 020: ID 067b:2515 Prolific Technology, Inc. Flash Disk Embedded Hub
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54808
Location: 56N 3W

PostPosted: Tue Feb 05, 2008 10:04 pm    Post subject: Reply with quote

zialien,

Google has lots of posts with problems with that device but I didn't find any solutions or root causes.
Reads of the what should be the master boot record fail but the kernel gets a partition table.
Thats two pieces of conflicting evidence. It suggests the partition table is not at block zero and the kernel can tell.

You could try multiples of 512 for the bs in dd. Larger flash drives have 4096 byte native block sizes. However, dd should cope with that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zialien
n00b
n00b


Joined: 27 Jun 2006
Posts: 31
Location: Melbourne, Australia

PostPosted: Tue Feb 12, 2008 9:31 pm    Post subject: Reply with quote

Ok, I have tried 512 - 4096 with the same error. This is all rather confusing.

Any more ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum