IT 공부내용 정리/Linux

터미널 명령어 - fdisk 디스크의 파티션을 관리할 때

따뜻한 차가움 2025. 3. 21. 14:00

사용 버전 : Linux 우분투(레드햇 계열) 24.04.01 LTS 버전
사용한 시스템 지역/언어 : 대한민국/한글

man fdisk 원문

더보기

FDISK(8)                     System Administration                    FDISK(8)

NAME
       fdisk - manipulate disk partition table

SYNOPSIS
       fdisk [options] device

       fdisk -l [device...]

DESCRIPTION
       fdisk is a dialog-driven program for creation and manipulation of
       partition tables. It understands GPT, MBR, Sun, SGI and BSD partition
       tables.

       Block devices can be divided into one or more logical disks called
       partitions. This division is recorded in the partition table, usually
       found in sector 0 of the disk. (In the BSD world one talks about `disk
       slices' and a `disklabel'.)

       All partitioning is driven by device I/O limits (the topology) by
       default. fdisk is able to optimize the disk layout for a 4K-sector size
       and use an alignment offset on modern devices for MBR and GPT. It is
       always a good idea to follow fdisk's defaults as the default values
       (e.g., first and last partition sectors) and partition sizes specified
       by the +/-<size>{M,G,...} notation are always aligned according to the
       device properties.

       CHS (Cylinder-Head-Sector) addressing is deprecated and not used by
       default. Please, do not follow old articles and recommendations with
       fdisk -S <n> -H <n> advices for SSD or 4K-sector devices.

       Note that partx(8) provides a rich interface for scripts to print disk
       layouts, fdisk is mostly designed for humans. Backward compatibility in
       the output of fdisk is not guaranteed. The input (the commands) should
       always be backward compatible.

OPTIONS
       -b, --sector-size sectorsize
           Specify the sector size of the disk. Valid values are 512, 1024,
           2048, and 4096. (Recent kernels know the sector size. Use this
           option only on old kernels or to override the kernel’s ideas.)
           Since util-linux-2.17, fdisk differentiates between logical and
           physical sector size. This option changes both sector sizes to
           sectorsize.

       -B, --protect-boot
           Don’t erase the beginning of the first disk sector when creating a
           new disk label. This feature is supported for GPT and MBR.

       -c, --compatibility[=mode]
           Specify the compatibility mode, 'dos' or 'nondos'. The default is
           non-DOS mode. For backward compatibility, it is possible to use the
           option without the mode argument — then the default is used. Note
           that the optional mode argument cannot be separated from the -c
           option by a space, the correct form is for example -c=dos.

       -h, --help
           Display help text and exit.

       -V, --version
           Print version and exit.

       -L, --color[=when]
           Colorize the output. The optional argument when can be auto, never
           or always. If the when argument is omitted, it defaults to auto.
           The colors can be disabled; for the current built-in default see
           the --help output. See also the COLORS section.

       -l, --list
           List the partition tables for the specified devices and then exit.

           If no devices are given, the devices mentioned in /proc/partitions
           (if this file exists) are used. Devices are always listed in the
           order in which they are specified on the command-line, or by the
           kernel listed in /proc/partitions.

       -x, --list-details
           Like --list, but provides more details.

       --lock[=mode]
           Use exclusive BSD lock for device or file it operates. The optional
           argument mode can be yes, no (or 1 and 0) or nonblock. If the mode
           argument is omitted, it defaults to yes. This option overwrites
           environment variable $LOCK_BLOCK_DEVICE. The default is not to use
           any lock at all, but it’s recommended to avoid collisions with
           systemd-udevd(8) or other tools.

       -n, --noauto-pt
           Don’t automatically create a default partition table on empty
           device. The partition table has to be explicitly created by user
           (by command like 'o', 'g', etc.).

       -o, --output list
           Specify which output columns to print. Use --help to get a list of
           all supported columns.

           The default list of columns may be extended if list is specified in
           the format +list (e.g., -o +UUID).

       -s, --getsz
           Print the size in 512-byte sectors of each given block device. This
           option is DEPRECATED in favour of blockdev(8).

       -t, --type type
           Enable support only for disklabels of the specified type, and
           disable support for all other types.

       -u, --units[=unit]
           When listing partition tables, show sizes in 'sectors' or in
           'cylinders'. The default is to show sizes in sectors. For backward
           compatibility, it is possible to use the option without the unit
           argument — then the default is used. Note that the optional unit
           argument cannot be separated from the -u option by a space, the
           correct form is for example '-u=cylinders'.

       -C, --cylinders number
           Specify the number of cylinders of the disk. I have no idea why
           anybody would want to do so.

       -H, --heads number
           Specify the number of heads of the disk. (Not the physical number,
           of course, but the number used for partition tables.) Reasonable
           values are 255 and 16.

       -S, --sectors number
           Specify the number of sectors per track of the disk. (Not the
           physical number, of course, but the number used for partition
           tables.) A reasonable value is 63.

       -w, --wipe when
           Wipe filesystem, RAID and partition-table signatures from the
           device, in order to avoid possible collisions. The argument when
           can be auto, never or always. When this option is not given, the
           default is auto, in which case signatures are wiped only when in
           interactive mode. In all cases detected signatures are reported by
           warning messages before a new partition table is created. See also
           wipefs(8) command.

       -W, --wipe-partitions when
           Wipe filesystem, RAID and partition-table signatures from a newly
           created partitions, in order to avoid possible collisions. The
           argument when can be auto, never or always. When this option is not
           given, the default is auto, in which case signatures are wiped only
           when in interactive mode and after confirmation by user. In all
           cases detected signatures are reported by warning messages before a
           new partition is created. See also wipefs(8) command.

       -V, --version
           Display version information and exit.

DEVICES
       The device is usually /dev/sda, /dev/sdb or so. A device name refers to
       the entire disk. Old systems without libata (a library used inside the
       Linux kernel to support ATA host controllers and devices) make a
       difference between IDE and SCSI disks. In such cases the device name
       will be /dev/hd* (IDE) or /dev/sd* (SCSI).

       The partition is a device name followed by a partition number. For
       example, /dev/sda1 is the first partition on the first hard disk in the
       system. See also Linux kernel documentation (the
       Documentation/admin-guide/devices.txt file).

SIZES
       The "last sector" dialog accepts partition size specified by number of
       sectors or by +/-<size>{K,B,M,G,...} notation.

       If the size is prefixed by '+' then it is interpreted as relative to
       the partition first sector. If the size is prefixed by '-' then it is
       interpreted as relative to the high limit (last available sector for
       the partition).

       In the case the size is specified in bytes than the number may be
       followed by the multiplicative suffixes KiB=1024, MiB=1024*1024, and so
       on for GiB, TiB, PiB, EiB, ZiB and YiB. The "iB" is optional, e.g., "K"
       has the same meaning as "KiB".

       The relative sizes are always aligned according to device I/O limits.
       The +/-<size>{K,B,M,G,...} notation is recommended.

       For backward compatibility fdisk also accepts the suffixes KB=1000,
       MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB. These 10^N
       suffixes are deprecated.

SCRIPT FILES
       fdisk allows reading (by 'I' command) sfdisk(8) compatible script
       files. The script is applied to in-memory partition table, and then it
       is possible to modify the partition table before you write it to the
       device.

       And vice-versa it is possible to write the current in-memory disk
       layout to the script file by command 'O'.

       The script files are compatible between cfdisk(8), sfdisk(8), fdisk and
       other libfdisk applications. For more details see sfdisk(8).

DISK LABELS
       GPT (GUID Partition Table)
           GPT is modern standard for the layout of the partition table. GPT
           uses 64-bit logical block addresses, checksums, UUIDs and names for
           partitions and an unlimited number of partitions (although the
           number of partitions is usually restricted to 128 in many
           partitioning tools).

           Note that the first sector is still reserved for a protective MBR
           in the GPT specification. It prevents MBR-only partitioning tools
           from mis-recognizing and overwriting GPT disks.

           GPT is always a better choice than MBR, especially on modern
           hardware with a UEFI boot loader.

       DOS-type (MBR)
           A DOS-type partition table can describe an unlimited number of
           partitions. In sector 0 there is room for the description of 4
           partitions (called `primary'). One of these may be an extended
           partition; this is a box holding logical partitions, with
           descriptors found in a linked list of sectors, each preceding the
           corresponding logical partitions. The four primary partitions,
           present or not, get numbers 1-4. Logical partitions are numbered
           starting from 5.

           In a DOS-type partition table the starting offset and the size of
           each partition is stored in two ways: as an absolute number of
           sectors (given in 32 bits), and as a Cylinders/Heads/Sectors triple
           (given in 10+8+6 bits). The former is OK — with 512-byte sectors
           this will work up to 2 TB. The latter has two problems. First,
           these C/H/S fields can be filled only when the number of heads and
           the number of sectors per track are known. And second, even if we
           know what these numbers should be, the 24 bits that are available
           do not suffice. DOS uses C/H/S only, Windows uses both, Linux never
           uses C/H/S. The C/H/S addressing is deprecated and may be
           unsupported in some later fdisk version.

           Please, read the DOS-mode section if you want DOS-compatible
           partitions. fdisk does not care about cylinder boundaries by
           default.

       BSD/Sun-type
           A BSD/Sun disklabel can describe 8 partitions, the third of which
           should be a `whole disk' partition. Do not start a partition that
           actually uses its first sector (like a swap partition) at cylinder
           0, since that will destroy the disklabel. Note that a BSD label is
           usually nested within a DOS partition.

       IRIX/SGI-type
           An IRIX/SGI disklabel can describe 16 partitions, the eleventh of
           which should be an entire `volume' partition, while the ninth
           should be labeled `volume header'. The volume header will also
           cover the partition table, i.e., it starts at block zero and
           extends by default over five cylinders. The remaining space in the
           volume header may be used by header directory entries. No
           partitions may overlap with the volume header. Also do not change
           its type or make some filesystem on it, since you will lose the
           partition table. Use this type of label only when working with
           Linux on IRIX/SGI machines or IRIX/SGI disks under Linux.

           A sync(2) and an ioctl(BLKRRPART) (rereading the partition table
           from disk) are performed before exiting when the partition table
           has been updated.

DOS MODE AND DOS 6.X WARNING
       Note that all this is deprecated. You don’t have to care about things
       like geometry and cylinders on modern operating systems. If you really
       want DOS-compatible partitioning then you have to enable DOS mode and
       cylinder units by using the '-c=dos -u=cylinders' fdisk command-line
       options.

       The DOS 6.x FORMAT command looks for some information in the first
       sector of the data area of the partition, and treats this information
       as more reliable than the information in the partition table. DOS
       FORMAT expects DOS FDISK to clear the first 512 bytes of the data area
       of a partition whenever a size change occurs. DOS FORMAT will look at
       this extra information even if the /U flag is given — we consider this
       a bug in DOS FORMAT and DOS FDISK.

       The bottom line is that if you use fdisk or cfdisk(8) to change the
       size of a DOS partition table entry, then you must also use dd(1) to
       zero the first 512 bytes of that partition before using DOS FORMAT to
       format the partition. For example, if you were using fdisk to make a
       DOS partition table entry for /dev/sda1, then (after exiting fdisk and
       rebooting Linux so that the partition table information is valid) you
       would use the command dd if=/dev/zero of=/dev/sda1 bs=512 count=1 to
       zero the first 512 bytes of the partition.

       fdisk usually obtains the disk geometry automatically. This is not
       necessarily the physical disk geometry (indeed, modern disks do not
       really have anything like a physical geometry, certainly not something
       that can be described in the simplistic Cylinders/Heads/Sectors form),
       but it is the disk geometry that MS-DOS uses for the partition table.

       Usually all goes well by default, and there are no problems if Linux is
       the only system on the disk. However, if the disk has to be shared with
       other operating systems, it is often a good idea to let an fdisk from
       another operating system make at least one partition. When Linux boots
       it looks at the partition table, and tries to deduce what (fake)
       geometry is required for good cooperation with other systems.

       Whenever a partition table is printed out in DOS mode, a consistency
       check is performed on the partition table entries. This check verifies
       that the physical and logical start and end points are identical, and
       that each partition starts and ends on a cylinder boundary (except for
       the first partition).

       Some versions of MS-DOS create a first partition which does not begin
       on a cylinder boundary, but on sector 2 of the first cylinder.
       Partitions beginning in cylinder 1 cannot begin on a cylinder boundary,
       but this is unlikely to cause difficulty unless you have OS/2 on your
       machine.

       For best results, you should always use an OS-specific partition table
       program. For example, you should make DOS partitions with the DOS FDISK
       program and Linux partitions with the Linux fdisk or Linux cfdisk(8)
       programs.

COLORS
       The output colorization is implemented by terminal-colors.d(5)
       functionality. Implicit coloring can be disabled by an empty file

          /etc/terminal-colors.d/fdisk.disable

       for the fdisk command or for all tools by

          /etc/terminal-colors.d/disable

       The user-specific $XDG_CONFIG_HOME/terminal-colors.d or
       $HOME/.config/terminal-colors.d overrides the global setting.

       Note that the output colorization may be enabled by default, and in
       this case terminal-colors.d directories do not have to exist yet.

       The logical color names supported by fdisk are:

       header
           The header of the output tables.

       help-title
           The help section titles.

       warn
           The warning messages.

       welcome
           The welcome message.

ENVIRONMENT
       FDISK_DEBUG=all
           enables fdisk debug output.

       LIBFDISK_DEBUG=all
           enables libfdisk debug output.

       LIBBLKID_DEBUG=all
           enables libblkid debug output.

       LIBSMARTCOLS_DEBUG=all
           enables libsmartcols debug output.

       LIBSMARTCOLS_DEBUG_PADDING=on
           use visible padding characters.

       LOCK_BLOCK_DEVICE=<mode>
           use exclusive BSD lock. The mode is "1" or "0". See --lock for more
           details.

AUTHORS
       Karel Zak <kzak@redhat.com>, Davidlohr Bueso <dave@gnu.org>

       The original version was written by Andries E. Brouwer, A. V. Le Blanc
       and others.

SEE ALSO
       cfdisk(8), mkfs(8), partx(8), sfdisk(8)

REPORTING BUGS
       For bug reports, use the issue tracker at
       https://github.com/util-linux/util-linux/issues.

AVAILABILITY
       The fdisk command is part of the util-linux package which can be
       downloaded from Linux Kernel Archive
       <https://www.kernel.org/pub/linux/utils/util-linux/>.

util-linux 2.39.3                 2023-10-23                          FDISK(8)

man fdisk 번역기 번역본

더보기

FDISK (8)      시스템 관리      FDISK (8)

이름
       FDISK- 디스크 파티션 테이블 조작

개요
       fdisk [옵션] 장치

fdisk -l [장치 ...]

설명
       FDISK는 생성 및 조작을위한 대화 중심 프로그램입니다.
       파티션 테이블. GPT, MBR, SUN, SGI 및 BSD 파티션을 이해합니다
       테이블.

블록 장치는 호출되는 하나 이상의 논리적 디스크로 나눌 수 있습니다.
       파티션. 이 부서는 일반적으로 파티션 테이블에 기록됩니다
       디스크의 섹터 0에서 발견됩니다. (BSD 세계에서는`디스크에 대해 이야기합니다
       슬라이스와 '디스크 라벨'.)

모든 분할은 장치 I/O 한계 (토폴로지)에 의해 주도됩니다.
       기본. FDISK는 4K 부문 크기의 디스크 레이아웃을 최적화 할 수 있습니다.
       MBR 및 GPT 용 최신 장치에서 정렬 오프셋을 사용하십시오. 그것은
       FDISK의 기본값을 기본값으로 따라가는 것이 좋습니다.
       (예 : 첫 번째 및 마지막 파티션 부문) 및 파티션 크기 지정
       +/- <size> {m, g, ...} 표기법은 항상
       장치 속성.

CHS (Cylinder-Head Sector) 주소 지정은 더 이상 사용되지 않으며 사용하지 않습니다
       기본. 오래된 기사와 권장 사항을 따르지 마십시오
       SSD 또는 4K 부문 장치에 대한 FDISK -S <N> -H <N> 조언.

Partx (8)는 스크립트가 디스크를 인쇄 할 수있는 풍부한 인터페이스를 제공합니다.
       레이아웃, FDISK는 주로 인간을 위해 설계되었습니다. 후진 호환성
       FDISK의 출력은 보장되지 않습니다. 입력 (명령)이 있어야합니다
       항상 뒤로 호환됩니다.

옵션
       -B, -sector-size sectorsize
           디스크의 섹터 크기를 지정하십시오. 유효한 값은 512, 1024입니다.
           2048 및 4096. (최근 커널은 섹터 크기를 알고 있습니다. 이것을 사용하십시오.
           오래된 커널에서만 옵션 또는 커널의 아이디어를 무시할 수 있습니다.)
           util-linux-2.17 이후, FDISK는 논리와와마다 차별화됩니다
           물리적 섹터 크기. 이 옵션은 두 섹터 크기를 모두 변경합니다
           섹션 크기.

-B, -Protect-Boot
           생성 할 때 첫 번째 디스크 섹터의 ​​시작을 지우지 마십시오.
           새로운 디스크 레이블. 이 기능은 GPT 및 MBR 용으로 지원됩니다.

-c, -호환성 [= 모드]
           호환성 모드 인 'dos'또는 'nondos'를 지정하십시오. 기본값은입니다
           비 DOS 모드. 뒤로 호환성을 위해서는 사용할 수 있습니다
           모드 인수가없는 옵션 - 기본값이 사용됩니다. 메모
           선택적 모드 인수는 -c에서 분리 될 수 없다는
           공간에 의한 옵션, 올바른 양식은 예를 들어 -c = dos입니다.

-h, -help
           도움말 텍스트와 종료를 표시합니다.

-v, -버전
           인쇄 버전 및 종료.

-l, -컬러 [= 언제]
           출력을 색칠하십시오. 자동이 될 수있는 경우 선택적 인수
           아니면 항상. 언제 인수가 생략되면, 기본값은 자동으로 나타납니다.
           색상은 비활성화 될 수 있습니다. 현재 내장 기본값은 참조하십시오
           -헬프 출력. 색상 섹션도 참조하십시오.

-L, --- 목록
           지정된 장치의 파티션 테이블을 나열한 다음 종료하십시오.

장치가 제공되지 않으면 /Proc /Partitions에 언급 된 장치
           (이 파일이 존재하는 경우) 사용됩니다. 장치는 항상 다음에 나열되어 있습니다
           명령 줄에 지정된 순서 또는
           /Proc /Partitions에 나열된 커널.

-x,-list-details
           -리스트와 마찬가지로 더 자세한 내용을 제공합니다.

-잠금 [= 모드]
           작동하는 장치 또는 파일에는 독점적 인 BSD 잠금을 사용하십시오. 선택 사항
           인수 모드는 예, 아니오 (또는 1 및 0) 또는 비 블록 일 수 있습니다. 모드 인 경우
           인수는 생략되며, 기본값은 예입니다. 이 옵션은 덮어 씁니다
           환경 변수 $ lock_block_device. 기본값은 사용하지 않습니다
           모든 자물쇠이지만 충돌을 피하는 것이 좋습니다.
           Systemd-udevd (8) 또는 기타 도구.

-n,-noauto-pt
           비어있는 기본 파티션 테이블을 자동으로 작성하지 마십시오
           장치. 파티션 테이블은 사용자가 명시 적으로 작성해야합니다.
           ( 'o', 'g'등과 같은 명령으로).

-O, -출력 목록
           인쇄 할 출력 열을 지정하십시오. -헬프를 사용하여 목록을 얻으십시오
           지원되는 모든 열.

목록이 지정된 경우 기본 열 목록이 확장 될 수 있습니다.
           형식 +목록 (예 : -o +uuid).

-s, -getsz
           주어진 각 블록 장치의 512 바이트 섹터로 크기를 인쇄하십시오. 이것
           옵션은 BlockDev (8)에 유리하게 사용되지 않습니다.

-t, -타입 유형
           지정된 유형의 디스크 라벨에 대해서만 지원을 활성화하고
           다른 모든 유형에 대한 지원을 비활성화합니다.

-u, -유닛 [= 단위]
           파티션 테이블을 나열 할 때 '부문'또는
           '실린더'. 기본값은 섹터에 크기를 표시하는 것입니다. 뒤로
           호환성, 장치없이 옵션을 사용할 수 있습니다.
           인수 - 그러면 기본값이 사용됩니다. 선택 단위입니다
           인수는 공간에 의해 -U 옵션과 분리 될 수 없습니다.
           올바른 형태는 예를 들어 '-u = 실린더'입니다.

-c, -실린더 번호
           디스크의 실린더 수를 지정하십시오. 나는 이유를 모른다
           누구든지 그렇게하고 싶을 것입니다.

-H, -헤드 번호
           디스크 헤드 수를 지정하십시오. (물리적 숫자가 아니라
           물론, 그러나 파티션 테이블에 사용되는 숫자.) 합리적
           값은 255 및 16입니다.

-s, -부문 번호
           디스크 트랙 당 섹터 수를 지정하십시오. (아닙니다
           물론 물리적 숫자이지만 파티션에 사용 된 숫자
           테이블.) 합리적인 값은 63입니다.

-w, -wipe 언제
           파일 시스템, RAID 및 파티션 테이블 서명을 닦으십시오
           가능한 충돌을 피하기 위해 장치. 언제 논쟁
           결코 또는 항상 또는 항상 자동이 될 수 있습니다. 이 옵션이 제공되지 않으면
           기본값은 자동이므로,이 경우 서명은
           대화식 모드. 모든 경우에 감지 된 서명은보고합니다
           경고 메시지 새 파티션 테이블이 생성되기 전에. 참조하십시오
           wipefs (8) 명령.

-w,--wipe- 파티션
           파일 시스템, RAID 및 파티션 테이블 서명을 새로 닦으십시오
           가능한 충돌을 피하기 위해 파티션을 만들었습니다. 그만큼
           자동이 될 수있는시기, 결코 또는 항상 또는 항상 논쟁. 이 옵션이 아닌 경우
           주어진, 기본값은 자동이며,이 경우 서명은 삭제됩니다.
           대화식 모드에 있고 사용자가 확인한 후. 대체로
           감지 된 서명은 경고 메시지로보고됩니다.
           새로운 파티션이 만들어졌습니다. Wipefs (8) 명령도 참조하십시오.

-v, -버전
           버전 정보 및 종료.

장치
       장치는 일반적으로 /dev /sda, /dev /sdb 정도입니다. 장치 이름은
       전체 디스크. libata가없는 오래된 시스템 (내부에 사용 된 라이브러리
       ATA 호스트 컨트롤러 및 장치를 지원하는 Linux 커널)
       IDE와 SCSI 디스크의 차이. 그러한 경우 장치 이름
       /dev /hd* (IDE) 또는 /dev /sd* (SCSI)입니다.

파티션은 장치 이름과 파티션 번호가 뒤 따릅니다. 을 위한
       예, /dev /sda1은 첫 번째 하드 디스크의 첫 번째 파티션입니다.
       체계. Linux 커널 문서 (The
       문서/admin-guide/device.txt 파일).

크기
       "마지막 섹터"대화 상자는
       섹터 또는 +/- <size> {k, b, m, g, ...} 표기법.

크기가 '+'에 의해 접두사가있는 경우
       파티션 제 1 부문. 크기가 '-'에 의해 접두사가 있으면
       높은 한도 (마지막으로 사용 가능한 부문
       파티션).

경우 크기가 숫자보다 바이트로 지정됩니다.
       곱셈 접미사 kib = 1024, mib = 1024*1024 등이 뒤 따릅니다
       gib, tib, pib, eib, zib 및 yib를 위해. "IB"는 선택 사항 (예 : "k"입니다.
       "kib"와 같은 의미가 있습니다.

상대 크기는 장치 I/O 한계에 따라 항상 정렬됩니다.
       +/- <size> {k, b, m, g, ...} 표기법이 권장됩니다.

후진 호환성의 경우 FDISK도 접미사 KB = 1000을 허용합니다.
       GB, TB, PB, EB, ZB 및 YB의 경우 MB = 1000*1000 등 이 10^n
       접미사는 더 이상 사용되지 않습니다.

스크립트 파일
       fdisk는 ( 'i'명령) sfdisk (8) 호환 스크립트를 읽을 수 있습니다
       파일. 스크립트는 메모리 파티션 테이블에 적용됩니다.
       파티션 테이블을 작성하기 전에 수정할 수 있습니다.
       장치.

그리고 그 반대로 현재 메모리 내 디스크를 작성할 수 있습니다.
       'o'명령으로 스크립트 파일에 레이아웃.

스크립트 파일은 CFDISK (8), SFDISK (8), FDISK 및
       다른 libfdisk 응용 프로그램. 자세한 내용은 sfdisk (8)를 참조하십시오.

디스크 레이블
       GPT (Guid Partition 테이블)
           GPT는 파티션 테이블의 레이아웃에 대한 최신 표준입니다. gpt
           64 비트 논리 블록 주소, 체크섬, UUID 및 이름을 사용합니다.
           파티션과 무제한의 파티션 (
           파티션의 수는 일반적으로 많은 경우 128로 제한됩니다.
           분할 도구).

첫 번째 부문은 여전히 ​​보호 MBR을 위해 예약되어 있습니다.
           GPT 사양에서. MBR 전용 파티셔닝 도구를 방지합니다
           GPT 디스크를 잘못 인식하고 덮어 쓰는 것.

GPT는 항상 MBR, 특히 현대에서 더 나은 선택입니다.
           UEFI 부트 로더가있는 하드웨어.

DOS 형 (MBR)
           DOS 형 파티션 테이블은 무제한 수의
           파티션. 섹터 0에는 4에 대한 설명을위한 공간이 있습니다.
           파티션 ( '기본'이라고 함). 이 중 하나는 확장 될 수 있습니다
           분할; 논리 파티션을 보유하는 상자입니다
           링크 된 부문 목록에서 발견 된 설명자, 각각
           해당 논리 파티션. 4 개의 주요 파티션,
           존재하든 아니든, 숫자 1-4를 얻으십시오. 논리 파티션은 번호가 매겨집니다
           5부터 시작합니다.

DOS 형 파티션 테이블에서 시작 오프셋 및 크기
           각 파티션은 두 가지 방식으로 저장됩니다. 절대 수로
           부문 (32 비트로 제공) 및 실린더/헤드/부문 트리플
           (10+8+6 비트로 제공). 전자는 512 바이트 부문이 있습니다
           이것은 최대 2TB까지 작동합니다. 후자에는 두 가지 문제가 있습니다. 첫 번째,
           이 C/H/S 필드는 헤드 수와
           트랙 당 부문의 수는 알려져 있습니다. 둘째, 우리가더라도
           이 숫자가 무엇인지 알 수 있습니다.
           충분하지 않습니다. DOS는 C/H/S 만 사용하고 Windows는 두 가지를 모두 사용합니다
           c/h/s를 사용합니다. C/H/S 주소 지정은 더 이상 사용되지 않으며 가능할 수 있습니다
           나중에 FDISK 버전으로 지원되지 않습니다.

DOS 호환을 원한다면 DOS 모드 섹션을 읽으십시오
           파티션. FDISK는 실린더 경계를 신경 쓰지 않습니다
           기본.

BSD/SUN 유형
           BSD/Sun Disklabel은 8 개의 파티션을 설명 할 수 있습니다.
           '전체 디스크'파티션이어야합니다. 파티션을 시작하지 마십시오
           실제로 실린더에서 첫 번째 섹터 (스왑 파티션과 같은)를 사용합니다.
           0, 그것은 디스크 라벨을 파괴하기 때문에. BSD 레이블은 다음과 같습니다
           일반적으로 DOS 파티션 내에 중첩됩니다.

IRIX/SGI 유형
           IRIX/SGI DISKLABEL은 16 개의 파티션을 설명 할 수 있습니다.
           전체 '볼륨'파티션이어야하며 9 번째
           '볼륨 헤더'라는 레이블이 지정되어 있어야합니다. 볼륨 헤더도 있습니다
           파티션 테이블을 덮고 있습니다. 즉, 블록 0에서 시작하고
           기본적으로 5 개의 실린더 이상으로 연장됩니다. 나머지 공간
           볼륨 헤더는 헤더 디렉토리 항목에서 사용할 수 있습니다. 아니요
           파티션은 볼륨 헤더와 겹칠 수 있습니다. 또한 변하지 않습니다
           당신은 그것을 잃을 것이기 때문에 그것의 유형 또는 파일 시스템을 만들었습니다.
           파티션 테이블. 작업 할 때만이 유형의 레이블을 사용하십시오
           Linux/SGI 머신의 Linux 또는 Linux에서 IRIX/SGI 디스크.

동기화 (2) 및 IOCTL (blkrrpart) (파티션 테이블을 다시 읽음
           파티션 테이블시기에 종료하기 전에 디스크에서)가 수행됩니다.
           업데이트되었습니다.

DOS 모드 및 DOS 6.X 경고
       이 모든 것이 더 이상 사용되지 않습니다. 당신은 사물을 신경 쓰지 않아도됩니다
       현대 운영 체제의 기하학 및 실린더처럼. 당신이 정말로
       DOS 호환 파티션을 원한다면 DOS 모드를 활성화하고
       '-c = dos -u = cylinders'fdisk 명령 줄을 사용하여 실린더 장치
       옵션.

DOS 6.X 형식 명령은 첫 번째 정보를 찾습니다.
       파티션의 데이터 영역의 부문 과이 정보를 처리합니다.
       파티션 테이블의 정보보다 더 신뢰할 수 있습니다. 도스
       형식은 dos fdisk가 데이터 영역의 첫 512 바이트를 지울 것으로 기대합니다.
       크기 변경이 발생할 때마다 파티션의. DOS 형식이 보입니다
       이 추가 정보는 /u 플래그가 주어 지더라도 - 우리는 이것을 고려합니다.
       DOS 형식 및 DOS FDISK의 버그.

결론은 fdisk 또는 cfdisk (8)를 사용하여
       DOS 파티션 테이블 항목의 크기, 그러면 DD (1)를 사용해야합니다.
       DOS 형식을 사용하기 전에 해당 파티션의 처음 512 바이트를 0
       파티션 형식. 예를 들어, FDISK를 사용하여
       /dev /sda1에 대한 DOS 파티션 테이블 항목 (FDISK를 종료 한 후
       파티션 테이블 정보가 유효하도록 Linux를 재부팅하면
       dd 명령 dd if =/dev/Zero of =/dev/sda1 bs = 512 count = 1 ~를 사용합니다.
       파티션의 처음 512 바이트를 제로하십시오.

FDISK는 일반적으로 디스크 형상을 자동으로 얻습니다. 이것은 아닙니다
       필수 물리 디스크 형상 (실제로 현대 디스크는 그렇지 않습니다.
       실제로 물리적 형상과 같은 것이 있습니다.
       그것은 단순한 실린더/헤드/섹터 양식에 설명 될 수 있습니다),
       그러나 MS-DOS가 파티션 테이블에 사용하는 디스크 형상입니다.

일반적으로 모든 것이 기본적으로 잘 진행되며 Linux가있는 경우 문제가 없습니다.
       디스크의 유일한 시스템. 그러나 디스크를 공유 해야하는 경우
       다른 운영 체제, 종종 fdisk를
       다른 운영 체제는 적어도 하나의 파티션을 만듭니다. Linux 부츠
       파티션 테이블을보고 무엇을 추론하려고합니다 (가짜)
       다른 시스템과의 좋은 협력을 위해서는 형상이 필요합니다.

파티션 테이블이 DOS 모드로 인쇄 될 때마다 일관성
       파티션 테이블 항목에서 확인이 수행됩니다. 이 점검이 확인됩니다
       물리적, 논리적 시작과 종말점이 동일하고
       각 파티션이 실린더 경계에서 시작하고 끝나는 (
       첫 번째 파티션).

일부 버전의 MS-DOS는 시작되지 않는 첫 번째 파티션을 만듭니다.
       실린더 경계에서는 첫 번째 실린더의 섹터 2에 있습니다.
       실린더 1에서 시작하는 파티션은 실린더 경계에서 시작할 수 없습니다.
       그러나 이것은 당신이 당신의 OS/2가 없다면
       기계.

최상의 결과를 얻으려면 항상 OS 특이 적 파티션 테이블을 사용해야합니다.
       프로그램. 예를 들어 DOS FDISK로 DOS 파티션을 만들어야합니다.
       Linux FDISK 또는 Linux CFDISK와 함께 프로그램 및 Linux 파티션 (8)
       프로그램.

그림 물감
       출력 색상화는 터미널 컬러에 의해 구현됩니다 .D (5)
       기능. 빈 파일로 암시 적 색칠을 비활성화 할 수 있습니다

/etc/terminal-colors.d/fdisk.disable

FDISK 명령 또는 모든 도구의 경우

/etc/terminal-colors.d/disable

사용자 별 $ XDG_CONFIG_HOME/TERMINAL-COLORS.D 또는
       $ home/.config/Terminal-Colors.d는 전역 설정을 무시합니다.

출력 색상화는 기본적으로 그리고
       이 사례 터미널 색상 .D 디렉토리는 아직 존재할 필요가 없습니다.

FDISK에서 지원하는 논리적 색상 이름은 다음과 같습니다.

헤더
           출력 테이블의 헤더.

도움말
           도움말 섹션 제목.

경고하다
           경고 메시지.

환영
           환영 메시지.

환경
       fdisk_debug = 모두
           FDISK 디버그 출력을 활성화합니다.

libfdisk_debug = 모두
           libfdisk 디버그 출력을 활성화합니다.

libblkid_debug = 모두
           libblkid 디버그 출력을 활성화합니다.

libsmartcols_debug = 모두
           libsmartcols 디버그 출력을 활성화합니다.

libsmartcols_debug_padding = on
           보이는 패딩 문자를 사용하십시오.

lock_block_device = <dode>
           독점적 인 BSD 잠금을 사용하십시오. 모드는 "1"또는 "0"입니다. 자세한 내용은 잠금을 참조하십시오
           세부.

저자
       Karel Zak Zak <kzak@redhat.com>, Davidlohr bueso <dave@gnu.org>

원본 버전은 Andries E. Brouwer, A. V. Le Blanc에 의해 작성되었습니다.
       그리고 다른 사람들.

참조하십시오
       Cfdisk (8), MKFS (8), Partx (8), SFDISK (8)

보고 버그
       버그 보고서는 문제 추적기를 사용하십시오
       https://github.com/util-linux/util-linux/issues.

유효성
       fdisk 명령은 Util-Linux 패키지의 일부입니다.
       Linux 커널 아카이브에서 다운로드했습니다
       <https://www.kernel.org/pub/linux/utils/util-linux/>.

Util-Linux 2.39.3 2023-10-23 FDISK (8)

형태와 기능

1) fdisk [옵션] [장치] : [장치]를 옵션에 맞게 조작한다.

2) fdisk -l [장치] : [장치]에 대한 파티션 정보를 출력한다.

[장치]가 입력되지 않으면 리눅스에 있는 모든 장치에 대해 파티션 정보를 출력한다.

3) fdisk [장치] : [장치]의 파티션을 편집할 수 있는 창을 띄운다.

 

3의 형태에서 가장 아랫줄에 Command (m for help): 라는 부분이 나오게 되는데 말 그대로 m키를 누르고 엔터를 입력하면 설명을 볼 수 있다.

 

해당 도움말

더보기

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty MBR (DOS) partition table
   s   create a new empty Sun partition table

도움말 번역기 번역본

더보기

도움말:

DOS(MBR)
a 부팅 가능 플래그 토글
b 중첩된 BSD 디스크 레이블 편집
c DOS 호환성 플래그 토글

일반
d 파티션 삭제
F 빈 분할되지 않은 공간 나열
l 알려진 파티션 유형 나열
n 새 파티션 추가
p 파티션 테이블 인쇄
t 파티션 유형 변경
v 파티션 테이블 확인
i 파티션에 대한 정보 인쇄

기타
m 이 메뉴 인쇄
u 디스플레이/입력 단위 변경
x 추가 기능(전문가 전용)

스크립트
I sfdisk 스크립트 파일에서 디스크 레이아웃 로드
O sfdisk 스크립트 파일에 디스크 레이아웃 덤프

저장 및 종료
w 디스크에 테이블 쓰기 및 종료
q 변경 사항 저장 없이 종료

새 레이블 만들기
g 새 빈 GPT 파티션 테이블 만들기
G 새 빈 SGI(IRIX) 파티션 테이블 만들기
o 새 빈 MBR(DOS) 파티션 테이블 만들기
s 새 빈 Sun 파티션 테이블 만들기

 

일반적으로 사용할 부분은 일반 항목과 저장 및 종료의 항목을 사용하게 될 것이다.

 

예시)

/dev/sda 라는 장치가 있다고 하면

이 장치에 대해서 정보를 얻기 위해 fdisk -l /dev/sda 를 사용한다.

 

그러면 해당 장치와 해당 Disk(장치)에 있는 Device(파티션)을 알려주는데

파티션 번호에 따라서 1,2,3,4 등의 숫자가 붙는다

여기서 우리가 저장소로 활용하는 방법은 "장치 이름 + 파티션의 번호"를 이용하는 것이다.

즉 /dev/sda3은 /dev/sda 장치의 3번째 파티션 이라는 의미를 가진다.

 

만약 Device에 대한 내용이 없다면 해당 장치는 별도의 파티션이 없다는 것으로 저장소를 생성해줘야 한다.

그럴 때는 3번 형태를 이용해서 장치에 접속 후 n을 눌러 새로운 파티션을 생성해주면 된다.

값을 입력하라는 내용들이 나오는데 잘 모른다면 일단 모두 엔터를 눌러도 좋다.

왜냐면 장치의 모든 용량을 1개의 파티션으로 만들어 주는 세팅이기 때문이다.

아무 값도 입력하지 않고 엔터를 누르면 defult 값이 입력된다.

 

이후 저장하고 나가야하는데 w를 입력해야 한다. q를 입력하면 아무런 변화가 생기지 않는다.

 

이후 파일 시스템까지 만들어주면 해당 장치에 대한 저장소 세팅이 끝나게 된다.