Is there an easier to way to find out which /dev/ my flash drive is connected to...
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
modprobe sdhci should work (you might also need sdhci-pci.) This should chain load mmc_core and mmc_block. The partitions should also show up in /dev with the same names they have in /var/log/messages when you plug the card in. If not, go to /sys/block/mmcblk0 and cat dev to see the major/minor device numbers (same with subdirectories mmcblk0p?.) Use mknod to create the devices if needed.
I came across this post because I'm installing slamd64 onto an SD card but the setup program doesn't recognize these devices as places it can install to. I suppose that's sort of a side conversation. I think I'll just have to manually mount them.
Kevin Barry
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?
I'm surprised nobody has mentioned udev
You can write a udev rule so different devices are always mounted and then linked to a sensible devicename eg /dev/Lisas-Nikon or /dev/1TB-Backup
This page http://www.reactivated.net/writing_udev_rules.html
tells you how, and there are some good examples to help get you started.
I'm surprised nobody has mentioned udev
You can write a udev rule so different devices are always mounted and then linked to a sensible devicename eg /dev/Lisas-Nikon or /dev/1TB-Backup
This page http://www.reactivated.net/writing_udev_rules.html
tells you how, and there are some good examples to help get you started.
Yes, udev rules work very well for this sort of thing. I use one to run a script when a certain flash drive is inserted. The script mounts the flash drive, loops a few encrypted file systems on the hard drive with the key I have stored on the flash drive, then unmounts the flash drive. It does take some work up front just to learn how to use the system, however; especially identifying the particular device you want the rule to apply to.
Kevin Barry
and saw a mmcblk0p1 device with memory in it. I mounted up that device and lo and behold it was my SD Card. I have made no changes at all. I simply missed that device. Even looking at the output in /var/log/messages after I insert the SD Card
Code:
mmc0: new SDHC card at address 8fe4
mmcblk0: mmc0:8fe4 SD04G 3872256KiB
mmcblk0: p1
never shows mmcblk0p1 as the new device. Anyhow, it's working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.