2

I've thoroughly read through the gdisk man page and the author's walkthrough found here http://www.rodsbooks.com/gdisk/walkthrough.html

I'm wondering if there is a repository of error codes out there for gdisk. When I first started using gdisk I'd naturally make mistakes and see error codes:

GPT fdisk (gdisk) version 1.0.3

Type device filename, or press <Enter> to exit: I
Problem opening I for reading! Error is 2.
The specified file does not exist!

Simple mistake right, I typed in something that doesn't exist.

Then the second mistake:

GPT fdisk (gdisk) version 1.0.3

Type device filename, or press <Enter> to exit: /dev/sda
Problem opening /dev/sda for reading! Error is 13.
You must run this program as root or use sudo!

This might be a silly question, but I'm curious if this is the 13th error what would the other 11 errors be that I haven't made a mistake for yet?

I did find one additional error code in an apple forum https://discussions.apple.com/thread/7584206

Here error code 1 seems to relate to gdisk encountering bios/mbr installations.

1
  • 1
    Thanks for linking that Apple discussions thread, it was useful in figuring out my problem (basically, you need to disable SIP in newer MacOS's). – Paul Dec 26 '20 at 3:39
2

When gdisk outputs “Error is ...”, the error is an errno value. To see what they correspond to, run errno -l (at least on Linux systems).

Error 2 means “No such file or directory”, which makes sense because you presumably don’t have a file named I. Error 13 means “permission denied”, which suggests that you weren’t running gdisk as root (as indicated by the error message).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.