*/-->
pre.src {background-color: Black; color: White;}
fdisk updates and GPT support (转)
原文: (被墙了, 直接复制粘 [nian?]) 贴过来) http://blog.stgolabs.net/2012/09/fdisk-updates-and-gpt-support.html
fdisk 已经支持 GPT (2012-09-27) 了, 但是你现在 (2015-05-02) 用百度搜索的时候还是会找到说不支持的博文. 国内的博客大部分都是 copy 来 copy 去, 这种没质量的 copy 应该收藏到 有道笔记
里面, 而不是老是拿出来害大家.
很多像我这样的小白 都是咽着 这些 "灰尘" 爬过来的
fdisk /dev/sda 进去之后按 m
Create a new label g create a new empty GPT partition table G create a new empty SGI (IRIX) partition table o create a new empty DOS partition table s create a new empty Sun partition table
明显是支持 GPT 分区的
http://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=766d5156c43b784700d28d1c1141008b2bf35ed7
你也可以用 parted The fdisk tool is perhaps the most recognized disk partitioner in the world
The fdisk tool is perhaps the most recognized disk partitioner in the world, as it has historically been present in Windows and all Unix flavors, among other OSs. While this tool has proven useful for its Linux variant, it as been subject to intense patching along its 20 years of existence, and it is a product of multiple authors, coding styles and concepts. Because of this, extending fdisk, to keep up with modern day computing and disk needs is hard, time consuming and error prone. To address this, a serious effort, initially sponsored by Google, was started to redesigned and update fdisk to fit the requirements of a modern disk partitioning program. Some include removing DOS compatibility mode, replacing the deprecated CHS addressing with LBA, GPT support, creating a generic a driver based API that can transparently handle different partition types and major code cleanups and refactoring, among others. While several things have been done, there is still a long ways to go.
I‘m pleased to announce that fdisk can now work with GPT based disks!!
GUID Partition Table (GPT) , developed by Intel in the late ‘90s, is a standard for laying out partitioning on hard disks, now forming part of the UEFI standard. Its increasing popularity is easily understandable, as it provides several benefits over the traditional PC master boot record (MBR) scheme. Furthermore, people using Intel based Apple products (like macbooks) will most likely be using GPT (with a hybrid MBR scheme). While the Internet is full of documents that go into the details of this format, there are a few benefits worth mentioning here:
GPT does not know anything about CHS addressing, and only uses LBA (64bit).
Because it uses 64bit LBAs, it can hold 2^{64}?1 sectors, typically 9.4 Zb with standard 512 byte sectors, way above the 2Tb limit offered by MBR.
GPT uses 32bit CRC checksums to validate data integrity for its headers and partition entries. It also adds redundancy to it‘s structures having them present twice, once at the start and again at the end of the disk. This, of course, helps protect the system against disk errors and allows better recovery.
Some considerations about the implementation:
We currently support probing, listing/adding/deleting/writing partitions, data integrity verification. Furthermore, fdisk can determine if there is a traditional protected, or hybrid MBR present.
For now, primary header corruption is not recoverable from he backup at the end of the disk.
Header checksums are updated upon every change (ie: add/delete partitions), this allows us to mathematically verify the changes on-the-fly, and not only when writing to disk, like most other related tools do.
When creating a new partition, all partition type GUIDs are available.
I‘d like to thank both Petr Uzel from SuSE and Karel Zak from Red Hat for their time reviewing, testing and answering any doubts I had.
Enjoy!