LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-24-2015, 08:14 AM   #1
XXLRay
Member
 
Registered: May 2010
Posts: 133

Rep: Reputation: 16
Ubuntu 14.04 doesn't create high number devices


I have a Ubuntu 14.04 that I boot from a micro SD card in a card reader slot. I created thirteen partitions that should show up at /dev and fdisk -l shows them.
Code:
...
Disk /dev/mmcblk0: 31.7 GB, 31657558016 bytes
64 heads, 32 sectors/track, 30191 cylinders, total 61831168 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: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *        2048      100351       49152    e  W95 FAT16 (LBA)
/dev/mmcblk0p2          100352     5220351     2560000   83  Linux
/dev/mmcblk0p3         5220352     6244351      512000   83  Linux
/dev/mmcblk0p4         6244352     8292351     1024000    5  Extended
/dev/mmcblk0p5         6244353     6449151      102399+  83  Linux
/dev/mmcblk0p6         6449153     6653951      102399+  83  Linux
/dev/mmcblk0p7         6653953     6858751      102399+  83  Linux
/dev/mmcblk0p8         6858753     7063551      102399+  83  Linux
/dev/mmcblk0p9         7063553     7268351      102399+  83  Linux
/dev/mmcblk0p10        7268353     7473151      102399+  83  Linux
/dev/mmcblk0p11        7473153     7677951      102399+  83  Linux
/dev/mmcblk0p12        7677953     7882751      102399+  83  Linux
/dev/mmcblk0p13        7882753     8087551      102399+  83  Linux
/dev/mmcblk0p14        8087553     8292351      102399+  83  Linux
...
Unfortunately mmcblk0p7 is the last device to show up in /dev

Code:
ls -l /dev
...
brw-rw---- 1 root disk    179,   0 Jan  1  2000 mmcblk0
brw-rw---- 1 root disk    179,   1 Jan  1  2000 mmcblk0p1
brw-rw---- 1 root disk    179,   2 Jan  1  2000 mmcblk0p2
brw-rw---- 1 root disk    179,   3 Jan  1  2000 mmcblk0p3
brw-rw---- 1 root disk    179,   4 Jan  1  2000 mmcblk0p4
brw-rw---- 1 root disk    179,   5 Jan  1  2000 mmcblk0p5
brw-rw---- 1 root disk    179,   6 Jan  1  2000 mmcblk0p6
brw-rw---- 1 root disk    179,   7 Jan  1  2000 mmcblk0p7
brw-rw---- 1 root disk    179,   8 Jan  1  2000 mmcblk1
brw-rw---- 1 root disk    179,  16 Jan  1  2000 mmcblk1boot0
brw-rw---- 1 root disk    179,  24 Jan  1  2000 mmcblk1boot1
brw-rw---- 1 root disk    179,   9 Jan  1  2000 mmcblk1p1
brw-rw---- 1 root disk    179,  10 Jan  1  2000 mmcblk1p2
...
Is it a udev rule issue? What do I need to do to get the partitions show up as devices?

All partitions are properly mounted to /media/... when I insert the card via USB card reader in another Ubuntu 14.04 computer.
 
Old 08-25-2015, 07:36 AM   #2
XXLRay
Member
 
Registered: May 2010
Posts: 133

Original Poster
Rep: Reputation: 16
I read a bit of the kernel documentation (https://git.kernel.org/cgit/linux/ke...on/devices.txt) and found

Code:
179 block       MMC block devices
		  0 = /dev/mmcblk0      First SD/MMC card
		  1 = /dev/mmcblk0p1    First partition on first MMC card
		  8 = /dev/mmcblk1      Second SD/MMC card
		    ...

		The start of next SD/MMC card can be configured with
		CONFIG_MMC_BLOCK_MINORS, or overridden at boot/modprobe
		time using the mmcblk.perdev_minors option. That would
		bump the offset between each card to be the configured
		value instead of the default 8.
So it seems as automatically the first SD card minor numbers are cut off after 7.

As follows I re-compiled the kernel with CONFIG_MMC_BLOCK_MINORS=11 but it didn't help
 
Old 08-25-2015, 07:46 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,169

Rep: Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628
Did you compare the .config's on the 2 systems ?. Passing in the override as suggested would seem easier than redoing a kernel ad-nauseum.
 
Old 08-25-2015, 08:20 AM   #4
XXLRay
Member
 
Registered: May 2010
Posts: 133

Original Poster
Rep: Reputation: 16
CONFIG_MMC_BLOCK_MINORS is 8 in the system that works but note that I am accessing the card via USB and not via an internal SD card reader there.
What do you mean by "Passing in the override"?
 
Old 08-26-2015, 11:05 AM   #5
XXLRay
Member
 
Registered: May 2010
Posts: 133

Original Poster
Rep: Reputation: 16
Is there any way to check if I chose the correct .config file?

Code:
modprobe mmcblk.perdev_minors
Didn't throw an error but as it didn't do anything I guess it's not the way to use it. Any suggestions?

Last edited by XXLRay; 08-26-2015 at 11:08 AM.
 
Old 08-27-2015, 10:06 AM   #6
XXLRay
Member
 
Registered: May 2010
Posts: 133

Original Poster
Rep: Reputation: 16
I created a /etc/sysctl.d/11-mmcblk-perdev-minors.conf with the content
Code:
mmcblk.perdev_minors = 11
then rebooted but it didn't change anything either. Is this at least the way it is supposed to work or do I have a bad misunderstanding here?
 
Old 08-27-2015, 10:59 AM   #7
XXLRay
Member
 
Registered: May 2010
Posts: 133

Original Poster
Rep: Reputation: 16
Fixed it. A build script overwrote my .config after I changed it. One option was to disable the update but I chose to set "Device Drivers -> MMC/SD/SDIO card support -> Number of minors per block device" in menuconfig that was called by the script.
 
  


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
Can two devices have the same major and minor number? david_8274 Linux - Newbie 2 04-30-2014 09:15 PM
[HELP] How to create large number of raw devices from file stevetlam Linux - Newbie 4 05-24-2013 09:12 AM
Why doesn't Ubuntu 9.10 detect my USB devices? Advice Pro Linux - Newbie 32 03-07-2011 06:33 PM
Leaving open High-number ports Murdock1979 Linux - Security 2 11-19-2007 11:52 AM
how to increase the loop devices number baloon Red Hat 3 03-29-2007 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:53 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