This document covers the Linux fdisk, and not the DOS fdisk. Ok, So your in need of some disk repartitioning and you need to use fdisk, but it scares you because of all the horror storys you've heard that begin with I was in fdisk and then... Well, hopefully after reading this you wont be so scared. Ok, so your in fdisk and need to make a new ext2 partition. You start up fdisk and see: Using /dev/hda as default device! Command (m for help): Well, now would be a good time to list the commands with "m" Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition p print the partition table q quit without saving changes t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Well, what you will want to do now is (p)rint your current partition table, that will give you valuable information: Command (m for help): p Disk /dev/hda: 240 heads, 63 sectors, 778 cylinders Units = cylinders of 15120 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 2 2 13 90720 82 Linux swap /dev/hda2 14 14 352 2562840 83 Linux native /dev/hda3 353 353 691 2562840 83 Linux native As you can see, hda1 is my swap, hda2 and hda3 are primary. (hda2 /home, hda3 /). Ok, you want to add another partition, so, remember the last sector of the last partition so you will know what cylinder to start with when making your new partition, in this case, the last cylinder is 691. ok, so to make a new partition you would issue the command n , add a new partition, so, you issue N and see this: Command (m for help): n First cylinder (692-745): What it is asking you is were to start the new partition, you want to start one cylinder above were the last one left off, in this case the last one left off at 691 so now im going to tell fdisk to start at cylinder 692 Command (m for help): n First cylinder (692-745): 692 Last cylinder or +size or +sizeM or +sizeK ([692]-745): ok, so I tell it to start at cylinder 692, now, its asking me for the size of the partition. Now, this is were you have to have the capitalization exact. If you wanted to make the partition 50MB you would type +50M Be carefull, because +50m isnt the same as +50M, +50m will make a 50K partition, not a 50MB partition, so make sure to issue the command +50M exactly as shown. Command (m for help): n First cylinder (692-745): 692 Last cylinder or +size or +sizeM or +sizeK ([692]-745): +50M Command (m for help): Ok, i said +50M so it just made a 50MB partition and dropped me back to the command line, now your not done yet! Lets see if it was done correctly by issueing the (p)rint command to list the partition table /dev/hda1 2 2 13 90720 82 Linux swap /dev/hda2 14 14 352 2562840 83 Linux native /dev/hda3 353 353 691 2562840 83 Linux native /dev/hda4 692 692 698 52888+ 83 Linux native You can see there it correctly made the new partition (hda4) and its 50MB. You can see the partition type is Linux Native, if you want to change that issue the (t) command, then it will ask you what partition, like this: Command (m for help): t Partition number (1-4): 4 Hex code (type L to list codes): Its asking you what type of partition you want it to be, type L for the list and you will see: Hex code (type L to list codes): L 0 Empty a OS/2 Boot Manag 64 Novell Netware a5 BSD/386 1 DOS 12-bit FAT b Win95 FAT32 65 Novell Netware b7 BSDI fs 2 XENIX root c Win95 FAT32 (LB 75 PC/IX b8 BSDI swap 3 XENIX usr e Win95 FAT16 (LB 80 Old MINIX c7 Syrinx 4 DOS 16-bit <32M f Win95 Extended 81 Linux/MINIX db CP/M 5 Extended 40 Venix 80286 82 Linux swap e1 DOS access 6 DOS 16-bit >=32 51 Novell? 83 Linux native e3 DOS R/O 7 OS/2 HPFS 52 Microport 93 Amoeba f2 DOS secondary 8 AIX 63 GNU HURD 94 Amoeba BBT ff BBT 9 AIX bootable Hex code (type L to list codes): So, to change it to whatever you wanted you would now type the number of the type you want, if you wante dto change it to an DOS partition you would enter "f2" if you want to change it to Linux Swap you would choose "82", etc... ok, now enter whatever you want, and now it will drop you back to the default prompt Hex code (type L to list codes): 83 Command (m for help): Now, if your absolutley sure you want to save this, enter the (w) command, that will write to the disk and then exit, the (q) command will exit WITHOUT saving changes. Well, thats it, hope it helped you in some way. Doug telnetd@doemill.shocking.com