#Odroid M1S running Home Assistant OS - can't get back to hk recovery to flash ubuntu

1 messages · Page 1 of 1 (latest)

last ivy
#

Hello guys,
pretty new to to Home Assistant. I got myself an odroid M1S to go and try it out. I followed the instructions (https://www.home-assistant.io/installation/odroid/) to flash onto the emmc. Now I want to revert from HAOS to ubuntu server but I struggle with getting the device back to emmc flashable mode (https://www.home-assistant.io/installation/odroid#flashing-an-odroid-m1s , hk recovery step).
I used "Advanced SSH & Web Terminal" as well as an local Terminal (like in the guide) to execute:

curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | sudo dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync

but either way it returns:

➜ ~ curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | sudo dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync
dd: invalid argument 'progress' to 'status'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (23) Failure writing output to destination, passed 1360 returned 0

Can anyone help me out here? Thanks in advance

Home Assistant

Install Home Assistant on a ODROID

Home Assistant

Install Home Assistant on a ODROID

magic latch
last ivy
#

Thank you for your suggestion. I flashed a mirco sd-card with the emmcums, but the odroid still boots into home assistant not allowing to flash a different image to the emmc.

Copied from the guide:
"Warning: Installing Home Assistant OS replaces the firmware and SPL on the eMMC with the mainline version provided by the Home Assistant OS. As a result, it is not possible to use the SD card with the EMMC2UMS image anymore, because the mainline SPL is not compatible with U-Boot in the EMMC2UMS image at this time (February 2024). This does not pose any problem for standard use, just makes it more complicated in case you want to return to the Hardkernel-provided OS (see HK Recovery)."

"HK Recovery
If you want to restore your M1S back into Hardkernel’s initial state, you will have to restore the HK’s bootloader. A reliable way of reflashing the eMMC with an operating system of your choice is to use Home Assistant OS to flash the EMMC2UMS image which turns the ODROID-M1S into USB Mass Storage device. Once you have flashed the EMMC2UMS image, you can flash any OS again. You will need a micro USB cable to connect ODROID-M1S to PC.

Note: This commands will render your current Home Assistant OS installation unbootable!

Use the local terminal (HDMI/keyboard) to access the system console. On the Home Assistant CLI (command line), enter login to enter the root shell and use curl to download an image and dd it to the eMMC block device:

curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | sudo dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync"

I tried using the local terminal (HDMI/keyboard). It downloads the file, but fails flashing, stating:
/bin/ash: sudo: not found.

Sorry I can not copy paste the output as it's running through hdmi.

magic latch
#

remove "sudo" from the command.

#
curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | sudo dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync"

to

curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync"
#

HAOS doesnt have sudo. and your running as root anyway

last ivy
#

Thank you for your quick responses, greatly appreciated.
Now it returns:
dd: invalid argument ´progress´ to ´status´

magic latch
#

can try removing that section
so

curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | dd of=/dev/mmcblk0 bs=4M conv=fsync"

this means you wont get a dd writing progress bar. so you might want to give it a few minutes after command completes to be sure everything is written before rebooting

#

I am not entirely sure if it will matter or not but better to be safe

last ivy
#

I will give it a shot. Give me a minute or two. Thank you

magic latch
#

no worries. note if anything strange happens etc...

#

I am surprised this hasn't come up before. the status thing is probably a quirk of different dd versions. but sudo being in there is just wrong... i guess not many people every do this proceedure 😛

last ivy
#

curl -L -A "Mozilla/5.0" https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | dd of=/dev/mmcblk0 bs=4M conv=fsync"

The above lines actually did flash it (at least I think so), returning:
0+2 records in
0+2 records out
7369 bytes (7.0KB) copied, 0.139414 seconds, 50.2KB/s

I disconnected the device from power and reconnected it. It does not boot into home assistant, but is not discovered in Windows Disk Managment either.

I will restart the PC first and get back. Hope it just some windows quriks.

magic latch
last ivy
#

yes, the sd-card was not inserted. So far no luck though, device not showing up.

magic latch
#

and your using the micro-b port on the odroid and not the c port?

last ivy
#

yes, I connected the usb-c for power. Waited a short while and then connected the micro-usb. Still nothing though, tried another micro-usb cable and all the ports on my pc.
Will keep on trying though. I remember usb issues flashing android phones through bootloader in the past.

last ivy
#

Good news everyone.... I got it to show up.

magic latch
#

awesome, what did you do?

#

I created a Documentation Issue HERE that highlights the issue in the docs.

last ivy
#

I found this: https://github.com/home-assistant/operating-system/blob/8c5377810f48eeacef47981f32efbf0fc0b97c7f/Documentation/boards/hardkernel/odroid-m1s.md

"Installing HAOS erases Petitboot, if you wish to return to any official Hardkernel images then short the maskRom pads near the 40pin connector while booting from a Hardkernel recovery image."

I flashed a sd-card with the emmc2ums image. inserted it. Used a shortened paperclip (metal, no plastic around it) to shorten the maskrom (it's labeled on the board, 2pins) and it showed up on disk managment.

Currently flashing ubuntu server and will report back.

GitHub

:beginner: Home Assistant Operating System. Contribute to home-assistant/operating-system development by creating an account on GitHub.

magic latch
#

cool, i have updated the issue to include that message and its linked here. perhaps someone with a bit more knowledge of the specifics on how it works and a board on hand can go over it and potentially update the docs.

last ivy
#

It worked. Ubuntu server running and can ssh into it through putty.

magic latch
#

well, it took a bit of messing around but we got there...

last ivy