Boot from USB supported?

Post Reply
bosstiat
Posts: 2
Joined: Sun Mar 31, 2019 12:19 pm
languages_spoken: english
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Boot from USB supported?

Unread post by bosstiat » Sun Mar 31, 2019 12:27 pm

I read the specs and see that eMMC and SD card boot is supported. Can I boot from a USB 3.0 with a Ubuntu 18.04 image? Would that apply to SSD via USB to SATA cable?

Thanks

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: Boot from USB supported?

Unread post by mad_ady » Sun Mar 31, 2019 3:15 pm

Normally you can't, but since HardKernel added SPI flash, you can!
Make sure the boot switch is in the SPI position and image the disk with your OS.
Petitboot should start and should list your usb OS and you should be able to boot it,
Any usb storage should work.

elatllat
Posts: 1427
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 10 times
Been thanked: 27 times
Contact:

Re: Boot from USB supported?

Unread post by elatllat » Mon Apr 01, 2019 7:43 am

Normally you can even without SPI :P

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: Boot from USB supported?

Unread post by mad_ady » Mon Apr 01, 2019 1:44 pm

Do you mean with uboot on sd? Or does the soc support usb boot directly? I don't remember...

User avatar
tobetter
Posts: 3764
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 28 times
Been thanked: 128 times
Contact:

Re: Boot from USB supported?

Unread post by tobetter » Mon Apr 01, 2019 4:26 pm

S922X only can boot uSD/eMMC/SPI/NAND, but cannot boot from USB storage directly.
Even S805 and S905 are same.

umiddelb
Posts: 451
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by umiddelb » Tue Apr 02, 2019 4:17 am

IMHO there are different levels of boot. The firmware needs to be placed on SPI/eMMC/µSD, but then, the n2's firmware supports loading the kernel image etc. from USB storage. So you can run almost the entire os from USB. Storing the firmware on removable media has some advantages, e.g. you cannot brick your device due to an unsuccessful attempt to update the firmware.

bosstiat
Posts: 2
Joined: Sun Mar 31, 2019 12:19 pm
languages_spoken: english
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by bosstiat » Tue Apr 02, 2019 6:43 am

Well I understand the speed of USB 3 (350mb/s) on this board to be faster than the speed of the eMMC and SD (100-150mb/s). So I hope that might translate faster boot time and faster Read Write in general.

brad
Posts: 955
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2
Location: Australia
Has thanked: 14 times
Been thanked: 28 times
Contact:

Re: Boot from USB supported?

Unread post by brad » Tue Apr 02, 2019 3:16 pm

bosstiat wrote:
Tue Apr 02, 2019 6:43 am
Well I understand the speed of USB 3 (350mb/s) on this board to be faster than the speed of the eMMC and SD (100-150mb/s). So I hope that might translate faster boot time and faster Read Write in general.
I just attempted to increase the speed of emmc to full hs400 mode (theoretical transfer speed of 400mb/s) on a 64Gb card but it fails to initialise unless I drop the clock speeds down. Some different emmc tuning algorithms *might* be able to increase emmc speed in the future (at least for some cards) but it is yet to be seen / proven as yet.

Edit: after checking the datasheet it looks like its not supported max HS200 mode.

julian1412
Posts: 17
Joined: Sat Mar 17, 2018 2:59 am
languages_spoken: english, german
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Boot from USB supported?

Unread post by julian1412 » Sat May 04, 2019 1:34 am

I'm booting from the sd card while Ubuntu is installed on the USB stick. It works very fine. All you need to do is:
  • Install the Ubuntu Minimal Image on the SD Card. If there is already one you just need to change the boot.ini.
  • Make a backup of your boot.ini and save it somewhere (not on the SD card).
  • Change line 90 (the line after "Boot Args"): Replace the value of "root=UUID=<and so on>" with "root=/dev/sda2"
Save it and place the SD card in your odroid and connect the USB storage with Odroid. That's it!

Note: I assume that only the boot partition on the sd card is needed, but I'm not 100% sure.
These users thanked the author julian1412 for the post:
seafrog (Sun May 05, 2019 9:15 pm)

seafrog
Posts: 2
Joined: Tue Mar 12, 2019 12:13 am
languages_spoken: english, german
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by seafrog » Sun May 05, 2019 9:14 pm

@julian1412
It's a workaround, but a good one!
Tested and works fine on my site also, thx. The easiest solutions are most the best ones, you just have to think of.

User avatar
venkatbo
Posts: 526
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Boot from USB supported?

Unread post by venkatbo » Thu May 09, 2019 8:49 am

