Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Change Gentoo Handbook to recommend GPT partition tables?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Sun Oct 20, 2013 8:10 pm    Post subject: Change Gentoo Handbook to recommend GPT partition tables? Reply with quote

EDIT: This turned into a parted hate thread rather than a discussion of real issues. As well, fdisk suddenly became able to handle GPT partition tables (25 years late) while this thread is still hot. I rewrote the subject.

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=4

The only drive in my box that can still be partitioned with fdisk is my ssd. Everything else is bigger than 2T.

Why not change the handbook to show parted and gpt partition tables?


Last edited by 1clue on Wed Oct 23, 2013 2:13 am; edited 2 times in total
Back to top
View user's profile Send private message
kurly
Apprentice
Apprentice


Joined: 02 Apr 2012
Posts: 253

PostPosted: Mon Oct 21, 2013 4:13 am    Post subject: Reply with quote

Did you read the rest of the page you linked? Particularly the part about "Using parted to Partition your Disk"? Or the part right after it that discusses GPT partition tables?
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Mon Oct 21, 2013 5:01 am    Post subject: Reply with quote

Yes, I did.

My question is, why is it that the first thing on the partitioning page is a dinosaur should have been extinct 25 or so years ago, when hard disks hit 40 megabytes?

Is there any disadvantage at all to using parted? AFAIK, none.
What possible redeeming quality does fdisk have? AFAIK, none.

Why perpetuate a dinosaur?

I can understand it for some sort of rescue disk where you don't know how old the system is you're rescuing, but this is a new install. At least switch the order around, advocate GPT partitions and have a footnote for old/existing systems.
Back to top
View user's profile Send private message
kurly
Apprentice
Apprentice


Joined: 02 Apr 2012
Posts: 253

PostPosted: Mon Oct 21, 2013 5:06 am    Post subject: Reply with quote

1clue wrote:
At least switch the order around, advocate GPT partitions and have a footnote for old/existing systems.
That is a reasonable suggestion; I am unsure how to forward it to someone who can actually change it. Mailing list? Bug report?

Thanks for clarifying.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Mon Oct 21, 2013 5:42 am    Post subject: Reply with quote

I just filed a bug report.
Back to top
View user's profile Send private message
<3
l33t
l33t


Joined: 21 Oct 2004
Posts: 926

PostPosted: Mon Oct 21, 2013 6:43 am    Post subject: Reply with quote

I say leave it as is. I've been using Gentoo for like 10 years and feel more comfortable with fdisk, I have about 5 HDs and none of them over 500GB so it's not an issue for me. If anyone wants to use parted it's in the manual as well so there should not be an issue.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Mon Oct 21, 2013 6:54 am    Post subject: Reply with quote

Just guessing, but if you've been around Gentoo that long you probably don't use the handbook much for partitioning do you?

All I'm really suggesting is a change of focus. The MS-DOS partition table is literally incapable of addressing all the space in drives that can be had for $120 USD. There's no disadvantage to having a GPT partition, so why not suggest that instead?

There are really good reasons to recommend GPT, and the only reason I can think of to recommend MS-DOS tables is tradition. The size thing I already mentioned, another thing that comes to mind right away is the backup partition table at the end of the disk on GPT. I've certainly had corrupt partition tables in the past.

Some of the users working their way through the handbook are novices. Why train them to use something that was obsolete 25 years ago?
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 852
Location: Germany

PostPosted: Mon Oct 21, 2013 10:32 am    Post subject: Reply with quote

Personally, I like fdisk better from a usability point of view. Parted felt awkward when I used it not too long ago.
Perhaps a good compromise would be recommending gptfdisk.
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
sabayonino
l33t
l33t


Joined: 03 Jan 2012
Posts: 699

PostPosted: Mon Oct 21, 2013 10:51 am    Post subject: Reply with quote

did you ever try cfdisk ?

it's more easy

https://en.wikipedia.org/wiki/Cfdisk

:wink:

Code:
# cfdisk /dev/sd{a,b,c...}

_________________
BOINC ed il calcolo distribuito

My LiveRecoverySystem Repo
Back to top
View user's profile Send private message
GFCCAE6xF
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 266

PostPosted: Mon Oct 21, 2013 11:05 am    Post subject: Reply with quote

