LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-28-2011, 02:46 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Partition codes for GPT


Anyone know why Linux has to share a partition type code (specifically, 0700) with Windows? Why can't it have its own like some other OSes?
 
Old 02-28-2011, 03:00 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.15.5
Posts: 1,501
Blog Entries: 12

Rep: Reputation: 155Reputation: 155
Because it uses the same partition type, which is pretty handy for dual booters. It's nice to be unique, but compatibility is nice too.
 
Old 02-28-2011, 03:32 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by mostlyharmless View Post
Because it uses the same partition type, which is pretty handy for dual booters. It's nice to be unique, but compatibility is nice too.
How does that apply to a dual boot? Wouldn't you want to have one partition be Linux and the other be Windows (if that's the two you have)? Or is this all about trying to use the same one partition for both?

If I had Windows, I'd rather keep it distinct from Linux, with a type code to keep them apart. Linux swap does have its own type code. By why does a Linux filesystem (usually ext2, ext3, or ext4) and a Windows filesystem (usually, FAT32 or later) need to be made hard to tell them apart? Wouldn't that risk Windows thinking it owns even the one intended for Linux?
 
Old 02-28-2011, 06:52 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 11,168

Rep: Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365Reputation: 1365
From wiki.
"
In computer hardware, GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. Although it forms a part of the Extensible Firmware Interface (EFI) standard (Intel's proposed replacement for the PC BIOS), it is also used on some BIOS systems because of the limitations of MBR partition tables, which restrict a disk partition's size to a maximum of 2.19 TB (2.19 1012 bytes) or 2 TiB−512 bytes (2,199,023,255,040 bytes or 4,294,967,295 (232−1) sectors 512 (29) bytes per sector).[1] GPT allows for a maximum disk and partition size of 9.4 ZB (9.4 1021 bytes) or 8 ZiB−512 bytes (9,444,732,965,739,290,426,880 bytes or 18,446,744,073,709,551,615 (264−1) sectors 512 (29) bytes per sector).
"
From man page gdisk.
"
If Windows is to boot from a GPT disk, a partition of type Microsoft Reserved (gdisk internal code 0x0C01) is recommended. This partition should be about 128 MiB in size. It ordinarily follows the EFI System Partition and immediately precedes the Windows data partitions
"


You can see that GPT is a standard in use because of either limitations or by a need rather than an OS driven issue.
 
Old 03-10-2011, 06:52 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by jefro View Post
From wiki.
"
In computer hardware, GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. Although it forms a part of the Extensible Firmware Interface (EFI) standard (Intel's proposed replacement for the PC BIOS), it is also used on some BIOS systems because of the limitations of MBR partition tables, which restrict a disk partition's size to a maximum of 2.19 TB (2.19 1012 bytes) or 2 TiB−512 bytes (2,199,023,255,040 bytes or 4,294,967,295 (232−1) sectors 512 (29) bytes per sector).[1] GPT allows for a maximum disk and partition size of 9.4 ZB (9.4 1021 bytes) or 8 ZiB−512 bytes (9,444,732,965,739,290,426,880 bytes or 18,446,744,073,709,551,615 (264−1) sectors 512 (29) bytes per sector).
"
From man page gdisk.
"
If Windows is to boot from a GPT disk, a partition of type Microsoft Reserved (gdisk internal code 0x0C01) is recommended. This partition should be about 128 MiB in size. It ordinarily follows the EFI System Partition and immediately precedes the Windows data partitions
"


You can see that GPT is a standard in use because of either limitations or by a need rather than an OS driven issue.
GPT is actually a much better way to set up a partition table. I do think I could have done better designing the details, but this is still so much better than what we had before. I use GPT even on my netbook that has just a 32GB SSD.

BTW, the way I would have designed a partition table format, those limitations that GPT has would not even exist. But at this point, it's not worth trying to overcome the momentum of GPT for what are currently just minor detail differences. Still, I do think a better partitioning tool is needed, at least for command line usage. So I might work on that when I have some time.

Still, none of this explains why systems like BSD and Solaris have partition type codes that are different than Windows, and Linux does not. Who picked that number (for each), anyway?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Delete GPT Partition sjreilly Linux - General 2 04-20-2013 11:24 AM
[SOLVED] Installing Slackware with GPT partition table Skaperen Slackware 15 02-23-2011 01:37 PM
Which distro(s) work with GPT partition table? ozegoods Linux - General 5 12-13-2010 06:57 PM
how to format an EFI partition on a GPT partitioned HD nfolken Linux - Laptop and Netbook 2 01-28-2010 08:59 AM
Is ubuntu or fedora supports installing on GPT-based partition? gabeyg Linux - General 1 08-19-2007 06:58 PM


All times are GMT -5. The time now is 10:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration