Petitboot, yet another bootloader based on KEXEC

Sholander
Posts: 39
Joined: Wed Jun 05, 2019 1:02 am
languages_spoken: english
ODROIDs: ODROID N2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Sholander » Mon Aug 12, 2019 5:09 am

From where can I download "RC3 version of Petitboot" ? The last version I have is "201907-RC1"

User avatar
mad_ady
Posts: 6363
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: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Mon Aug 12, 2019 6:01 am

Look for it a few pages back in a post from @tobetter.
@tobetter: maybe you should make it official and put it on the wiki

woodyl
Posts: 11
Joined: Mon Aug 05, 2019 2:04 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by woodyl » Mon Aug 12, 2019 11:48 pm

Is it possible to set up Petitboot to automatically set the HDMI display resolution? I'm using an HDMI-to-VGA adapter that only supports up to 720p. When I boot into an OS (Arch in this case), the bootloader automatically detects the resolution so that the display works, but it doesn't work with Petitboot. Here's another idea: I know that Petitboot scans through the attached devices to find a boot.ini file. What if it first looked through all the devices to find a 'petitboot.ini' file? Then, you could set parameters to stop booting and revert to Petitboot with various options set. You could set screen resolution, e.g. That would let you start up in Petitboot without having to disconnect the device your OS is mounted on. Maybe you could reboot from Petitboot and bypass the petitboot.ini file on the reboot.

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 » Tue Aug 13, 2019 11:30 am

woodyl wrote:
Mon Aug 12, 2019 11:48 pm
Is it possible to set up Petitboot to automatically set the HDMI display resolution? I'm using an HDMI-to-VGA adapter that only supports up to 720p. When I boot into an OS (Arch in this case), the bootloader automatically detects the resolution so that the display works, but it doesn't work with Petitboot. Here's another idea: I know that Petitboot scans through the attached devices to find a boot.ini file. What if it first looked through all the devices to find a 'petitboot.ini' file? Then, you could set parameters to stop booting and revert to Petitboot with various options set. You could set screen resolution, e.g. That would let you start up in Petitboot without having to disconnect the device your OS is mounted on. Maybe you could reboot from Petitboot and bypass the petitboot.ini file on the reboot.
Somehow display autodetection code in the Linux kernel does not work properly in the Petitboot, this issue is not fixed yet, unfortunately. I do not clearly understand the suggestion. Are you meaning to let Petitboot can set the boot configuration?

User avatar
mad_ady
Posts: 6363
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: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Aug 13, 2019 1:38 pm

I think we're looking for a way to bypass resolution autodetection and force a specific resolution instead. This could be done either by hardcoding it and building a custom petitboot or by parsing a separate "petitboot.ini" config file.
I remember that c2 had a c2_init.sh file that ran in the initrd and set the manual resolution by grabbing it from the kernel command line. It was setting it via sysfs if I remember correctly. Is there something similar for n2's startup?

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 » Tue Aug 13, 2019 1:55 pm

mad_ady wrote:
Tue Aug 13, 2019 1:38 pm
I think we're looking for a way to bypass resolution autodetection and force a specific resolution instead. This could be done either by hardcoding it and building a custom petitboot or by parsing a separate "petitboot.ini" config file.
I remember that c2 had a c2_init.sh file that ran in the initrd and set the manual resolution by grabbing it from the kernel command line. It was setting it via sysfs if I remember correctly. Is there something similar for n2's startup?
I was thinking of the way to add a new section u-boot like this in case display auto detection cannot be resolved.

Code: Select all

  1 [u-boot]
  2 hdmimode=1080p60hz
  3 
  4 [petitboot]
  5 petitboot,interface=eth0
  6 petitboot,timeout=5
  7 petitboot,console=ttyS0,115200n8
  8 petitboot,bootdevs=network,any,
  9 petitboot,autoboot=true
 10 petitboot,http_proxy=
 11 petitboot,https_proxy=
 12 petitboot,write?=true
These users thanked the author tobetter for the post:
binhex (Tue Aug 13, 2019 6:05 pm)

User avatar
mad_ady
Posts: 6363
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: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Aug 13, 2019 2:26 pm

Sure, but that would be more work for you

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 » Tue Aug 13, 2019 2:36 pm

mad_ady wrote:
Tue Aug 13, 2019 2:26 pm
Sure, but that would be more work for you
always...

woodyl
Posts: 11
Joined: Mon Aug 05, 2019 2:04 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by woodyl » Wed Aug 14, 2019 2:04 am

The idea I suggested of having the petitboot.ini file would provide more options than just setting the HDMI resolution. If we could do something like that, it would avoid the necessity of hardcoding various options into Petitboot. So, my idea is that PB is now scanning the first partition of of each drive looking for boot.ini. What I'm proposing is that it would first scan the partition for petitbooot.ini, then if it didn't find one, it would go on to scan for boot.ini as usual. If it finds petitboot.ini, it could load options from there. For instance, it could set HDMI resolution, then revert back to booting Petitboot instead of booting into the boot.ini. That way, you could interact with Petiboot, check the version, etc. On reboot, you could have the option to skip petitboot.ini on the next reboot. That's just one idea. I think that people who know more about it than I do can think of some other possibilities with such a setup. The main thing is that it would provide flexibility and reduce the need to hardcode everything somebody wants to do into PB itself.

Viald
Posts: 11
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Viald » Wed Aug 14, 2019 5:02 am

Hello.
I booted my N2 from SSD using petitboot without issue. Since few days, my N2 doesn't boot anymore.
The SSD is well detected by petitboot and both partitions are well mounted and accessible.
As usual petitboot start to boot the SSD after 10s but even after waiting few minutes, I haven't the login prompt on the console.

For sure there is something wrong during the boot process. How can I see all steps of the boot process on the console ? I always had black screen until the login prompt.

Thank you.

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

Unread post by elatllat » Wed Aug 14, 2019 11:28 am

Viald wrote:
Wed Aug 14, 2019 5:02 am
... How can I see all steps of the boot process on the console ?...
buy a uart cable or edit console out of boot.ini

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 Aug 14, 2019 12:26 pm

Viald wrote:
Wed Aug 14, 2019 5:02 am
Hello.
I booted my N2 from SSD using petitboot without issue. Since few days, my N2 doesn't boot anymore.
The SSD is well detected by petitboot and both partitions are well mounted and accessible.
As usual petitboot start to boot the SSD after 10s but even after waiting few minutes, I haven't the login prompt on the console.

For sure there is something wrong during the boot process. How can I see all steps of the boot process on the console ? I always had black screen until the login prompt.

Thank you.
Which OS is in your SSD?
Can you add console=tty1 to the boot.ini on your SSD?
These users thanked the author tobetter for the post:
Viald (Thu Aug 15, 2019 2:29 am)

Viald
Posts: 11
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Viald » Wed Aug 14, 2019 2:59 pm

Ubuntu, I'll try. Thanks

Viald
Posts: 11
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Viald » Thu Aug 15, 2019 2:30 am

Thank you Tobetter, I can now see the boot steps and I was able to correct the issue.

karog
Posts: 21
Joined: Fri Oct 09, 2015 3:28 am
languages_spoken: english
ODROIDs: XU4,N2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by karog » Thu Aug 15, 2019 2:34 am

@Vlald, so what was the issue? It is always helpful to others what issues may arise. So a post saying you fixed the problem is less helpful than one that states what the problem and solution was for fellow travelers, even if you may think it is unique to you. Thx

Viald
Posts: 11
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Viald » Thu Aug 15, 2019 3:27 am

You are right. In fact, the issue comes from /etc/fstab I had added USB disk which was not plugged anymore. The system started in maintenance mode. Until I was not able to see the boot steps, I was not able to guess my mistake too ;)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest