Petitboot on Odroid HC4 forgets Debian boot option

Jeremy Kerr jk at
Fri Jan 21 19:06:43 AEDT 2022

Hi Hubert,

[just re-adding the petitboot list, in case anyone else hits the same
issue in future]

> Thanks a lot for your reply, time and efforts.

No problem! I haven't done much to help yet though!

> I have a attached a screenshot of /var/log/petitboot/pb-discover.log
> as I could not get the file itself out of the petitboot environment.
> Hope that helps anyhow. Unfortunately I do not have anything like
> pastebin or so.

>From your screenshot, it looks like it's finding some block devices,
which is a good sign. No sign of it trying to parse bootloader config
files though, but a lot has scrolled off the top of the screen,
including the start of petitboot finding your sda1 device.

I'm not sure how much the odroid builds have built-in to the petitboot
image, but you should have some networking tools to copy the log file
elsewhere. rsync / ssh / scp / nc are the ones that you might find most

> That was a good hint and I tried to grub-install debian again to my
> harddrive but it did not succeed due to a file that was not found that
> grub-install needs.

OK, that may be the cause of the problem then - if the grub config file
(located somewhere like /boot/grub/grub.cfg) isn't generated correctly,
then petitboot has nothing to parse.

I'd suggest trying to figure out why that's failing, and if the failure
means you're not getting a grub config file generated.

> What about creating a boot entry in say /dev/sda1 myself?

Yep, you can definitely do that.

> What would this file need to look like in order for petitboot to
> recognise it?

Petitboot supports a bunch of different configuration files, but let's
stick to grub since that's what you're already dealing with.

Something like this should work, assuming the kernel and initramfs files
are on the same partition as the config file, named /boot/grub/grub.cfg:

    menuentry Debian {
        linux /boot/vmlinux-<version> <kernel-args>
	initrd /boot/initrd.img-<version>

- where you've specified <version> correctly to refer to actual files in
the /boot partition, and <kernel-args> is at least the root= parameter,
and anything else you need to be able to boot (just as you've been doing
when creating the manual boot entry in the petitboot ui).

> If all that doesnt lead to a solution, can I just boot from an SD-
> Card? I have dd'd an Armbian image to an SD-Card and tried to boot
> from it without success. Screen switched off after several seconds and
> remained in that state for minutes. This was the process I have gone
> through.
> - Insert the SD card
> - press and hold the black button at the bottom of the Odroid
> - Plugged in the power cable

You mean bypassing petitboot? Sorry, I have no idea about the odroid's
firmware boot process :(



More information about the Petitboot mailing list