@julian1412, dont you have to copy the rootfs from your sdcard to the storage medium attached to the USB3 port, and remove it from sdcard ?

seafrog
Posts: 2
Joined: Tue Mar 12, 2019 12:13 am
languages_spoken: english, german
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by seafrog » Thu May 09, 2019 5:09 pm

I just changed my setting a bit, working also fine.
1. dd your SD Card to an IMG and then to a ssd/hd you want to use
2. just delete the second partition of the SD Card, so only the BOOT partition remains. The UUID was copied and points now to the ssd/hd.
3. Connect both and start.

5953LC
Posts: 8
Joined: Thu May 09, 2019 3:33 am
languages_spoken: english
ODROIDs: c2 n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by 5953LC » Fri May 10, 2019 4:56 pm

So are you seeing a speed increase from using the USB3 media ?

So the N2 only supports up to HS200 max and will never support HS400 ?

User avatar
tobetter
Posts: 3764
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 28 times
Been thanked: 128 times
Contact:

Re: Boot from USB supported?

Unread post by tobetter » Fri May 10, 2019 5:05 pm

5953LC wrote:
Fri May 10, 2019 4:56 pm
So the N2 only supports up to HS200 max and will never support HS400 ?
The max specification of S922X is HS200.

brad
Posts: 955
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2
Location: Australia
Has thanked: 14 times
Been thanked: 28 times
Contact:

Re: Boot from USB supported?

Unread post by brad » Fri May 10, 2019 6:51 pm

tobetter wrote:
Fri May 10, 2019 5:05 pm
5953LC wrote:
Fri May 10, 2019 4:56 pm
So the N2 only supports up to HS200 max and will never support HS400 ?
The max specification of S922X is HS200.
I would not say never as others have had it working on different amlogic SOC's but it appears to be a challenge to get very accurate clocks and often very dependent on the particular module emmc being used. Seems to be an ongoing WIP accross the entire amlogic range for the moment in mainline linux.

I did some testing on C2 recently with different emmc's and still some things to work out and understand, once a working 5.2 image I will try and compare on the N2 as well

5953LC
Posts: 8
Joined: Thu May 09, 2019 3:33 am
languages_spoken: english
ODROIDs: c2 n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by 5953LC » Sat May 11, 2019 3:12 pm

brad wrote:
Fri May 10, 2019 6:51 pm
tobetter wrote:
Fri May 10, 2019 5:05 pm
5953LC wrote:
Fri May 10, 2019 4:56 pm
So the N2 only supports up to HS200 max and will never support HS400 ?
The max specification of S922X is HS200.
I would not say never as others have had it working on different amlogic SOC's but it appears to be a challenge to get very accurate clocks and often very dependent on the particular module emmc being used. Seems to be an ongoing WIP accross the entire amlogic range for the moment in mainline linux.

I did some testing on C2 recently with different emmc's and still some things to work out and understand, once a working 5.2 image I will try and compare on the N2 as well
So it sounds like if a high enough quality emmc chip were used it might be possible have HS400 emmc speeds on N2 (and possibly C2). This would be awesome because I have 2 of C2 and 3 of N2 ... I would certainly pay a premium to get such a chip... <hint, hint, Ameridroid and Hardkernel> - the increase in boot times, etc would be well worth the price and, well, enough said...

So please, please keep us posted as it wold be awesome. :D

5953LC
Posts: 8
Joined: Thu May 09, 2019 3:33 am
languages_spoken: english
ODROIDs: c2 n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Boot from USB supported?

Unread post by 5953LC » Sat May 11, 2019 3:29 pm

bosstiat wrote:
Tue Apr 02, 2019 6:43 am
Well I understand the speed of USB 3 (350mb/s) on this board to be faster than the speed of the eMMC and SD (100-150mb/s). So I hope that might translate faster boot time and faster Read Write in general.
:lol: Sorry, back on track guys:

:?: As I understand there are workarounds to use the USB3 as the working drive ...

Is anyone seeing tht 350 mb/s I/O when working off those drives ?

User avatar
venkatbo
Posts: 526
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Boot from USB supported?

Unread post by venkatbo » Sun May 12, 2019 2:05 pm

One can also follow the same first 4 steps listed here:
https://wiki.odroid.com/odroid-xu4/soft ... _webserver
to boot from a SSD/HDD attached to an USB3 port.

skeetre
Posts: 66
Joined: Mon Apr 29, 2019 11:27 am
languages_spoken: english
ODROIDs: Odroid-N2
Location: FL, USA
Has thanked: 15 times
Been thanked: 11 times
Contact:

