Skip to content

[boot] Create distribution /bootopts file larger than 512 bytes#2362

Merged
ghaerr merged 2 commits intomasterfrom
bootopts
Jul 20, 2025
Merged

[boot] Create distribution /bootopts file larger than 512 bytes#2362
ghaerr merged 2 commits intomasterfrom
bootopts

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented Jul 20, 2025

Extends the distribution /bootopts file to larger than 512 bytes (max size still 1023 bytes). This was done for two reasons:

  • The /bootopts loader for FAT always reads two sectors, but if only one is present, a garbage sector (the next consecutive sector) will also be read. If the /bootopts file is exactly 512 bytes long, then it won't be zero terminated and the garbage sector will be interpreted at startup.
  • If the /bootopts file is edited on a FAT filesystem, the new /bootopts will only work if the file was already two sectors in size, thus guaranteeing the file sectors remain contiguous. When editing /bootopts on FAT, the file size should not be reduced below 513 bytes, as doing so may cause the file contents to become non-contiguous when next edited.

Comments were added to the xtide= line for informational purposes:

#xtide=3 # 0=ATA, 1=XTIDEv1, 2=XTIDEv2 (high speed), 3=XTCF

@ghaerr ghaerr merged commit 1f632ad into master Jul 20, 2025
1 check passed
@ghaerr ghaerr deleted the bootopts branch July 20, 2025 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant