Re: How to visit U disk?
On Thu, 14 Aug 2008 08:39:43 +0800, EdwardKing <[EMAIL PROTECTED]> wrote: > Then I use dmesg: > $dmesg | grep ^da > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Removable Direct Access SCSI-2 device > da0:1.000MB/s transfers > da0:125MB (256000 512 byte sectors: 64H 32S/T 125C) Correct, this shows da0 is your USB disk. You just need to know which partition to access. # ls /dev/da0* will show you which entries are present. As I mentioned before, /dev/da0s1 or /dev/da0s1c should be the correct one. You can check which partitions are on da0 with this command that just does some reading (no modification): # fdisk da0 Then you tried, as suggested: > $mount -t msdosfs dev/da0s1c /mnt > mount_msdosfs: /dev/da0s1c: Operation not permitted Yes, of course. You're issuing this command from a user's shell, not as root. But because of FreeBSD's security concepts, you need to do the mount operation as root (that's why I prefixed the mount command with a # sign), so use "su" or "sudo" (sudo needs to be installed). You can, of course, enable the user to have access to the USB devices by modifying /etc/devfs.conf and setting vfs.usermount=1 in /etc/sysctl.conf. > $mount -t msdosfs dev/da0 /mnt > mount_msdosfs: /dev/da0: Operation not permitted Same reason here. You need to be root to do this. And don't complain, it's completely intended to be this way. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: How to visit U disk?
I plug USB and FressBSD shows: $umass0: on uhub0 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0:1.000MB/s transfers da0:125MB (256000 512 byte sectors: 64H 32S/T 125C) uhub2: on uhub0 uhub2: 7 ports with 7 removable, self powered Then I use dmesg: $dmesg | grep ^da da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0:1.000MB/s transfers da0:125MB (256000 512 byte sectors: 64H 32S/T 125C) $mount -t msdosfs dev/da0s1c /mnt mount_msdosfs: /dev/da0s1c: Operation not permitted $mount -t msdosfs dev/da0 /mnt mount_msdosfs: /dev/da0: Operation not permitted Where wrong of visiting USB? Thanks - Original Message - From: "Polytropon" <[EMAIL PROTECTED]> To: "EdwardKing" <[EMAIL PROTECTED]> Cc: "FreeBSD" Sent: Wednesday, August 13, 2008 6:34 PM Subject: Re: How to visit U disk? > On Tue, 12 Aug 2008 08:53:18 +0800, EdwardKing <[EMAIL PROTECTED]> wrote: >> I want to use U disk which format is FAT32,I don't know how to visit U >> disk,my dev directory is follows: >> #cd /dev >> #ls >> ... >> usb >> usb0 >> usb1 >> ... >> >> How to do it? >> Thanks in advance > > I just try to guess what you're trying to do: Acces an USB hard > disk? Look out for /dev/da* device files that occur when connecting > the disk, or: > > # dmesg | grep ^da > > The da* files - direct access - are the special files to access > USB drives. > > Then you can mount them as you like (FAT32 -> msdosfs): > > # mount -t msdosfs /dev/da0s1c /mnt > > or something similar. mount_msdosfs allows some options to get > the file attributes correct, read "man mount_msdosfs" to learn > more about it. > > > Hope that was the question. :-) > > > -- > Polytropon > From Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... -- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: How to visit U disk?
EdwardKing wrote: Thanks your answer! I use dmesg | tail #dmesg | tail sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa-0xb on isa0 Timecounter "TSC" frequency 2194304266 Hz quality 800 Timecounters tick every 1.000 msec hptrr: no controller detected. ad0: 5120MB at ata0-master UDMA33 acd0: CDROM at ata1-master UDMA33 Waiting 5 seconds for SCSI devices to settle GEOM_LABEL: Label for provider acd0 is iso9660/FreeBSD_Install. Trying to mount root from ufs:/dev/ad0s1a If you issued the command right after you plugged the USB stick in your system, it has not been detected. The last line #mount_msdosfs ufs:/dev/ad0s1a /mnt mount_msdosfs ufs:/dev/ad0s1a: : Operation not permitted Because there is no file ufs:/dev/ad0s1a, note that ufs: is not part of the path of the device in the file system. #mount_msdosfs /dev/ad0s1a /mnt mount_msdosfs /dev/ad0s1a: : Operation not permitted Because the /dev/ad0s1a device is already mounted as the root file system. #device umass device: not found The shell says there is no command `device'. It seems you would take advantage from reading section «18. Storage» in the Handbook, especially section 18.2 that explains thow to recognize devices after their names, and section 18.5 that is devoted to USB devices. Again, the URL for section 18 is: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks.html (Note that top-posting obfuscates the dialog history, so it is best to avoid top-posting.) - Original Message - From: "Michaël Grünewald" <[EMAIL PROTECTED]> To: "EdwardKing" <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2008 1:46 PM Subject: Re: How to visit U disk? EdwardKing wrote: I want to use U disk which format is FAT32,I don't know how to visit U disk,my dev directory is follows: #cd /dev #ls ... usb usb0 usb1 ... How to do it? Thanks in advance After you plug the stick in the system, it is attached by the kernel which issues some information. This information is visible in the console, you can also access it with the dmesg utility: $ dmesg | tail umass0: on uhub4 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 247MB (506880 512 byte sectors: 64H 32S/T 247C) GEOM_LABEL: Label for provider da0s1 is msdosfs/USBSTICK. You can see above example output from my system. The stick is available here through `/dev/da0s1' or through `/dev/msdosfs/USBSTICK'. Not that some environements will automagically mount the stick for you, usually at some directory under /var/media. You may also want to read parts of the `Storage section' in the Handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks.html -- Cheers, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: How to visit U disk?
On Tue, 12 Aug 2008 08:53:18 +0800, EdwardKing <[EMAIL PROTECTED]> wrote: > I want to use U disk which format is FAT32,I don't know how to visit U > disk,my dev directory is follows: > #cd /dev > #ls > ... > usb > usb0 > usb1 > ... > > How to do it? > Thanks in advance I just try to guess what you're trying to do: Acces an USB hard disk? Look out for /dev/da* device files that occur when connecting the disk, or: # dmesg | grep ^da The da* files - direct access - are the special files to access USB drives. Then you can mount them as you like (FAT32 -> msdosfs): # mount -t msdosfs /dev/da0s1c /mnt or something similar. mount_msdosfs allows some options to get the file attributes correct, read "man mount_msdosfs" to learn more about it. Hope that was the question. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
How to visit U disk?
I want to use U disk which format is FAT32,I don't know how to visit U disk,my dev directory is follows: #cd /dev #ls ... usb usb0 usb1 ... How to do it? Thanks in advance -- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"