View previous topic :: View next topic |
Author |
Message |
DevSolar Tux's lil' helper
Joined: 07 Sep 2004 Posts: 82
|
Posted: Sun Oct 31, 2004 9:01 am Post subject: Stupid Q: mount /dev/sdX1 only after mount /dev/sdX? |
|
|
This is probably a very stupid question, but I have no idea what's up here...
I have a 6-in-1 card reader installed in one of my tower's drive bays. It's recognized by the kernel drivers alright, and the card slots are given /dev/sdb through /dev/sde. Let's say I want to use the CompactFlash slot, which is /dev/sdc.
Now, since there's no card inserted at bootup, there's no /dev/sdc1, only /dev/sdc. I can't mount the card ("mount /dev/sdc1 /mnt/cf"), I always get "special device /dev/sdc1 does not exist".
How can I get the system to detect the partitions on the inserted card? (Aside from having to have the card inserted upon boot...) |
|
Back to top |
|
|
GatoVolador Apprentice
Joined: 16 Jun 2004 Posts: 268 Location: California, USA
|
Posted: Mon Nov 01, 2004 8:09 pm Post subject: |
|
|
I have a similar problem with a Zip 100Mb floppy using udev. Unfortunately I have not foud a good solution. I can still get it to work by doing one of the following.
1. Mount it twice. That's right, mount the device twice in a row. The first one errors out, but the second will mount the device for me. My understanding is that the first mount forces the device's partition table to be read, which causes the creation of the appropriate devices to actually mount the device. Once the devices are created the second mount should work.
2. Try the following: Insert the media, then do Code: | blockdev --rereadpt /dev/hdb | and see if the appropriate device links appear. If they do, you should be able to mount the thing. Short of writing a shell script to do the blockdev and mount, I've not come across a better way of getting my removable device's device nodes created automatically.
3. I'm not sure about if this will work or not for you, but you could try creating the device nodes in your /etc/conf.d/local.start? Something like Code: | [ ! -b /dev/sdc1 ] && mknod -m 660 /dev/sda1 b 8 1
[ ! -b /dev/sdb1 ] && mknod -m 660 /dev/sdb1 b 8 17
[ ! -b /dev/sdc1 ] && mknod -m 660 /dev/sdc1 b 8 33
[ ! -b /dev/sdd1 ] && mknod -m 660 /dev/sdd1 b 8 49
[ ! -b /dev/sde1 ] && mknod -m 660 /dev/sdb1 b 8 65 | May work for you, I'm not sure, I'm trying it out for my zip on the next reboot. For more info on the device numbers search for "sda" in /usr/src/linux/Documentation/devices.txt
Hope that helps some,
Jay |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Mon Nov 01, 2004 8:55 pm Post subject: |
|
|
thats an unfortunate misfeature of most media reading devices. they dont inform the host when media has been inserted.
getting the partition table re-read is as simple as:
and then sdc1 will appear if a card is present.
udev's NAME{all_partitions} key support will help you work around this issue. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
fabs_uk n00b
Joined: 01 Jun 2004 Posts: 15 Location: university, the joys of
|
Posted: Mon Nov 15, 2004 3:38 am Post subject: |
|
|
Is there a way to acheive this re-read without root access? i'm just a little tired of having to throw up a root term every time i want to mount my memory cards (being able to put it in a script would be my aim). Alternatively i could just go and get a *correct* card-reader.....if such a thing exists!
Thanks,
Fabs |
|
Back to top |
|
|
|
|
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
|
|