0

Here is my problem.

Our operating system is Debian 11. The main hard disk is doing fine. I have a 6TB external volume. If I choose to use parted to format this disk it will entail recompiling the Debian 11 kernel with CONFIG_EFI_PARTITION enabled as mentioned here

We are not allowed to recompile the kernel.

My query is : May I use fdisk to parition the 6TB disk into 3 2TB partitions ? Will that still need recompilation of the kernel?

1 Answers1

2

You have misunderstood that article (and it contains some false information).

The limit about the 2TB comes from the partition table, not the Linux kernel.

msdos partition tables allow a maximum of 2 TB. Recompiling the kernel will not change that. To use larger partitions you must use GPT partition tables.

15 years ago, when it was not widely used, you had to recompile the kernel to activate GPT support. Nowadays every Linux distribution supports it out of the box, no recompilation necessary.

$ sudo fdisk /dev/sdb

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
The size of this disk is 6 TiB (6597069766656 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).

Created a new DOS disklabel with disk identifier 0xfe370791.

Command (m for help): g
Created a new GPT disklabel (GUID: DBB9DB85-EC26-7C40-9A4F-3C3989F7F4D0).

Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-12884901854, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-12884901854, default 12884901854):

Created a new partition 1 of type 'Linux filesystem' and of size 6 TiB.
Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
  • The above mentioned link said : `You must include GPT support in the kernel to use GPT. ` That is why I wanted to use MBR. Do I misunderstand? – user2338823 May 26 '23 at 09:47
  • Chances that your kernel does not already include it are next to zero. Just try it. – Gerald Schneider May 26 '23 at 09:48
  • The article you linked also says: `Please note that almost all new kernel and latest distro supports GPT` – Gerald Schneider May 26 '23 at 09:49
  • There is a comment from 2009 (!) on that article: `Since recent versions of Ubuntu and Debian have CONFIG_EFI_PARTITION compiled into their stock kernels, you should remove the part about having to recompile the kernel so that readers don’t needlessly recompile their kernels.` – Gerald Schneider May 26 '23 at 09:50
  • If GPT support does not need recompiling the kernel ***and*** is going to be used with fdisk also, can I not simply use `parted` to make a 6TB partition directly ? Would that work without recompiliing the kernel ? – user2338823 May 26 '23 at 09:56
  • Of course. It doesn't matter what tool you use. – Gerald Schneider May 26 '23 at 09:57