-
-
Notifications
You must be signed in to change notification settings - Fork 501
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 formula to get starting sector of root partition #3119
Conversation
Current method of obtaining starting sector of root partition is making some assumptions that are not always met. When running fdisk you can't assume that the following is always true: - root partition is the last partition of the disk - fdisk will not display any warning (like 'Partition table entries are not in disk order.')
@sal666 I made a small failsafe addition, so the root devices can only match again line start, and not inside the fdisk output header somewhere. But as a general though about having root partition not the last partition:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@MichaIng |
@sal666 So yeah, I will merge this PR for now. Since we allow choosing the root partition in the first place currently, which does not make any sense if we later expect it to be the last partition. |
Current method of obtaining starting sector of root partition is making some assumptions that are not always met. When running fdisk you can't assume that the following is always true: