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

DietPi-Imager | Fix GPT backup partition table handling #7033

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Apr 22, 2024

Skip moving backup partition table before touching the image. parted/sfdisk may throw warnings, but the step can fail if the last partition reaches the end of the image, e.g. if the file was cut right after the last partition, ignoring the backup table.

Additionally, obtain the size needed for the GPT backup correctly by the first usable LBA/sector, instead of using the 34 sectors default GPT size. fdisk/sfdisk use 2048 by default, while parted defaults to the actual 34 sectors the GPT truly uses.

@MichaIng MichaIng added Bug 🐞 Installer 💠 Issues related to DietPi-Installer and/or pre-image used labels Apr 22, 2024
@MichaIng MichaIng added this to the v9.4 milestone Apr 22, 2024
@MichaIng MichaIng linked an issue Apr 22, 2024 that may be closed by this pull request
- DietPi-Imager | Skip moving backup partition table before touching the image. parted/sfdisk may throw warnings, but the step can fail if the last partition reaches the end of the image, e.g. if the file was cut right after the last partition, ignoring the backup table. Additionally, obtain the size needed for the GPT backup correctly by the first usabe LBA/sector, instead of using the 34 sectors default GPT size. fdisk/sfdisk use 2048 by default, while parted defaults to the actual 34 sectors the GPT truly uses.
@MichaIng MichaIng merged commit 079710a into dev Apr 23, 2024
2 checks passed
@MichaIng MichaIng deleted the imager branch April 23, 2024 11:15
@MichaIng MichaIng restored the imager branch April 23, 2024 11:15
@MichaIng MichaIng deleted the imager branch April 27, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Installer 💠 Issues related to DietPi-Installer and/or pre-image used
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image | Radxa ZERO 3
1 participant