fdisk
在MS-DOS上fdisk的截屏 | |
| 開發者 | Robert Baron, IBM, Microsoft, Digital Research, Datalight, Novell, Brian E. Reifsnyder |
|---|---|
| 首次發布 | 1983年, 41–42年前 |
| 操作系統 | MS-DOS, PC DOS, FlexOS, SISNE plus, OS/2, eComStation, ArcaOS, Windows, DR-DOS, ROM-DOS, FreeDOS, PTS-DOS, *BSD,[1] SysV |
| 類型 | 命令 |
| 許可協議 | MS-DOS, PC DOS, FlexOS, OS/2, Windows, DR DOS, ROM-DOS, PTS-DOS: 專有軟件 商業軟件 FreeDOS: GPLv2 |
fdisk是一個用於磁盤分區的命令行工具。它已經成為一些操作系統的一部分,包括DOS、舊版本的Windows、某些FreeBSD的移植版和macOS。Windows 2000和之後的版本已將fdisk替換為更高級的工具diskpart。
實現
[編輯]DOS
[編輯]1983年3月,fdisk (Fixed Disk Setup Program)隨着IBM PC XT和IBM PC DOS 2.0發布。 fdisk v1.0可以創建一個FAT12分區,刪除它,改變活動分區,或顯示分區數據。fdisk可以寫入支持最多四個分區的MBR。另外三個分區用於其他操作系統,例如CP/M-86和Xenix,這些操作系統有它們自己的分區工具。
微軟在MS-DOS v3.2中第一次添加了fdisk,[2]MS-DOS v2.0到v3.10包含了OEM特定的分區工具,可能名為fdisk。
為了更高效地利用大容量硬盤,發布於1984年8月的PC DOS 3.0開始支持FAT16。發布於1987年4月的PC DOS 3.30開始支持擴展分區(不直接存儲數據,但可以包含最多23個邏輯卷的分區)。在這兩種情況下,fdisk都被修改過,以支持FAT16和擴展分區。MS-DOS 3.31中,Compaq的fdisk第一次支持FAT16B。FAT16B隨後在MS-DOS和PC DOS 4.0中可用。
fdisk中沒有文檔的/mbr開關,可以修復MBR,使得這個工具很快流行起來。
IBM PC DOS 7.10配備了新的fdisk32工具。
ROM-DOS[3]、DR DOS 6.0[4]、FlexOS[5]、PTS-DOS 2000 Pro[6]和FreeDOS[7]都包含了fdisk命令的一個實現。
Windows
[編輯]
Windows 95、Windows 98和Windows ME附帶MS-DOS的衍生版fdisk。然而,Windows 2000和以後的版本附帶了更先進的diskpart和圖形化的磁盤管理工具。
從Windows 95 OSR2開始,fdisk支持FAT32文件系統。[8]
Windows 95附帶的fdisk不能顯示大於64GB硬盤的正確大小。新版的fdisk修復了此問題。[9]另外,fdisk不能創建大於512GB的分區,即使FAT32支持最大2TB的分區。Windows 95 OSR 2.1、Windows 98和Windows ME上所有版本的fdisk都有這個限制。
IBM OS/2
[編輯]4.0版本前的OS/2附帶了兩個分區管理工具。一個是文本模式的fdisk[10],另一個是圖形化的fdiskpm。[11]這兩個工具的功能相同,可以操作FAT和更先進的HPFS分區。
4.5或更高版本的OS/2(包括eComStation和ArcaOS)可以使用JFS文件系統。在這些系統中,fdisk被邏輯捲軸管理員(LVM)代替。
Mach和386BSD
[編輯]Mach中的fdisk由Robert Baron編寫,被Julian Elischer移植到386BSD。[12]截止至2019年,FreeBSD[13]、NetBSD[14]和DragonFly BSD[15]也使用此實現。1995到1997年的OpenBSD也是如此。[1]
在OpenBSD 2.2之前,Tobias Weingartner在1997年重寫了fdisk[16],隨即被蘋果公司在2002年分支,在2019年前仍在macOS上使用。[17]
對於原生分區,BSD系統使用傳統的BSD磁碟標籤,由於兼容性問題,fdisk分區只能在某些架構中使用。
Linux
[編輯]在Linux中,fdisk是標準軟件包util-linux的一部分。 最初,程序由Andries E. Brouwer和A. V. Le Blanc編寫,2006年,Karel Zak和Davidlohr Bueso分支了util-linux包並重寫了fdisk。一個替代品――基於ncurses的程序cfdisk,允許用戶通過文本用戶界面(TUI)修改分區布局。[18]
參見
[編輯]參考資料
[編輯]- ^ 1.0 1.1 fdisk(8) — PC slice table (MBR) maintenance program. System Manager's Manual. FreeBSD, NetBSD, OpenBSD, DragonFly BSD.
- ^ Wolverton, Van. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. 2003. ISBN 0-7356-1812-7.
- ^ Datalight ROM-DOS User's Guide (PDF). Datalight. [2025-08-05]. (原始內容存檔 (PDF)於2011-11-16).
- ^ DR DOS 6.0 User Guide Optimisation and Configuration Tips (PDF). [2025-08-05]. (原始內容存檔 (PDF)於2019-09-30).
- ^ FlexOS Users Guide V1.3 (PDF). (原始內容 (PDF)存檔於2019-09-25).
- ^ PTS-DOS 2000 Pro User Manual (PDF). Buggingen, Germany: Paragon Technology GmbH. 1999 [2018-05-12]. (原始內容存檔 (PDF)於2018-05-12).
- ^ ibiblio.org FreeDOS Group -- FreeDOS Base. ibiblio. [2020-06-03]. (原始內容存檔於2019-03-30).
- ^ How to Use the Fdisk and Format Tools to Partition or Repartition a Hard Disk. Microsoft Support 6.0. Microsoft. 28 June 2012.
- ^ Fdisk Does Not Recognize Full Size of Hard Disks Larger than 64 GB. Microsoft Support 4.0. Microsoft. 24 August 2012.
- ^ JaTomes Help - OS/2 Commands. [2019-06-20]. (原始內容存檔於2019-04-14).
- ^ JaTomes Help - OS/2 Commands. [2019-06-20]. (原始內容存檔於2019-04-14).
- ^ Fdisk. [2025-08-05]. (原始內容存檔於2022-06-25).
- ^ fdisk — PC slice table maintenance utility. BSD Cross Reference. FreeBSD.
- fdisk -- PC slice table maintenance utility. FreeBSD Manual Pages.
- ^ fdisk — MS-DOS partition maintenance program. BSD Cross Reference. NetBSD.
- ^ fdisk — PC slice table (MBR) maintenance program. BSD Cross Reference. DragonFly BSD.
- fdisk - PC slice table (MBR) maintenance program. DragonFly On-Line Manual Pages.
- ^ fdisk — partition table maintenance program. BSD Cross Reference. OpenBSD.
- fdisk — partition table maintenance program. OpenBSD manual page server.
- ^ fdisk.tproj/fdisk.8, macOS 10.14.1, Apple, [2019-04-11], (原始內容存檔於2019-04-11)
- ^ Sharma, Deepesh. How to Create, Resize and Delete Linux Partitions With Cfdisk. MUO. 2021-02-22 [2023-05-15]. (原始內容存檔於2025-05-25) (英語).
延伸閱讀
[編輯]- Wolverton, Van. MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition. Microsoft Press. 1990. ISBN 978-1556152894.
- Kathy Ivens; Brian Proffit. OS/2 Inside & Out. Osborne McGraw-Hill. 1993. ISBN 978-0078818714.
- Tim O'Reilly; Troy Mott; Walter Glenn. Windows 98 in a Nutshell: A Desktop Quick Reference
. O'Reilly. 1999. ISBN 978-1565924864.