Inserting a USB storage device
- Plug in the device to the system
- Check the contents of the file /var/log/dmesg to see what the system named the device. (You can use the command dmesg.) It should appear as a SCSI device, so the name should be similar to /dev/sda or /dev/sdb.
- Use the command fdisk -l
, replacing with the device name from /var/log/dmesg to determine the partitions on the device. Most USB flash drives and other portable storage media types have only one partition, so the output of the fdisk command will most likely be something like /dev/sda1 or /dev/sdb1. - Create a directory (mkdir) to serve as the drive's mount point. It is recommended to use a name that is easy to remember like/mnt/usb.
- Mount the device with the mount command. If the device was detected as /dev/sda and the fdisk command showed/dev/sda1 as your partition, the command would be:
mount /dev/sda1 /mnt/usb
The mount command should automatically detect the partition type and mount the drive. It can be problematic to add the mount command to the file/etc/fstab, as the device may be detected with a different name if system devices are changed or if more than one USB device is plugged in at the same time. For this reason, it is recommended to mount the device manually with the full mount command listed above instead of relying on an entry in/etc/fstab.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.