SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I'm trying to mount a compact flash card in a pcmcia slot on a laptop. I've used this card on Linux on other computers before, so I know it works--always mounts normally as an IDE hard drive with a single vfat partition. This time, unfortunately, though the card is recognized on insertion and drivers are loaded, no corresponding file exists in /dev for the CF drive to be mounted as a hard drive.
Reading dmesg, the CF card is recognized as hdc, with a partition, hdc1. /dev has a long list of entries, including excessive hard drive partitions such as "hda2" and "hdd1". "hdc" is included, but no "hdc1", and attempting to mount CF on hdc elicited errors. Can I just create an "hdc1" in /dev? Checking the properties of other existing, valid hard drive files in /dev identify them "brwxrwxrwx", and that "b" is supposed to mean 'block device file', right? So how do you create a block device file?
To manually create a character or block device, check out the command 'mknod' by reading the man page (man mknod).
Incidentally, is there an entry in the /etc/fstab file for this drive?
As already said you can create a device node manually by "mknod".
In order you can assign a correct minor number to such device have a look at
ls -l /dev/hd? /a/b/b1 output.
Mine for conventional ide disks on first ide channel is
brw-rw---- 1 root disk 3, 0 2002-06-09 21:27 hda ---> master
brw-rw---- 1 root disk 3, 64 2007-03-26 18:43 hdb ---> slave
brw-rw---- 1 root disk 3, 65 2007-03-26 18:43 hdb1 ---> first partition
you should have on your second ide channel (master) something like
brw-rw---- 1 root cdrom 22, 0 2007-03-26 18:43 hdc
major nr (22)
minor nr (0)
so..
mknod /dev/hdc1 b 22 1
should do the trick unless there's something wrong with the VFAT_FS driver as the partition is not properly reccognised.
Ciao
The mknod command did the trick, though I changed the group from "root" to "disk" to match the file for the other mounted hard drive, just in case. That link to device allocations had a lot of information: It was everything I needed for understanding. First, you have to know whether the device is a block or character, defined by how it transfers data--one character at a time, or in blocks. Then, the first number is the major which is used to categorize devices by function/interface. The second number is the minor which indicates the order of all the devices in that category, or provides further functional categorization. Yeah? Anyway, mknod hdc1 b 22 1 in the /dev directory worked. After that, the CompactFlash disk (identified as hdc1 according to dmesg) mounted faultlessly with mount -t vfat /dev/hdc1 /mnt/cf
Again, thank you all for your helpful, prompt responses.
What a strange issue ... never seen anything like it, where you actually have to use 'mknod'. Technically, shouldn't it work automatically (shouldn't nodes be created automatically) ? What kind of issue might prevent this from happening automatically ? I don't quite understand
What a strange issue ... never seen anything like it, where you actually have to use 'mknod'. Technically, shouldn't it work automatically (shouldn't nodes be created automatically) ? What kind of issue might prevent this from happening automatically ? I don't quite understand
A flash card on an ide channel, that's strange..?! That's the reason I always stay away from such "trick & track little machines".
Anyway, it is possible there something wrong with the specific device driver
Ciao
I'm just glad it worked. I'd never had such a problem before, which is why I was so clueless, but it's probably because the distro designer sacrificed some automagic conveniences to fit a workable system into less space and be suitable for older computers. Really, I can't criticize, since the tools to get it working were there. My fault that I didn't know what was there and how to use it. Forums are great things!
mine is mounted as a scsi device /dev/sdb1 and if memory serves me correctly it has to be set up that way. you will also need to set fstab aand create a dir. to mount the device
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.