How to mount a partition on a disk that has an EFI GPT partition table in Debian GNU/Linux 5.0.3 (Lenny)

by Phil Jones
April 2010

What's this?

This is an example of how to mount a partition from a large disk that has an EFI GPT partition table instead of the conventional MBR (Master Boot Record) partition table. A large disk means a hard drive that is 1 Terabyte or more. EFI stands for Extensible Firmware Interface. GPT is short for Globally Unique Identifier Partition Table.

How to do it

1. Check the kernel was compiled with EFI support. The standard kernel with Debian Lenny comes with EFI support built-in. The command to check is:
cat /boot/config-2.6.26-2-686 | grep EFI
You know if the kernel was compiled with EFI support if you get these lines:
2. The fdisk command shows only a placeholder partition. This is normal.
fdisk -l /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! 
The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System /dev/sda1 1 121602 976762583+ ee EFI GPT
3. List the real partitions on the disk using parted.
parted /dev/sda print
You should get a result like this:
Number  Start   End     Size    File system  Name     Flags
1      17.4kB  1024MB  1024MB  ext3         primary
2      1024MB  6144MB  5120MB  xfs          primary
3      6144MB  6144MB  512B                 primary
4      6144MB  6144MB  512B                 primary
5      6144MB  7168MB  1024MB  linux-swap   primary
6      7168MB  992GB   985GB   xfs          primary

To mount the second partition, use the mount command in the same way you usually would.
mount -t xfs /dev/sda2 /mnt/test

Did this help?

If so, I'd be interested to know. Email me on phil {at}  Replace {at} with @ to email.