5 Replies Latest reply on Jan 19, 2017 10:31 PM by b-man

    Ubuntu/Other Linux distros not properly recognising external SD?

    b-man

      Hello,

       

      I've been experimenting with Fedora and Ubuntu on my Joule and I've noticed some odd behavior with external SD cards.

      For Fedora, the eMMC is recognized and enumerated upon boot but the external SD card isn't recognized at all, even if I attempt to

      reseat the SD card while Fedora is booted. For Ubuntu, the eMMC is recognized and enumerated on boot but the external SD card fails

      to properly enumerate. However for Ubuntu, I found that if I reseat the SD card while Ubuntu is booted, the SD card is immediately enumerated and mounted.

       

      I noticed while booting Fedora, I got the following kernel message:

       

      mmc0: error -110 whilst initializing sd card

       

      While for Ubuntu, mmc0 is seen on the PCI bus but mmcblk0 isn't created until after I reseat the card.

       

      Before reseating SD card:

       

      dmesg | grep -i mmc

      [    0.205484] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xe0000000-0xe3ffffff] (base 0xe0000000)

      [    0.205487] PCI: MMCONFIG at [mem 0xe0000000-0xe3ffffff] reserved in E820

      [    0.300836] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge

      [    2.786296] mmc0: SDHCI controller on PCI [0000:00:1b.0] using ADMA 64-bit

      [    2.790708] mmc1: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit

      [    3.023001] mmc1: new HS400 MMC card at address 0001

      [    3.027249] mmcblk1: mmc1:0001 016G32 14.7 GiB

      [    3.027527] mmcblk1boot0: mmc1:0001 016G32 partition 1 4.00 MiB

      [    3.027837] mmcblk1boot1: mmc1:0001 016G32 partition 2 4.00 MiB

      [    3.028002] mmcblk1gp0: mmc1:0001 016G32 partition 4 4.00 MiB

      [    3.028363] mmcblk1gp3: mmc1:0001 016G32 partition 7 4.00 MiB

      [    3.028735] mmcblk1rpmb: mmc1:0001 016G32 partition 3 4.00 MiB

      [    3.031816]  mmcblk1: p1 p2 p3

      [    6.682443] EXT4-fs (mmcblk1p2): mounting ext2 file system using the ext4 subsystem

      [    6.688689] EXT4-fs (mmcblk1p2): mounted filesystem without journal. Opts: (null)

       

      After:

       

      dmesg | grep -i mmc

      [    0.205484] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xe0000000-0xe3ffffff] (base 0xe0000000)

      [    0.205487] PCI: MMCONFIG at [mem 0xe0000000-0xe3ffffff] reserved in E820

      [    0.300836] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge

      [    2.786296] mmc0: SDHCI controller on PCI [0000:00:1b.0] using ADMA 64-bit

      [    2.790708] mmc1: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit

      [    3.023001] mmc1: new HS400 MMC card at address 0001

      [    3.027249] mmcblk1: mmc1:0001 016G32 14.7 GiB

      [    3.027527] mmcblk1boot0: mmc1:0001 016G32 partition 1 4.00 MiB

      [    3.027837] mmcblk1boot1: mmc1:0001 016G32 partition 2 4.00 MiB

      [    3.028002] mmcblk1gp0: mmc1:0001 016G32 partition 4 4.00 MiB

      [    3.028363] mmcblk1gp3: mmc1:0001 016G32 partition 7 4.00 MiB

      [    3.028735] mmcblk1rpmb: mmc1:0001 016G32 partition 3 4.00 MiB

      [    3.031816]  mmcblk1: p1 p2 p3

      [    6.682443] EXT4-fs (mmcblk1p2): mounting ext2 file system using the ext4 subsystem

      [    6.688689] EXT4-fs (mmcblk1p2): mounted filesystem without journal. Opts: (null)

      [  794.510040] mmc0: new ultra high speed DDR50 SDHC card at address 0001

      [  794.510964] mmcblk0: mmc0:0001 00000 29.8 GiB

      [  794.516945]  mmcblk0: p1 p2 p3

      [  794.730883] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)

       

      Is this a known problem? Has anyone else who has been running Ubuntu/other Linux distros had this problem?

        • 1. Re: Ubuntu/Other Linux distros not properly recognising external SD?
          McCool

          I am experiencing the same problem.   I am running the latest Canonical Ubuntu release for desktop Ubuntu (tuchuck-xenial-desktop-iso-20161006-0.iso) from here and have updated my Joule to BIOS version 131.

          However, the SD card is just not recognized at boot.   If I pop it out and push it back in, it is however recognized and mounted.   I even formatted it as ext4 managed to get fstab to mount it somewhere useful to enlarge my filesystem... but I can't use it for anything critical unless it is recognized at boot.

           

          The onboard eMMC it seems also "looks" like an SD card to the system.   On my system the eMMC mounts to mmcblk0 and the SD card to mmcblk1.   A good command to see what devices are recognized is lsblk.   Then you can clearly see this behaviour (reboot, run lsblk... no card..., then pop the card out and push it back it, run lsblk... there it is!).

           

          I also went into the "Disks" utility following the instructions at How to Mount Partitions Automatically on Start Up in Ubuntu 14.04 | UbuntuHandbook  and set the mount options to "Mount at startup" (which is also how you can set up a different mount point, BTW; it creates an fstab entry).   No luck.   The problem is the *device* is not created until you (re)insert the card.

          • 2. Re: Ubuntu/Other Linux distros not properly recognising external SD?
            McCool

            I did try creating the device nodes directly (using mknode with the same parameters as I observed after a (re)insert), but no joy.

            I also tried forcing a PCIe reenumeration using "echo 1 > /sys/bus/pci/rescan", no joy (I assume it is using the sdhci-pci controller; two show up when I use lspci, I assume one is for the onboard eMMC).

             

            I noticed there is no entry under /sys/block for the card (until it is re-inserted, then these magically appear).

            Running "udisksctl list" before and after reinsertion also shows the card only showing up after reinsertion.

            • 3. Re: Ubuntu/Other Linux distros not properly recognising external SD?
              McCool

              BTW, I should note this is *likely* an issue with the Linux setup, eg Ubuntu.    So it might be a good idea to ask this same question over in the Ubuntu forums.

              As for Fedora... frankly, it's probably better to focus on getting Ubuntu working first, since Canoncial does have a release specifically for the Joule and it *should* be able to do this.

              • 4. Re: Ubuntu/Other Linux distros not properly recognising external SD?
                b-man

                I've revisited this issue after taking a hiatus, and I have found that I still cannot boot using the uSD card. If I attempt to make a bootable Ubuntu image for the Joule by following this guide and using the official Intel Joule Module Configuration Tool, the board still refuses to boot. I've verified that I am running the latest 161 UEFI firmware, and I have verified that the boot order was configured correctly. I've tried multiple different SD cards (all class 10 and up), but I still am not having any success.

                 

                update:

                I've written Ostro to the SD card, and it does seem to boot. However, it looks like it hangs at "Waiting for installation media is fully initialized...".

                 

                Also, the ordering of the SD Card/eMMC devices are still reversed on my Joule; the uSD is seen as mmcblk0, while the eMMC is seen as mmcblk1.