geerlingguy / pi-cluster

Raspberry Pi Cluster automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More recent RaspiOS images have moved `cmdline.txt`

jamestait opened this issue · comments

I don't know in which version this changed, but certainly in RaspiOS derived from Debian 12.5 Bookworm this file now lives in /boot/firmware. There is a file in the original location, but it warns not to modify the file:

❯ ansible all -m command -a 'cat /boot/cmdline.txt'
192.168.0.16 | CHANGED | rc=0 >>
DO NOT EDIT THIS FILE cgroup_memory=1 cgroup_enable=memory

The file you are looking for has moved to /boot/firmware/cmdline.txt cgroup_memory=1 cgroup_enable=memory
192.168.0.17 | CHANGED | rc=0 >>
DO NOT EDIT THIS FILE cgroup_memory=1 cgroup_enable=memory

The file you are looking for has moved to /boot/firmware/cmdline.txt cgroup_memory=1 cgroup_enable=memory

As you can see, I didn't realise this before running the playbook, but my nodes happened to have the correct settings. ;-)

(As an aside, in the TPi-provided Ubuntu images for the RK1, the file is /boot/firmware/ubuntuEnv.txt. I have a patch to detect the OS and modify the appropriate file, but since the RK1 is not a Pi it's probably not appropriate for this repo.)

It may be useful still, I'm planning on setting up my RK1s in a separate cluster soon :)

@jamestait - See #10 — I would be glad to accept a PR that fixes this up to use the right path whether running on Ubuntu or Pi OS (I think we could explicitly use that as the switch here—even though non-SBC boards and non-RK1 boards running Ubuntu might have a different layout).

@geerlingguy I think PR #9 already does this? I don't think I needed to change anything else to get it working on my RK1s. Have I missed something?

@jamestait - lol, indeed it does! I should try reading the code before commenting! Thanks for that, I'll be hopefully testing this out in the next day or two on a couple new cluster builds!