# Cant Mount GPT Partition Hard Drive with ubuntu LiveCD



## AdamInc

ok so i have a old old problem i was running FreeNAS and one of my HD's died and 1 still worked, so im trying to get teh data off both drives the good and the bad but it never works with freeNas keeps freezing on me.

so i was thinking since Linux should read GPT partitioned hard drive run a liveCD and back up the data that i can and then low level format and see if that fixes the HD.

So when i load the Linux LiveCD and try to mount any one of my GPT hard drives i get a long long error about superblocks and this and that i dont have the exact error but does anyone know if theres a better linux distro to mount GPT hard drives with?


----------



## lotuseclat79

The kernel support for GPT may not have been compiled into the kernel on the Live CD. I would hazard a guess that most Live CDs may not include it.

By default Redhat Enterprise Linux / CentOS comes with GPT kernel support. However, if you are using Debian or Ubuntu Linux, you need to recompile the kernel. Set CONFIG_EFI_PARTITION to y to compile this feature.

Reference: Linux Creating a Partition Size Larger than 2TB. See GPT Kernel Support.

-- Tom


----------



## AdamInc

so what if i install a linux distro onto a hard drive, will that include the GPT kernel?


----------



## lotuseclat79

It depends on which disto as mentioned in the previous message #2.

-- Tom


----------



## AdamInc

ahh sorry my bad read it wrong im going to try the LIveCD of centos and see if that works, if not i got the dvd torrent downloading. thanks for the help i'll post back if i need more help im a linux newb


----------



## AdamInc

Ok so i installed CentOS 5 on a hard drive and plugged in my NTFS and GPT 1TB hard drives but i cant seem to figure out how to mount both so i can copy the data over, yes im a huge linux noob so any info would be great thanks.

EDIT: when i go into Logical Volume Management i can see them both

dev/sda
Size: 931.51GB
Partition Type: HPFS/NTFS(0x7)
Mount Point: Unmounted
Mount Point When Rebooted: None
File Sytem: No Filesystem
Not Initializable: Foreign boot partition
SCSI Address: 1:0:0:0
SCSI ID: SATA_ST31000340AS

dev/sdb
Size: 931.51GB
Partition Type: NONE
Mount Point: Unmounted
Mount Point when Rebooted: None
File System: No Filesystem
SCSI Address: 2:0:0:0
SCSI ID: SATA_ST31000340AS

thats the info under both 1TB HD's


----------



## lotuseclat79

Hi AdamInc,

In Linux, as root, issue the command: # fdisk -l 
or as a regular user: sudo fdisk -l

Post the output in this thread.

Usually, there are two steps to mounting a disk (as root):
1) create a mout point, e.g.
# mkdir /mnt/ntfs
or
# mkdir /mnt/centos

2) issue the mount command:
# mount -v -t ext3 /dev/sdb2 /mnt/centos (I am guessing that the output of fdisk -l will tell you that the main partition of Linux is at /dev/sdb2) Posting that output here will help us confirm it before you issue the mount command as I have given it here based on my assumption which could be either right or wrong which is why I ask you to post it here before proceding. Also, I do not know which filesystem you chose to install.
or
# mount -v -t ntfs /dev/sda1 /mnt/ntfs
(same comment as above applies to this step)

-- Tom


----------



## AdamInc

so i went into the terminal and used sudo fdisk -l and this is what came up

Disk /dev/hdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 10011 80308935 8e Linux LVM

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
256 heads, 63 sectors/track, 121126 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121127 976762583+ ee EFI GPT

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders

i hope this helps cause i have no clue what it means

Also when installing CentOS i think i checked every box available like server, file server and whatever else was available at the time


----------



## lotuseclat79

Reboot with all the disks plugged in from a Linux Live CD environment, and then redo the fdisk -l command. As an example (I have 4 disks w/ no GPT configure - Note: the NTFS drive):
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x60276027

Device Boot Start End Blocks Id System
/dev/sda1 * 5 4865 39045982+ c W95 FAT32 (LBA)
/dev/sda2 1 4 32098+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x60276029

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 33 265041 82 Linux swap / Solaris
/dev/sdb2 34 4865 38813040 83 Linux

Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x60276028

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 9728 78140128+ 7 HPFS/NTFS

Disk /dev/sdd: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5fd95fd9

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 13 104391 83 Linux
/dev/sdd2 14 9538 76509562+ 83 Linux
/dev/sdd3 9539 9729 1534207+ 82 Linux swap / Solaris

Please post all of the output of what I have requested, but do the fdisk -l command from a Linux Live CD as described above.

-- Tom


----------



## AdamInc

After booting into Ubuntu LiveCD cause i cant get the Cent)S one to work i did fdisk -l again and got

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8d47efa5

Device Boot Start End Blocks Id System
/dev/sda1 * 1 121601 976760001 7 HPFS/NTFS

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
256 heads, 63 sectors/track, 121126 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Disk identifier: 0x04995791

Device Boot Start End Blocks Id System
/dev/sdb1 1 121127 976762583+ ee GPT

Hope this helps


----------



## lotuseclat79

Ok, so, now we know that to mount the NTFS partition on a Live CD (as root)
$ sudo -i
# mkdir /mnt/ntfs
# mount -v -t ntfs /dev/sda1 /mnt/ntfs

Referencing Windows and GPT FAQ:
14. Can the 32-bit version of Windows XP read, write, and boot from GPT disks?
No. The 32-bit version will see only the Protective MBR. The EE partition will not be mounted or otherwise exposed to application software. This is entirely a Windows perspective on GPT however.

For the Linux perspective see Linux Creating a Partition Size Larger than 2TB.

It appears the GParted is the tool to use.

-- Tom


----------

