PDA

View Full Version : [SOLVED] 14.04 doesn't find high number devices



xxlray
August 20th, 2015, 10:52 AM
I have a Ubuntu 14.04 that I boot from a micro SD card on a Beaglebone computer board. I created thirteen partitions that should show up at /dev


sudo fdisk -l

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 one to show up


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 by the way.

xxlray
August 25th, 2015, 12:37 PM
I read a bit of the kernel documentation (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devices.txt) and found


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 :(

xxlray
August 26th, 2015, 04:09 PM
I added CONFIG_MMC_BLOCK_MINORS=11 to my .config and recompiled the kernel. Is there any way to check if I chose the correct file?


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?

xxlray
August 27th, 2015, 03:07 PM
I created a /etc/sysctl.d/11-mmcblk-perdev-minors.conf with the content

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?

xxlray
August 27th, 2015, 03:59 PM
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.