Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Udev e chiavi usb
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
HexDEF6
Guru
Guru


Joined: 26 May 2003
Posts: 451
Location: Trento

PostPosted: Wed Dec 08, 2004 4:06 pm    Post subject: Udev e chiavi usb Reply with quote

Ho un "piccolo" problema con una chiave usb e udev, infatti attaccando la chiave mi crea /dev/sda, ma non /dev/sda1, ma se faccio:
parted -s /dev/sda
mi crea /dev/sda1 (e anche /dev/storage grazie alle mie regole impostate a udev) e la chiavetta si monta in automatico (tutto configurato in fstab usando submount)
perche' non mi crea in automatico /dev/sda1 ??

se puo' servire, ho notato che sotto /dev non ho la directory scsi...

Ciao!


EDIT: ho scoperto che basta fare un touch /dev/sda perche' il device /dev/sda1 venga creato
_________________
Fa quel che te faresi!
Back to top
View user's profile Send private message
dboogieman
Apprentice
Apprentice


Joined: 02 Oct 2004
Posts: 197

PostPosted: Thu Dec 09, 2004 4:57 pm    Post subject: Reply with quote

Ciao io usato un approccio diverso se potese esserti utile:

Code:

/usr/src/linux$make menuconfig

scelto submenu: USB Support --->

[*] USB verbose debug messages
<*> EHCI HCD (USB 2.0) support (EXPERIMENTAL)
<*> UHCI Alternate Driver (JE) support
<*> OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
<*> USB Mass Storage support
[*] USB Mass Storage verbose debug
[*] ISD-200 USB/ATA Bridge support
[*] Microtech CompactFlash/SmartMedia support
[*] HP CD-Writer 82xx support
[*] SanDisk SDDR-09 (and other SmartMedia) support
[*] SanDisk SDDR-55 SmartMedia support
[*] Lexar Jumpshot Compact Flash Reader

poi scelto submenu: SCSI support --->

<*> SCSI support
<*> SCSI disk support
[*] Probe all LUNs on each SCSI device


poi ho salvato la configurazione del mio kernel e ho fatto:

Code:

/usr/src/linux/ make install
/usr/src/linux/ make deep
/usr/src/linux make clean

Dopo aver finito la compilazione prima di usare la chiavetta digito:

Code:

#modprobe usb-storage
#mount /dev/sda1 /mnt/stick (la stick precedente mente creata con mkdir)

Al termine dell'utilizzo digito:

Code:

#umount /dev/sda1 /mnt/stick

Anche a me ogni tanto non mi crea sda1 ma spluggando e ripluggando la chiavetta tutto funziona...a me funziona cosi...l'unica e' provare.

Ciao

dboogieman
Back to top
View user's profile Send private message
Mistobaan
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 76

PostPosted: Thu Dec 09, 2004 5:21 pm    Post subject: Reply with quote

avete installato correttamente udev?

bisogna disabilitare devfs e mettere

Code:
gentoo=nodevfs


nel boot di grub / lilo ...
_________________
God is real until declared integer
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31470
Location: here

PostPosted: Thu Dec 09, 2004 5:25 pm    Post subject: Reply with quote

Mistobaan wrote:
bisogna disabilitare devfs e mettere

Si ma solo se si e' lasciato il supporto nel kernel se no non serve
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
HexDEF6
Guru
Guru


Joined: 26 May 2003
Posts: 451
Location: Trento

PostPosted: Thu Dec 09, 2004 5:26 pm    Post subject: Reply with quote

Mistobaan wrote:
avete installato correttamente udev?

bisogna disabilitare devfs e mettere

Code:
gentoo=nodevfs


nel boot di grub / lilo ...


si udev e' a posto... (una volta fatto il touch su /dev/hda il tutto funziona alla perfezione)
_________________
Fa quel che te faresi!
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Thu Dec 09, 2004 5:27 pm    Post subject: Reply with quote

Che regola utilizzate per il pendrive?

Io ho:
Code:
BUS="usb", SYSFS{serial}="Numero che identifica il mio pendrive", KERNEL="sd?1" NAME="pen%n", SYMLINK="pendrive"

Ho rinominato in pen1 sda1 per non confonderlo con eventuali hd esterni, se volete il nome originale mettete %k

Poi dentro /etc/dev.d/pen1/mount.dev ho messo:
Code:
#!/bin/bash
if [ "$ACTION" == "add" ] ; then
        logger -t dev.d "Mounting Pendrive"
        /bin/mount /mnt/pendrive
fi

if [ "$ACTION" == "remove" ] ; then
        logger -t dev.d "Unmounting Pendrive"
        /bin/umount /mnt/pendrive
fi


In fstab nessun automount o robe simili, gestisce tutto udev
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
HexDEF6
Guru
Guru


Joined: 26 May 2003
Posts: 451
Location: Trento

PostPosted: Thu Dec 09, 2004 10:07 pm    Post subject: Reply with quote

Code:

BUS="usb", SYSFS{idVendor}="05e3", KERNEL="sd?1", NAME="%k", SYMLINK="card_16mb"
BUS="usb", KERNEL="sd?1", NAME="%k", SYMLINK="storage"


la prima regola serve per la mia sfigata chiavetta da 16mb (in realta' e' una memory card) in modo che crei il device /dev/card_16mb
La seconda regola fa si che qualunque chiave usb attaccata (o hd usb) sia identificato dal device /dev/storage

Comunque sia il mio problema sta ancora prima... il device sda1 non viene creato :( se non dopo aver fatto un touch a sda

Da notare che con la mia memory card da 16mb il problema non c'era fino a qualche settimana fa (quindi credo sia colpa del kernel nuovo....)....

Ciao!

EDIT: forse ho trovato la soluzione (ma in questo momento non ho una chiavetta usb per provare):
Code:

BUS="usb", SYSFS{idVendor}="05e3", KERNEL="sd?1", NAME{all_partitions}="%k", SYMLINK="card_16mb"
BUS="usb", KERNEL="sd?1", NAME{all_partitions}="%k", SYMLINK="storage"


Dal man:
If given with the attribute NAME{all_partitions} it will create
all 15 partitions of a blockdevice. This may be useful for
removable media devices.

domani provo!
_________________
Fa quel che te faresi!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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