:: Re: [DNG] Partitionins; philsophica…
Top Page
Delete this message
Reply to this message
Author: Haines Brown
Date:  
To: dng
Subject: Re: [DNG] Partitionins; philsophical question
On Tue, Mar 24, 2026 at 01:10:25PM +0100, Antony Stone wrote:
> On Sunday 22 March 2026 at 19:34:25, Haines Brown via Dng wrote:
>
> > Years ago when I partitioned, I was very careful to specify the
> > partition type for each partition. For example, /root was 8303,
> > /boot was 8300, /usr was 8314, /var was 8310.
>
> a) what do each of these numbers mean?


I've done soem digging, for which see below.

> b) whwre di you get them from?


Some years with a Devuan or more likely a Debian installationl,
the L command for fdisk would list the codes for partition types.
To day it is default except for EFi and swap space.

I find that the partition type is a hex number. For example,
swap space hes is 0x8200 in gdisk, and this is simplified to just
the last four digiits: 8200. EFI is ef00.

Digging came up with this:

Partition type codes (also called "partition IDs" or "partition
types") are metadata tags embedded in the partition table (either
MBR or GPT) that tell the operating system the intended use of a
partition—for example, whether it’s an EFI system partition, a
Linux root filesystem, or a swap space.

While partition type codes are distinct from the filesystem type
(e.g., ext4, xfs, or vfat), they work hand-in-hand: the type code
hints at the purpose of the partition, and the filesystem type
defines how data is stored on it. For instance, an "EFI System"
partition type code is almost always formatted with the vfat
filesystem.

> c) do they have any effect of the file system which you then
> format into the partition?


Apparently so, as the EFI type illusrates.

> > My question is, does the "defaults" option offered by fdisk
> > automatically assign the type? Is the type important. Is it
> > impotant?


I now infer that the defaults for a /usr partition means it has
the type 8314, which tells the kernel how date is stored in a
/usr partition.

Fof comlete list of hex codes see:
https://unix.stackexchange.com/questions/617709/linux-various-partition-type-codes-u

--

Haines Brown