#2804 PR merged
: Ensure syntactically correct 'disk' and 'part' entries in disklayout.conf¶
Labels: enhancement
, fixed / solved / done
jsmeix opened issue at 2022-05-10 10:32:¶
-
Type: Enhancement
-
Impact: Normal
-
Reference to related issue (URL):
https://github.com/rear/rear/issues/2801#issuecomment-1122015129 -
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 syntactically correct 'disk' and 'part' entries
jsmeix commented at 2022-05-11 11:18:¶
This pull request was triggered by
https://github.com/rear/rear/issues/2801#issuecomment-1122015129
therein in particular the last part that reads
I will have a look at
usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh
how to make it behave more reliably and failsafe,
in particular error out directly therein when things failed
instead of error out later in 950_verify_disklayout_file.sh
Therefore the changes in this pull request are
generic enhancements to detect early i.e. directly
in the code where the entries are genereated in
layout/save/GNU/Linux/200_partition_layout.sh
when invalid entries would be generated
(regardless what the actual reason is), see
https://github.com/rear/rear/issues/2801#issuecomment-1122405762
Because I get same disklayout.conf on my homeoffice laptop
there should be no regressions because of those changes
so that I would like to merge them tomorrow afternoon
unless there are objections form one of you
@rear/contributors
jsmeix commented at 2022-05-13 06:02:¶
I will wait until @pcahyna had done his tests, see
https://github.com/rear/rear/pull/2803#issuecomment-1125684872
jsmeix commented at 2022-05-30 13:28:¶
Via
https://github.com/rear/rear/commit/0a1d634ed15500bb21f37ac1bbb11c8a4bb11545
we do no longer error out when there is no partition label type value
for a 'disk' entry in disklayout.conf because "rear recover" works
in a special case without partition label type value when there is
only a 'disk' entry but nothing else for this disk exists in
disklayout.conf
which can happen when /dev/sdX is an empty SD card slot without medium,
see
https://github.com/rear/rear/issues/2810
[Export of Github issue for rear/rear.]