Here is a nice little story about a newbie in regards to partitioning installing Gentoo on a hdd he was given:

The last time I did a Gentoo install I ended up failing to install grub twice because of some lack of space, and thus re-partitioned the drive 3 times in the end. All I can say is thank ******** god I had another drive available to backup the install to so I could resume at bootloader installation because I had X and everything built and set up ready.

I did what I always have but this time something was weird with the disk or how it was previously formatted.
cfdisk failed, fdisk failed, then I went to last resort, I used the gui parted 'thing' on the systemrescuecd.
For some reason (I dont know why or care why) it left a little space before my first partition and a little just after my last one.
I got bootloader installed no problem after that.
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Mon Oct 21, 2013 1:23 pm    Post subject: Reply with quote

If someone is planning to have dual-boot (+Windows) at his machine, GPT partition table may cause some trouble. Windows can't be installed at GPT if mobo is not uefi-based, or/and it is a 32-bit Windows. This case, if you have linux installed already and/or have some data stored, you have to back your data up, recreate partition table and reinstall linux after changing GPT table to ms-dos.

In my view, there is nothing to change at the handbook page, but add some notes before partitioning, that explains possible issues (grub2 bigger free space requirement, dual-boot problems, >2Tb disks partitioning and so on).
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Mon Oct 21, 2013 2:48 pm    Post subject: Reply with quote

It's not the partitioning tool I'm railing against, it's the partition table type.

@creaker, it's obvious that legacy hardware might have problems. Again, I'm not recommending that it go away, I'm just suggesting that it might be time to change the focus in the docs.

I've been using fdisk since the early 90s, no matter what OS you're using you traditionally use the fdisk that comes with it. But frankly even when I started using it, it was already obsolete. The first hard disk I used it on was 40 megabytes (huge at the time) and it was already bigger than fdisk's original design spec.
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 852
Location: Germany

PostPosted: Mon Oct 21, 2013 6:11 pm    Post subject: Reply with quote

1clue wrote:
It's not the partitioning tool I'm railing against, it's the partition table type.

Well, since fdisk can't handle gpt, that amounts to the same :D.
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 21, 2013 8:00 pm    Post subject: Reply with quote

Quote:
# fdisk /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sda: 128.0 GB, 128035676160 bytes, 250069680 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 label type: gpt


# Start End Size Type Name
1 2048 250069646 119.2G Linux filesyste

Command (m for help):

_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Clad in Sky
l33t
l33t


Joined: 04 May 2007
Posts: 852
Location: Germany

PostPosted: Tue Oct 22, 2013 9:49 am    Post subject: Reply with quote

Ha!

Only last week, fdisk told me it couldn't handle GPT. :D
_________________
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2273
Location: Bardowick, Germany

PostPosted: Tue Oct 22, 2013 9:55 am    Post subject: Reply with quote

Jaglover wrote:
Quote:
# fdisk /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).
Wohoa! That is news to me, I am (like everybody else here?) used to the Warning that fdisk can't handle GPT.

However, please do not recommend an unintuitive and scary tool like parted as the first option. The output of "parted --help" is enough to scare anybody off. And if you start parted and enter "help", it gets worse.
Further, parted does not allow to set a partition type but wants (optionally) the fs type? Explain that to a newcomer who wants 0xfd "Linux raid auto" partitions for using mdadm.
Use cfdisk instead. It is nice looking, can do anything needed and won't scare newcomers into hiding on another planet.
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
segfault00
n00b
n00b


Joined: 16 Oct 2013
Posts: 4
Location: Ottawa, Canada

PostPosted: Tue Oct 22, 2013 4:19 pm    Post subject: Reply with quote

I am used to fdisk as well and thanks to recent events I have come to HATE parted. But I still agree that fdisk should not be the "default", first mentioned tool in the documentation.