Re: Boot from USB supported?

Unread post by skeetre » Tue May 14, 2019 12:12 am

I haven't tried an actual ssd yet, but with a samsung 128gb usb 3.1 thumbdrive I get about 250Mb/s.
Running ubuntu on the eMMC and mount my home directory off the thumb drive (mainly for the additional space for phoronix-test-suite).
Friends don't let friends use Spectre/Meltdown/Zombieload mitigations.

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Mon May 20, 2019 9:28 pm

If there is interest, I can build a version of u-boot for SPI with support for directly starting the system from USB. u-boot is an important element, so but preference - how such a option officially from specialists HK (I can provide entire the necessary information and patches for them). :)

https://forum.armbian.com/topic/9789-br ... ment=79432
These users thanked the author balbes150 for the post:
brad (Tue May 21, 2019 4:15 pm)

skeetre
Posts: 66
Joined: Mon Apr 29, 2019 11:27 am
languages_spoken: english
ODROIDs: Odroid-N2
Location: FL, USA
Has thanked: 15 times
Been thanked: 11 times
Contact:

Re: Boot from USB supported?

Unread post by skeetre » Mon May 20, 2019 10:03 pm

I would like this feature. Even I don't use it, I'd like the option, and it would be easy for testing new things. If grub/refind/burg/lilo, etc can all boot directly from cd,usb,hd,etc why shouldn't u-boot.
Friends don't let friends use Spectre/Meltdown/Zombieload mitigations.

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: Boot from USB supported?

Unread post by mad_ady » Mon May 20, 2019 11:44 pm

Is lilo still slive? I miss its cryptic messages...

skeetre
Posts: 66
Joined: Mon Apr 29, 2019 11:27 am
languages_spoken: english
ODROIDs: Odroid-N2
Location: FL, USA
Has thanked: 15 times
Been thanked: 11 times
Contact:

Re: Boot from USB supported?

Unread post by skeetre » Tue May 21, 2019 4:06 am

I ran across a live disc or something the other week that used it... but I don't know if it's still supported. I really like refind, you check it out if you haven't.
These users thanked the author skeetre for the post:
mad_ady (Tue May 21, 2019 12:16 pm)
Friends don't let friends use Spectre/Meltdown/Zombieload mitigations.

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: Boot from USB supported?

Unread post by mad_ady » Tue May 21, 2019 12:17 pm

Thanks - hadn't heard about it, but it looks nifty for efi systems!

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Tue May 21, 2019 6:39 pm

I added to the site new images 5.87 for N2 with kernel 5.1 which already have the necessary scripts to start the activation of multi-boot for UART (n2_autoscript) and start the system from USB (boot.scr).

If activation is already done, then after burning the image to USB media, you do not need to add\change anything. When you connect to N2 in the USB stick, the system automatically starts up. By the way, I checked the fast USB 3.0 flash drive on N2 , the speed is higher than the SD card. And when using USB-SSD , much faster than eMMC. :)


https://forum.armbian.com/topic/9789-br ... ment=79472
These users thanked the author balbes150 for the post:
skeetre (Tue May 21, 2019 11:37 pm)

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Tue May 21, 2019 8:59 pm

add support run image for kernel 4.9 in USB

https://forum.armbian.com/topic/9789-br ... ment=79488

skeetre
Posts: 66
Joined: Mon Apr 29, 2019 11:27 am
languages_spoken: english
ODROIDs: Odroid-N2
Location: FL, USA
Has thanked: 15 times
Been thanked: 11 times
Contact:

Re: Boot from USB supported?

Unread post by skeetre » Tue May 21, 2019 11:38 pm

Nice work balbes150! I'll have to test this out when I get a chance.
Friends don't let friends use Spectre/Meltdown/Zombieload mitigations.

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Fri May 24, 2019 6:57 pm

New version multi-boot
and add to image for Armbian script install to eMMC

https://forum.armbian.com/topic/9789-br ... ment=79664

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Mon May 27, 2019 10:15 pm

New ver multiboot 0.3

https://forum.armbian.com/topic/9789-br ... ment=79776

After testing a new version of universal multi-boot on N2 in SPI, I realized that I no longer need to write a separate u-boot to SD\eMMC at all. All systems run perfectly from any media (USB SD eMMC PXE Piteboot) and work when using a single version in SPI. I would replace the N2 bootloader selection switch with a normal jumper that can be used in critical cases (when the u-boot in the SPI is corrupted). :)

