Bricked NAND - how to create a USB bootable SD and LibreELEC on ONE SD?

  • Hello,
    I got a problem. I got Mini M8S II with broken NAND. One possibility to run my box is:
    1) create a bootable SD card with Amlogic SD card maker, copy files from orginal firmware on it except recovery, recovery is TRWP for S905x devices,
    2) create USB flash drive with LibreELEC USB SD creator.
    3) both devices must be connected at the same time.
    Box starts, works very well, but...
    Is there any possibility to create AIO sd card and use ONLY sd card?
    I'm newbie here, I'm trying to learn a bit about amlogic/android devices but no luck yet :(
    Could somebody help me with this problem?

    Edited once, last by windziu (November 27, 2016 at 8:30 PM).

  • Thanks guys for advice.
    I got new problems trying to get what I want ;)
    I created a LE card and went to livecd mint to try Yours advices but when I try to execute dd, terminal says "cant find such file or directory".
    I moved sd uboot what works with my mini to boot partition of LE prepared SDCard (/dev/sdc1) and tried with dd.
    " dd if=u-boot.bin.sd.bin of=/dev/sdc1 conv=fsync bs=1 count=442"
    and got "cant find such file or directory".
    What do I do wrong? Maybe LiveCD does not works properly?
    Can You guys explain for me, for real newbie step-by-step, how to write uboot to sd card contains LE?

    P.S. kszaq jestes moze z Polski?

    EDIT: Guys, IT WORKS!
    I did manage to write u-boot to LE prepared sd card, and it works! (My knowledge about linux is so poor..., I forgot to mount folder first ;) )
    Thank You for your help!
    EDIT 2: Maybe wrong place to ask for it but, if LibreELEC works on sd, is there any possibility to write on sd card stock firmware from MINI and boot from it?

    Edited once, last by windziu (November 28, 2016 at 10:34 PM).

  • windziu I'm glad you sorted this out. :) You might be able to run Android from SD card but that would need at least:

    • creating 3 partitions on SD card for boot, system and data partition
    • modifying initramfs to mount these partitions at proper mount points
    • maybe something else

    Again, like my first post this is only and idea and I've never done that.

    P.S. Tak. ;)

  • Seems like a hard thing to achieve... Would You guys point some tutorials how to start adventure with this journey?

    P.S. Milo widziec rodaka z takimi osiagnieciami, wielki szacunek za cala prace wlozona w Libre :D
    Czy zechcialbys moze pomoc mi z tym przedsiewzieciem? Moglbys potlumaczyc co i jak ugryzc? Jestem nowy w tym temacie, chcialbym sie troche zaglebic ale mam ogromne braki w obsludze androida/linuksa, od czego zaczac? Prowadz Mentorze :D

  • Sorry to bump this old topic but I believe I corrupted my Mini M8S 2's eMMC when I tried to install LibreELEC on it. Box froze during the flash. Can no longer flash ROM's using USB Burning Tool as flashes hang at 7%, the formatting stage.

    If I manage to boot LibreELEC from an SD, would it be possible to format the eMMC?

    Edited once, last by SEIKT (September 23, 2018 at 1:17 PM).

  • Sorry to bump this old topic but I believe I corrupted my Mini M8S 2's eMMC when I tried to install LibreELEC on it. Box froze during the flash. Can no longer flash ROM's using USB Burning Tool as flashes hang at 7%, the formatting stage.

    If I manage to boot LibreELEC from a USB, would it be possible to format the eMMC?

    why don't you try it

  • why don't you try it

    Because I don't have a computer with Linux laying around so I was looking for somewhat of a confirmation before I format my hard drive to install Linux. Plus I wouldn't know what commands to enter even if it were possible.

    Theoretically, yes perhaps. I'm not sure if LE's busybox has commands for formatting an eMMC, but since the warranty on your box is already out the door, you might as well try. Otherwise contact the Mini M8S manufacturer first.

    Well out of warranty. At least there's hope, thanks.

  • create a new bootable image on a usb drive, use rufus from windows, then at least you could have a working system from usb.

    then instead of trying to format the eMMC just install to internal

    To get a Linux machine, you can create a Live linux distro like Knoppix.

    Edited once, last by bubblegum57 (September 23, 2018 at 3:11 PM).

  • create a new bootable image on a usb drive, use rufus from windows, then at least you could have a working system from usb.

    then instead of trying to format the eMMC just install to internal

    To get a Linux machine, you can create a Live linux distro like Knoppix.

    Cheers. Got Linux running. Created a bootable SD card in LE Creator using one of @kszaq's LE images. Then added the u-boot Nothing found — Yandex.Disk to it in Linux.

    Popped the card into my box but it didn't boot, tried with the reset button pressed too. Will try the other 2 u-boots provided by balbes150

    If a ROM flashed to an SD with Burn Card Maker, which adds a u-boot to the root of a SD, can get my box to boot to this screen, booting into other stuff should be possible right?

    QNawmWD.jpg

    Edited once, last by SEIKT (September 24, 2018 at 11:49 AM).

  • Okay, progress is being made. I have LE running on the box now. SSH'd to the box and ran installtointernal.

    Didn't make any progress beyond that point, stuck there for an hour. Any ideas on what commands I should enter?

    Found the install script. https://raw.githubusercontent.com/coreelec/coreelec/master/projects/amlogic/filesystem/usr/sbin/installtointernal

    It gets stuck at this command:

    Code
        mke2fs -F -q -t ext4 -m 0 /dev/system || exit 1

    Going to assume the eMMC is kaput. Ran the above command without the silent flag, this is what it spat out until it stalled.

    Will have to settle with the fastest UHS-I microSD, https://www.amazon.com/dp/b06xyhn68l

    Edited 3 times, last by SEIKT (September 25, 2018 at 9:05 AM).

  • Perhaps you overcomplicated this a bit...

    Let me share my experience. I just purchased an Odroid C2, and a eMMC card (with sd adapter)..

    That box was able to boot the eMMC (generic linux), but my pc could not write LE to the eMMC card via the adapter. So I burned a linux (could probably even be LE) to the SD card, and booted from there. (with the eMMC also present)

    Then - instead of dd'ing a u-boot to the eMMC (or running this "installtointernal" command, that seems to be assuming that /dev/system is on the eMMC), I just downloaded the latest Odroid LE image - gunzipped - and then dd that to the eMMC card...

    Probably for you something like sudo dd if=LibreELEC-S905.arm-8.2-8.2.3.1.img of=/dev/sdb bs=4M

    (with the disclaimer that I don't know the correct image for you, and if indeed sdb is your internal eMMC - but anyway, worth the shot :)

    Then - removed the sd, and LE now runs from the eMMC...

    I assume you could do similar - since you where able to copy the u-boot to the eMMC and boot from there...

    please share progress :)

    -TOP

  • Appreciate your input. Gave it a go, but the box wouldn't boot afterwards.

    Code
    LibreELEC:~ # dd if=LibreELEC-S905.arm-8.2-8.2.3.1.img of=/dev/mmcblk0 bs=4M
    137+1 records in
    137+1 records out
    575668224 bytes (549.0MB) copied, 55.714322 seconds, 9.9MB/s
  • Appreciate your input. Gave it a go, but the box wouldn't boot afterwards.

    Code
    LibreELEC:~ # dd if=LibreELEC-S905.arm-8.2-8.2.3.1.img of=/dev/mmcblk0 bs=4M
    137+1 records in
    137+1 records out
    575668224 bytes (549.0MB) copied, 55.714322 seconds, 9.9MB/s

    No booting as in "not even getting the LibreElec splash screen", or that it never completes the boot - until Kodi??

    Any diodes showing filesystem activity (or similar, I don't know the box you have)

    Have you updated the device tree file?

    Try to boot from a sd card, and see if you can access the mmcblk0 device... if so, it is probably the device tree that needs to be updated.

    The positive (and this is really great), dd reporting that it copied the files show very clearly that the eMMC is not bricked :)

    read: [8.2.3.1] LibreELEC 8.2 for S905/S905X

    and: [HOWTO + FAQ] Install community builds on S905/S905D/S905W/S905X/S912 device

    -TOP

    Edited 3 times, last by toppot (September 28, 2018 at 8:08 AM).

  • Blue power LED doesn't light up and no video output. Flashing a uboot to eMMC corrects this (power LED lights up) but the screen remains black. Tried flashing the correct dtb but it made no difference. Perhaps I flashed it to the incorrect location. These were the commands I entered.

    Code
    dd if=/dev/zero of=/dev/dtb bs=256k count=1
    dd if=/storage/downloads/dtb.img of=/dev/dtb bs=256k

    I wonder if there is a way to restore /dev/system... as you pointed that appears to be the issue. I've ran installtointernal successfully before the last time when it froze. So if the eMMC isn't bricked, I'm assuming the partitions are corrupt. I have access to terminal through TWRP, which may not be as limited as LE.