Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Usb won't mount[solved]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

Usb won't mount[solved]

  • Quote

Post by Gankfest » Tue Aug 07, 2007 7:31 pm

I get this error when I try to mount my usbstick:

mount: special device /dev/sda1 does not exist

dmesg | grep USB

drivers/usb/input/hid-core.c: v2.6:USB HID core driver
scsi 2:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0
scsi 2:0:0:1: Direct-Access Generic USB CF Reader 1.01 PQ: 0 ANSI: 0
scsi 2:0:0:2: Direct-Access Generic USB SM Reader 1.02 PQ: 0 ANSI: 0
scsi 2:0:0:3: Direct-Access Generic USB MS Reader 1.03 PQ: 0 ANSI: 0
usb 1-5: new high speed USB device using ehci_hcd and address 4
scsi3 : SCSI emulation for USB Mass Storage devices

lspci:

0:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) (prog-if 20 [EHCI])

lsusb:
Bus 005 Device 002: ID 058f:9360 Alcor Micro Corp.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 043d:0096 Lexmark International, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 0781:5151 SanDisk Corp. Cruzer Micro 256/512MB Flash Drive

the only thing is the card is a 2g not 512mb

all the kernel arguments are loaded correctly I checked like 4-5 times. If any additional information is needed let me know and I'll post it. I really need this to work because I hate shitdows, but I need a usb stick for school. Thanx!
Last edited by Gankfest on Wed Aug 08, 2007 9:55 am, edited 1 time in total.
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
dusik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 129
Joined: Tue Jan 04, 2005 3:05 am
Location: Durham, NC, USA
Contact:
Contact dusik
Website

  • Quote

Post by dusik » Tue Aug 07, 2007 7:40 pm

What if it's not /dev/sda? See what ls /dev/sd* says.

Also, why not use automount via sys-apps/hal and sys-apps/ivman?
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Tue Aug 07, 2007 7:41 pm

It's not necessarily sda. Try for starters:

Code: Select all

find /dev -name sd\*
Top
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

  • Quote

Post by Gankfest » Tue Aug 07, 2007 8:16 pm

kool it mounted on /dev/sde1, but it won't read it probably because it is in windows format which I can figure out. Thanx for the find /dev -name sd\* great tool.
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
dusik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 129
Joined: Tue Jan 04, 2005 3:05 am
Location: Durham, NC, USA
Contact:
Contact dusik
Website

  • Quote

Post by dusik » Tue Aug 07, 2007 8:40 pm

Which file system - FAT32 or NTFS?
Top
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

  • Quote

Post by Gankfest » Tue Aug 07, 2007 8:47 pm

dusik wrote:Which file system - FAT32 or NTFS?
NTFS
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
holytrousers
n00b
n00b
User avatar
Posts: 14
Joined: Mon Aug 06, 2007 2:19 pm

  • Quote

Post by holytrousers » Tue Aug 07, 2007 9:48 pm

well even if its NTFS, you should be able to read it, or even write to it (if you configure your kernel properly)
A propos, it is strange that it is possible to have write access to a proprietary file system like the ntfs in an open source project, but no write access to ext2fs on windows (i found fs-driver.org that has write access, but its not gpl), or reiserfs (the only driver i found breaks the windows every time i try to access a file)
Maybe i will switch to ext2 :cry:
Top
dusik
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 129
Joined: Tue Jan 04, 2005 3:05 am
Location: Durham, NC, USA
Contact:
Contact dusik
Website

  • Quote

Post by dusik » Tue Aug 07, 2007 9:59 pm

Ok, all you need for NTFS read/write support is to install ntfs3g. Just follow the instructions here: http://gentoo-wiki.com/HOWTO_NTFS_write_with_ntfs-3g

It's really matured and quite safe to use nowadays.

Aside from that, I'd also suggest installing sys-apps/ivman -- then your usb stick should be automagically mounted whenever you plug it in.
Top
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

  • Quote

Post by Gankfest » Tue Aug 07, 2007 10:31 pm

dusik wrote:Ok, all you need for NTFS read/write support is to install ntfs3g. Just follow the instructions here: http://gentoo-wiki.com/HOWTO_NTFS_write_with_ntfs-3g

It's really matured and quite safe to use nowadays.

Aside from that, I'd also suggest installing sys-apps/ivman -- then your usb stick should be automagically mounted whenever you plug it in.
ok have them both installed and I followed the guide and inserted this after the emerge:

# ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs

it works fine besides it dosn't automount I cp a doc from my box to my roommates shitbox no problme but

