mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-01 08:27:59 +00:00
VMware environments are not unusual now. Add VMware partitions recognition
(both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part. Reviewed by: ae Approved by: ae MFC after: 2 weeks
This commit is contained in:
parent
bf313207fc
commit
b20e4de387
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234417
@ -103,6 +103,9 @@ struct g_part_alias_list {
|
||||
{ "netbsd-lfs", G_PART_ALIAS_NETBSD_LFS },
|
||||
{ "netbsd-raid", G_PART_ALIAS_NETBSD_RAID },
|
||||
{ "netbsd-swap", G_PART_ALIAS_NETBSD_SWAP },
|
||||
{ "vmware-vmfs", G_PART_ALIAS_VMFS },
|
||||
{ "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG },
|
||||
{ "vmware-reserved", G_PART_ALIAS_VMRESERVED },
|
||||
};
|
||||
|
||||
SYSCTL_DECL(_kern_geom);
|
||||
|
@ -69,6 +69,9 @@ enum g_part_alias {
|
||||
G_PART_ALIAS_EBR, /* A EBR partition entry. */
|
||||
G_PART_ALIAS_MS_FAT32, /* A Microsoft FAT32 partition entry. */
|
||||
G_PART_ALIAS_BIOS_BOOT, /* A GRUB 2 boot partition entry. */
|
||||
G_PART_ALIAS_VMFS, /* A VMware VMFS partition entry */
|
||||
G_PART_ALIAS_VMKDIAG, /* A VMware vmkDiagnostic partition entry */
|
||||
G_PART_ALIAS_VMRESERVED, /* A VMware reserved partition entry */
|
||||
/* Keep the following last */
|
||||
G_PART_ALIAS_COUNT
|
||||
};
|
||||
|
@ -163,6 +163,9 @@ static struct uuid gpt_uuid_linux_data = GPT_ENT_TYPE_LINUX_DATA;
|
||||
static struct uuid gpt_uuid_linux_lvm = GPT_ENT_TYPE_LINUX_LVM;
|
||||
static struct uuid gpt_uuid_linux_raid = GPT_ENT_TYPE_LINUX_RAID;
|
||||
static struct uuid gpt_uuid_linux_swap = GPT_ENT_TYPE_LINUX_SWAP;
|
||||
static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS;
|
||||
static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG;
|
||||
static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED;
|
||||
static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA;
|
||||
static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED;
|
||||
static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA;
|
||||
@ -200,6 +203,9 @@ static struct g_part_uuid_alias {
|
||||
{ &gpt_uuid_linux_lvm, G_PART_ALIAS_LINUX_LVM, 0 },
|
||||
{ &gpt_uuid_linux_raid, G_PART_ALIAS_LINUX_RAID, 0 },
|
||||
{ &gpt_uuid_linux_swap, G_PART_ALIAS_LINUX_SWAP, 0 },
|
||||
{ &gpt_uuid_vmfs, G_PART_ALIAS_VMFS, 0 },
|
||||
{ &gpt_uuid_vmkdiag, G_PART_ALIAS_VMKDIAG, 0 },
|
||||
{ &gpt_uuid_vmreserved, G_PART_ALIAS_VMRESERVED, 0 },
|
||||
{ &gpt_uuid_mbr, G_PART_ALIAS_MBR, 0 },
|
||||
{ &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA, 0x0b },
|
||||
{ &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA, 0 },
|
||||
|
@ -126,6 +126,8 @@ static struct g_part_mbr_alias {
|
||||
{ DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM },
|
||||
{ DOSPTYP_LINRAID, G_PART_ALIAS_LINUX_RAID },
|
||||
{ DOSPTYP_PPCBOOT, G_PART_ALIAS_FREEBSD_BOOT },
|
||||
{ DOSPTYP_VMFS, G_PART_ALIAS_VMFS },
|
||||
{ DOSPTYP_VMKDIAG, G_PART_ALIAS_VMKDIAG },
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -55,6 +55,8 @@
|
||||
#define DOSPTYP_LINUX 0x83 /* Linux partition */
|
||||
#define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */
|
||||
#define DOSPTYP_PMBR 0xee /* GPT Protective MBR */
|
||||
#define DOSPTYP_VMFS 0xfb /* VMware VMFS partition */
|
||||
#define DOSPTYP_VMKDIAG 0xfc /* VMware vmkDiagnostic partition */
|
||||
#define DOSPTYP_LINRAID 0xfd /* Linux raid partition */
|
||||
|
||||
struct dos_partition {
|
||||
|
@ -120,6 +120,13 @@ struct gpt_ent {
|
||||
#define GPT_ENT_TYPE_LINUX_LVM \
|
||||
{0xe6d6d379,0xf507,0x44c2,0xa2,0x3c,{0x23,0x8f,0x2a,0x3d,0xf9,0x28}}
|
||||
|
||||
#define GPT_ENT_TYPE_VMFS \
|
||||
{0xaa31e02a,0x400f,0x11db,0x95,0x90,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
|
||||
#define GPT_ENT_TYPE_VMKDIAG \
|
||||
{0x9d275380,0x40ad,0x11db,0xbf,0x97,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
|
||||
#define GPT_ENT_TYPE_VMRESERVED \
|
||||
{0x9198effc,0x31c0,0x11db,0x8f,0x78,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
|
||||
|
||||
#define GPT_ENT_TYPE_APPLE_BOOT \
|
||||
{0x426F6F74,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}}
|
||||
#define GPT_ENT_TYPE_APPLE_HFS \
|
||||
|
Loading…
Reference in New Issue
Block a user