Wetek Img issues

  • Hi,

    I've been building from the master branch for a few months now and i noticed now and then that the .img file (inside img.gz) sometimes gets courrpt during the creating process, it's noticable since the 2nd linux partition created after writing the img to the sdcard is unmountable even on the pc.
    when inserting the sdcard the error is:

    Code
    mount_storage could not mount /dev/mmcblk0p2

    i tried writing it several times and even deleting the partiotion table formatting etc it's the img it self, i tried formatting the 2nd partition as ext4 and got the following error (probobly on the 1st partition):

    Code
    oudn't mount /dev/SYSTEM

    The thing is, actually 2 things:

    1. the working build i have is from May 6, May 7 fails like this, i also have a build from June 2nd (fresh) also fails and one from June 10 and today (not fresh) all fail the same way.
    2. copying the img.gz to .update and running the update on the build from May 5th passed and made it update but inside is the same .img file that fails to be written to the same SD.

    Before the May builds i've also enoutnered this but since i'm still new at this i though it's my faults somehow.

    BTW i'm building for Wetek Core (amlogic pkg) and this was the same for openelec too.

    Any ideas?

  • I've downloaded your img.gz and fsck'd both the FAT and ext4 partitions and they're both clean so there's nothing wrong with the image itself. Unfortunately I don't have Wetek hardware so can't write the image to an actual device, but the problem doesn't appear to be in the image creation process (we did have a problem with this, when creating the FAT partition, fixed on master on 9 June - see mtools: Fix creation of dot directories (. and ..) by MilhouseVH · Pull Request #435 · LibreELEC/LibreELEC.tv · GitHub).

    Can you try a different SD card?

  • hmm strange, were you able to mount the 2nd partition? because even on linux i could not.
    Is there any way to test this on PC? i don't have another SD this is a new SD and like i said when build x works and y, z doesn't i still think it might be the build not the SD otherwise it doesn't make any sense.
    I can write this to the device nand but won't that brick it if it's bad?

  • Yes, I could mount the second partition - use "sudo apt-get install kpartx" on Ubuntu to install kpartx:


    i don't have another SD this is a new SD and like i said when build x works and y, z doesn't i still think it might be the build not the SD otherwise it doesn't make any sense.

    Yes, that is strange, but I can't think of anything obvious that has changed that would cause this.


    I can write this to the device nand but won't that brick it if it's bad?

    Not familiar with the Wetek system so can't advise here.

    Edited once, last by milhouse (June 14, 2016 at 10:15 PM).


  • Yes, I could mount the second partition - use "sudo apt-get install kpartx" on Ubuntu to install kpartx:


    Yes, that is strange, but I can't think of anything obvious that has changed that would cause this.


    Not familiar with the Wetek system so can't advise here.

    I ran the same commands you did and got the same results and numbers just now...
    Any chance i might be doing the writing wrong?

    Code
    sudo dd if=LibreELEC-WeTek_Core.arm-8.0-devel-20160612143724-r23223-gec2a5d2.img of=/dev/sdb bs=4M
  • Just for the sake of it try to format the SD card before you write a new image to it. Use gparted, delete the partitions, create a new partition table and format it to fat32.

    I've seen similar issues like this before and suggested sdcard formatter to people and it usually fixed the problem.
    SD Card Formatter - SD Association


    I tested the build you've posted and it works fine on my side.


  • Just for the sake of it try to format the SD card before you write a new image to it. Use gparted, delete the partitions, create a new partition table and format it to fat32.

    I've seen similar issues like this before and suggested sdcard formatter to people and it usually fixed the problem.
    SD Card Formatter - SD Association


    I tested the build you've posted and it works fine on my side.

    I only have Linux and i tried with gparted and fdisk, still the same results, even gparted says the 2nd partiotion is unknown...
    I think the problem is not with the sdcard itself but with the writing of the img, is there any other way to write it apart from DD?

  • I only have Linux and i tried with gparted and fdisk, still the same results, even gparted says the 2nd partiotion is unknown...
    I think the problem is not with the sdcard itself but with the writing of the img, is there any other way to write it apart from DD?

    I'll have another go at this later.

    Try dd without the block size argument, it should default to 512kb.


  • Any chance i might be doing the writing wrong?

    Code
    sudo dd if=LibreELEC-WeTek_Core.arm-8.0-devel-20160612143724-r23223-gec2a5d2.img of=/dev/sdb bs=4M

    I've always used:

    Code
    sudo dd if=LibreELEC-WeTek_Core.arm-8.0-devel-20160612143724-r23223-gec2a5d2.img of=/dev/sdb bs=1M conv=fsync
  • I actually found out that the reason this is failing is that the machine i used to write the img can't seem to mound the 2nd partiton as ext4 for some reason (proboly kernel related) but on another machine it's fine so i guess since it can't mount it properly it's not written properly or something... but for some images it was able to mount... and i couldn't find the main cause in the kernel option between the too (still looking).

    But i want to thank you all for your assistance with this issue


  • I actually found out that the reason this is failing is that the machine i used to write the img can't seem to mound the 2nd partiton as ext4 for some reason (proboly kernel related) but on another machine it's fine so i guess since it can't mount it properly it's not written properly or something... but for some images it was able to mount... and i couldn't find the main cause in the kernel option between the too (still looking).

    But i want to thank you all for your assistance with this issue

    DD transfers an image that contains both partitions. DD will never try to mount these partitions.

    Gerald


  • DD transfers an image that contains both partitions. DD will never try to mount these partitions.

    I'm aware of this but there was no other explanation to this issue, and also why it's happening since i do have ext4 support in the kernel and the root partition is mounted as ext4, so since weird things are happening then i guess DD fails too...

  • The new build from today mounts and works on that machine but other don't, no idea why but i guess it's my fault not yours so no need to keep this thread open for that.
    Thanks for the help attempts :)