PDA

View Full Version : external HD`s


greg m
01-06-2011, 12:25 PM
hello
one of the reasons i`m trying bsd is because i like OS`s.
with pcbsd when i plug in a usb hd and it opens nothing is shone i need to move videos from one hd to a larger hd. can`t do this if i cant see them.i installed pcbsd yesterday and i like it so far. did i not install a program i need?

thank you greg m

Ian_Robinson
01-06-2011, 02:00 PM
It is always good to identify what version of PCBSD are you using, the type of formatting on your external USB drive, and its size.

Generally, when a USB drive is connected, PCBSD displays a pop-up to show it has detected the attachment of a USB device. Thus the device is detected, but not necessarily "mounted." (See next paragraph.) If PCBSD detects a problem, it usually presents an error message along the bottom of the screen.

If the device is detected successfully, it will be displayed in the left side of Dolphin (the default file viewer), and you mount the device by clicking on the icon for the drive. The icon will also have text identifying the drive by either its Volume Name or its size. You will find that PCBSD mounts the USB drive in the directory tree at a subdirectory called /media (i.e., /media/disk). Still in Dolphin, you can get to your directories and files by clicking on the /media and navigating down the directory tree from there.

If the detection is not automatic, you can go to a terminal (called "Konsole") in PCBSD. You must log in as "su" and enter your administrative password. The terminal prompt will change from a ">" to a "#" to show you are now logged into the terminal as "su" (superuser, administrator). The next steps are to (1) determine the disk identification that PCBSD gives to the USB device and (2) to mount the USB device manually.

--------- (1) determine the USB device id: -------------------------

(a) with the USB device connected, type the following command into the terminal (the # in these examples is the terminal prompt. You do not type this):

#dmesg

(b) examine the output from dmesg:

da0 at umass-sim0 bus 0 target 0 lun 0
da0: <WD 1200BB External 0412> Fixed Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C)
#

From that example, we learn that PCBSD sees the USB device as "da0". The number at the end of "da" might be something other than zero, like da1, da2, etc. depending on how many scsi devices are attached to your computer. We will use the "da0" or "da1" etc. as a prefix in later commands. Note also that the size is reported as 114473 MB (114 GB). File systems larger than 128 gigabytes are considered "large". In the later commands, you must tell the system that the disk is "large" so it will mount properly.

------------------ (2) Mount the device -----------------------

Mount the device with a command built from a combination of the mount command, the type of format of the filesystem, a "flag" for the "large" command where necessary, the id of the device, and the point in the directory tree where you want it to mount.

Structure of command: mount fstype flags deviceid mountpoint

Example: mount -t msdosfs /dev/da0s1 /media
Example: mount_msdosfs /dev/da0s1 /media

Those two examples are equivalents, the difference being the -t flag is the older form of the command and the mount_msdosfs is the newer form. Notice that we have added a device prefix ("/dev/") to the device id and a suffix ("s1") The prefix will always be /dev/, but the suffix may change depending on how the hard disk is sliced up. A disk with more than one partition on it will have a different suffix. To determine the correct suffix, you can either experiment with substituting different suffixes (s2, s3) or you can load sysinstall -- but we will not cover that here.

More Examples:

Example: mount -t msdosfs -o large /dev/da2s1 /mnt/temp_lb
Example: mount_msdosfs -o large /dev/da2s1 /mnt/USB_Disk

In these latter examples, we are mounting a hard disk of at least 128 Mb (-o large -- that is an o (oh) not a zero). We are also chosen a pre-existing subdirectory of /mnt as the targets)

If you are mounting an ntfs file system, you must identify that in your mount command.

Example: #mount_ntfs -o large /dev/da0s1 /media

========= Safe Unmounting ================

Never remove a USB disk without umounting it. If you mounted with Dolphin, you unmount by right clicking on the device icon and choosing "unmount" or "eject"

If you mounted with a terminal, you must unmount with the "umount" command. Notice the spelling "umount" -- there is NO "n" between u and m. You must be logged in as "su"

Command structure: umount mountpoint

Example: #umount /media
Example: #umount /media/disk
Example: #umount /mnt/temp_lb
Example: #umount /mnt/USB_Disk

==============================

Hope this helps.

You can get further information in the PCBSD Handbook or the FreeBSD Handbook in the sections on File Systems. You can also look up the "mount" and "umount" commands with a search in Google such as: FreeBSD +mount or FreeBSD +umount or FreeBSD mount USB

Ian Robinson
Salem, Ohio

greg m
01-06-2011, 08:51 PM
thank you for your reply. the HD`s are formated for windows, as all are from stores.
i have the new pcbsd 8.1x64
the learning curve goes up with bsd.

thank you greg