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
Ensure supported partition tables #2803
Conversation
In layout/save/GNU/Linux/200_partition_layout.sh ensure $disk_label is one of the supported partition tables, cf. #2801 (comment)
This pull request was triggered by
Therefore the changes in this pull request are Because I get same disklayout.conf on my homeoffice laptop |
first thought: shouldn't we check the exit code from parted? I can try to recreate a broken setup (like #2801) and check if parted returns a nonzero exit code when this error happens. |
@pcahyna Of course ReaR should care about exit codes of called programs Because from my current point of view proper parted exit code handling |
By the way: |
The fact that parted does not document its exit codes is an argument against checking the exit code. I think that we probably could rely on the usual semantics (nonzero exit code means an error, if nothing else is documented), but I agree that we should not make a potentially disruptive change soon before a planned release. Is it preferable to enumerate all supported partition types? I wonder whether when in the current state another partition type (not in the supported list) is encountered, the code breaks, or does the right thing. (Of course, the partition type must not be |
When in the current state a partition type is reported by parted |
Added comment why layout/save/GNU/Linux/200_partition_layout.sh must error out when a partition type is reported by parted that is not in the supported list cf. #2803 (comment)
@pcahyna |
There is no need that I push here |
I believe this change is fine, but waiting until tomorrow will hopefully allow me to test several disk layouts. |
@pcahyna |
@jsmeix oops! I thought I had written that I was going to test some disk layouts, but I can't find this comment - maybe it was lost, or more likely I only intended to write it and my memory betrayed me. What I intend to test is: gpt partitions, dasd partitions, and filesystems directly on disks (without partitions), same with RAID. |
Yes. Both changes have the same intent. |
Added comment why layout/save/GNU/Linux/200_partition_layout.sh must error out when a partition type is reported by parted that is not in the supported list cf. rear#2803 (comment)
Added comment why layout/save/GNU/Linux/200_partition_layout.sh must error out when a partition type is reported by parted that is not in the supported list cf. rear#2803 (comment)
Hi @jsmeix , sorry for the delay, I have completed tests of several partition layouts now (except dasd).
Here are the layout files resulting from all the cases:
Note that disks without partition tables are sometimes reported as
|
@pcahyna |
Type: Enhancement
Impact: High
Reference to related issue (URL):
Broken 'part' entries in disklayout.conf in case of 'unknown' partition table #2801 (comment)
How was this pull request tested?
I got the same disklayout.conf on my homeoffice laptop
with the changes of this pull request here.
Brief description of the changes in this pull request:
In layout/save/GNU/Linux/200_partition_layout.sh
ensure $disk_label is one of the supported partition tables, cf.
#2801 (comment)