A cool and undocumented feature of MICROS~1 fdisk is the /mbr flag. This will rewrite the MBR of C:. It will not do anything to a second hard drive that has been formatted with format /s, believe me, I've tried. So you'll have to take out the primary hard drive and boot from floppy to do that.

Anyway, to use this feature, simply type fdisk /mbr to rewrite your boot record. I often instruct Linux newbies to do this when they want to get rid of LILO. But beware, one time this screwed up a partition table of mine.

Sure, there are 'other' disk partitioning tools, but the only one you really need is fdisk. And not the namby-pamby one (though the FreeDOS fdisk has potential), but the real, honest to Bob, linux fdisk. Sure, you have your Diskdrakes, your disk druids, your yasts and even your heathen Partion Magics; but when it comes down to brass tacks, is there anything so pure, powerful and simple as fdisk?

I think not. Beauty through function, my friends.

fdisk is a program for manipulating the partition table of a hard disk that runs under Linux (and other Unices, though the operation of *BSD varient versions is slightly different). There is also a DOS based fdisk, but it has much more limited capabilities. A partition is simply a logical division of a physical hard disk that is regarded as being, for operating system purposes, a seperate disk. So, a 30-Gig disk might be divided into 3 10-Gig partitions, each of which can have its own file system, and be mounted, unmounted, formatted, and identified seperately. fdisk uses a menu-driven interface to allow creation, modification, and deletion of disk partitions, and also allows an updated partition table to be written to the 0 sector of the disk.

Among Linux fdisk's many advantages over its DOS counterpart, it is capable of creating partitions in an almost unimaginable array of formats. The extended filesystems (ext2, ext3, and so on), DOS/Windows filesystems (FAT, FAT32, and so on), journeled filesystems (reiserfs), swap partitions, and more obscure disk formats are all supported (of course, you might need disk tools, kernel support, modules, or something else to actually use them!). fdisk is often more succesful than 'smarter' programs at creating partitions- nice, shiny, GUI programs run from automated user-friendly installers will sometimes choke on a disk geometry that fdisk will breeze through. I think a lot Linux newbies learn to use fdisk the hard way after a friendlier partition program does something peculiar to their disk or data (I know I did!).

Linux fdisk suffers from a few odd incompatibilities when used in combination with partition or formatting utilities from other OS'es. No problem for single-booters, but for those who dual boot, caution is prescribed. Linux fdisk documentation recommends that you let OS specific utilities build the partitions where that OS will live- DOS fdisk for Windows installs, Linux fdisk for the linux portion, and other things for other things. Don't say you weren't warned.

fdisk is standard equipment for most, if not all, Linux distributions. Most folks use it when they install, and then never think about it again. It can be used after installation to resize partitions. This can be Risky Business if done improperly, so be sure to check the man pages and documentation for related low-level disk skullduggery before attempting any such thing (i.e, dd, mount, hdparm, and fdisk variants such as sfdisk and cfdisk).

Log in or registerto write something here or to contact authors.