Skip to content
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

Support for NVMe devices #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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