How to check if a disk has MBR or GPT type partition?

MBR

sudo parted /dev/sda print | grep Table
Partition Table: msdos

GPT

sudo parted /dev/sda print | grep Table
Partition Table: gpt
Advertisements

How to recover ESXi password with Linux boot disk

In the rare unfortunate event that you lost your ESXi root password, you can reset it with a Linux Live ISO. The reference article uses Ubuntu Live DVD. I used RHEL 7 Boot ISO and went into rescue mode. In theory, any Linux ISO that can you get a shell and mount fat16 partition should work.

The disk where ESXi installed will differ depending on how it was installed. In my case, I knew it was SD card installed. I could easily tell the install disk by the size. Besides, it was very clear from the partition layout. Newer ESXi uses GTP and not MBR. fdisk does not support GPT. Since I just needed to view the partition table, fdisk -l did the job.