Renaming nice nanos labels
I'm flashing my nanos from Linux. To automate the process, it would be nice to be able to configure the disk labels differently for each half, so that I can plug and boot them both on bootloader mode, and have my script flash each half automatically.
Currently I cannot do that because all nanos have "NICENANO" as disk label, so I cannot differentiate each half easily.
Is that possible ?
Otherwise I could differentiate them by UUID, but by label would be nice since I would be able to put a consistent label on all my keyboards for seamless flashes.
2 Replies
Unfortunately, you can’t change the
That’s technically possible, but it’s not something ZMK or we provide prebuilt, and it’s easy to brick the chip if something goes wrong. You’d need to grab the Adafruit nRF52 UF2 bootloader source, modify the volume label in the code, build it for the nice!nano target, and flash it via SWD (requires a programmer like a J-Link or an nRF52 DK). Simply flashing over USB isn’t possible when replacing the bootloader.
For scripting without touching the bootloader, your best bet is exactly what you mentioned—key off the device UUID rather than the label. On Linux you can get this with
If you want, I can point you to the exact bootloader code line where the label is defined so you could change + compile it yourself, but it’s a more advanced route.
Do you want me to share that location and the build steps for the custom bootloader?
NICENANO
disk label—it’s hardcoded into the UF2 bootloader firmware that ships on the nice!nano, and ZMK doesn’t control that part. The label lives in the bootloader binary itself, so the only way to change it would be to compile and flash a custom UF2 bootloader to each nice!nano.That’s technically possible, but it’s not something ZMK or we provide prebuilt, and it’s easy to brick the chip if something goes wrong. You’d need to grab the Adafruit nRF52 UF2 bootloader source, modify the volume label in the code, build it for the nice!nano target, and flash it via SWD (requires a programmer like a J-Link or an nRF52 DK). Simply flashing over USB isn’t possible when replacing the bootloader.
For scripting without touching the bootloader, your best bet is exactly what you mentioned—key off the device UUID rather than the label. On Linux you can get this with
lsblk -o NAME,LABEL,UUID
or by using /dev/disk/by-uuid
. That lets you reliably distinguish each half in bootloader mode without altering the bootloader itself.If you want, I can point you to the exact bootloader code line where the label is defined so you could change + compile it yourself, but it’s a more advanced route.
Do you want me to share that location and the build steps for the custom bootloader?
All right, rebootstrapping all chips will be too much of a hassle, I'll just write down the UUIDs