Hi,
I'm currently teaching Linux system administration to a class at the local "chambre de commerce". The course is based mainly on a minimal CentOS 7 installation.
Usually my preferred tool for handling manual GPT partitioning is gdisk, which is not installed on a minimal install. I just gave the good old fdisk a spin, which enables GPT partition table creation with the 'g' shortcut.
Here's what I get when listing a GPT-partitioned drive with fdisk:
# fdisk -l /dev/sdb WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes ...
Now my first reaction would be to install gdisk (yum install gdisk) and use this to handle GTP partitioning. But I'm curious. How "experimental" (e. g. prone to blow up in my face) is fdisk really? So far, I've only used it for MBR-style partitioning.
Cheers from the sunny South of France,
Niki
Le 07/10/2018 à 12:09, Nicolas Kovacs a écrit :
Now my first reaction would be to install gdisk (yum install gdisk) and use this to handle GTP partitioning. But I'm curious. How "experimental" (e. g. prone to blow up in my face) is fdisk really? So far, I've only used it for MBR-style partitioning.
I have a follow-up remark.
Before CentOS, I've been using Slackware as my main OS on servers and desktops. My policy for partitioning and formatting was always "Keep It Simple", e. g. :
* use traditional fdisk with DOS-MBR style partitioning on systems that supported it
* use GPT-style partitioning on systems that required it (like huge drives or EFI systems)
As far as I can tell, the CentOS installer is doing something similar, but "automagically". Please correct me if I'm wrong.
Cheers,
Niki
On Oct 7, 2018, at 4:49 AM, Nicolas Kovacs info@microlinux.fr wrote:
- use traditional fdisk with DOS-MBR style partitioning on systems that
supported it
Unless you only need 4 or fewer partitions and are using 2TB or smaller disks, I can’t see any good reason to use MBR on desktop, laptop, or server systems these days.
(MBR does still have some well-justified use in the embedded world, removable media, etc.)
As far as I can tell, the CentOS installer is doing something similar, but "automagically". Please correct me if I'm wrong.
I believe the primary criteria the CentOS installer uses is that it checks whether it was booted via EFI or BIOS. If EFI, it assumes it must use GPT partitioning to get a bootable system.
Obviously if you’re installing onto a > 2TB disk or drive array, it also uses GPT.
You can tell which case you’ve fallen into by doing manual partitioning in the installer and then seeing whether the installer offers you the option of creating a “biosboot” partition or /boot/efi.
On Oct 7, 2018, at 4:09 AM, Nicolas Kovacs info@microlinux.fr wrote:
How "experimental" (e. g. prone to blow up in my face) is fdisk really? So far, I've only used it for MBR-style partitioning.
I have no idea. In fact, before your post, I had no idea fdisk even had GPT awareness.
I’m replying because you have a third option besides fdisk and gdisk, which should be present on a minimal install, and which is extremely well-tested for the GPT case: parted.
On 10/07/2018 03:09 AM, Nicolas Kovacs wrote:
use this to handle GTP partitioning. But I'm curious. How "experimental" (e. g. prone to blow up in my face) is fdisk really? So far, I've only used it for MBR-style partitioning.
I always use fdisk for CentOS 7 and do manual partitioning, because I align all partition at 4 MiB (in order to align them to SSD/NVMe's erase block size). All my CentOS machines have GPT. Haven't seen any issues so far.
Not trying to prove anything. That's just my personal experience.