CoreELEC - Ways to install CoreELEC to eMMC without the eMMC module writer.

Post Reply
User avatar
cdu13a
Posts: 316
Joined: Tue Jan 20, 2015 3:33 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, HC1, N2
Has thanked: 12 times
Been thanked: 94 times
Contact:

CoreELEC - Ways to install CoreELEC to eMMC without the eMMC module writer.

Post by cdu13a »

So you bought an Odroid N2 CoreELEC Edition and an eMMC module but didn't realize just how handy it would be to also buy the USB 3.0 eMMC module writer.

Well luckily there is multiple ways to do this with out having the writer. Even with these options I would still very much recommend that you consider buying
the USB 3.0 eMMC module writer if you are buying an eMMC module. Even if it spends most if it's time in a drawer, it's very handy to have when you need it. :)

Note: Since some people have had some display issues with older versions of petitboot it's recommended that you update petitboot before beginning. Instructions on how to do so can be found here.

Method #1 Duplicate existing install from sd card to eMMC using SSH
------------------------------------------------------------------------------------
This is the method that most people will probably want to use.

Step #1: Enable SSH if you have not done so already.
go to Settings > CoreELEC > Services > SSH > Enable SSH
Step #2: Power off your Odroid N2.
Step #3: Toggle the boot mode switch to the SPI boot position.
Step #4: Attach eMMC module. (make sure the sd card that has CoreELEC installed on it is also inserted.)
Step #5: Power on your Odroid N2.
Step #6: Select CoreELEC from the petitboot menu.
Step #6: SSH into your Odroid N2. (The default user and passwords for CoreELEC user: root password: coreelec)
Step #7: enter the following commands.

Code: Select all

wget https://github.com/CoreELEC/CoreELEC/blob/coreelec-9.2/projects/Amlogic-ng/filesystem/usr/sbin/installtoemmc -O /storage/installtoemmc
chmod 755 /storage/installtoemmc
/storage/installtoemmc
Method #2 A new install using Petitboot's new USB Mass Storage mode feature.
------------------------------------------------------------------------------------
Thanks to @tobetter the Odroid N2 has a new trick, you can attach the Odroid N2 to your computer via USB and use it as a memory card reader to flash
CoreELEC onto the eMMC module.
This method requires that you have version dev.20191127 or newer of petitboot.
If you have not already updated petitboot to version dev.20191127, instructions on how to do so can be found here.

Extra Items you will need.
-------------------------------------
1x Type A to Micro B USB cable
1x USB keyboard

Step #1: Power Off Odroid N2.
Step #2: Toggle the boot mode switch to SPI boot mode.
Step #3: Attach eMMC module.
Step #4: Attach USB keyboard.
Step #5: Power On Odroid N2.
Step #6: At petitboot menu. Select Exit to shell.
Step #7: Connect USB cable between the OTG port on the Odroid N2 and USB port on your computer.

Step #8: On the Odroid N2, enter the following command.

Code: Select all

ums /dev/mmcblk0
This tells the Odroid N2 to introduce itself to your computer as a USB Mass Storage device, and use the eMMC module as the storage that the computer sees.

Step #9: Wait for your PC to detect the Odroid N2

Step #10: Once your PC detects the Odroid N2 you can now use your preferred method to Flash an OS image to the eMMC from your computer.
The most recent CoreELEC stable install images can be found here. https://coreelec.org/

Step #11: On the Odroid N2, enter the following command.

Code: Select all

ums
This will tell the Odroid N2 to stop sharing the eMMC module with the computer.
Step #12: Remove USB cable

Step #13: Ctrl + Alt + Delete to reboot the N2 and use the newly flashed OS image.

Note: It's also possible to access a micro sd card this way as well if you want. For those times you can't find your sd card reader. You just need to follow basically the same steps but change the command from step #8 to ums /dev/mmcblk1
for reference
/dev/mmcblk0 = emmc
/dev/mmcblk1 = sd card
/dev/sda = first USB storage device


Method #3 A new install using using SSH.
------------------------------------------------------------------------------------

Note: this uses the current stable build as an example. But would work for any other build just by changing the url in the command below.

Step #1: Enable SSH if you have not done so already.
go to Settings > CoreELEC > Services > SSH > Enable SSH
Step #2: Power off your Odroid N2.
Step #3: Toggle the boot mode switch to the SPI boot position.
Step #4: Attach eMMC module. (make sure the sd card that has CoreELEC installed on it is also inserted.)
Step #5: Power on your Odroid N2.
Step #6: Select CoreELEC from the petitboot menu.
Step #6: SSH into your Odroid N2. (The default user and passwords for CoreELEC user: root password: coreelec)
Step #7: enter the following commands.

Code: Select all

wget https://github.com/CoreELEC/CoreELEC/releases/download/9.2.1/CoreELEC-Amlogic-ng.arm-9.2.1-Odroid_N2.img.gz -O /storage/CoreELEC.img.gz
gunzip /storage/CoreELEC.img.gz
dd if=/storage/CoreELEC.img of=/dev/mmcblk0 bs=1M conv=fsync
sync
reboot
These users thanked the author cdu13a for the post (total 4):
tobetter (Fri Jan 17, 2020 11:07 am) • rooted (Fri Jan 17, 2020 11:09 am) • tony.hong (Fri Jan 17, 2020 1:54 pm) • istanbulls (Fri Jan 17, 2020 11:05 pm)

User avatar
rooted
Posts: 7973
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 243 times
Contact:

Re: CoreELEC - Ways to install CoreELEC to eMMC without the eMMC module writer.

Post by rooted »

Great post, comprehensive and easy to follow.

odroidn2user
Posts: 322
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 89 times
Been thanked: 86 times
Contact:

Re: CoreELEC - Ways to install CoreELEC to eMMC without the eMMC module writer.

Post by odroidn2user »

What I do, is:
- boot a Linux image from microSD on the Odroid, an image like Hardkernels Ubuntu Mate image. You can burn the Linux image to a microSD using balenaEtcher
- Then once booted into the microSD on the Odroid, download from the network (either NAS or Internet) the image you want to write to the EMMC, to the microSD.
- Then just dd it to the emmc, with something a little like: sudo dd if=image.img of=/dev/mmcblk0 bs=4096 status=progress
- Reboot.

Not as fancy as some of the solutions above, but it uses generally known activities.
But this obviously requires some Linux and command line knowledge. And there are always some risk using dd, but that's manageable.

Then, there are installer images which install themselves, like tobetter's net installers, but that is an exception to the general rule.

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 1 guest