the thing is it changes mount points everytime I plug it in (for ex. it was /dev/sde1 /mnt/usb now it's /dev/sdf1 /mnt/usb) is their a way to make it keep one mount point every time I plug it in and how would I add it to fstab so I can click an icon and do it that way. Thanx
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Tue Aug 07, 2007 10:46 pm

Write a udev rule for it.
Top
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

  • Quote

Post by Gankfest » Wed Aug 08, 2007 4:23 am

ok I just want to mek sure this is correct I have:

udev rule

SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/local/bin/mount-device.sh /dev/%k"

script:

#!/bin/sh

DEVICE="$1"
GID=`grep plugdev /etc/group | cut -d: -f 3`

if [ "$DEVICE" = "" ] ; then exit 1 ; fi

# wait a moment till' hal has information about the device
sleep 2

HAL_UDI=`hal-find-by-property --key block.device --string "$DEVICE"`

function get_hal_label {
CUR_UDI=$1
LABEL=""
COUNTER=0;
while [ -z "$LABEL" -a $COUNTER -lt 4 ]; do
LABEL=`hal-get-property --key volume.label --udi "$CUR_UDI" 2>/dev/null`
if [ -z "$LABEL" ]; then
LABEL=`hal-get-property --key storage.serial --udi "$CUR_UDI" 2>/dev/null`
fi
CUR_UDI=`hal-get-property --key info.parent --udi "$CUR_UDI" 2>/dev/null`
let COUNTER=COUNTER+1
done

if [ -z $LABEL ]; then
LABEL=${DEVICE##/dev/}
fi
}

function get_hal_removable {
CUR_UDI=$1
REMOVABLE=""
COUNTER=0
while [ -z "$REMOVABLE" -a $COUNTER -lt 4 ]; do
REMOVABLE=`hal-get-property --key storage.removable --udi "$CUR_UDI" 2>/dev/null`
if [ -z "$REMOVABLE" ]; then
BUS=`hal-get-property --key storage.bus --udi "$CUR_UDI" 2>/dev/null`
if [ "$BUS" = "usb" ]; then
REMOVABLE="true"
fi
fi
CUR_UDI=`hal-get-property --key info.parent --udi "$CUR_UDI" 2>/dev/null`
let COUNTER=COUNTER+1
done

if [ -z "$REMOVABLE" ]; then
logger "assuming $HAL_UDI is removable for safety reasons"
REMOVABLE="true"
fi
}

if [ -z "$HAL_UDI" ]; then # can't find device in hal db
logger "hald didn't know about $DEVICE"
LABEL=${DEVICE##/dev/}
else # device found in hal db.
get_hal_label "$HAL_UDI"
get_hal_removable "$HAL_UDI"
fi

logger "Mounting HAL_UDI $HAL_UDI as $DEVICE to $LABEL (removable: $REMOVABLE)"

SYNC_OPT=""

if [ $REMOVABLE = "true" ]; then
SYNC_OPT="--sync"
fi

pmount --umask 007 $SYNC_OPT "$DEVICE" "$LABEL"

# if you do not want to use pmount (why should you?)
#MOUNTPOINT=/media/${LABEL}
#mkdir -p "$MOUNTPOINT" &&
#touch "$MOUNTPOINT"/.created_by_pmount &&
#mount "$DEVICE" "$MOUNTPOINT" -o gid=$GID,umask=007 ||
#rm "$MOUNTPOINT"/.created_by_pmount &&
#rmdir "$MOUNTPOINT"

fstab:

/dev/sde1 /mnt/usb auto noauto,user 0 0

now when I click on the icon in system:/media it doesn't mount the device on /dev/sde1 /mnt/usb, so how can I fix it so it doe's. Thanx!
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Wed Aug 08, 2007 5:28 am

A udev rule is 1 line, not 100. There's dozens if not hundreds of previous threads about it.
Top
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

  • Quote

Post by Gankfest » Wed Aug 08, 2007 5:49 am

PaulBredbury wrote:A udev rule is 1 line, not 100. There's dozens if not hundreds of previous threads about it.
The udev rule is one line here:

SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/local/bin/mount-device.sh /dev/%k"

the script to run it I guess is this:

#!/bin/sh

DEVICE="$1"
GID=`grep plugdev /etc/group | cut -d: -f 3`

if [ "$DEVICE" = "" ] ; then exit 1 ; fi

# wait a moment till' hal has information about the device
sleep 2

HAL_UDI=`hal-find-by-property --key block.device --string "$DEVICE"`

function get_hal_label {
CUR_UDI=$1
LABEL=""
COUNTER=0;
while [ -z "$LABEL" -a $COUNTER -lt 4 ]; do
LABEL=`hal-get-property --key volume.label --udi "$CUR_UDI" 2>/dev/null`
if [ -z "$LABEL" ]; then
LABEL=`hal-get-property --key storage.serial --udi "$CUR_UDI" 2>/dev/null`
fi
CUR_UDI=`hal-get-property --key info.parent --udi "$CUR_UDI" 2>/dev/null`
let COUNTER=COUNTER+1
done

if [ -z $LABEL ]; then
LABEL=${DEVICE##/dev/}
fi
}

function get_hal_removable {
CUR_UDI=$1
REMOVABLE=""
COUNTER=0
while [ -z "$REMOVABLE" -a $COUNTER -lt 4 ]; do
REMOVABLE=`hal-get-property --key storage.removable --udi "$CUR_UDI" 2>/dev/null`
if [ -z "$REMOVABLE" ]; then
BUS=`hal-get-property --key storage.bus --udi "$CUR_UDI" 2>/dev/null`
if [ "$BUS" = "usb" ]; then
REMOVABLE="true"
fi
fi
CUR_UDI=`hal-get-property --key info.parent --udi "$CUR_UDI" 2>/dev/null`
let COUNTER=COUNTER+1
done

if [ -z "$REMOVABLE" ]; then
logger "assuming $HAL_UDI is removable for safety reasons"
REMOVABLE="true"
fi
}

if [ -z "$HAL_UDI" ]; then # can't find device in hal db
logger "hald didn't know about $DEVICE"
LABEL=${DEVICE##/dev/}
else # device found in hal db.
get_hal_label "$HAL_UDI"
get_hal_removable "$HAL_UDI"
fi

logger "Mounting HAL_UDI $HAL_UDI as $DEVICE to $LABEL (removable: $REMOVABLE)"

SYNC_OPT=""

if [ $REMOVABLE = "true" ]; then
SYNC_OPT="--sync"
fi

pmount --umask 007 $SYNC_OPT "$DEVICE" "$LABEL"

# if you do not want to use pmount (why should you?)
#MOUNTPOINT=/media/${LABEL}
#mkdir -p "$MOUNTPOINT" &&
#touch "$MOUNTPOINT"/.created_by_pmount &&
#mount "$DEVICE" "$MOUNTPOINT" -o gid=$GID,umask=007 ||
#rm "$MOUNTPOINT"/.created_by_pmount &&
#rmdir "$MOUNTPOINT"

coming from this guide here:

http://gentoo-wiki.com/UDEV

I just want to make sure it's correct in the fact that every time I plug my usbstick it it gets the same mount point so I can stick it in fstab and have an icon in system:/media. Now the icon that is their now doesn't work so I was wondering if someone knew if my fstab is correct in loading the usbstick which is here:

/dev/cdrom /mnt/cdrom auto noauto,user 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
/dev/sde1 /mnt/usb auto noauto,user 0 0
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
Gankfest
l33t
l33t
User avatar
Posts: 946
Joined: Wed Aug 01, 2007 4:50 am
Location: Miami Beach, FL
Contact:
Contact Gankfest
Website

  • Quote

Post by Gankfest » Wed Aug 08, 2007 9:55 am

I magically fixed it some how idk and don't care. tootles!
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Top
purpler
n00b
n00b
User avatar
Posts: 38
Joined: Thu Jan 11, 2007 7:38 pm
Location: /v*/l*/p*/world

  • Quote

Post by purpler » Tue Aug 14, 2007 10:49 pm

i have this crapy problem too,i tred ivman and it somehow mount device but not always i plug it in..
im sure that kernel is ok because automounting worked once but wont now..
is there any "automount holy grail" available?
Our system, who art on raised tile,hallowed be thy OS..
Gentoo.
Top
artbody
Guru
Guru
User avatar
Posts: 494
Joined: Fri Sep 15, 2006 7:55 pm
Location: LB
Contact:
Contact artbody
Website

  • Quote

Post by artbody » Fri Aug 17, 2007 10:04 pm

earlier versions of udev i solved this way
http://www.reactivated.net/writing_udev_rules.html
but
since the new version of udev
the udevrules create a few symlinks for most usb devices
so i solved this problem that way

example is a harddisk
/etc/fstab
....
/dev/disk/by-id/scsi-SATA_ST3320620AS_3QF08LR2-part1 /mnt/ext_disc1 .......

works fine
Never give up
WM : E16 the true enlightenment
achim
Top
purpler
n00b
n00b
User avatar
Posts: 38
Joined: Thu Jan 11, 2007 7:38 pm
Location: /v*/l*/p*/world

  • Quote

Post by purpler » Sun Aug 19, 2007 2:53 am

why is it so f****** hard to do such stupid thing as a usb stick and cdrom automounting?
i tried bunch of things and im getting tired of this crap allready..


::28.08.2007 edit::
it seems latest sync and emerge -NDuva world pull in new udev-115 which apperently solved the problem, usb stick and cdrom was mounted on predefined entries on fstab almost instantly so i guess i finished latest problem i had with gentoo..
thnxx all for helping out and long live gentoo :)
Our system, who art on raised tile,hallowed be thy OS..
Gentoo.
Top
Post Reply

17 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic