Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[boot] Fix bad MBR partition generated by setboot #2084

Merged
merged 1 commit into from
Oct 21, 2024
Merged

[boot] Fix bad MBR partition generated by setboot #2084

merged 1 commit into from
Oct 21, 2024

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Oct 21, 2024

Corrects improper end cylinder number and partition size for hd32mbr-minix.img and hd32mbr-fat.img images. This resulted in an extra cylinder being used for the partition as well as calculating the partition size incorrectly, which would result in writing off the end of the partition, a major bug.

Also fixes fdisk to accept only the correct start and end cylinder numbers, courtesy of @Mellvik's fix Mellvik/TLVC#93.

Here's the corrected setboot (and fdisk) output for the HD32 images with CHS 63/16/63. Note the correct 32MB disk size is 63441 sectors (instead of the previous 63504):
hd32mbr fdisk

@ghaerr ghaerr merged commit 1bcdc74 into master Oct 21, 2024
1 check passed
@ghaerr ghaerr deleted the mbr branch October 21, 2024 19:18
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