[SOLVED] Issues booting to NVMe with petitboot

Post Reply
magnum_pi
Posts: 244
Joined: Tue Mar 05, 2013 6:37 am
languages_spoken: English, Japanese, French, Irish
ODROIDs: U2, X2, XU, U3
Has thanked: 5 times
Been thanked: 4 times
Contact:

[SOLVED] Issues booting to NVMe with petitboot

Post by magnum_pi »

My setup: M1 with latest (2022-04-24) petitboot, latest official Ubuntu image (Ubuntu 20.04.4) on SD and latest Android on emmc.

I wanted to try out Devuan (a version of Debian) so I used debootstrap to install it on a partition on the NVMe. That has no kernel, so I copied the Ubuntu boot partition across into the new /boot dir.

I booted up and saw the new OS in petitboot on the nvme device, but when I selected it, it booted up into Ubuntu. I had forgotten that the boot.scr needed updating, so I used sed to change the UUID of the root partition to my new Devuan partition, and also changed the "bootlabel" variable.

When I boot into petitboot after this change, I don't see the nvme partition at all, and when I try to boot from the existing Ubuntu option, it fails with black screen and not-working keyboard or network. There's no output on the serial debug cable either. The blue LED continues to blink, though.

Reverting the boot.scr allows me to boot from either Linux partition, although they both point to the Ubuntu install.

I know that the NVMe device is working and recognised, but I think that petitboot is getting confused by my new boot.scr somehow. I don't have any duplicated UUIDs.

Any ideas?

PS. I also tried updating using pb-update. This downloaded an update and flashed it. However, if I do it again, it wants to flash it again. I think that the pb-update command isn't storing the new hash of the firmware before rebooting.
Last edited by magnum_pi on Thu Jun 16, 2022 7:38 am, edited 1 time in total.

magnum_pi
Posts: 244
Joined: Tue Mar 05, 2013 6:37 am
languages_spoken: English, Japanese, French, Irish
ODROIDs: U2, X2, XU, U3
Has thanked: 5 times
Been thanked: 4 times
Contact:

Re: Issues booting to NVMe with petitboot

Post by magnum_pi »

Ah, I have some progress.

Instead of using sed to modify the boot.scr file, I used:

Code: Select all

mkimage -c none -A arm -T script -d boot.txt boot.scr
With this change, petitboot doesn't get confused any more and I can boot into either distro.

I don't have a working Devuan yet, though. It doesn't seem like USB, network or UART are working, but I can probably fix these in a chroot environment.
These users thanked the author magnum_pi for the post:
odroid (Thu Jun 16, 2022 9:30 am)

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests