Fixing ‘Can’t have a partition outside the disk!’

Another day, another strange bug. This is just how my life works, apparently.

When deploying newer versions of ESXi on Cisco C-series servers that use Cisco’s FlexFlash SD card storage (although, admittedly this could be any server vendor) you may run into this fantastic error message that reads “Can’t have a partition outside the disk! Unable to read partition table for device.” This essentially means that the format in which the volume on the storage isn’t able to be used for an ESXi installation.

In looking into this issue we found Cisco KB CSCus51007 and countless blogs that tell you to do one of four things:

  1. Install ESXi 5.5U1 Customized Image and then upgrade to the flavor of ESXi of your choice.
  2. Take the SD card out, put it in a different computer, re-partition it (or make it blank) and then install ESXi.
  3. Boot into GParted and re-partition the SD card.
  4. Insert the SD card into a working ESXi host and use the recovery console shell to format the SD card.

I thought about this for a moment and came to a hypothesis. Is it possible to get to the recovery shell from the ESXi installer? Knowing what I know about how ESXi works, it just loads everything into memory at boot. The installer has to work the same way, right? So, when I booted up my image of 6.0 U3, I got to the window where you select your disk and wrote down the C#:T#:L# of the SD card volume and hit ALT+F1.

This was a triumph. One may even call it a huge success. The recovery console was available. A coworker of mine came over to see what I was up to and I explained what I was doing. He was as intregued as I was, as storage is his jam. I logged in as root (which in the installer, has no password set) and punched in lsLS showed us that there was a /vmfs/ directory, just like a live version of ESXi.. In /vmfs/devices/disks/ we found our device.

The command you need to run to convert the volume is as follows: partedUtil mklabel “/dev/disks/deviceID” gpt. An example would look like this: partedUtil mklabel “/dev/disks/mpx.vmhba11:C0:T0:L0” gpt. Wait, why isn’t /vmfs/devices/ in the path name? /vmfs/devices/ is actually a symlink to /dev/. The command, from our testing, doesn’t even work when you use the symlink.

From there, hit ALT-F2 and re-scanned the storage for the installer. ESXi 6.0 U3 installed without issue. I hope this helps some admins in the future, as the resources out there on this problem aren’t great! A TL;DR is below with steps. Enjoy!

TL;DR: just give me the fix!

  1. Boot into ESXi’s installer
  2. Get to the disk selection screen and take note of the disk identifier
  3. Hit ALT+F1
  4. Navigate to /dev/disks/
  5. Use ls to find your disk identifier
  6. Use the following command to convert the disk into GPT: partedUtil mklabel “/dev/disks/deviceID” gpt
  7. Install ESXi

Disclaimer: If you break something using this, I take zero responsibility. Any advice you take from me is on you.


11 thoughts on “Fixing ‘Can’t have a partition outside the disk!’

  1. Thanks a lot for your post, really helped out. i question though, is this supported with 2 SD cards in fail-over or mirrored when using them with a cisco blade B200 M3


    1. Great question! I don’t know. We had C-Series blades in that same mode and this is how we had to do this. I would try it and see what happens, then go from there.


  2. Thanks! I’m very impressed by this post, it’s still very relevant. I’m on a 6200 Series pair of FIs with firmware at 4.0(2d) with B200 M3 firmware at 4.0(2d). Had a few I/O errors and replaced an SD card, of course you have to rebuild the raid which kills the OS and so I ran into this problem. Been doing a lot of digging and am so pleased for coming across this blog. I’m surprised this hasn’t been better documented. Thanks for you efforts! Saved me a lot of trouble!


  3. Excellent article, still valid in 20202, wow, thanks a bunch, it saved us going through that other methods of getting the older version first before we could upgrade to the newest. Great stuff, many thanks.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s