Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
usb stick only works with fdisk
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
horus
n00b
n00b


Joined: 09 Mar 2004
Posts: 64
Location: /dev/null

PostPosted: Fri Dec 02, 2005 1:23 pm    Post subject: usb stick only works with fdisk Reply with quote

hi @ll

ive kind of a special problem :)

when i plug in my usb stick, i cant mount it. i first have to run fdisk /dev/sda.

BEFORE fdisk /dev/sda

Code:
usb 1-2: new high speed USB device using ehci_hcd and address 11
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 11
usb-storage: waiting for device to settle before scanning
  Vendor:           Model: USB DRIVE         Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
sda: Unit Not Ready, sense:
: Current: sense key=0x6
    ASC=0x28 ASCQ=0x0
sda : READ CAPACITY failed.
sda : status=1, message=00, host=0, driver=08
sd: Current: sense key=0x6
    ASC=0x28 ASCQ=0x0
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
sda: Unit Not Ready, sense:
: Current: sense key=0x6
    ASC=0x28 ASCQ=0x0
sda : READ CAPACITY failed.
sda : status=1, message=00, host=0, driver=08
sd: Current: sense key=0x6
    ASC=0x28 ASCQ=0x0
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
sda: Unit Not Ready, sense:
: Current: sense key=0x6
    ASC=0x28 ASCQ=0x0
sda : READ CAPACITY failed.
sda : status=1, message=00, host=0, driver=08
sd: Current: sense key=0x6
    ASC=0x28 ASCQ=0x0
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
 sda: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 0
ldm_validate_partition_table(): Disk read failed.
Buffer I/O error on device sda, logical block 0
 unable to read partition table
Attached scsi removable disk sda at scsi7, channel 0, id 0, lun 0
usb-storage: device scan complete


AFTER fdisk /dev/sda

Code:
Attached scsi removable disk sda at scsi7, channel 0, id 0, lun 0
usb-storage: device scan complete
SCSI device sda: 4075520 512-byte hdwr sectors (2087 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 4075520 512-byte hdwr sectors (2087 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
 sda: sda1


now i can mount it.

why??
why doesnt it work without fdisk?

(fdisk isnt the only prog, if i try to mount /dev/sda2, an error occurs, but after that, sda1 appears and i can mount it)

thx 4 helping
horus
_________________
Acer Aspire 1501LMi
AMD64 3000+
60GB Ultra ATA/100 HDD
512MB DDR SDRAM
IEEE 802.11g
10/100/1000MB Ethernet
Back to top
View user's profile Send private message
badchien
Guru
Guru


Joined: 16 Feb 2004
Posts: 415
Location: doghouse

PostPosted: Fri Dec 02, 2005 9:59 pm    Post subject: Reply with quote

That's because udev doesn't know about the partitions on the device until something tries to access it the first time.

If you create a udev rule for the device, use all_partitions option. It will create nodes corresponding to all possible partitions on the device.

Code:
NAME{all_partitions}="usbstick"

That will get you /dev/usbstick, usbstick1, usbstick2, etc.

Alternatively you could setup Hal, D-Bus, pmount et al and let them handle this stuff for you.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon Dec 05, 2005 3:43 pm    Post subject: Reply with quote

I have a related problem but I dont even get a device name .

Code:
bash-3.00#ls /dev/sd*
ls: /dev/sd*: No such file or directory


I have sg0 and sr0 but they relate to my SCSI cdrom drive.

This is a new usb stick and I've never tried this before although I did test this kind of interface with a fujipix camera a few months back with no trouble.

I see nothing in dmesg nor in /var/log/messages that indicates anything even happened when I plugged the device in.

Am I mistaken about how all this works?

TIA 8)

{EDIT}

sorry forget that , I just plugged it into a usb onboard and I see it as sda . Looks like I need to speak to my pci usb card.

:roll:
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
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