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 08-27-2017, 08:12 PM   #1
GeneCode
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Rep: Reputation: Disabled
Understanding detected devices?


Hi all.

I am working with barebox Linux right now. I am not sure why some SD card that I plug in, shows as 2 devices:

/dev/disk0.0
/dev/disk0

but another SD card I have only detected as 1 device:

/dev/disk0

I guess it is something to do with partition? Or something? I'd like to know how to get a consistent ref name for a device because I have a script to automount it to a directory.

Thank you
 
Old 08-27-2017, 10:14 PM   #2
GeneCode
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Ok not sure why, but after I reformated the SD card, both now has the same devices.

/dev/disk0.0
/dev/disk0

Anyway I still want to know why there are 2 devices for a single card.
 
Old 08-28-2017, 12:10 AM   #3
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,869

Rep: Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051
Quote:
Originally Posted by GeneCode View Post
Hi all.

I am working with barebox Linux right now. I am not sure why some SD card that I plug in, shows as 2 devices:

/dev/disk0.0
/dev/disk0

but another SD card I have only detected as 1 device:

/dev/disk0

I guess it is something to do with partition? Or something? I'd like to know how to get a consistent ref name for a device because I have a script to automount it to a directory.

Thank you
If I'm understanding your question correctly, the first device node represents the device itself, where as the 0 (or 1, etc) represents the partitions on said device/media (SD card, USB, etc).

For example, if I had a device with 2 partitions on it, and it's got the device node /dev/sda the sda1 would be the first partition on said device/media, with sda2 being the second partition.

The device node given to a device is (to my understanding anyway) decided by the order in which storage devices are "seen" by the kernel.

Hope this helps.

Last edited by jsbjsb001; 08-28-2017 at 12:11 AM.
 
1 members found this post helpful.
Old 08-28-2017, 12:13 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,401
Blog Entries: 10

Rep: Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213Reputation: 5213
exactly, partitioning.

Quote:
Originally Posted by GeneCode View Post
/dev/disk0.0
/dev/disk0
/dev/disk0.0 is the first partition
/dev/disk0 is the card itself

there might be even more partitions...
 
1 members found this post helpful.
  


Reply

Tags
device


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
Help understanding how drives/arrays are detected elliot01 Linux - Hardware 3 02-15-2013 12:25 PM
[SOLVED] USB Devices Not Detected isururj Linux - Hardware 4 07-19-2010 02:37 AM
understanding USB storage devices linuxdeveloper29 Linux - Hardware 1 10-27-2008 03:17 AM
(EE) No devices detected. patricodog Mandriva 33 02-27-2005 11:10 PM
X - no devices detected kleptophobiac Linux - Hardware 3 12-16-2003 08:36 AM

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

All times are GMT -5. The time now is 02:27 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
Open Source Consulting | Domain Registration