LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What does the 't' command in cfdisk do? (https://www.linuxquestions.org/questions/linux-software-2/what-does-the-t-command-in-cfdisk-do-4175427430/)

zwitterion-241920 09-15-2012 04:27 PM

What does the 't' command in cfdisk do?
 
In the cfdisk man page I found the following:
Quote:

Change the filesystem type. By default, new partitions are cre-
ated as Linux partitions, but since cfdisk can create partitions
for other operating systems, change partition type allows you to
enter the hex value of the filesystem you desire. A list of the
know filesystem types is displayed. You can type in the
filesystem type at the prompt or accept the default filesystem
type [Linux].
I know that cfdisk does not create any filesystems (you need mkfs for that), I googled around a bit and at hackipedia.org/Software/GNU/pdf,%20fdisk/cfdisk.pdf I found this:
Quote:

Changes the system type on the partition. This does not convert the filesystem,
it just changes the information stored in the partition. This is useful for cases
where the system type on the partition doesn’t match the filesystem type, for
example you have an fat32 partition on an DOS type partition table, having an
ext2 filesystem on it. Changing the system type is not really meaningful on all
partition table types. The default is to automatically determine the system type
from the current filesystem with ‘a’. You can also select a custom filesystem
by pressing ‘c’, but this is not recommended. Direct choosing a specific system
type is not supported.
So when I change the type, some data is changed, but which data and what does this do?

acid_kewpie 09-15-2012 04:51 PM

it's just the partition type in the partition table. This is *NOT* the filesystem whatsoever. it's only a flag in the partition table, and that flag is usually ignored by most systems, which will generally read the first few bytes of each filesystem to definitely know what it is rather than relying on potentially inconsistent data.

zwitterion-241920 09-15-2012 05:54 PM

That must be the System-ID byte (http://wiki.osdev.org/Partition_Tabl...System_ID_byte, http://www.win.tue.nl/~aeb/partition...n_types-1.html)!
Thank you, acid_kewpie.


All times are GMT -5. The time now is 06:21 AM.