Skip to content

Conversation

@baedacool
Copy link

Signed-off-by: Peter Maier maierp@br-automation.co.at

Peter Maier added 4 commits January 25, 2019 06:46
Signed-off-by: Peter Maier <maierp@br-automation.co.at>
Signed-off-by: Peter Maier <maierp@br-automation.co.at>
@func0der
Copy link

The drives are found now, but the partitions do not seem be properly parsed.

One thing I saw was the partition names in the partition table are missing a p before their partition number:

Partition  Attrs   Start Sector    End Sector  # of Sectors System
/dev/nvme0n11                2,048     1,050,623     1,048,576 EFI System partition
/dev/nvme0n12            1,050,624     3,147,775     2,097,152 EFI System partition
....

Hexdump did not work either, because of the wrong naming:

hexdump: /dev/nvme0n11

@func0der
Copy link

I found the issue.

ReadEFI needs to be extended.

Instead of:

       label=${drive}$((${i}+1));

We need to create the label for the partion like so:

        PartExt=$((${i}+1));
        if [ "${drive:0:9}" = "/dev/nvme" ]; then
                PartExt="p$PartExt"
        fi
        label=${drive}$PartExt;

And the script works fine for me.
The partition table above works correctly and the hexdump works, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants