raspberrypi / rpi-imager

The home of Raspberry Pi Imager, a user-friendly tool for creating bootable media for Raspberry Pi devices.
https://www.raspberrypi.com/software
Other
1.67k stars 255 forks source link

[BUG]: Filename shortening if file is created by imager #945

Open paulober opened 4 days ago

paulober commented 4 days ago

What happened?

Cloud-init network-config can't be created by imager only edited if already present in the imager because it would shorten the filename which results in an invalid filename for the cloud-init datasource.

Version

1.9.2 (Default)

What host operating system were you using?

Windows

Host OS Version

24H2

Selected OS

Raspberry Pi OS Bookworm Lite (64-bit)

Which Raspberry Pi Device are you using?

Raspberry Pi 5

What kind of storage device are you using?

microSD Card in a USB reader

OS Customisation

Relevant log output

https://github.com/raspberrypi/rpi-imager/blob/879b89cae1e35d5d6dd6b26aa269a0f3e260a5c3/src/devicewrapperfatpartition.cpp#L402-L483

paulober commented 4 days ago

@tdewey-rpi Seems like it worked on other images because they already pre-created the modified files and therefore this part does not execute.

lurch commented 4 days ago

What filename is it supposed to have? What does it get shortened to?

tdewey-rpi commented 4 days ago

What filename is it supposed to have? What does it get shortened to?

In practice, we see Imager producing short filenames essentially all the time. This first manifested with user-data, and affects the default names for each of the cloud-init configuration files.

maxnet commented 3 days ago

In practice, we see Imager producing short filenames essentially all the time.

Pretty sure it did generate new files like "firstrun.sh" (lowercase) correctly in the past. If storing long file name entries would not work at all, I would expect it to show up as FIRSTRUN.SH instead, as the 8.3 short name is stored in uppercase.