LinuxQuestions.org
Visit Jeremy's Blog.
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 11-03-2017, 01:57 AM   #1
hellolqs
LQ Newbie
 
Registered: Aug 2011
Posts: 16

Rep: Reputation: Disabled
Question [question] which device/partition to mount USB flash drive


Hi all,

I always mount my USB flash drive, like:
Code:
/ # mount /dev/sdb1 /mnt/usbdisk
And, I got a new one which support USB 3.0, and then the mount operation (as shown above) will fail.

After a closer look, I found that with this USB 3.0 jump drive, I have to mount it with the following way, instead.
Code:
/ # mount /dev/sdb /mnt/usbdisk
My questions are: [Googled. No answers found, (yet..)]
1). Is the difference related to USB version (USB 3.0 vs 2.0) or other factors?
2). Is there a proper way to determine which /dev/${partition} should I use to mount (i.e. sda or sda1)?

Thanks for the helps!
 
Old 11-03-2017, 02:21 AM   #2
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,415
Blog Entries: 9

Rep: Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899Reputation: 1899
it simply depends on whether (and how) the drive is partitioned. Usually usb drives have a partition table on them with a single partition listed, so the device that you actually mount is /dev/sd*1. Your new drive appears not to be partitioned, so the whole-drive device /dev/sdb is the thing you must mount. cdroms are organised like that, and floppy disks always were too, but it's unusual for a pen drive. I doubt if it has anything to do with it being usb3.

If you give the command dmesg|tail immediately after plugging in your drive, you will see if the kernel has found any partitions on it.

PS: I found this link which you might find useful:
https://askubuntu.com/questions/2765...artition-table

Last edited by hazel; 11-03-2017 at 02:31 AM. Reason: Added link
 
1 members found this post helpful.
Old 11-03-2017, 08:08 AM   #3
firenze465
Member
 
Registered: Oct 2017
Posts: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by hellolqs View Post
Hi all,

I always mount my USB flash drive, like:
Code:
/ # mount /dev/sdb1 /mnt/usbdisk
This command works - but as you can see, you're mounting one partition of your usb. You're not mounting all of the usb.

sdb is all of your usb.
sdb1 is only a partition of your usb.
It is best to simply mount all of your usb.

Quote:
And, I got a new one which support USB 3.0, and then the mount operation (as shown above) will fail.
Yes, this is because you haven't yet created a partition on your usb 3.0.
But you have created a partition on your usb 2.0. This is why the command works on your usb 2.0

Quote:
After a closer look, I found that with this USB 3.0 jump drive, I have to mount it with the following way, instead.
Code:
/ # mount /dev/sdb /mnt/usbdisk
Yes. And you should use this command for your usb 2.0 as well.
Does that work?

Quote:
1). Is the difference related to USB version (USB 3.0 vs 2.0) or other factors?
It's nothing to do with your faster usb 3.0
It's about getting the command right.
If you want to mount the whole usb then use 'sdb'.
If you want to only mount a created partition on your usb, then use the name your computer gives for that partition on your usb (e.g sdb1, sdb2 etc).

Quote:
2). Is there a proper way to determine which /dev/${partition} should I use to mount (i.e. sda or sda1)?
If you don't create any partitions on your usb 3.0, then just use 'sdb'.

Last edited by firenze465; 11-03-2017 at 08:11 AM.
 
1 members found this post helpful.
Old 11-03-2017, 11:41 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,320

Rep: Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825
Quote:
Originally Posted by firenze465 View Post
This command works - but as you can see, you're mounting one partition of your usb. You're not mounting all of the usb.
sdb is all of your usb.
sdb1 is only a partition of your usb.
It is best to simply mount all of your usb.
If the USB has only one partition, a command to mount that is enough; if it has more than one, then each would obviously need to be mounted separately, but I think that would be unusual.
 
1 members found this post helpful.
Old 11-03-2017, 11:45 AM   #5
hellolqs
LQ Newbie
 
Registered: Aug 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks all for the answers.
 
Old 11-04-2017, 02:40 PM   #6
Crackleplus
LQ Newbie
 
Registered: Nov 2017
Location: USA
Posts: 1

Rep: Reputation: Disabled
At the start almost everyone face these kind of problems.
 
  


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
[SOLVED] unable to mount a usb flash drive and an SD card after changing mount directory name remn Linux - Newbie 24 10-24-2015 03:04 PM
Cannot mount USB Flash Drive, 4 device files Hakala Linux - Software 1 04-01-2006 12:20 PM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:23 AM.

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