Is there an easier to way to find out which /dev/ my flash drive is connected to...
Everytime I plug in my usb flash drive, I have to to some work. For example, I put in the usb flash drive then I
cd /mnt mount /dev/sdb1 /mnt/sdb1 mount /dev/sdc1 /mnt/sdc1 mount /dev/sdd1 /mnt/sdd1 mount /dev/sde1 /mnt/sde1 (all the sdx1 were already created) I have to do each one until I get no error, then I know that the flash drive is tied to that /dev. Is there an easier way to find out which /dev/sdx1 the flash drive gets tied to after I plug the flash drive into the computer? Also, how would I find out which /dev/ my sd card gets connected to? |
Quote:
what distro are you using? before plugging your usb drive, tail your /var/log/messages, then plug the drive, the log should show wat drive is plugged into the computer. . from then you will know what device is your drive.. if your distro supports the hotplug(is this the one?) it should detect your drive automatically.. (in my case Vector linux detects it ) but slackware does not. so i just did what i have suggested you. most probably its, /dev/sda1 OR /dev/sdb1 .. not sure. . |
Or after you have plugged it in, use the command 'dmesg' to find out which device it is.
Robin |
I use tail as well.. and actually you can use tail BEFORE you plug in the drive so you can watch it being detected and identified.. this can be very usefull when troubleshooting.
Code:
it-lenny:~# tail -f /var/log/messages |
What about for SD cards?
I inserted my SD card and checked /var/log/messages and got mmc0: new SDHC card at address 8fe4 mmcblk0: mmc0:8fe4 SD04G 3872256KiB mmcblk0: p1 and I've tried making directories mmc0, mmcblk0, and p1 and for each one I've tried mounting, ie. mount /dev/mmc0 /mnt/mmc0 mount /dev/mmcblk0 /mnt/mmcblk0 mount /dev/p1 /mnt/p1 and for all I've gotten: No such file or directory. I double checked the config file for my kernel [CODE] [trist007@darkstar:/boot] $ cat config-final-2.6.27.7-smp | grep MMC # CONFIG_PCI_GOMMCONFIG is not set CONFIG_PCI_MMCONFIG=y CONFIG_MMC=m # CONFIG_MMC_DEBUG is not set # CONFIG_MMC_UNSAFE_RESUME is not set # MMC/SD Card Drivers CONFIG_MMC_BLOCK=m CONFIG_MMC_BLOCK_BOUNCE=y # CONFIG_MMC_TEST is not set # MMC/SD Host Controller Drivers CONFIG_MMC_SDHCI=m CONFIG_MMC_SDHCI_PCI=m CONFIG_MMC_RICOH_MMC=m CONFIG_MMC_WBSD=m CONFIG_MMC_TIFM_SD=m [\CODE] So I have the modules required, but which ones do I load specifically? I tried loading modprobe sdhci and still I wasn't able to mount. I checked the /var/log/messages and dmesg and it said that there was no valid FAT or NTFS or ext3 filesystem on the sd card. |
Code:
mmc0: new SDHC card at address 8fe4 My Ubuntu system spits out all the following lines when I attach a USB stick: Code:
[19167.684000] usb 2-5: new high speed USB device using ehci_hcd and address 2 Robin |
I use PCLinuxOS 2007 and 2009.1
Open Konqueror file browser (KDE based). Plug in USB stick. Click on entry for USB stick that appears. Read Konqueror location bar which says: media:/sdb1 Voila |
I would suggest you ditch PClinuxOS and get a "real" distro-that might start an argument!
Ubuntu/Debian/Slackware will have no problem with what you want. |
Well, linus72, you just shot yourself in the foot... ;) XenaneX doesn't have a problem with USB-sticks, the original poster trist007 has, and lo and behold, he's apparently using Slackware.
Robin |
Quote:
Sorry, have to ask the basic questions first, so we don't waste time with more complex measures, if the underlying hardware isn't correct.. |
The specification page for my laptop says that it has a Secure Digital, Memory Stick, Memory Stick Pro, MultiMedia Card, and xD Picture Card, that all fit in the same slot. I guess I don't have a SDHC slot. Is there support for the ones I have in linux?
|
There is support in Linux for SDHC cards, but you have to have the appropriate card reading hardware for it.
SD cards will work in a SDHC card reader, but not the other way around. Once review for this unit states that it works well with Linux. http://reviews.pricegrabber.com/flas...cs/m/34878983/ |
I suppose that if the kernel sees a SDHC card, then it means that the reader can use it correctly; otherwise the reader should not even be able to react to the presence of the card, and the kernel shouldn't recognize it. The problem lies in the next step: I think the kernel sees the card correctly but there is no event which gets triggered by that, no device node made, and then there is nothing to mount.
Robin |
In my post above, when I tail /var/log/messages after inserting the SD Card, the output says that the SDHC Card is located at address 8fe4. Isn't there a way to manually create a /dev that points to that memory address? I guess it would be more complicated than that wouldn't it?
|
In one of my above posts, I cat the config of my kernel. I seem to have all the modules for mmc. How do I find out the names or aliases of all those modules so that I can modprobe them?
|
All times are GMT -5. The time now is 09:58 PM. |