LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2013, 01:37 PM   #1
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Rep: Reputation: 15
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?
 
Old 09-02-2013, 01:50 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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.
 
Old 09-02-2013, 01:56 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
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.
 
Old 09-02-2013, 02:31 PM   #4
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Original Poster
Rep: Reputation: 15
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
 
Old 09-02-2013, 03:00 PM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by StefanP View Post
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.
 
Old 09-02-2013, 03:39 PM   #6
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 140

Original Poster
Rep: Reputation: 15
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?
 
Old 09-02-2013, 07:59 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
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
 
Old 09-03-2013, 07:50 AM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by StefanP View Post
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.

Last edited by lleb; 09-03-2013 at 07:54 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hauppauge wintv-hvr h006 - dvb-t tuner - usb-stick - hybrid tv stick Xeratul Linux - Hardware 5 12-23-2012 10:47 AM
LXer: Installing "Sugar on a stick" (Strawberry Release) On A USB Stick LXer Syndicated Linux News 0 08-04-2009 04:50 PM
memory stick doesn't mount, not visible in lsusb pickarooney Linux - Hardware 2 10-12-2008 04:10 PM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 12:12 PM
USB problems: Memorex USB stick 256MB and PSX to USB adapter by Radio Shack Knuckles T15 Linux - Hardware 1 05-19-2004 07:58 PM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration