Petitboot, yet another bootloader based on KEXEC

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri Apr 19, 2019 7:56 pm

phaseshifter wrote:
Fri Apr 19, 2019 7:10 pm
is that what you wanted..??
??

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Fri Apr 19, 2019 8:43 pm

I think phaseshifter meant the usb disk output

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri Apr 19, 2019 8:51 pm

@mad_ady, thanks.
@phaseshifter, so you are able to see /dev/sda1 and /dev/sda2 but Petitboot does not show up the OS entry to boot from your HDD? Are you able to that /dev/sda1 is mounted? You can check once you get the shell from Petitboot. What's the file system type of the partition? Ext4?

"Tapatalk wishes you to have fun with ODROID"


phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Fri Apr 19, 2019 9:14 pm

no it see`s all the partitions but it fails to engage or boot the drive it has a quick read of it then it does nothing after that..i just bumped the voltage rail to 17 volts and re-flashed the drive..see what happens shortly..
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri Apr 19, 2019 11:28 pm

phaseshifter wrote:
Fri Apr 19, 2019 9:14 pm
no it see`s all the partitions but it fails to engage or boot the drive it has a quick read of it then it does nothing after that..i just bumped the voltage rail to 17 volts and re-flashed the drive..see what happens shortly..
I suggest doing the same with SD or USB stick rather than SATA drive successfully. Their procedure to boot the OS in the storage is the same and they are verified devices boot by Petitboot.

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Sat Apr 20, 2019 3:55 am

well that defeats the whole objective..i don't have any issue booting from emmc via petiboot..long way to come however new hardware is on it`s way so..write speeds that i have observed during writes to the hdd via etcher dd not really impress me hope that ..that will change..

if your objective is to see if petitboot actually works well it does but just not with my hdd`s...
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

eddiepropane
Posts: 3
Joined: Sat Apr 20, 2019 6:49 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by eddiepropane » Sat Apr 20, 2019 7:02 pm

Hi,

I am having issues with any drives/OS showing up in Petitboot - Running the 1704 version from the wiki.

I have tried with SD (Sandisk 64GB), SD and EMMC and EMMC and do not get any start up entries although both OS are bootable is switched to EMMC.

The OS's tried have been the latest ubuntu minimal, CoreELEC, EmuELEC.

Nothing shows up from boot up, just that standard menu and refreshing does not bring anything up, if I re-plug the SD card in then it will show up in the menu but really looking for it to function in a way I can choose which OS to boot without having to change disks etc.

Edit reason: I had wrote the post then noticed some advice to drop to shell and check the drives are mounted which I can do when I get back home and update this post :)

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sat Apr 20, 2019 11:29 pm

eddiepropane wrote:
Sat Apr 20, 2019 7:02 pm
Hi,

I am having issues with any drives/OS showing up in Petitboot - Running the 1704 version from the wiki.

I have tried with SD (Sandisk 64GB), SD and EMMC and EMMC and do not get any start up entries although both OS are bootable is switched to EMMC.

The OS's tried have been the latest ubuntu minimal, CoreELEC, EmuELEC.

Nothing shows up from boot up, just that standard menu and refreshing does not bring anything up, if I re-plug the SD card in then it will show up in the menu but really looking for it to function in a way I can choose which OS to boot without having to change disks etc.

Edit reason: I had wrote the post then noticed some advice to drop to shell and check the drives are mounted which I can do when I get back home and update this post :)
Hi, it's the known issue as of now and put into the TODO list...sorry for the inconvenience.
One small tip, in order to show up the OS name to Petitboot boot entry, you can add below to boot.ini such that the name will be displayed instead of NO LABEL.

Code: Select all

setenv bootlabel "Ubuntu 18.04"
These users thanked the author tobetter for the post (total 3):
xabolcs (Sat Apr 20, 2019 11:59 pm) • mad_ady (Sun Apr 21, 2019 12:58 am) • phaseshifter (Wed Apr 24, 2019 10:11 am)

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 24, 2019 10:13 am

my new hardware made no difference it still wont boot from hdd on either of my n-2`s one day i guess..i don't know ...???

EDIT: @tobetter ..ok i`ll get you some stat`s today..
Last edited by phaseshifter on Wed Apr 24, 2019 10:18 am, edited 1 time in total.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Apr 24, 2019 10:15 am

phaseshifter wrote:my new hardware made no difference it still wont boot from hdd on either of my n-2`s one day i guess..i don't know ...???
Where the kernel stucked when boot from HDD? Are you able to capture the log if possible?

"Tapatalk wishes you to have fun with ODROID"


phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 24, 2019 10:50 am

Code: Select all

500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.4/1-1.4:1.0/0003:062A:4101.0001/input/input1
[    5.916603@2] hid-generic 0003:062A:4101.0001: input,hidraw0: USB HID v1.10 Keyboard [MOSART Semi. 2.4G Keyboard Mouse] on usb-xhci-hcd.0.auto-1.4/input0
[    5.924770@2] usb 2-1.2: new SuperSpeed USB device number 3 using xhci-hcd
[    5.933548@2] input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.4/1-1.4:1.1/0003:062A:4101.0002/input/input2
[    5.949685@2] usb 2-1.2: Unsupported device
[    6.004584@2] hid-generic 0003:062A:4101.0002: input,hiddev0,hidraw1: USB HID v1.10 Mouse [MOSART Semi. 2.4G Keyboard Mouse] on usb-xhci-hcd.0.auto-1.4/input1
[   12.012339@2] vout: aml_tvout_mode_work: monitor_timeout
[   14.016354@2] prepare_namespace() wait -1
[   14.016400@2] Waiting for root device /dev/sda2...
[   64.524337@4] fb: mem_free_work, free memory: addr:800000
that is where it hangs..goes no further...
Last edited by phaseshifter on Wed Apr 24, 2019 10:58 am, edited 1 time in total.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 24, 2019 10:55 am

Code: Select all

root@odroid:~# lsusb
Bus 002 Device 003: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@odroid:~#

Code: Select all

root@odroid:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
root@odroid:~#
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Apr 24, 2019 11:48 am

phaseshifter wrote:
Wed Apr 24, 2019 10:55 am

Code: Select all

root@odroid:~# lsusb
Bus 002 Device 003: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@odroid:~#

Code: Select all

root@odroid:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
root@odroid:~#
What's the version of the kernel in your HDD? Can you check if the kernel in your HDD contains the driver UAS?
The problem what I am seeing is that kernel in your HDD is not able to access your HDD.

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 24, 2019 12:23 pm

i gather since i flashed 0325 image to the hdd the kernel would be 164-22
since i use the latest image from the wiki ...
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Apr 24, 2019 12:46 pm

phaseshifter wrote:
Wed Apr 24, 2019 12:23 pm
i gather since i flashed 0325 image to the hdd the kernel would be 164-22
since i use the latest image from the wiki ...
I guess you will need to update the kernel first from the one which can boot.
You can build the kernel by yourself or copy from the eMMC or SD card which has been updated the kernel.
As I mentioned, the problem why you are not able to boot from HDD is that the kernel cannot mount your HDD since UAS driver is missing. UAS driver is in the distributed image as a kernel module, but later when I have reported the same issue, I've enabled to be in the kernel image.

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 24, 2019 1:09 pm

so if i copy vfat boot folder directory from the emmc which i have updated....
to the vfat boot folder and all it`s contents on the hdd would that work..???

is this correct i`m pretty shore i can do that...i shall try..see how it goes
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Apr 24, 2019 1:28 pm

phaseshifter wrote:
Wed Apr 24, 2019 1:09 pm
so if i copy vfat boot folder directory from the emmc which i have updated....
to the vfat boot folder and all it`s contents on the hdd would that work..???

is this correct i`m pretty shore i can do that...i shall try..see how it goes
Probably, but later once you are able to boot...at least you can have a shell...you will require to update the directory /lib/modules from eMMC as well.
These users thanked the author tobetter for the post:
phaseshifter (Thu Apr 25, 2019 5:14 am)

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Thu Apr 25, 2019 3:20 am

what if i just wait for the next image to be released...???
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu Apr 25, 2019 3:22 am

phaseshifter wrote:
Thu Apr 25, 2019 3:20 am
what if i just wait for the next image to be released...???
Why not? But not sure when the new image will be released which I cannot manage, expecting this week...but don't know.

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Thu Apr 25, 2019 3:25 am

ok i did it and it worked it booted running an update..thank you...running off the usb ssd hdd drive now..
ok i ran into the vfat corrupt issue after i ran an update upgrade etc...i have to find the thread on how to fix it but should be ok after i do that..thanks for all the help..phase
Last edited by phaseshifter on Fri May 03, 2019 8:49 pm, edited 2 times in total.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu Apr 25, 2019 7:01 am

phaseshifter wrote:
Thu Apr 25, 2019 3:25 am
ok i did it and it worked it booted and it resized and running an update..thank you...running off the usb ssd hdd drive now..
ok i ran into the vfat corrupt issue after i ran an update upgrade etc...i have to find the thread on how to fix it but should be ok after i do that..thanks for all the help..phase
Cool, I am glad to hear it works and you didn't give it up. :D
The corruption issue of VFAT after the update is reported and has been asked to fix in the next release.
These users thanked the author tobetter for the post:
phaseshifter (Thu Apr 25, 2019 10:43 am)

User avatar
jack_d
Posts: 11
Joined: Tue Dec 16, 2014 5:27 am
languages_spoken: english
ODROIDs: ordered C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by jack_d » Thu Apr 25, 2019 10:25 am

Hi to all !

I just played a little with Petitboot - did the upgrade to 0190417 and set the boot select switch to "SPI".

I only inserted my EMMC-card with minimal image "!ubuntu-18.04.2-4.9-minimal-odroid-n2-20190329".

Powered on the N2 and it boots into Petitboot, but EMMC-card is not displayed as bootable device. Also a "Rescan devices" did not help.

Do i anything wrong or is a EMMC-card not supported by Petitboot ?

Best regards,

jack_d

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu Apr 25, 2019 10:27 am

jack_d wrote:
Thu Apr 25, 2019 10:25 am
Hi to all !

I just played a little with Petitboot - did the upgrade to 0190417 and set the boot select switch to "SPI".

I only inserted my EMMC-card with minimal image "!ubuntu-18.04.2-4.9-minimal-odroid-n2-20190329".

Powered on the N2 and it boots into Petitboot, but EMMC-card is not displayed as bootable device. Also a "Rescan devices" did not help.

Do i anything wrong or is a EMMC-card not supported by Petitboot ?

Best regards,

jack_d
Sorry, I am looking into the issue why eMMC does not display the menu entry whilst SD card and USB storage are fine.

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Thu Apr 25, 2019 11:13 am

@jack_d really unless your using several op systems and have both emmc and sd-card generally u dont need bother with the spi...if your just running emmc just boot it as normal..like maybe if you had a few ssd`s usb drives with op systems all differing it would be an different case...
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Thu Apr 25, 2019 11:28 am

i just installed gparted to check out my hdd status and it had not resized..i thought it did as the board did it`s initial shutdown after first boot
but i had to resize it via gparted..
i think i/we may have missed something else.
i`ll not d much with this image at present as i hope and wait for the next image release..that a lot of things will be tended to...
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Thu Apr 25, 2019 1:13 pm

@phaseshifter: automatic resizing is broken because it searches for mmcblk devices. In the meantime you can use gparted to do the resizing

User avatar
jack_d
Posts: 11
Joined: Tue Dec 16, 2014 5:27 am
languages_spoken: english
ODROIDs: ordered C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by jack_d » Thu Apr 25, 2019 4:35 pm

@phaseshifter : with only one EMMC-card it is obvious that i don't need Petitboot, but i just want to see it work ...

Best regards,

jack_d

phaseshifter
Posts: 3452
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 35 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Thu Apr 25, 2019 4:39 pm

@mad_ady yeah cool...@jack_d that is fine ..it`s a feature ...each to their own..!!!
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

mxmilkb
Posts: 10
Joined: Fri Apr 26, 2019 9:28 am
languages_spoken: English
ODROIDs: N2
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mxmilkb » Thu May 02, 2019 11:10 am

I'm wondering about petitboot and LVM logical partitions or btrfs snapshots as boot devices? Probably not given the small 8Mb?

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu May 02, 2019 12:12 pm

mxmilkb wrote:
Thu May 02, 2019 11:10 am
I'm wondering about petitboot and LVM logical partitions or btrfs snapshots as boot devices? Probably not given the small 8Mb?
I'm sorry, I am not able to understand clearly what you mean...would you please give a usecase?

mxmilkb
Posts: 10
Joined: Fri Apr 26, 2019 9:28 am
languages_spoken: English
ODROIDs: N2
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mxmilkb » Thu May 02, 2019 12:32 pm

Syslinux doesn't support an LVM boot device, but GRUB does.

Currently I use LVM [RAID] but will probably move to btrfs in the future as it does the job of both filesystem and volume manager.

btrfs snapshots can also be booted, and btrfs snapshots are easier to handle and LVM snapshots.

Looking at the petitboot repo, it appears handling LVM (with LVM RAID) and btrfs are in the system already? Not sure about btrfs snapshots though.

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu May 02, 2019 12:57 pm

mxmilkb wrote:
Thu May 02, 2019 12:32 pm
Syslinux doesn't support an LVM boot device, but GRUB does.

Currently I use LVM [RAID] but will probably move to btrfs in the future as it does the job of both filesystem and volume manager.

btrfs snapshots can also be booted, and btrfs snapshots are easier to handle and LVM snapshots.

Looking at the petitboot repo, it appears handling LVM (with LVM RAID) and btrfs are in the system already? Not sure about btrfs snapshots though.
I am not sure about that since I have not tested yet. But it's not the matter of the size of SPI flash memory 8MB at least, I guess.
Currently, the file system that can boot by Petitboot is if the root file system is mountable by Linux kernel on boot and if init is accessible from it. In order word, if the root file system is purely a ramdisk and other disks are mounted to it, Petitboot cannot boot it.
These users thanked the author tobetter for the post:
mxmilkb (Thu May 02, 2019 2:24 pm)

1917
Posts: 9
Joined: Wed May 01, 2019 3:51 pm
languages_spoken: english, russian
ODROIDs: N2 4Gb
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by 1917 » Fri May 03, 2019 12:59 am

tobetter wrote:
Wed Apr 24, 2019 12:46 pm
I guess you will need to update the kernel first from the one which can boot.
You can build the kernel by yourself or copy from the eMMC or SD card which has been updated the kernel.
As I mentioned, the problem why you are not able to boot from HDD is that the kernel cannot mount your HDD since UAS driver is missing. UAS driver is in the distributed image as a kernel module, but later when I have reported the same issue, I've enabled to be in the kernel image.
Regarding the UAS driver for HDD via USB boot -- which version of the N2 kernel has a built-in UAS driver (i.e. not a module)?

Got the same issue... wonder if some existing N2 Ubuntu kernel will be enough or I need to recompile the kernel myself.

1917
Posts: 9
Joined: Wed May 01, 2019 3:51 pm
languages_spoken: english, russian
ODROIDs: N2 4Gb
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by 1917 » Fri May 10, 2019 12:28 am

I didn't try to recompile the kernel yet, but can tell for now that merely flashing a release Ubuntu image with the kernel updated to the latest version doesn't help -- Petitboot doesn't show a boot entry corresponding to the HDD connected via USB.

The drive itself can be seen by Petitboot actually, both partitions are mounted and readable (in Petitboot's shell), but seems it doesn't even try to boot from the HDD. Missing UAS driver might be unrelated to this issue.

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri May 10, 2019 12:38 am

1917 wrote:
Fri May 10, 2019 12:28 am
I didn't try to recompile the kernel yet, but can tell for now that merely flashing a release Ubuntu image with the kernel updated to the latest version doesn't help -- Petitboot doesn't show a boot entry corresponding to the HDD connected via USB.

The drive itself can be seen by Petitboot actually, both partitions are mounted and readable (in Petitboot's shell), but seems it doesn't even try to boot from the HDD. Missing UAS driver might be unrelated to this issue.
What's the kernel version on your HDD?

1917
Posts: 9
Joined: Wed May 01, 2019 3:51 pm
languages_spoken: english, russian
ODROIDs: N2 4Gb
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by 1917 » Fri May 10, 2019 11:17 am

tobetter wrote:
Fri May 10, 2019 12:38 am
1917 wrote:
Fri May 10, 2019 12:28 am
I didn't try to recompile the kernel yet, but can tell for now that merely flashing a release Ubuntu image with the kernel updated to the latest version doesn't help -- Petitboot doesn't show a boot entry corresponding to the HDD connected via USB.

The drive itself can be seen by Petitboot actually, both partitions are mounted and readable (in Petitboot's shell), but seems it doesn't even try to boot from the HDD. Missing UAS driver might be unrelated to this issue.
What's the kernel version on your HDD?
Linux odroid 4.9.170-27 #1 SMP PREEMPT Mon Apr 29 12:45:24 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
(latest from official repo)

Turns out this kernel version already has UAS built-in:

Code: Select all

root@odroid:/home/odroid# cat /usr/src/linux-4.9.170-27/.config | grep -i _UAS
CONFIG_USB_UAS=y

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri May 10, 2019 11:37 am

1917 wrote:
Fri May 10, 2019 11:17 am
tobetter wrote:
Fri May 10, 2019 12:38 am
1917 wrote:
Fri May 10, 2019 12:28 am
I didn't try to recompile the kernel yet, but can tell for now that merely flashing a release Ubuntu image with the kernel updated to the latest version doesn't help -- Petitboot doesn't show a boot entry corresponding to the HDD connected via USB.

The drive itself can be seen by Petitboot actually, both partitions are mounted and readable (in Petitboot's shell), but seems it doesn't even try to boot from the HDD. Missing UAS driver might be unrelated to this issue.
What's the kernel version on your HDD?
Linux odroid 4.9.170-27 #1 SMP PREEMPT Mon Apr 29 12:45:24 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
(latest from official repo)

Turns out this kernel version already has UAS built-in:

Code: Select all

root@odroid:/home/odroid# cat /usr/src/linux-4.9.170-27/.config | grep -i _UAS
CONFIG_USB_UAS=y
Thanks, so it's not the UAS driver problem either Petitboot problem as well because Petitboot can see the drive and mount its partitions.

What's your drive?
Do you see any logs on a display or serial console?
Does your ODROID-N2 reboots if failed to boot from HDD?

1917
Posts: 9
Joined: Wed May 01, 2019 3:51 pm
languages_spoken: english, russian
ODROIDs: N2 4Gb
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by 1917 » Fri May 10, 2019 11:59 am

No serial console at the moment, unfortunately. :(

USB bus tree:

Code: Select all

root@odroid:/home/odroid# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 1: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 4, If 0, Class=Vendor Specific Class, Driver=rtl8812au, 480M
root@odroid:/home/odroid#
The drive itself is OCZ (Toshiba) Vector 150 120Gb SSD, hwinfo output seems to be buggy -- shifted Vendor/Device strings:

Code: Select all

04: SCSI 00.0: 10600 Disk
  [Created at block.245]
  Unique ID: R7kM.GQ3ko5jd159
  SysFS ID: /class/block/sda
  SysFS BusID: 0:0:0:0
  SysFS Device Link: /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb2/2-1/2-1.4/2-1.4:1.0/host0/target0:0:0/0:0:0:0
  Hardware Class: disk
  Model: "TO Exter nal USB 3.0"
  Vendor: "TO Exter"
  Device: "nal USB 3.0"
  Revision: "0203"
  Serial ID: "2015033100063"
  Driver: "uas", "sd"
  Device File: /dev/sda (/dev/sg0)
  Device Files: /dev/sda, /dev/disk/by-id/usb-TO_Exter_nal_USB_3.0_2015033100063-0:0, /dev/disk/by-path/platform-xhci-hcd.0.auto-usb-0:1.4:1.0-scsi-0:0:0:0
  Device Number: block 8:0-8:15 (char 21:0)
  Geometry (Logical): CHS 14593/255/63
  Size: 234441648 sectors a 512 bytes
  Capacity: 111 GB (120034123776 bytes)
  Config Status: cfg=new, avail=yes, need=no, active=unknown

12: USB 00.0: 10600 Disk
  [Created at usb.122]
  Unique ID: lX5h.sVoICYDmsO8
  Parent ID: FKGF.+3vBt8JFTJ3
  SysFS ID: /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb2/2-1/2-1.4/2-1.4:1.0
  SysFS BusID: 2-1.4:1.0
  Hardware Class: disk
  Model: "TOSHIBA External USB 3.0"
  Hotplug: USB
  Vendor: usb 0x0080 "TOSHIBA"
  Device: usb 0xa001 "External USB 3.0"
  Revision: "2.03"
  Serial ID: "2015033100063"
  Driver: "uas"
  Module Alias: "usb:v0080pA001d0203dc00dsc00dp00ic08isc06ip62in00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #6 (Hub)
Petitboot mounts both /boot and rootfs partitions successfully and lists these partitions in System information, but no corresponding boot entry shown. It looks like no attempt to boot from the attached drive is made -- no reboots, no screen flashes, etc. Fow now I'm using a combined eMMC/SD+SSD boot with SSD's rootfs UUID being written to boot.ini with eMMC/SD holding the FAT parttion.
Petitboot's log shows only strings like "Processing new USB device...". I'll try to get logs when I get a serial cable.

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: Petitboot, yet another bootloader based on KEXEC

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

@1917, would you try this for me?
Please run uboot-parser after getting into the Petitboot shell and let me have what it shows. Maybe your would require to replace sda1 to another one for your drive.

Code: Select all

# uboot-parser /usr/var/petitboot/mnt/dev/sda1/boot.ini

1917
Posts: 9
Joined: Wed May 01, 2019 3:51 pm
languages_spoken: english, russian
ODROIDs: N2 4Gb
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by 1917 » Sat May 11, 2019 10:15 am

tobetter wrote:
Fri May 10, 2019 3:10 pm
@1917, would you try this for me?
Please run uboot-parser after getting into the Petitboot shell and let me have what it shows. Maybe your would require to replace sda1 to another one for your drive.

Code: Select all

# uboot-parser /usr/var/petitboot/mnt/dev/sda1/boot.ini
ok, I'll take a photo of its output once I get home.
The only difference with the stock boot.ini at the moment is the fatload mmc lines replaced with fatload usb ones. But this doesn't make any difference, same result for mmc/usb.

I did few experiments running U-Boot usb commands (usb reset, usb tree, etc), but it seems the usb command support was removed from the current version of U-Boot.
These commands might have been useful to determine U-Boot's devno values for enumerated USB devices I think.

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sat May 11, 2019 1:57 pm

1917 wrote:
Sat May 11, 2019 10:15 am
tobetter wrote:
Fri May 10, 2019 3:10 pm
@1917, would you try this for me?
Please run uboot-parser after getting into the Petitboot shell and let me have what it shows. Maybe your would require to replace sda1 to another one for your drive.

Code: Select all

# uboot-parser /usr/var/petitboot/mnt/dev/sda1/boot.ini
ok, I'll take a photo of its output once I get home.
The only difference with the stock boot.ini at the moment is the fatload mmc lines replaced with fatload usb ones. But this doesn't make any difference, same result for mmc/usb.

I did few experiments running U-Boot usb commands (usb reset, usb tree, etc), but it seems the usb command support was removed from the current version of U-Boot.
These commands might have been useful to determine U-Boot's devno values for enumerated USB devices I think.
My quick guess is that "fatload usb" would make a problem since the parser would not recognize it if I remember correctly. I will wait for your screen shot and help you later when I have it.

1917
Posts: 9
Joined: Wed May 01, 2019 3:51 pm
languages_spoken: english, russian
ODROIDs: N2 4Gb
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by 1917 » Sun May 12, 2019 4:53 pm

I took a liberty to add printenv command to the boot.ini file to make the output more informative. Without it, only the part starting with "IMAGE=" is printed.

Image
Image
Image

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sun May 12, 2019 8:26 pm

1917 wrote:
Sun May 12, 2019 4:53 pm
I took a liberty to add printenv command to the boot.ini file to make the output more informative. Without it, only the part starting with "IMAGE=" is printed.

Image
Image
Image
Sorry, I cannot read properly from the screenshot. Would you please share your boot.ini before you modify and not showing the boot entry?

mxmilkb
Posts: 10
Joined: Fri Apr 26, 2019 9:28 am
languages_spoken: English
ODROIDs: N2
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mxmilkb » Tue May 14, 2019 2:18 am

If you click "Load full resolution" that pops over the image on the site the images link so, then right click and View image, it's easier to read.

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: Petitboot, yet another bootloader based on KEXEC

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

What's the probability of eventually directly booting a GPT with EXT4 or F2FS formated USB without a fat32 partition present?
It would be pretty awesome on both Android and Linux.

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed May 29, 2019 4:50 am

Kernel wrote:
Wed May 29, 2019 4:29 am
What's the probability of eventually directly booting a GPT with EXT4 or F2FS formated USB without a fat32 partition present?
It would be pretty awesome on both Android and Linux.
Since Petitboot is based on Linux kernel, the file system which can be supported can be mounted and boot from storage. I've not tested GPT but it would work, but need to check if GPT is enabled in the kernel. Currently, it still has a bunch of problems, unfortunately.

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: Petitboot, yet another bootloader based on KEXEC

Unread post by Kernel » Wed May 29, 2019 5:13 am

tobetter wrote:
Wed May 29, 2019 4:50 am
Since Petitboot is based on Linux kernel, the file system which can be supported can be mounted and boot from storage. I've not tested GPT but it would work, but need to check if GPT is enabled in the kernel. Currently, it still has a bunch of problems, unfortunately.
That's great there's a potential down the road! :mrgreen:
As long as there's no hardware limitations, I'm sure a lot of us would be willing to wait for such a killer capability until it's properly thought out.

It would be a very competitive feature among SBCs if you could natively boot a flashdrive for example with just GPT and Ext4

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed May 29, 2019 8:46 am

@Kernel, if you are interesting you can try out this.
viewtopic.php?f=55&t=30869

Using Debian Netboot installation, you can install Debian to USB drive directly and you can set the partition type and mount entries by yourself. I've not tested GPT, but bare minimal installation works as your flavors.

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: Petitboot, yet another bootloader based on KEXEC

Unread post by Kernel » Wed May 29, 2019 10:12 am

tobetter wrote:
Wed May 29, 2019 8:46 am
@Kernel, if you are interesting you can try out this.
viewtopic.php?f=55&t=30869

Using Debian Netboot installation, you can install Debian to USB drive directly and you can set the partition type and mount entries by yourself. I've not tested GPT, but bare minimal installation works as your flavors.
That's good to know, thankyou!

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: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sun Jun 02, 2019 9:19 pm

I've made some progress on Petitiboot to recognize eMMC which wasn't previously and I'd like to share the image if you like to try out. The trial image,spiupdate-201906-rc1.img, can be downloaded from the link.
https://drive.google.com/file/d/1O4IMqT ... sp=sharing

This is one working on my ODROID-N2, I can boot to Debian Stretch in USB drive and Debian Buster in eMMC. If I don't attach the MMC or SD card, I will only have Debian Stretch in USB driver, I can boot it directly from Petitboot.
IMG_20190602_2036458.jpg
IMG_20190602_2036458.jpg (300.18 KiB) Viewed 1390 times
The file must be copied as spiupdate.img to the first partition in your SD card, not eMMC. In order to update properly, the boot select switch must be placed to SPI and must do a power cycle, unless ODROID-N2 will keep boot MMC cards.
https://wiki.odroid.com/odroid-n2/os_im ... grade_mode

Most of you would have the boot entry as NONE instead of Debian blah blah or Ubuntu blah blah because Petitboot does not know which OS is installed in the memory card. If you like to display the OS name, you can add one line at the top in the boot.init.

Code: Select all

setenv bootlabel "Name of Your OS Installed"
What's not possible
  • The Android boot image format is not supporting yet. Which mean that Hardkernel's Android or CoreElec cannot boot up, there is a trick to make them boot up but I won't share it as of today. Instead, I would try to Petitboot can recognize the image. Actually the kexec-tools should be upgraded.
  • The configuration of Petitboot is not being stored. Actually, it's not supported yet but I've allocated a decent amount of memory on SPI memory and will make Petitiboot can store the configuration or considering to provide pre-encoded blobs which store the different boot orders.
  • I knew that Petitboot can be navigated with HK's stock remote which is intended, but now I realize that the back key is not working...so will be fixed
Note
I've requested by many people to make SD card or USB disk has a higher priority. Different people have a different purpose. I'd like to keep the current boot order eMMC to SD, I will provide a way to change the boot order that I've made some and expecting to share in a couple of days. Just my small concern is the complexity since 3 places have their own bootloader and the change wouldn't be affected to the one if you flash a memory card which should be resolved by a user. One way my preference is to use the bootloader and set the booting order in SPI but it would happen later when I resolve the boot issue with Android boot image.
These users thanked the author tobetter for the post (total 3):
Kernel (Sun Jun 02, 2019 11:28 pm) • mad_ady (Mon Jun 03, 2019 1:01 am) • mxmilkb (Mon Jun 03, 2019 4:04 am)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests