Help with installtoemmc

#1

Hi all,

Did a silly thing, tried to run installtoemmc without disabling all my NFS shares so the script tried to copy all those shares to the emmc and it became full.

Tried again, but it not working, getting the following…

 CoreELEC:~ # installtoemmc
Odroid_N2
This script will now erase the eMMC on your device
All data on this eMMC will be lost forever!

Type "yes" if you know what you are doing or anything else to exit: yes
Disabling eMMC timeout...
Stopping Kodi...
Unmount all partitions from mmcblk0...
Delete all partitions...
1+0 records in
1+0 records out
512 bytes (512B) copied, 0.005747 seconds, 87.0KB/s
Create new partitions...
Flash Bootloader...
Create Filesystem for new flash partition...
Create Filesystem for new storage partition...
/dev/mmcblk0p2 contains a ext4 file system labelled 'STORAGE'
        last mounted on /var/media/NEWSTORAGE on Thu May 16 15:20:20 2019
/dev/mmcblk0p2 is mounted; will not make a filesystem here!
Unmount all partitions from mmcblk0...
Mount new partitions...
Copy /flash files to new flash partition...
Copy template boot.ini...
Set UUIDs in new boot.ini...
Not enough space on the new storage partition. Skipping...
Unmount all partitions from mmcblk0...
umount: can't unmount /var/media/NEWBOOT: Invalid argument
umount: can't unmount /var/media/COREELEC: Invalid argument
umount: can't unmount /var/media/NEWSTORAGE: Invalid argument
umount: can't unmount /var/media/STORAGE: Invalid argument
All done! Please poweroff your device and remove the SD/USB.
Enjoy!
CoreELEC:~ #

Any help appreciated.

TIA

Greg

#2

Try this then reboot and run installtoemmc again

dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1

#3

Just to confirm the steps:

  1. Boot from SD with emmc not installed.
  2. Run installtoemmc and answer yes to reboot with the 30 sec delay.
  3. Reboot and during the 30 sec delay install the emmc.
  4. Run your command.
  5. Run installtoemmc to restart the transfer process.
#4

Will have to fixup the script

#5

In an effort to get this working I did the following:

mount /dev/mmcblk0p2 /var/media/NEWSTORAGE
cd movies  *(this is the share that filled up the emmc)*
rm *
umount /var/media/NEWSTORAGE
installtoemmc

This completed with no errors so I removed the SD and the emmc is now booting.