The util-linux-ng package does not contain rdev(8), ramsize(8),
vidmode(8) and rootflags(8) anymore.
-The fdisk(8) command does not use DOS-compatible mode and cylinders as
-display units by default. The old deprecated DOS behavior could be enabled
-by 'c' and 'u' fdisk commands.
+The fdisk(8) command does not use DOS-compatible mode and cylinders as display
+units by default. The old deprecated DOS behavior could be enabled by 'c' and
+'u' fdisk commands or from command line by '-c=dos -u=cylinders' options.
Release highlights
------------------
.sp
.B fdisk \-h
.SH DESCRIPTION
+.B fdisk
+(in the first form of invocation)
+is a menu driven program for creation and manipulation of
+partition tables.
+It understands DOS type partition tables and BSD or SUN type disklabels.
+
+.B fdisk
+does not understand GUID Partition Table (GPT) and
+it is not designed for large partitions. In particular case use more advanced GNU
+.BR parted (8).
+
+.B fdisk does not use DOS-compatible mode and cylinders
+as display units by default. The old deprecated DOS behavior could be
+enabled by '-cdos -ucyl' command line options.
+
Hard disks can be divided into one or more logical disks called
.IR partitions .
This division is described in the
There may be reasons of security, ease of administration and backup,
or testing, to use more than the minimum number of partitions.
-.B fdisk
-(in the first form of invocation)
-is a menu driven program for creation and manipulation of
-partition tables.
-It understands DOS type partition tables and BSD or SUN type disklabels.
-
-.B fdisk
-doesn't understand GUID Partition Table (GPT) and
-it is not designed for large partitions. In particular case use more advanced GNU
-.BR parted (8).
-
+.SH DEVICES
The
.I device
is usually /dev/sda, /dev/sdb or so. A device name refers to the entire disk.
is the first partition on the first hard disk in the system.
See also Linux kernel documentation (the Documentation/devices.txt file).
+.SH DISK LABELS
A BSD/SUN type 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
.BI \-h
Print help and then exit.
.TP
-.BI \-c
-Switch off DOS-compatible mode. (Default)
+.BI "\-c"[=mode]
+Specifies the compatiblity mode, 'dos' or 'nondos' mode. The default is non-DOS
+compatibility mode. For backward compatibility the option is possible to use
+without <mode> argument, then the default is used. Note that the optional
+<mode> argument cannot be separated from the -c option by space, the correct
+form is for example '-c=dos'.
.TP
.BI "\-C " cyls
Specify the number of cylinders of the disk.
.I /proc/partitions
(if that exists) are used.
.TP
-.B \-u
-When listing partition tables, give sizes in sectors instead
-of cylinders. (Default)
+.BI "\-u"[=unit]
+When listing partition tables, give sizes in 'sectors' or in 'cylinders'. The
+default is to give sizes in sectors. For backward compatibility the option is
+possible to use without <units> argument, then the default is used. Note that
+the optional <unit> argument cannot be separated from the -u option by space,
+the correct form is for example '-u=cylinders'.
.TP
.BI "\-s " partition
The
" fdisk -s <partition> give partition size(s) in blocks\n"
"\nOptions:\n"
" -b <size> sector size (512, 1024, 2048 or 4096)\n"
-" -c switch off DOS-compatible mode (default)\n"
+" -c[=<mode>] compatible mode: 'dos' or 'nondos' (default)\n"
" -h print this help text\n"
-" -u show sizes in sectors instead of cylinders (default)\n"
+" -u[=<unit>] dysplay units: 'cylinders' or 'sectors' (default)\n"
" -v print program version\n"
" -C <number> specify the number of cylinders\n"
" -H <number> specify the number of heads\n"
{
display_in_cyl_units = !display_in_cyl_units;
update_units();
- printf(_("Changing display/entry units to %s\n"),
- str_units(PLURAL));
+
+ if (display_in_cyl_units)
+ printf(_("Changing display/entry units to cylinders (DEPRECATED!)\n"));
+ else
+ printf(_("Changing display/entry units to sectors\n"));
}
static void
toggle_dos_compatibility_flag(void) {
dos_compatible_flag = ~dos_compatible_flag;
if (dos_compatible_flag)
- printf(_("DOS Compatibility flag is set\n"));
+ printf(_("DOS Compatibility flag is set (DEPRECATED!)\n"));
else
printf(_("DOS Compatibility flag is not set\n"));
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- while ((c = getopt(argc, argv, "b:cC:hH:lsS:uvV")) != -1) {
+ while ((c = getopt(argc, argv, "b:c::C:hH:lsS:u::vV")) != -1) {
switch (c) {
case 'b':
/* Ugly: this sector size is really per device,
user_cylinders = atoi(optarg);
break;
case 'c':
- dos_compatible_flag = 0;
+ dos_compatible_flag = 0; /* default */
+
+ if (optarg && !strcmp(optarg, "=dos"))
+ dos_compatible_flag = ~0;
+ else if (optarg && strcmp(optarg, "=nondos"))
+ fatal(usage);
break;
case 'h':
fatal(help);
opts = 1;
break;
case 'u':
- display_in_cyl_units = 0;
+ display_in_cyl_units = 0; /* default */
+ if (optarg && strcmp(optarg, "=cylinders") == 0)
+ display_in_cyl_units = !display_in_cyl_units;
+ else if (optarg && strcmp(optarg, "=sectors"))
+ fatal(usage);
break;
case 'V':
case 'v':