N2 Boot Sequence

I know Petitboot can boot from USB where u-boot can not, but are there other advantages over u-boot? (assuming everything gets sorted out with Petitboot at some point)

Technically U-boot also can boot from USB if proper command is given and Petitboot is also booted by U-boot. My perspective Petitboot is more than a boot manager, as I mentioned it’s already a small Linux box can have recovery or test tools which I am asking some users who have a trouble of display, ethernet and usb if they are not able to use them with a certain OS image. The current build of my Petitboot image has minimal tools even ‘vi’. So if you have a keyboard and display, you can edit ‘boot.ini’ in Petitboot without a desktop.

1 Like

I was gonna say U-boot can be made to boot from Usb as well but ya beat me to it… lol.

Adding tools to the bootloader has been a long time project of mine and its refreshing to see someone looking into that as well. Seems like most working on bootloaders never really think much about the tool end of things.
Currently i use Jtag to test and scan for things on a new board when i dump the core and for along time have trying to find a way to incorporate those abilities into the bootloader but it almost becomes more of a mini linux system for the bootloader to get that inteligence and trying to find a way to fish Jtagable data without the jtag is a huge hurdle i have not yet overcome. The idea was to be able to create a bootloader capable of scanning out a large portion of the device tree info when working on a unknown device.

Anyways thanx for your thoughts on the reasoning

I can confirm this works with nightly 0623.
CoreELEC on emmc and Debian Stretch on SD(from merveric@ Hardkernel)
Modified boot.ini from Debian Stretch with the “bootlabel” line and now i can choose what i want to boot.
So nice and super easy…and i love it!
Thank you so much @tobetter!

1 Like

Glad to hear your set up works, this make me more work for Petitboot.

If you have a chance to run another Debian distro for headless server, please try Netboot installer which install Debian from scratch to your N2. :smile:
https://forum.odroid.com/viewtopic.php?f=55&t=30869

Another update of Petitboot is uploaded.
https://forum.odroid.com/viewtopic.php?f=182&t=33873&p=260670#p260670

1 Like

thank you for this update.
i try to boot Debian Stretch from USB-Stick but this does not work.
it crashes and reboots.
Should this work and I am doing something wrong? incompatible stick maybe? (tried a slow and a breand new usb3 stick)
SD-Card in USB-Reader can boot. If i use the same image on USB-Stick it crashes.

Can you capture the logs if you have? Which image did you flash on it? I also suspect if USB stick is not supported by the Linux kernel but probably not…

Its this image from Merveric: https://forum.odroid.com/viewtopic.php?p=246536#p246536
Do you need dmesg log or something else?
One more thing i can say: it starts reading boot.ini from usb stick because resolution changes to the value i set in boot.ini on the stick.

I’ve tried to run the image “Debian-Stretch64-1.0.1-20190519-N2.img.xz” and got booted by Petitboot. What I did is I flash the image to my USB stick with “dd” and just plugged in to USB, then boot from Petitboot. After finishing the first boot, it works.

It would be great if you can share the logs, then I will look into it or just copy whole files in the first partition and send me, I will try on my image as well.

Thank you for your test. So we will this get working too. You are amazing!
I’m going to try etcher instead of odroids disc imager. If it does not work I will give you the files on Sunday.

it works! i just had to use etcher.
one more question: will it be possible to store petitboot.cfg on usb-stick? atm it will be ignored.

edit: i was wrong it was just luck with etcher: it crashes boot process if other USB Storages (HDD NTFS/EXT4) are connected. If a second USB stick (FAT32) is connected it is booting fine

I don’t get it, the USB stick with ext4 cannot boot up while with FAT32 can? Do you use the same USB disk?
ATM, I have no plan to store the config to any other place instead of SD instead I will focus to store it to eMMC such that eventually no additional storage is required.

OK. config on eMMC would be even better. thank you!
FAT32/ext4 are different devices. could you help me to get the right logfile created?
what i got:
USB-HDD 1: NTFS
USB-HDD 2: ext4
USB-Stick 1: Debian Stretch i want to boot from
USB-Stick 2: FAT32

what is working:
USB-Stick 1 + USB-Stick 2

what is NOT working:
USB-Stick 1 + USB-HDD 1 + USB-HDD 2

Seriously??? 3 USB disk at the same time? To be honest, there are couple of reports that USB 3.0 stability issue and the problem is being tested. That’s why I suspect one reason is two USB-HDD drives are not working and curious what about USB-Stick1 + USB-HDD1. Also wonder what are the vendors and the models of USB-HDD1/2.

its not a problem for me in my use-case i want use two devices only at the same time - that is working fine.
i just wanted to reproduce the problem and this was just an “accident” all drives were connected on my powered 7port USB3 hub. i have two use cases:
CoreELEC:

  1. USB-HDD1 movies and music
  2. USB-HDD2 tv-record/timeshift

Debian Stretch:

  1. USB-Stick 1: bootmedia and FoFiX
  2. USB-Stick 2: music for FoFiX

and because its so easy to switch bootmedia now i forgot to switch off the HDDs and the problem occured.

I’m a bit lost, what’s the problem now to resolve? :thinking:

Its not a poblem for me anymore as i can boot debian stretch from the USB-Stick

Good to hear it’s not a problem any more, by the way which Debian did you install and how? Can you share with me?

this image:
https://forum.odroid.com/viewtopic.php?p=246536#p246536
flashed with etcher to a USB-Stick

1 Like