|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Populating /dev
My situation:
I have an external hard drive that can be mounted manually as da0s1. No problems there. However, da0s1 is the only USB device available in my /dev bank. So when I want to mount a flash drive, I'm out of luck. In the past I could mount a flash drive on da1s1, but currently I can't do so. Sometimes I've been able to mount the flash drive using the external drive's device file, but I don't like doing that, because often I need both devices mounted at the same time. What I want to do: I want to create a /dev entry for the flash drive. If I can do that, a lot of things will clear up. It's my understanding that /dev entries can be generated using command line utilities like dd and the disk label utility, but I can't for the life of me remember where I saw this procedure written out. So, if anyone in here can point me to an FAQ, HowTo, or other source of documentation on how to generate device entries, I will be most grateful and will do what I can to increase your karma quota. That assumes, of course, that this procedure is still supported by FreeBSD. I've mentioned this problem in other threads, and I have come to partial solutions for many issues, but so far, not all of them. So I'm looking into a new approach. For the record, I'm using PC-BSD 8.2. Which is essentially (or rather, it should be) FreeBSD 8.2 with some nice bells and whistles added. My computer is a Dell Dimension 4550 series that has been customized and upgraded so many times that Dell's original diagnostic utility doesn't recognize it any more. (But PC-BSD and Windows-XP both run just fine, so what the heck.) Thanks in advance, RJPugh |
|
|||
/dev should automatically populate when you insert a usb device.
|
|
||||
I don't use FreeBSD, but suspect that MAKEDEV(8) and mknod(8) will be your friends for this task. The former is a script usually located in the /dev directory. Hope that helps.
|
|
|||
On most original Unix systems, /dev was not populated automatically by the kernel.. it simply contained previously generated device nodes.
FreeBSD/Linux switched over to the dynamic technique for various reasons, but they typically preserve the ability to generate device nodes using the classic MAKEDEV/makedev script. It was once second nature for Unix enthusiasts to generate the additional nodes when they were needed, kids these days are so spoiled. Fortunately, OpenBSD does not have a "devfs" and /dev is simply a directory of files on /. |
|
|||
Any reason you cannot mount /dev/da1s1 ?? Insert the flash drive, and
Code:
cd /dev ls -lac | grep da camcontrol rescan all # etc...
__________________
FreeBSD 13-STABLE |
|
|||
Quote:
However, will the commands you list help with this issue? I haven't yet had a chance to try the other suggestions people have given. Please stay tuned. RJPugh |
|
|||
I believe that the node should be generated when the device is inserted and it will be listed at the end of your dmesg output within seconds of insertion. In that version of freebsd it is likely controlled by "hal" (This is a different hal than the Space Odyssey but can be just as unfriendly).
More info here: http://www.freebsd.org/gnome/docs/halfaq.html |
|
|||
Quote:
The problem you're experiencing is that FreeBSD is apparently unable to detect the device. Rescanning with camcontrol may help with that. Check % tail /var/log/messages After inserting the pendrive. What does it say?
__________________
May the source be with you! |
|
|||
This is one method I have written down. (For instance, if you mount flashdrives on /flashdrive, you can put how.txt in /flashdrive for instructions before the use of the flash drive
Code:
kldload ehci.ko (insert flash drive, wait until it's light stops blinking if it has one) camcontrol rescan all mount -t msdosfs /dev/da0s1 /flashdrive mount -t msdosfs /dev/da0 /flashdrive mount -t msdosfs /dev/da0s1 /flashdrive (multiple attempts so the system has time, and reason, to probe..) (that is for fat32 on the flash drive of course, ...) may change depending upon your v7 v8 v9 version, whether it was an initial install or an upgrade, etc.
__________________
FreeBSD 13-STABLE |
|
|||
I think the OP is using PC-BSD 8.2
Quote:
|
|
|||
Update:
I went through the various pointers people gave me, and after a "camcontrol rescan", I can now see the flash drive. Or rather, a flash drive. The drive I generally use still isn't visible in FreeBSD, but other ones are. That says to me that something is wrong with that particular flash drive. I'll clean it out in Windows-XP, then try to reformat it. If that doesn't work, then I'll just replace it. Those things aren't that expensive, all things considered. Still, I can now probe and mount other flash drives using the manual mount procedure, which is what I was after in the first place. Note that before I went through all of this, my system couldn't see *any* flash drives, so your pointers ultimately did work. It looks like the FreeBSD portion of this problem has been solved. That being said, I want to thank everyone for their help and pointers. RJPugh |
|
|||
Glad you solved the issue RJPugh, I got to come back to read-how. Anyway, add this and see what happen is it's not said already. Last week I decided to dd out one of my flash-drive because I got sick of the DOS 4GB limit. I was ready to suffer the consequences but when I re-booted and plugged my UFS formatted, the first place I looked was in the /dev directory. It had da0 and not da0s1... so now I only have to:
Code:
mount /dev/da0 /mnt and I been using it every since. ... I been meaning to read this thread for a week... If you try it I bet the da0s1 is still there waiting for your HDD. but if you dd from the head of the HDD someday it may not work anymore because it to may becomes da0. PS: I had to do: Code:
newfs -U /dev/da0 ... Last edited by sharris; 7th May 2011 at 06:42 PM. |
|
|