D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Memory stick not recognised

 

On 24/08/13 19:04, Neil Winchurst wrote:
> On 24/08/13 18:34, bad apple wrote:
>> It's unlikely to alter this, but double-check when you
>> create a new partition(s) that the disk layout type is traditional
>> MSDOS, not GPT - the latter is possible, but tends to just create more
>> problems.
>
> Meant to say, please excuse my ignorance, but how do I find out the
> disk layout type? I have never heard of GPT. Looking with gparted just
> now I cannot see anything about the layout.
>
> Thanks
>
> Neil
>
>

No problem chief, it's:

Device > Create Partition Table

>From within the Gparted menus. It will pop up a box and you'll have to
click "advanced" - as it will warn you, it will default to creating a
MSDOS partition (which is probably what it is by default anyway) or you
can manually choose from other more exotic options (Sun, Amiga, GPT,
etc). This step *will* destroy and data on your drive too, of course.

A "cheaty" way to non-destructively test if a device has a GPT layout is
to simply issue "fdisk -l" against it as fdisk doesn't support GPT
partitions yet*. Here is an example of my system where I have an
unmounted GPT formatted btrfs volume available at /dev/sdc:

ghost@failbot:~$ sudo fdisk -l /dev/sdc
[sudo] password for ghost:

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


Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6ae18eb0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1  1953525167   976762583+  ee  GPT

As you can see, fdisk will throw a massive fit immediately if asked to
scan a GPT partition, which obviously tells you your target device is
indeed GPT! The last line of fdisk's output also clearly identifies it
as type "ee" and "GPT", which is helpful. This won't require you
destroying your data either, just to find out if you're GPT or not.

Cheers


* there are exceptions - the very latest versions of fdisk, which you
won't be using on your stable system - do actually have limited GPT
support so won't throw this warning. They'll still (correctly) identify
the partition type though. Parted does fully support GPT.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq