#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):

  • 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
therein in particular the last part that reads

I will have a look at
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
when invalid entries would be generated
(regardless what the actual reason is), see

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

jsmeix commented at 2022-05-13 06:02:

I will wait until @pcahyna had done his tests, see

jsmeix commented at 2022-05-30 13:28:

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

[Export of Github issue for rear/rear.]