My recent firsthand experience:
2 weeks ago I tried a new install and since my hdd had already previously been GPT partitioned automagically by a trial Mint install I had done earlier, I decided to try parted for my gentoo install.
Not having much experience with parted, I followed the documentation instructions as carefully as possible. But I had all my data on a UFS partition I usually mount in /home that I wanted to keep but I accidentally deleted with parted. I thought to myself "oops, I'd better quit parted before I write that mistake to disk" only to suddenly realize that parted works on the disk immediately. NOOOOOOO!!!!!! :(
Anyways, after 2 weeks on forums and IRC trying in vein to restore/recover that UFS partition I have now given up and will be resorting to an older snapshot of the data.

So it might be nice to have a note about the immediate-ness of parted commands in the handbook, or maybe cfdisk would be a good recommendation instead? I have not tried that yet but like the sound of it.
Back to top
View user's profile Send private message
<3
l33t
l33t


Joined: 21 Oct 2004
Posts: 926

PostPosted: Tue Oct 22, 2013 7:48 pm    Post subject: Reply with quote

Don't try to fix what isn't broke.
Back to top
View user's profile Send private message
wuzzerd
Guru
Guru


Joined: 05 Jan 2005
Posts: 454
Location: New Mexico

PostPosted: Tue Oct 22, 2013 11:15 pm    Post subject: Reply with quote

Gparted bit me last week. I built a "small" partition which filled up before I could jam the portage tree into it. Using fdisk I was able to set the block size. fdisk -b 1024 filled the bill. 512 would probably be better.

Giant disks? How many of us have a file so big that a 1TB partition is insufficient to hold it? What block size do you need?

My preference is to make several partitions on large media, just in case. If one partition blows up the others will be there.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Oct 23, 2013 12:06 am    Post subject: Reply with quote

<3 wrote:
Don't try to fix what isn't broke.


Only it IS broken.

While the page goes slightly into the issues, it doesn't very well express why you would want a GPT partition or why you wouldn't. It doesn't say anything about modern systems or older systems, or compatibility with some sort of Windows. This isn't a minor detail, it's a Decision that affects the rest of the installation and cannot be easily changed.

As wuzzerd unintentionally points out, the reasons aren't evidently clear even to people who have already installed Gentoo. Put an MS-DOS partition table on a 3T disk and it is now a 2T disk. It ignores all space on the drive past 2T. The current system I'm working on would lose 3T if I were to use MS-DOS partition tables.

I hadn't intended this to be a gparted hate thread. I mentioned gparted because it was the GPT-compatible tool mentioned in the handbook. I don't like it very much either. However its user interface shortcomings are irrelevant to the benefits of GPT partition tables. Use another tool. Use the new fdisk, evidently.

It's bizarre to me that the version of fdisk introducing GPT support becomes available while this thread is hot. It took them 25 years, maybe I should buy a lottery ticket?

There comes a point where you need to change focus to support current equipment. IMO the "normal" new computer getting Gentoo will soon have need of UEFI-compatible techniques, or it already does. Certainly the MS-DOS partition table is obsolete if commonly available, inexpensive hardware can't be fully used with it. Moreover, if you use price to decide your drive space as I do, a 3T drive is "below the knee" meaning a little bit of money adds a lot of storage, as opposed to "above the knee" meaning a lot of price adds a little bit of storage. People who buy based on price/performance ratio will likely buy something bigger than 2T.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Oct 23, 2013 2:13 am    Post subject: Reply with quote

This turned into a parted hate thread rather than a discussion of the original intent, GPT partition table use in favor of MS-DOS partition tables. As well, fdisk suddenly became able to handle GPT partition tables (25 years late) while this thread is still hot. I rewrote the subject.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Wed Oct 23, 2013 2:39 am    Post subject: Reply with quote

I'm converting to GPT every time I replace a hard drive (unless it is a single filesystem in which case will use it as raw device). However, I wouldn't recommend this approach to dual-booters, I hear Windows cannot boot BIOS-GPT combo?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Oct 23, 2013 3:10 am    Post subject: Reply with quote

I haven't verified that, but that's what people are saying.

Personally i don't dual boot. I put one OS on the hardware and anything else is a VM. So this combination doesn't apply to me. Edit: That means I can pretty much always use GPT without any problems.

However, this sort of thing is important to know before you put in a partition table of any sort. There is no "always safe" option. Which reinforces my opinion that the handbook needs to change.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Wed Oct 23, 2013 3:10 pm    Post subject: Reply with quote

I'd like to chime in on this. I'm the developer of GPT fdisk (gdisk, cgdisk, and sgdisk), which is available in the Gentoo "gptfdisk" package, and I also maintain the rEFInd EFI boot manager, so I have considerable experience with partitioning and boot issues. Both are relevant to the question at hand.

GPT does indeed have advantages over MBR, even on BIOS-based computers and small hard disks. These include:


  • Support for over-2TiB disks. Note that's 2TiB, not 2TB; 2TiB is about 2.2TB, so MBR is just fine on a 2TB disk. The current handbook entry is unclear on this issue.
  • Support for up to 128 partitions by default, with no primary/extended/logical distinction. The 128-partition limit can be raised if necessary, but not with parted; AFAIK, only GPT fdisk can do this.
  • A backup of the partition table is stored at the end of the disk, which can help protect against accidents with "dd" or the like.
  • CRCs of the data structures are stored within them, which helps OSes and utilities detect data corruption.
  • Partitions have names and GUIDs, which can help to identify them.
  • Partition type codes are GUIDs, which means there's less risk of collisions between partition types. In practice, this doesn't always work, though; Linux has traditionally used the same type code GUID for its filesystem partitions as Windows, for instance. (A Linux-only type code has been available for two years, but still isn't supported by the released version of parted. It is supported by GPT fdisk and is in the parted git repository.)


Unfortunately, these advantages are offset on some systems because of difficulties booting from GPT disks. These problems arise mostly on some systems with buggy BIOSes or with EFIs set to boot in BIOS/CSM/legacy mode. I describe them here. If users aren't aware of these problems, they'll end up pulling their hair out trying to work around them. Fedora made the mistake of switching to a GPT-by-default policy with their installer a few releases back (I think with F15 or F16) and they ended up reversing that decision with the next release because they had so many problems with it. If the Gentoo handbook were edited to recommend GPT rather than MBR, then at the very least these potential problems must be adequately covered. Unfortunately, that's a difficult task, since the nature of the problem varies from one system to another. Adding the boot/active flag on the MBR's protective 0xEE partition usually fixes the problem, but not always; and adding that flag will actually cause problems on some systems if the user wants to switch from a BIOS-mode to an EFI-mode boot. Thus, there's a lot of room for user confusion, even with good documentation.

Furthermore, as Jaglover and creaker have pointed out, using GPT on a BIOS-based computer in a dual-boot configuration with Windows is impossible. Windows ties its boot mode strictly to the partition table type: If it's GPT, Windows will boot only in EFI mode; and if it's MBR, Windows will boot only in BIOS mode.

For these reasons, my recommendation is:


  • When booting in BIOS mode with an under-2TiB disk, use MBR partitions.
  • When booting in BIOS mode with an over-2TiB disk, use GPT partitions, but be sure to document the potential problems.
  • When booting in EFI mode, use GPT partitions.


These recommendations apply to the boot disk. If the computer has two hard disks, the non-boot disk can use whatever partition table type you want. Note that most EFI-based computers give the option of booting in either native EFI mode or using a Compatibility Support Module (CSM), which enables using BIOS boot loaders (aka "legacy mode"). This gives the user some choice in the boot mode to be used, and also opens a whole new can of worms.

One more point: The choice in partitioning software is not between just fdisk (and the related cfdisk and sfdisk) and parted (and other libparted-based tools, such as GParted); there's also my GPT fdisk, which is modelled after fdisk (with cgdisk modelled after cfdisk and sgdisk modelled after nothing but intended to be used in many of the situations in which sfdisk might be used). If you're comfortable with fdisk, you'll be at home with gdisk. The GPT support in fdisk was added very recently (with util-linux 2.23, IIRC), which is why different people here have had different experiences with it. The fdisk GPT support lags well behind what gdisk offers. Thus, for parted-haters, gdisk is the way to go for GPT partitioning, although a very recent fdisk should work in a pinch.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Oct 23, 2013 5:51 pm    Post subject: Reply with quote

@srs5694,

Awesome. Your post was educational.

Now could you do one more thing for me? You seem to be an expert on this, and since you're a developer for a GPT-compatible tool you obviously care.

Could you make a post which could be used as a portion of the handbook, as a modification of the official docs, aimed at a potentially new user? I'll append it with your name on the bug report. Or, you could go to bugs.gentoo.org and post to bug 488844.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum