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:
- Install ESXi 5.5U1 Customized Image and then upgrade to the flavor of ESXi of your choice.
- Take the SD card out, put it in a different computer, re-partition it (or make it blank) and then install ESXi.
- Boot into GParted and re-partition the SD card.
- 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 ls. LS 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!
- Boot into ESXi’s installer
- Get to the disk selection screen and take note of the disk identifier
- Hit ALT+F1
- Navigate to /dev/disks/
- Use ls to find your disk identifier
- Use the following command to convert the disk into GPT: partedUtil mklabel “/dev/disks/deviceID” gpt
- 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!’”
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
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.
Hey there, this workaround worked like a charm!
Thanks for sharing you saved me a huge headache…
It kind of boggles my mind there isn’t an actual KB on this issue.
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!
Still working like a charm – did take a while to understand that the console credentials are “root” without password.
Hi, thanks. Worked perfectly on my C220 M3. Same as Alessandro re the root password!
This saved my sanity! Thanks!
This still works with FlexFlash in RAID on a brand new C220 M5 and ESXi 7.0U1. Thanks so much!
Excellent information to know!
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.