View previous topic :: View next topic |
Author |
Message |
HexDEF6 Guru


Joined: 26 May 2003 Posts: 451 Location: Trento
|
Posted: Wed Dec 08, 2004 4:06 pm Post subject: Udev e chiavi usb |
|
|
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 |
|
 |
dboogieman Apprentice


Joined: 02 Oct 2004 Posts: 197
|
Posted: Thu Dec 09, 2004 4:57 pm Post subject: |
|
|
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 |
|
 |
Mistobaan Tux's lil' helper


Joined: 07 May 2004 Posts: 76
|
Posted: Thu Dec 09, 2004 5:21 pm Post subject: |
|
|
avete installato correttamente udev?
bisogna disabilitare devfs e mettere
nel boot di grub / lilo ... _________________ God is real until declared integer |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31486 Location: here
|
Posted: Thu Dec 09, 2004 5:25 pm Post subject: |
|
|
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 |
|
 |
HexDEF6 Guru


Joined: 26 May 2003 Posts: 451 Location: Trento
|
Posted: Thu Dec 09, 2004 5:26 pm Post subject: |
|
|
Mistobaan wrote: | avete installato correttamente udev?
bisogna disabilitare devfs e mettere
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 |
|
 |
neon l33t


Joined: 04 Aug 2003 Posts: 759 Location: Catania, Italy, Europe
|
Posted: Thu Dec 09, 2004 5:27 pm Post subject: |
|
|
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 |
|
 |
HexDEF6 Guru


Joined: 26 May 2003 Posts: 451 Location: Trento
|
Posted: Thu Dec 09, 2004 10:07 pm Post subject: |
|
|
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 |
|
 |
|