SFDISK(8) SFDISK(8) sfdisk - sfdisk [] [-N _] sfdisk [] sfdisk -- - . , (stdin ). 2.26, sfdisk MBR (DOS), GPT, SUN SGI, CHS (Cylinder-Head-Sector --). CHS Linux, . sfdisk . --wipe always . , fdisk(8) cfdisk(8) . sfdisk ( 2.26), , - , ( ) . ( ), , , . , , ( ). sfdisk - (, - , ). (, ), . sfdisk - . sfdisk SGI SUN, fdisk(8). , . sfdisk BLKRRPART ioctl ( ) , ( --no-reread). , sfdisk systemd-udevd(8). --lock. , systemd-udevd . sfdisk , , ( -N), . . [-N, --partno partition-number] device sfdisk , . . , sfdisk . If the option -N or --partno is specified, then the changes are applied to the partition addressed by partition-number. The unspecified fields of the partition are not modified. , -N. , MBR 4 , . sfdisk , -N. . --append. -A, --activate [_...] . , \(aq-\(aq, . MBR PMBR. GPT, sfdisk PMBR. -, <>. --backup-pt-sectors . << >>. --delete [_...] . -d, --dump , sfdisk. . . -g, --show-geometry [...] . --show-pt-geometry , . -J, --json JSON. , sfdisk JSON. -l, --list [...] . --verify. -F, --list-free [...] . --part-attrs _ [] GPT. , . , . , "RequiredPartition,50,51" . : 0 (RequiredPartition) , . , . , , . 1 (NoBlockIOProtocol) EFI . 2 (LegacyBIOSBootable) BIOS. 3-47 , . UEFI. 48-63 GUID. . , Microsoft 60 , 61 , 62 , 63 . --part-label - [] GPT (). , . --part-type - [] . , . MBR, GUID for GPT, ( "linux") ( 'L'). -c --id , . --part-uuid - [uuid] UUID GPT () uuid , UUID . --disk-id [] . , . UUID GPT MBR. --discard-free ( ) . --list-free, . . blkdiscard(8). Warning ! , . , <> fdisk , . , sfdisk ( , , ). -r, --reorder , . -s, --show-size [...] 1024 . . blockdev(8). -T, --list-types , --label. -V, --verify [...] , . --relocate . GPT. : gpt-bak-std GPT . gpt-bak-mini GPT . , UEFI , , , . -a, --append , . Note that in this case an unused partition may be re-used even though it is not the last partition in the partition table. See also -N for addressing a specific entry in the partition table. -b, --backup . ~/sfdisk--.bak; , -O, --backup-file. . , . --bytes Print SIZE in bytes rather than in human readable format. --color[=] . auto, never always. , auto. . --help. . . -f, --force . --Linux . , Linux ( ). --lock[=] Use an exclusive BSD lock for the device or file that is operated upon. The optional argument mode can be yes (1), no (0), or nonblock. If the mode argument is omitted, it defaults to yes. This option overrides the environment variable $LOCK_BLOCK_DEVICE. The default is to not use any lock at all, but using a lock is recommended to avoid collisions with systemd-udevd(8) or other tools. -n, --no-act , . --no-reread ioctl , . --no-tell-kernel . --no-reread . ( ). -O, --backup-file . , . --move-data[=] , , . , . -N . ' - . <<@default>>, , B ~/sfdisk-<->.move . ', 2.35. , . ! . --move-use-fsync. 100 ( ), . ( 2048), , ( sdc1 sdc2). echo '+100M,' | sfdisk --move-data /dev/sdc -N 1 echo '2048,' | sfdisk /dev/sdc --append sfdisk /dev/sdc --reorder --move-use-fsync fsync(2) --move-data. -o, --output , . --help, . , + (, -o +UUID) -q, --quiet . --sector-size - . 512, 1024, 2048 4096. . , . util-linux-2.17, fdisk . -. -u, --unit S . <<>>. , --show-size. -X, --label Specify the disk-label type (e.g., dos, gpt, ...). If this option is not given, then sfdisk defaults to the type of the existing label, but if there is no label on the device yet, then the type defaults to dos. This default may be overridden by the "label: " script-header line. The option --label does not force sfdisk to create an empty disk label (see the EMPTY DISK LABEL section below). -Y, --label-nested . . , , / MBR GPT. -w, --wipe , RAID auto, never always. , auto, , ; , , never. auto ( ), always . , . . wipefs(). -W, --wipe-partitions , RAID , . auto, never always. , auto, , . . . wipefs(8). -h, --help . -v, --version . sfdisk . ' , . : <>: <> : unit . sectors (). label . : dos gpt. label-id . ( 0x) MBR UUID GPT. first-lba GPT. , . sfdisk . last-lba GPT. , . sfdisk . last-lba , --force, . table-length GPT. grain , . 1 , . , . sector-size , . sfdisk , , , (. --sector-size). 2.39 sfdisk , sector-size . , , . . , () , ; . , ; . , '-', . -N ( ), . ' , - . 1 . (KiB, MiB, GiB, TiB, PiB, EiB, ZiB YiB), . v2.38, -N ( ), '+' , . << >>; , . . , - (KiB, MiB, GiB, TiB, PiB, EiB, ZiB YiB), - . '+'. . , '+' ; , . MBR (DOS), x '; GUID GPT; . MBR, 'E' MBR '0E'. sfdisk , ( --part-type) . v2.36, libfdisk , . ( "linux"). 2.37, libfdisk - ( "Linux /usr x86" , "linux usr-x86"). : L - 'linux' Linux; 83 MBR 0FC63DAF-8483-4772-8E79-3D69D8477DE4 GPT. S - 'swap' ' ; 82 MBR 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F GPT Ex - 'extended' MBR; 05 MBR. <> MBR 0x0E. H - 'home' ; 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 GPT U - <> EFI, EF MBR C12A7328-F81F-11D2-BA4B-00A0C93EC93B GPT R - <> Linux RAID; FD MBR A19D880F-05FC-4D3B-A006-743F0F84911E for GPT V - <> LVM; 8E MBR E6D6D379-F507-44C2-A23C-238F2A3DF928 for GPT linux. <> Linux (85) , <>. [*|-]. , . Linux -- Linux, , -- . , ( UUID). , . [ :] [=], ... '. sfdisk . . , , --dump. , . (, name="This is partition name") start= size= '+' '-', , . : start= ' , - . 1 . (KiB, MiB, GiB, TiB, PiB, EiB, ZiB YiB), . size= . (KiB, MiB, GiB, TiB, PiB, EiB, ZiB YiB). - . bootable . attrs= , , GPT. . --part-attrs, GPT. uuid= UUID GPT. name= GPT. type= ( 0x) MBR, GUID GPT, (, type="Linux /usr (x86)"). . , . Id= . , sfdisk . , . "label: <>" - . : echo 'label: gpt' | sfdisk /dev/sdb GPT. , --append . . sfdisk . sfdisk --dump . sfdisk. : sfdisk --dump /dev/sda > sda.dump : sfdisk /dev/sda < sda.dump , sfdisk UUID . , , , , UUID . , , --backup-pt-sectors. ~/sfdisk-<>-<>.bak. --backup-file. . : sfdisk --backup-pt-sectors /dev/sda GPT : dd if=~/sfdisk-sda-0x00000200.bak of=/dev/sda seek=$((0x00000200)) bs=1 conv=notrunc --backup sfdisk. , : sfdisk --backup --delete /dev/sda wipefs(8). , sfdisk, 2.26, -I . dd(1). terminal-colors.d(5). /etc/terminal-colors.d/{}.disable {} /etc/terminal-colors.d/disable 2.41, $NO_COLOR , . $XDG_CONFIG_HOME/terminal-colors.d $HOME/.config/terminal-colors.d . , terminal-colors.d . , sfdisk, : header . warn . welcome . SFDISK_DEBUG=all sfdisk. LIBFDISK_DEBUG=all libfdisk. LIBBLKID_DEBUG=all, LIBSMARTCOLS_DEBUG=all libsmartcols. LIBSMARTCOLS_DEBUG_PADDING=on . libblkid. LOCK_BLOCK_DEVICE=<> BSD. <<1>> <<0>>. . --lock, . 2.26, sfdisk -R --re-read . blockdev --rereadpt. 2.26, sfdisk --DOS, --IBM, --DOS-extended, --unhide, --show-extended, --cylinders, --heads, --sectors, --inside-outer, --not-inside-outer. sfdisk --list --label-nested=mbr /dev/sda MBR GPT. echo -e ',10M,L\n,10M,L\n,+,\n' | sfdisk /dev/sdc Linux , 10 , . echo -e 'size=10M, type=L\n size=10M, type=L\n size=+\n' | sfdisk /dev/sdc , , . echo -e 'type=swap' | sfdisk -N 3 /dev/sdc <>. sfdisk --part-type /dev/sdc 3 swap , , . sfdisk --delete /dev/sdc 2 . echo "+,+" | sfdisk -N 3 --move-data /dev/sdc , , , . Karel Zak sfdisk sfdisk, Andries E. Brouwer. fdisk(8), cfdisk(8), parted(8), partprobe(8), partx(8) sfdisk util-linux, Linux . util-linux 2.42.2 2026-06-16 SFDISK(8)