PS I added the to latest versions to the images of Armbian and Libreelec new version multiboot, now you can easily run these versions from any media, including any USB flash drive. Starting from a USB stick is very convenient, it is to quickly check to pull out of N2 working systems on SD card or eMMC module. When you connect a USB flash drive to N2, the system automatically starts from USB, no need to change or switch. When you disconnect the USB flash drive automatically starts the normal system. Or you can just change the USB media. By the way, there is no need for a module to connect eMMC to a PC, all operations (install) with eMMC can be performed without removing the module from N2. :)
These users thanked the author balbes150 for the post (total 2):
brad (Mon May 27, 2019 10:17 pm) • Kernel (Wed May 29, 2019 4:48 am)

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Tue May 28, 2019 7:20 pm


Kernel
Posts: 20
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 9 times
Been thanked: 1 time

Re: Boot from USB supported?

Unread post by Kernel » Wed May 29, 2019 4:42 am

I was poking around the wiki and I noticed towards the bottom of this page
https://wiki.odroid.com/odroid-n2/gettingstart/start
It also has the capability to boot via OTG!?
https://wiki.odroid.com/odroid-n2/getti ... tg_booting

It appears it's still undocumented though so does anyone have any more information?
Definately a very useful feature that should be advertised since even the Pi is limited to booting via USB A.

Not to mention it's a seperate BUS than the USB A slots.

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: Boot from USB supported?

Unread post by mad_ady » Wed May 29, 2019 1:59 pm

The C2 also has this feature, but Amlogic hasn't released any documentation about how to use it. Not sure if it's a paid feature or something internal, for their debugging.

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Wed May 29, 2019 6:33 pm

New ver 0.4

The new version now uses a single startup scheme for all media (USB SD eMMC) using standard files, the basic "boot.ini" and second "boot.scr." For proper operation of the "boot.ini" with USB media they should be adjusted (added new options to run from USB).

https://forum.armbian.com/topic/9789-br ... ment=79869
These users thanked the author balbes150 for the post (total 2):
Kernel (Thu May 30, 2019 8:31 am) • brad (Thu May 30, 2019 9:53 pm)

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Fri May 31, 2019 6:31 pm

A request was sent to add support to start the system from USB media. Now the appearance of official support for this functionality for all users depends on HK. :)

https://github.com/hardkernel/u-boot/pull/57
These users thanked the author balbes150 for the post:
Kernel (Sun Jun 02, 2019 11:29 pm)

User avatar
tobetter
Posts: 3764
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 28 times
Been thanked: 128 times
Contact:

Re: Boot from USB supported?

Unread post by tobetter » Fri May 31, 2019 6:48 pm

balbes150 wrote:
Fri May 31, 2019 6:31 pm
A request was sent to add support to start the system from USB media. Now the appearance of official support for this functionality for all users depends on HK. :)

https://github.com/hardkernel/u-boot/pull/57
Thank you babest150, I've reviewed your PR and have replied my thought. Please let me know how you think.

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Boot from USB supported?

Unread post by balbes150 » Tue Jun 04, 2019 10:17 pm

tobetter wrote:
Fri May 31, 2019 6:48 pm
I've reviewed your PR and have replied my thought. Please let me know how you think.
I added the latest PR to my GIT.

By the way, the good news is that @narmstrong added support for N2 in the main u-boot-2019.

https://github.com/superna9999/u-boot/t ... /odroid-n2

julian1412
Posts: 17
Joined: Sat Mar 17, 2018 2:59 am
languages_spoken: english, german
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Boot from USB supported?

Unread post by julian1412 » Sun Jul 14, 2019 5:05 pm

julian1412 wrote:
Sat May 04, 2019 1:34 am
I'm booting from the sd card while Ubuntu is installed on the USB stick. It works very fine. All you need to do is:
  • Install the Ubuntu Minimal Image on the SD Card. If there is already one you just need to change the boot.ini.
  • Make a backup of your boot.ini and save it somewhere (not on the SD card).
  • Change line 90 (the line after "Boot Args"): Replace the value of "root=UUID=<and so on>" with "root=/dev/sda2"
Save it and place the SD card in your odroid and connect the USB storage with Odroid. That's it!

Note: I assume that only the boot partition on the sd card is needed, but I'm not 100% sure.
for those who use this solution: Please check after each apt-get upgrade if the boot.ini boot args have changed. After my latest upgrade it changed and I was wondering why it's booting Ubuntu from the SD-Card. (I should delete this partition)

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: Boot from USB supported?

Unread post by mad_ady » Sun Jul 14, 2019 5:19 pm

Set persistent changes from bootargs in boot.ini.default.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest