LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB stick not visible (https://www.linuxquestions.org/questions/linux-newbie-8/usb-stick-not-visible-4175475601/)

StefanP 09-02-2013 12:37 PM

USB stick not visible
 
When I insert my USB stick in the computer it doen't show in the file manager. If I check the /media directory it doesn't show there either. If I use sudo fdisk -l it does show as "sdb". What would be the command to make it visible? Since I cannot see it I have no path for it either?

btmiller 09-02-2013 12:50 PM

When you run fdisk, do you see any partitions on the USB stick, e.g. sdb1. If so,

Code:

sudo mount /dev/sdb1 /media
should mount it. If the stick is one big partition, try:

Code:

sudo mount /dev/sdb /media
This assumes /media is an empty directory with nothing else mou8nted under it. I often like to mount USB sticks on /mnt, since /media is often dynamically managed by autofs, so you miguht try that too.

yancek 09-02-2013 12:56 PM

You didn't indicate which distribution of Linux you are using.
You also haven't indicated if there is anything on the usb stick, what filesystem.
The standard command to mount an ext4 type filesystem on a flash drive which is seen as the second drive with one partition is to first create a mount point:

sudo mkdir /media/usb

Then mount: sudo mount -t /dev/sdb1 /media/usb

If it is something else, you will need to make the appropriate changes.

StefanP 09-02-2013 01:31 PM

My USB stick was automatically made an installation disk with the command dd
After I installed Linux Debian Wheezy from it after rebooting and inserting back the USB stick it was not seen anymore (the other sticks automatically seen in the file managers)
What I wanted to do is after the computer recognizes the USB stick as an installation CD, I can still use it with commands like apt-get install... (i thought by mounting it would do that...)
Below is what the USB stick shows like:

root@debian:/home/children# sudo fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c7be7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 152143871 76070912 83 Linux
/dev/sda2 152145918 156301311 2077697 5 Extended
/dev/sda5 152145920 156301311 2077696 82 Linux swap / Solaris
Disk /dev/sdb: 4040 MB, 4040724480 bytes
64 heads, 32 sectors/track, 3853 cylinders, total 7892040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x39884cb6
Device Boot Start End Blocks Id System
/dev/sdb1 * 64 1327103 663520 17 Hidden HPFS/NTFS

lleb 09-02-2013 02:00 PM

Quote:

Originally Posted by StefanP (Post 5020397)
When I insert my USB stick in the computer it doen't show in the file manager. If I check the /media directory it doesn't show there either. If I use sudo fdisk -l it does show as "sdb". What would be the command to make it visible? Since I cannot see it I have no path for it either?

here is a fast break down on howto mount/umount a VFAT (FAT32) flash drive via command line (CLI)

Code:

[root@centos ~]# tail -f /var/log/messages
Sep  2 14:50:05 centos kernel: sd 11:0:0:0: [sdd] Assuming drive cache: write through
Sep  2 14:50:05 centos kernel: sd 11:0:0:0: [sdd] Assuming drive cache: write through
Sep  2 14:50:05 centos kernel: sdd: sdd1
Sep  2 14:50:05 centos kernel: sd 11:0:0:0: [sdd] Assuming drive cache: write through
Sep  2 14:50:05 centos kernel: sd 11:0:0:0: [sdd] Attached SCSI removable disk
Sep  2 14:50:06 centos kernel: usb 2-4: USB disconnect, device number 3
Sep  2 14:50:16 centos kernel: powernow-k8: Found 1 AMD FX(tm)-6350 Six-Core Processor              (6 cpu cores) (version 2.20.00)
Sep  2 14:50:16 centos kernel: powernow-k8: Core Performance Boosting: on.
Sep  2 14:50:16 centos kernel: [Firmware Bug]: powernow-k8: No compatible ACPI _PSS objects found.
Sep  2 14:50:16 centos kernel: [Firmware Bug]: powernow-k8: Try again with latest BIOS.
Sep  2 14:55:51 centos kernel: usb 3-4: new high speed USB device number 4 using ehci_hcd
Sep  2 14:55:51 centos kernel: usb 3-4: New USB device found, idVendor=1b1c, idProduct=0ab1
Sep  2 14:55:51 centos kernel: usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep  2 14:55:51 centos kernel: usb 3-4: Product: Flash Voyager
Sep  2 14:55:51 centos kernel: usb 3-4: Manufacturer: Corsair
Sep  2 14:55:51 centos kernel: usb 3-4: SerialNumber: 92e646a69e562a
Sep  2 14:55:51 centos kernel: usb 3-4: configuration #1 chosen from 1 choice
Sep  2 14:55:51 centos kernel: scsi12 : SCSI emulation for USB Mass Storage devices
Sep  2 14:55:52 centos kernel: scsi 12:0:0:0: Direct-Access    Corsair  Flash Voyager    0.00 PQ: 0 ANSI: 2
Sep  2 14:55:52 centos kernel: sd 12:0:0:0: Attached scsi generic sg3 type 0
Sep  2 14:55:52 centos kernel: sd 12:0:0:0: [sdd] 31588352 512-byte logical blocks: (16.1 GB/15.0 GiB)
Sep  2 14:55:52 centos kernel: sd 12:0:0:0: [sdd] Write Protect is off
Sep  2 14:55:52 centos kernel: sd 12:0:0:0: [sdd] Assuming drive cache: write through
Sep  2 14:55:52 centos kernel: sd 12:0:0:0: [sdd] Assuming drive cache: write through
Sep  2 14:55:52 centos kernel: sdd: sdd1
Sep  2 14:55:53 centos kernel: sd 12:0:0:0: [sdd] Assuming drive cache: write through
Sep  2 14:55:53 centos kernel: sd 12:0:0:0: [sdd] Attached SCSI removable disk

[root@centos ~]# ls -la /mnt/
total 20
drwxr-xr-x.  6 root root 4096 Apr 28 16:17 .
dr-xr-xr-x. 27 root root 4096 Sep  2 14:41 ..
drwxr-xr-x.  2 root root 4096 Apr 28 16:17 cdrom
drwxr-xr-x.  2 root root 4096 Jan  5  2013 usb
drwxr-xr-x.  2 root root 4096 Jan  5  2013 usb2
drwxr-xr-x.  3 root root    0 Sep  2 14:40 win7

[root@centos ~]# fdisk -l /dev/sdd

Disk /dev/sdd: 16.2 GB, 16173236224 bytes
255 heads, 63 sectors/track, 1966 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1  *          1        1967    15793152    c  W95 FAT32 (LBA)


[root@centos ~]# mount -t vfat /dev/sdd1 /mnt/usb
[root@centos ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
              ext4    50G  8.5G  39G  19% /
tmpfs        tmpfs    3.9G  4.0K  3.9G  1% /dev/shm
/dev/sdb1    ext4    485M  144M  316M  32% /boot
/dev/mapper/vg_centos-lv_home
              ext4    1.8T  978G  713G  58% /exports/centos
/dev/sda1    ext4    1.4T  743G  564G  57% /exports/NFS_TV_Shows
/dev/sdc1    ext4    3.6T  1.1T  2.4T  30% /exports/New
/dev/sdd1    vfat    16G  9.2G  5.9G  61% /mnt/usb


[root@centos ~]# umount /mnt/usb
[root@centos ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
              ext4    50G  8.5G  39G  19% /
tmpfs        tmpfs    3.9G  4.0K  3.9G  1% /dev/shm
/dev/sdb1    ext4    485M  144M  316M  32% /boot
/dev/mapper/vg_centos-lv_home
              ext4    1.8T  978G  713G  58% /exports/centos
/dev/sda1    ext4    1.4T  743G  564G  57% /exports/NFS_TV_Shows
/dev/sdc1    ext4    3.6T  1.1T  2.4T  30% /exports/New



now if your system automagically mounts, then you will look as pointed out above in either /media or /run, but in either case df -Th will show you were it is mounted if it is mounted automagically.

enjoy and good luck.

StefanP 09-02-2013 02:39 PM

Your example is for "Win95 FAT32 (LBA)".
Mine is listed as "Hidden HPFS/NTFS".
I tried "vfat"... it didn't work
I tried "hpfs" instead of "vfat" ... it didn't work
I tried "ntfs" instead of "vfat" ... it dind't work

Also /mnt/usb it is for me instead /media/usb (there is no point mounted /mnt/usb in my system.

so what do I use for the mount command now?

yancek 09-02-2013 06:59 PM

You might see if the info at the site below helps. I haven't got anything to test it with right now.

http://major.io/2010/12/14/mounting-...scue-in-linux/

If you have parted installed on Debian you could try the command below which should show the filesystem type:

Code:

parted /dev/sda print all

lleb 09-03-2013 06:50 AM

Quote:

Originally Posted by StefanP (Post 5020465)
Your example is for "Win95 FAT32 (LBA)".
Mine is listed as "Hidden HPFS/NTFS".
I tried "vfat"... it didn't work
I tried "hpfs" instead of "vfat" ... it didn't work
I tried "ntfs" instead of "vfat" ... it dind't work

Also /mnt/usb it is for me instead /media/usb (there is no point mounted /mnt/usb in my system.

so what do I use for the mount command now?

hmm lets see simple. then google howto mount a HPFS/NTFS partition, and if you are already seeing it in /media/usb, then it is already mounted. you have to create /mnt/usb if you wish to mount it manually. your system is automagically mounting the device. how else would you notice that it is MOUNTED at /media/usb.

have you installed ntfs-3g, if not that needs to be installed before Debian can access the HPFS/NTFS file system.


All times are GMT -5. The time now is 01:26 AM.