Cannot boot from PCIe based SD-card reader

  • Got a really cheap Acer Revo RL85 with Haswell Celeron.

    It has a PCIe based SD-Card reader on the top.

    I installed latest LE onto an SD-Card but inserted it into the SD-Card reader and rebooted.

    After a few seconds, I get :

    I type EXIT and get this:

    If I keep entering EXIT, it eventually panics and crashes:

    If I insert the SD-card into a SD-to-USB adapter, and boot off the USB, then all is fine.

    It appears that the SD card is not fully mounted by the LE because there's not an appropriate driver for the PCIe based SD Card reader ?

    It's a Realtek RTS5229 device.

    I prefer to use the SD-Card reader to boot to keep the USB sockets for other peripherals.

    LE v8.0.2

    UEFI boot.

    Cannot provide debug log as I cannot get it to boot from the builtin SD-Card reader.

    All the h/w info are in the attached dumps.

    I can boot the same SD card when inserted into USB card reader.

    Attached dmesg, lspci and lsusb dumps.

    rl85-dmesg.txt

    rl85-lspci.txt

    rl85-lsusb.txt

    Please let know if I need to provide anything else.

    Edited 3 times, last by MacNB: Centralizing the problem. (July 2, 2017 at 6:16 PM).

  • Not breaking the etiqutte.

    Well I put it in the general problem page originally thinking it's something obvious that someone will recognise.

    Now I think it's a bug report so I am "officially reporting" it here.

    If the general problem report page is ALSO for bug reports please state that on the page to avoid the confusion and stop people from posting to this page.

    Feel free to delete my post from the general problem page.

    • Official Post

    ^ looks like a 4GB card device being detected.

    The error is clear in the first two images. The syslinux.conf or extlinux.conf is configured for boot=LABEL=System and disk=LABEL=Storage and those partition labels do not exist on the boot device. It should be using boot=UUID=blah something like below:

    Code
    DEFAULT virtual
    TIMEOUT 50
    PROMPT 0
    
    LABEL virtual boot=UUID=2605-0052 disk=UUID=c1d54db6-83d0-4a9e-b662-e7099f9edbf0 quiet tty vga=curren

    So i'm wondering if another bootloader and traces of an older OE install are present on the 1TB /dev/sda device? - because using disk labels in the boot config is how things used to be done. LE has only ever used the UUID method.

  • So i'm wondering if another bootloader and traces of an older OE install are present on the 1TB /dev/sda device? - because using disk labels in the boot config is how things used to be done. LE has only ever used the UUID method.

    The 1TB HDD has a standard Win 10 (upgraded from Win8.1) UEFI OS.

    The LE SD card was cleanly created using the LE SD-USB Creator Installer App. Never had OE.

    I am assuming that the SD-USB Installer App created the syslinux.cfg file. I looked in /flash/EFI/boot/syslinux.cfg and it contains:

    Code
    DEFAULT linux
    PROMPT 0
     
    LABEL linux
     KERNEL /KERNEL
     APPEND boot=LABEL=System disk=LABEL=Storage  quiet

    The same SD card boots via USB but not via SD-Card Reader.

    What's the difference in the two boot scenarios ?

  • To check if the SD-Card reader is supported in general boot the LE SD card from USB and insert a second SD card to the reader (file system does not matter).

    Please post output of dmesg and lsmod.

  • Yes, after booting the SD from USB, and inserting the second SD card in the PCIe SD card reader, it works fine.

    See attached lsmod and dmesg (see last two lines in the dump).

    It's just the booting from the PCIe SD-card reader that is the problem.

    The LE bootable SD card was created using the LE Installer from scratch (formatted by the LE Installer).

    rl85-lsmod.txt

    rl85-dmesg2.txt

  • The needed driver rtsx_pci_sdmmc is build as module and therefore not available at boot time.


    You have to use the USB card reader until the kernel configuration is changed.


    I will PR the change and get you informed.

  • The needed driver rtsx_pci_sdmmc is build as module and therefore not available at boot time.


    You have to use the USB card reader until the kernel configuration is changed.


    I will PR the change and get you informed.

    Thx for the explanation.

    I thought it looked liked the driver not built-into the boot kernel.

    Many thanks for your proactive support.

    If there's any pre-testing required, let me know.

  • The error is clear in the first two images. The syslinux.conf or extlinux.conf is configured for boot=LABEL=System and disk=LABEL=Storage and those partition labels do not exist on the boot device. It should be using boot=UUID=blah something like belo

    This is only partly true for x86 systems, as it turns out. The installer itself will use UUID, but the installed x86 system will use LABELs.


    The x86 installer will create the two partitions and file systems on the x86 client, and then label them "Storage" and "System", before creating /flash/extlinux.conf with LABELs and - if UEFI support is detected - copying /flash/extlinux.conf to /flash/syslinux.cfg and /flash/EFI/BOOT/syslinux.cfg. Copying both syslinux.cfg files ensures that a UEFI-capable client will boot successfully using either legacy BIOS or UEFI.


    So MacNB's syslinux.cfg using LABELs is correct.

    Assuming the problem is the drivers being loaded as modules, there is now a test build available (based on LE9 with Kodi 18a1) that includes in-kernel drivers.

    MacNB can you manually upgrade your SD card by copying the KERNEL and SYSTEM files extracted from the test build tar file, then try booting your newly updated SD card and report if it works or not.

    Edit: I see mglae has posted above - if you want to play it safe, use a fresh SD card based on an official disk image and then manually update the KERNEL and SYSTEM files in the root of the first partition using the files extracted from the tar file, before booting from the SD card in your client device.

  • milhouse thx for adding the SD-card reader to the boot kernel. It works !

    I did as you suggested and manually updated the LE 8.0.2 build by copying the KERNEL & SYSTEM files (and *.md's).

    On first (off USB carder reader), it hung at the Kodi 18.0 splash screen.

    I powered-off, inserted the SD card into the card reader and booted. Again it hung at the Kodi splash screen but at least it was booting further than before. I powered off.

    I then did what mglae suggested (thanks) to build another SD card with LE 8.0.2 build from scratch, booted it, and updated with test build.

    Booted off the PCI card reader and shown the default Estuary skin.:thumbup:

    The reason it hung at the Kodi 18.0 splash screen seems to be related to the inclusion advancedsettings.xml file in my user data folder.

    I went back to my original SD card that I updated with the test build and renamed advancedsettings.xml file to my-advancedsettings.xml and it booted normally.

    So there seems to be a problem with parsing/reading/handling of the advancedsettings.xml file ?

    But basically, booting from Realtek PCIe reader works. Thx for it's inclusion milhouse.

    It would be nice to see it in the next build of LE 8.0.X ;)

  • So there seems to be a problem with parsing/reading/handling of the advancedsettings.xml file ?

    Possibly, please post the content of your my-advancedsettings.xml file. It's entirely possible for the latest Kodi 18a1 to crash because of some addon and it's settings, but I've not yet seen a crash caused by advancedsettings.xml.

  • Possibly, please post the content of your my-advancedsettings.xml file. It's entirely possible for the latest Kodi 18a1 to crash because of some addon and it's settings, but I've not yet seen a crash caused by advancedsettings.xml.

    I found the problem with advancedsettings.xml. The problem was the IP address setting of the mysql server.

    my-advancedsettings.xml.zip

    Kodi had not crashed but waiting. I managed to SSH into LE.

    When I re-built the SD card for the new test build, I copied the advancedsettings.xml file to the Userdata folder.

    BUT I have two versions of that file (one for my bro's NAS and one of mine). I copied his instead of mine by mistake.

    My NAS has the IP 192.168.1.200 but the advancedsettings.xml file I copied had 192.168.1.220 so kodi has waiting for mysql server that did not exist. As soon I changed the IP address to the correct value, kodi came up and started syncing my library.

    BTW, I still think that this "feature" is not the right behaviour. Even with the "Wait for Network to startup" settings, Kodi should "give up waiting for mysql server" after a user defined time out an assume the server does not exist instead of just "hanging" for ever.

    It's now prepared to be in 8.2

    Thx :thumbup: