Page 1 of 1

Changing the kernel boot options

Posted: Wed Jul 09, 2025 8:28 pm
by monnier
I installed the Debian image on my machine.
AFAICT the boot options are passed to the kernel via a device tree overlay stored in the "dtbo" partition (a.k.a /dev/mmcblk2p3). This is a binary format not fit for editing:

# hexdump -C /dev/mmcblk2p3
00000000 d7 b7 ab 1e 00 00 05 80 00 00 00 20 00 00 00 20 |........... ... |
00000010 00 00 00 02 00 00 00 20 00 00 08 00 00 00 00 00 |....... ........|
00000020 00 00 02 90 00 00 00 60 00 00 00 00 00 00 00 00 |.......`........|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 02 90 00 00 02 f0 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 d0 0d fe ed 00 00 02 90 00 00 00 38 00 00 02 14 |...........8....|
00000070 00 00 00 28 00 00 00 11 00 00 00 10 00 00 00 00 |...(............|
00000080 00 00 00 77 00 00 01 dc 00 00 00 00 00 00 00 00 |...w............|
00000090 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................|
000000a0 00 00 00 01 66 72 61 67 6d 65 6e 74 40 30 00 00 |....fragment@0..|
000000b0 00 00 00 03 00 00 00 04 00 00 00 00 ff ff ff ff |................|
000000c0 00 00 00 01 5f 5f 6f 76 65 72 6c 61 79 5f 5f 00 |....__overlay__.|
000000d0 00 00 00 03 00 00 00 92 00 00 00 07 72 6f 6f 74 |............root|
000000e0 3d 2f 64 65 76 2f 6d 6d 63 62 6c 6b 32 70 38 20 |=/dev/mmcblk2p8 |
000000f0 72 77 20 72 6f 6f 74 66 73 74 79 70 65 3d 65 78 |rw rootfstype=ex|
00000100 74 34 20 64 61 74 61 3d 2f 64 65 76 2f 6d 6d 63 |t4 data=/dev/mmc|
00000110 62 6c 6b 32 70 39 20 63 6f 6e 73 6f 6c 65 62 6c |blk2p9 consolebl|
00000120 61 6e 6b 3d 30 20 63 67 72 6f 75 70 5f 65 6e 61 |ank=0 cgroup_ena|
00000130 62 6c 65 3d 63 70 75 73 65 74 20 63 67 72 6f 75 |ble=cpuset cgrou|
00000140 70 5f 6d 65 6d 6f 72 79 3d 31 20 63 67 72 6f 75 |p_memory=1 cgrou|
00000150 70 5f 65 6e 61 62 6c 65 3d 6d 65 6d 6f 72 79 20 |p_enable=memory |
00000160 73 77 61 70 61 63 63 6f 75 6e 74 3d 31 00 00 00 |swapaccount=1...|
00000170 00 00 00 02 00 00 00 02 00 00 00 01 66 72 61 67 |............frag|


How can I change the kernel boot options in there?
Even better would be to change the U-Boot boot command, so I could tell it to boot another kernel (ideally stored in a filesystem rather than storing it in a partition).