CREATING DOS/LINUX PARTITIONS (using FIPS) Motivation / introduction. Introduction to DOS / MS-DOS (newbies' section) Creating a DOS partition using FDISK. Setting up your HD with FIPS.exe. Creating a Linux partition using FDISK/CFDISK. Concluding remarks. Motivation / introduction This document explains the basics of DOS, how to create DOS / Linux partitions using fdisk / cfdisk and how to set up your hard drive with FIPS.exe. If the lingual flow of English seems a bit strange and erroneous from byte to byte, this is due to the fact that English is my 3rd language. Get over it ;) I, HB3^ aka Phantomd, cannot be held responsible if you don't understand the contents of this document and do stupid things using fdisk / cfdisk or FIPS.exe. If you disagree with my opinions, or if you find something that doesn't seem to be right please let me know, in a polite form. ( WARNING กกก: be careful what you do, read all the instructions before you proceed, some of the changes might cause some problems. Read the document careful. Don't tell me that I didn't warn you. Introduction to DOS You might wonder what DOS stands for, well it stands for disk operating system. As you might know the original DOS was bought by Bill Gates in 1981 and was upgraded to MS-DOS (Microsoft Disk Operating System), the most frequently used operating system for IBM and IBM compatible computers. MS-DOS is actually a program, but it's not just any usual program. Most of your programs won't work without MS-DOS, because Bill Gates wanted his MS-DOS to control every part of the computer system. MS -DOS not only makes it possible for your programs to work, it also gives you "complete" (not quite) over what your computer does. Since 1981 Microsoft has released lots of new versions of MS-DOS. The lastest ver. of MS-DOS is 6.22, which can do a lot more than the earlier versions (geez) but still remains compatible with them. Thus, if you start with ver 2.1 or whatever, you can still use all your knowledge and experience. Some people will ask the newbie's question "What can MS -DOS do for me?!?". Well MS-DOS coordinates the operation of the computer for your application programs. That's kewl isn't it, but guess what MS-DOS has much more to offer (special toolz ;]). You can use MS-DOS itself, controlling it with instructions called commands (cmd's), to manage your files, control the work flow, perform useful tasks that might require additional software and create so called 'smart commands' (*.bat). Of course this is not all what you can do with MS-DOS, there are tons of things that you can do, for example: partition your HD using Fdisk. Go ahead and read section 3. Creating a DOS partition using FDISK/PARTITION MAGIC Well let's pretend that you just bought a new pII 300mhz with a 6.2Gb HD ... (wouldn't that be nice). Now you have to partition that big space on your HD. If you don't want to do that stop reading, but I warn you, you must be crazy to have only one partition of 6.4Gb, just think if your system crashes what's going to happen to your stuff? On the other hand if you have more smaller partitions on which you save your work, progs etc. you won't lose them in case you have to format/del partiton C:/> (where windows is stored in most cases). The more partition you have the better you can seelp and enjoy your computer work. Okay enuf 'woman talk' hehe let's start to partition your 6.2Gb HD. How many partitions shell we do hmmm let's make 4 (max number of partitions on a HD). The first thing after you turn on your computer it will appear a prompt (something like c:\>). There you have to type fdisk in order to start partitioning your HD (divide and conquer; eg: c:/>fdisk ). The program fdisk will tell you something like this: "Your computer has a disk larger than 512 MB. This version of Windows includes improved support for large disks ....." and will ask you if you want to " enable large disk support (Y/N)...........? [Y]". Now what the hell does that mean, eh? That means that if you want to enable large disk support and you create more than one partition you won't be able to access the new driver(s) using other operating systems (os). Also all the 16 bit apps and programs won't run because this disk utility creates the new partitions on FAT32 (file allocation table 32 bits). If you didn't understand or you want to be able to run 16 bit progs, apps and access the other os' partitions press 'N'. The next thing fdisk will ask you is: "Choose one of the following: 1. Create DOS partition or Logical DOS Drive 2. Set active partition 3. Delete partition or Logical DOS Drive Display partition information Change current fixed disk drive Enter choice: [ ]" First thing we can do is to create a DOS partition, so we enter number 1 in the blank. After that we make a primary dos partition about 2 Gb and we call it 'partition-X' when your done. (remember 1Gb is 1024bytes, you do the math for 2 Gb) Again enter number one in the blank and chose 'create extended DOS partition' which will also be 2Gb and called 'partition-Y' (boring names). For the remained space 4Gb you do the same, create extended DOS partitions and give them a name(optional). After you are done partitioning the 6.2Gb HD exit fdisk, format the new partitions (eg: />:format c:) ..... for more info about what options you can attribe to the format cmd type: format /? . Well we are quite done partitioning our HD. Now let's have a look at what we have done, again type fdisk .... Enter [N] .... enter choice:[4] to display partition information. There you'll see all the partitions you have made, their names, their type (primary or extended), volume lable, space in Mb, what type of filesystem they use and usage in %. Eg: Partition Status Type Volume Label Mbytes System Usage C: 1 A PRI DOS WIN98 2047 FAT16 33% 2 EXT DOS 4103 67% To view information about the extended dos partition enter 'Y' to the question: "Do you want to display the logical drive information (Y/N)......? [ ]" . I guess you can figure out what this will show you, right? How do I delete a partition ? Then answer is easy. At the dos prompt type again fdisk ...... ".. large disk support ... ?: [N]" .... enter choice number: [3] (Delete partition or Logical DOS Drive). Enter what type of part -ition you want to delete ... chose if you have more partitions of the same type .... enter its name if it has one and press 'Y' (ATENTION: all data will be 100% lost, you cant undelete partition .... as far as I know). Setting up your HD with FIPS.EXE Most people installing Linux will have one HD with a single MS-DOS or Windows95/98 partition that uses the entire drive. Well wathca gonna do eh ? call 911 hehe no no the InfoMagic's CD-ROM set comes with a handy tool called FIPS, which will allow you to shrink your MS-DOS/windows partition and free up some HD space to install Linux (before installing Linux you need min. 2 partitions: a native and a swap partititon, I'm going to talk about that later). You can only use FIPS with a DOS or windows95/98 FAT partition. As a reminder, it won't be a bad idea to backup the existing system before running FIPS. Now, let me guess what the next question will be: "Where can I find fips.exe? ". Well you can find fips.exe on one of the CD's (usually on the first disk of the CD-ROM set). To use fips follow the next 10 steps: Copy fips.exe to your C: drive into a directory such as c:\windows or c:\dos. Create a bootable DOS or Windows 95/98 floppy disk and copy restorrb.exe from FIPS directory on the CD onto the bootable disk. Check your drive for errors and run defrag (included with DOS 6.x). This will rearrange the blocks and free up space at the end of the drive so fips can create a second partition. Be sure that you are in DOS mode, I mean be sure your not running Windows 95/98 or another os, reboot your computer in DOS. (windows users can do this by choosing from the start menu 'restart in DOS mode'). Type 'fips'. An introductory message will appear with a choice for which drive to shrink. Most people choose partition 1 to be split, weird isn't it . .. i chose partition 2 hehe, anyway. After confirming that you wish to continue, you will be asked to make a backup copy of your existing boot and rootsectors on the bootable disk made earlier. FIPS will ask if all the available free space should be used and present an initial partition table dividing the HD into 2 partitions. If you say 'no', you can use your up and down arrow keys to adjust the amount of space freed. to continue. If not, choose 'r' to re-edit the table. One last chance will be given to quit FIPS or write out the new partition table, if you are SURE that you did a great job write it out ;) Once FIPS is done, re-boot your computer. What you should do last is to use DOS's fdisk.exe to delete the second partition. Linux's fdisk will be used to create the native and swamp partitions. That's all about FIPS have fun ;) , and once again be careful what you are doing. Creating a Linux partition using FDISK/CFDISK This version of fdisk is not used under DOS but from within Linux. This implies that you should only create or delete partitions with the version of fdisk that comes with the os you are manipulating partitions for. What I mean is: create/delete DOS partitions with DOS's fdisk and only create/delete Linux partitions with Linux's fdisk. Before you start playing with Linux's fdisk, you should have an idea of how Linux labels and uses drive partitions. To Linux, partitions are given a name based on the disk on which the partition is, eg: /dev/hda refers to the 1 physical IDE HD (/dev/sda refers to the 1 SCSI disk) and /dev/hda1 refers to the 1 partition on the 1 physical IDE HD (logic isn't it). So /dev/hdb will refer to ? (2 physical IDE HD) same for the SCSI disks, /dev/scb refers to the 2 physical SCSI disk. Using Linux fdisk Linux's fdisk is fairly easy to use. Fdisk, by default will want to partition /dev/hda. From Slackware, to partition any other drive such as /dev/hdb type this: fdisk /dev/hdb or cfdisk /dev/hdb – I'll expalin later how to use cfdisk Within RedHat's software, fdisk is automatically informed of which drive you wish to partition. (smart aye ?). When fdisk is first started, you will see a command prompt. By entering the option 'm' you will get a list of available commands for fdisk. However the most useful one to start with is 'p': Eg: Command (m for help): p Disk /dev/hdb:32 heads, 63 sectors, 1024 cylinders Units=cylinders of 1024 * 512 bytes Device Boot Begin Start End Blocks /dev/hdb * 1 1 49 Id System 100160 06 DOS 16bit>=32M to add a swamp partition, use the 'n' command: Eg: Command (m for help): n Command action e extended p primary p partition number (1-4):2 first cylinder (50-1024):50 last cylinder or +size or +sizeK (50-1024): +16M this will create a Linux Native partition 16Mb in size. This is required if you have less than 16Mb of physical RAM. Next step, the partition must have its ID type changed to Linux swap with the 't' command: Eg: Command (m for help):t Partition number(1-4):2 Hex code (type L to list codes): 82 If you want to see the partition types and the ID numbers they use type 'L'. You will discover that a Linux native partition is type '83' and type '82' for Linux swap partition. Till now I described how you can do a swap partition ..... well you do the same for the Linux native partition, you start with the command 'n' followed by the option 'P' (primary partition) and you type in the partition number '3', first cylinder '54' and last cylinder '+x', where x is the number of Mb you want to use, 300 Mb will be the min I guess. My Linux native partition is 1500 Mb (nice to have 9 gigs, ain't it (). At this point, we have not saved the changes to the partition table so if the 'q' cmd is given, fdisk will quit without saving these changes. However, since we have gotten so far we will want to review the partition table (using 'p' cmd) and use 'w' cmd to write the table to the hard drive. Eg: Command (m for help): p -= displays the partition table =- if your are happy with type in 'w' Command (m for help):w Congrats your done creating Linux partitions with fdisk, now go and install Linux, it isn't so hard as it seems to be, depends .... Using cfdisk: Cfdisk is pretty straight forward so I'm not going to talk to much about it. Well what can I say about cfdisk is that I found it easier to use than the Linux's fdisk. The reason is that it's very similar to the DOS's fdisk. You don't have to use options and commands, all you have to do is use the arrows and press enter, but you still have to read before you proceed (geez). Eg: cfdisk /dev/hda ..... or cfdisk /dev/hdb after you type this and press enter you will see kind of a table, select free space (use the up and down arrows to select) then use the left and right arrow ( <- ; ->) to select the options (write, create, delete, type, units, cylinders, help, quit .... etc I guess this are all of them). Don't forget that after you created a Linux partition you have to write it out to the HD. After you are done with this you can continue installing Linux. Concluding Remarks I want to thnx the following persons for all their support: – he's the man, great help – a guy willing to help everybody (educational purpose only, you know it hehe so don't ask him about shit), thnx syn for your help ;) , , – great friends, great programmers – she's my cyber mom and i love her ;) so don't mess with her , - way to go guys ... keep it up hehe, we have lots of fun (REMgoread phoo's docs) If you want to contact me you can mail to HYPERLINK mailto:testa84b@hotmail.com esta84b@hotmail.com or just get your a$$ in #Hackerzlair on DalNet, I'm on in the evening. Document written by: HB3^ aka Phantomd Copyright (r) 1998 – 2000 HB3^/Phantomd