home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / install / fips / fips.doc < prev    next >
Encoding:
Text File  |  1996-07-11  |  22.4 KB  |  510 lines

  1.                   Welcome to FIPS 
  2.     The First nondestructive Interactive Partition Splitting program 
  3.  
  4.                 Version 1.1 
  5.                 may 25, 1994 
  6.  
  7.              Copyright 1993/94 by Arno Schaefer 
  8.  
  9.  
  10. 0. What you need to use FIPS 
  11. 1. Introduction 
  12. 2. Safety 
  13. 3. Restrictions 
  14. 4. Before you start 
  15. 5. Use with Stacker/SuperStor/Doublespace 
  16. 6. Use with OS/2 
  17. 7. Use with a multitasking OS 
  18. 8. Using FIPS 
  19. 9. After splitting the partition 
  20. 10. Commandline Switches 
  21. 11. Troubleshooting 
  22. 12. Credits 
  23.  
  24.  
  25. FIPS is a program designed to split an existing DOS partition without deleting 
  26. the data on it. 
  27.  
  28. FIPS is free software; you can redistribute it and/or modify 
  29. it under the terms of the GNU General Public License as published by 
  30. the Free Software Foundation; either version 2, or (at your option) 
  31. any later version. 
  32.  
  33. FIPS is distributed in the hope that it will be useful, 
  34. but WITHOUT ANY WARRANTY; without even the implied warranty of 
  35. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  36. GNU General Public License for more details. 
  37.  
  38. You should have received a copy of the GNU General Public License 
  39. along with FIPS; see the file COPYING.  If not, write to 
  40. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  41.  
  42. Report problems and direct all questions to: 
  43.  
  44.     schaefer@rbg.informatik.th-darmstadt.de 
  45.  
  46.  
  47. 0. What you need to use FIPS 
  48.  
  49. You need a defragmentation program in order to move all data to the beginning 
  50. of the hard disk. FIPS will only split your partition if you have enough free 
  51. space at the end. DOS 6.0 and later contains DEFRAG, which is suitable for 
  52. this purpose. Other suitable programs are Norton Speedisk (actually DEFRAG 
  53. is speedisk with less functions, licensed from Norton), PCTools' Compress, 
  54. DISKOPT in Novell DOS 7, or the shareware programs ORG, DOG or SAFPAK 
  55. (available by anonymous FTP from any SIMTEL mirror in the diskutil directory). 
  56. I did not test these however, so don't blame me if they don't work for you. 
  57.  
  58. You may also want to use a program like Norton Disk Doctor (or 'scandisk' 
  59. in DOS 6.2) to check your harddisk before and after using FIPS. 
  60.  
  61. FIPS was developed under DOS 5.0. It should work fine with anything above 
  62. 3.0, perhaps even with 2.0. However it will not be of much use with older 
  63. DOS versions, since the large partition sizes are only available since DOS 4. 
  64. It has been reported to work with DOS 6.0 and 6.2 and it seems to work 
  65. with Novell DOS 7. 
  66.  
  67.  
  68. 1. Introduction 
  69.  
  70. The program was inspired by the Linux Project. When installing Linux on a 
  71. PC that was used for DOS / Windows, many people want to retain a smaller 
  72. partition for their DOS software. However, since most Harddisks contain 
  73. only one large partition, you would normally be required to do a complete 
  74. backup, erase the partition and build two (or more) new partitions. Then you 
  75. would restore the backup to one of the new partitions. 
  76. This is a very time consuming activity and requires lots of diskettes (why 
  77. buy 50+ disks only to once backup and restore your HD?). 
  78. FIPS was written to remedy this problem. You can now split a partition 
  79. without losing any data, provided there is enough free space for the new 
  80. partition at the end of the old one. 
  81.  
  82.  
  83. 2. Safety 
  84.  
  85. FIPS was specifically designed to provide a maximum of safety. On startup 
  86. it checks the Partition Table, Boot Sector and FAT for any inconsistencies. 
  87. If it finds anything suspicious, it will tell you so. If there are errors, 
  88. FIPS will not proceed. 
  89. You have the possibility to write backup copies of your root and bootsector 
  90. to a floppy disk before proceeding. If something goes wrong, you may restore 
  91. these with the program 'restorrb.exe' (see section 4). 
  92. After you have entered the start cylinder for the new partition, FIPS will 
  93. check if the new partition is completely empty by examining the FAT of the 
  94. old one. If it is not, FIPS will stop. 
  95. After having calculated the new Partition Table and Bootsector, FIPS will 
  96. check them again, so that eventual bugs in the calculation may be detected. 
  97. Only if everything is ok, FIPS will ask for permission to write the new 
  98. Root and Bootsector. 
  99.  
  100.  
  101. 3. Restrictions 
  102.  
  103. FIPS will only work with Hard Disk BIOSes that use interrupt 13h for low 
  104. level harddisk access. I think this is true for practically all PCs. 
  105.  
  106. FIPS will only work on disks with a sector size of 512 bytes. 
  107. It seems that DOS is prepared to deal with different sector sizes, but 
  108. since they are not widely used, I decided not to support them. 
  109.  
  110. FIPS will not split partitions with 12 bit FATs (you would not want to split 
  111. partitions with less than 10 MB, would you?). 
  112.  
  113. FIPS will only split DOS partitions. Partition Table and Bootsector must 
  114. conform to the MSDOS 3.0+ conventions. This is marked by the system 
  115. indicator byte in the partition table, it must have the value 4 (16 bit 
  116. sector number) or 6 (32 bit sector number). 
  117. It will especially *not* split Linux partitions. 
  118.  
  119. FIPS does not yet work on extended DOS partitions. 
  120.  
  121. FIPS will not work if you already have four partitions, since it needs one 
  122. free partition entry. 
  123.  
  124. FIPS will not reduce the original partition to a size with less than 4085 
  125. clusters, because this would imply rewriting the 16 bit FAT to a 12 bit FAT. 
  126.  
  127.  
  128. 4. Before you start 
  129.  
  130. Run CHKDSK or (under DOS 6.2) SCANDISK on the partition you want to split. 
  131. If you have Norton Disk Doctor or something similar, you may use it alter- 
  132. natively. Make sure there remain no 'dead' clusters on the disk. 
  133.  
  134. Prepare a bootable floppy disk in drive A:. Under DOS this is usually done 
  135. by giving the command 'sys a:' or 'format a:/s'. Under Windows NT or OS/2 
  136. this may be different, if in doubt you should check your manual. 
  137.  
  138. Copy the FIPS files RESTORRB.EXE, FIPS.EXE and ERRORS.TXT to this disk. 
  139.  
  140. Test booting from the prepared floppy disk. Read you manual or ask a local 
  141. guru if you can't boot from floppy disk or if you can not access your hard 
  142. disk after booting (test this by giving the command 'dir c:', you should 
  143. see your hard disk's root directory). 
  144.  
  145. When you start FIPS (later!), you will be given the opportunity to write 
  146. backup copies of your root and boot sector to a file on drive A: called 
  147. ROOTBOOT.00x (where x stands for a digit from 0 to 9). If anything goes wrong 
  148. while using FIPS, you can restore the original configuration by booting from 
  149. the floppy and running RESTORRB. Please note: if you use FIPS more than once 
  150. (this is normally not necessary, but it may happen), more than one ROOTBOOT 
  151. file is written to the floppy disk. RESTORRB lets you choose which configu- 
  152. ration file to restore. The file RESTORRB.000 contains your original confi- 
  153. guration. Try not to confuse the versions. 
  154.  
  155. But before starting FIPS you _must_ now defragment your Harddisk. All of the 
  156. space that will be used for the new partition must be free. Be aware that the 
  157. Windows Swapfile will not be moved by most defragmentation programs. You must 
  158. uninstall it (in the 386enhanced part of the Windows Control Panel) and rein- 
  159. stall it after using FIPS.  
  160. If you use IMAGE or MIRROR, the last sector of the hard disk contains a 
  161. hidden system file with a pointer to your mirror files. You _must_ delete this 
  162. file before using FIPS (it will be recreated the next time you run mirror). 
  163. Do 'attrib -r -s -h image.idx' or 'attrib -r -s -h mirorsav.fil' in the root 
  164. directory, then delete the file. 
  165. If FIPS does not offer as much disk space for creation of the new partition 
  166. as you would expect it to have, this may mean that 
  167.  
  168. a. You still have too much data in the remaining partition. Consider making 
  169.    the new partition smaller or deleting some of the data. 
  170.  
  171. b. There are hidden files in the space of the new partition that have not 
  172.    been moved by the defragmentation program. Make sure to which program 
  173.    they belong. If a file is a swap file of some program (for example NDOS) 
  174.    it is possible that it can be safely deleted (and will be recreated 
  175.    automatically later when the need arises). See your manual for details. 
  176.     
  177.    If the file belongs to some sort of copy protection, you must uninstall 
  178.    the program to which it belongs and reinstall it after repartitioning. 
  179.     
  180.    I can't give you more aid in this - if you really can't figure out what 
  181.    to do, contact me directly. 
  182.  
  183. Attention! If you use a DOS version lower than DOS 5.0 do _not_ try to move 
  184. DOS' hidden system files (ibmbio.com & ibmdos.com or something similar). You 
  185. will end up with a harddisk that won't boot any more. Since these files are 
  186. already in the first sectors of the partition, it is not necessary to move 
  187. them. 
  188.  
  189. Be aware that the location of your DOS partitions in the partition table may 
  190. change. If you use the new partition under DOS _and_ you have an extended 
  191. partition and/or two drives, this means that the names of the partitions may 
  192. change (D: may become E: for example). I have taken care that C: always re- 
  193. mains C:, so that you will still be able to boot. 
  194.  
  195. For Linux users: 
  196. This also means that the number of the DOS partition under Linux may change 
  197. (/dev/hda3 may become /dev/hda1). Any existing Linux partitions will not 
  198. change, so that you will have no trouble booting. You just need to edit your 
  199. /etc/fstab file if you mount your DOS partition on bootup. 
  200.  
  201.  
  202. 5. Use with Stacker/SuperStor/Doublespace  
  203.  
  204. I received reports that the following scheme works with Stacker, it may also 
  205. work with the other programs. I can't confirm this, since I don't use any of 
  206. these programs. 
  207.  
  208. a. Make sure that there is enough space on the compressed partition to be 
  209.    split. 
  210. b. Use the Checkdisk program that comes with the compression software. 
  211. c. Remove the Windows swapfile (if you have one). 
  212. d. Decrease the size of the compressed volume with the utilities that come 
  213.    with the compression software. 
  214. e. Boot without the compression device driver. 
  215. f. Look at the directory listing to see how much space is available for the 
  216.    new partition. 
  217. i. use FIPS as described below. 
  218.  
  219. If the compressed volume is fragmented, FIPS will not offer as much space 
  220. for the new partition as is shown in the directory listing. I would not 
  221. expect this to happen, normally the compressed volume should be one block 
  222. of consecutive sectors. But if it happens to you, you should add the fol- 
  223. lowing steps. 
  224.  
  225. g. Remove Hidden, Readonly and System attributes from compressed volume. 
  226. h. Defragment the partition. 
  227.  
  228. j. Reset Hidden, Readonly and System attributes on compressed volume. 
  229.  
  230. Please let me know if this scheme works for you, so that I can include this 
  231. info in later releases. In any case, use at your own risk. 
  232.  
  233.  
  234. 6. Use with OS/2 
  235.  
  236. FIPS is known to have problems with OS/2, especially with the dual boot 
  237. feature. This is partly due to the fact that OS/2 dual boot uses two copies 
  238. of the boot sector - if only one copy is changed by FIPS, OS/2 will not 
  239. work properly. 
  240. But even when taking this into consideration, some people have reported 
  241. strange error messages by OS/2. If you want to give FIPS a try, make sure 
  242. to save the root and boot sector to floppy disk with FIPS before making 
  243. any changes. FIPS _might_ work if you 
  244.  
  245. 1. Remove dual boot from the partition 
  246. 2. Boot from a bootable DOS disk 
  247. 3. Run FIPS (make sure to make FIPS save the root and boot sector to floppy) 
  248. 4. Reboot, check if everything is ok under DOS 
  249. 5. Boot from your OS/2 installation disk and reinstall dual boot 
  250. 6. Boot to OS/2 and look if everything works as expected. 
  251.  
  252. If 5. does not work (OS/2 complains with 'hardware error' or something 
  253. similar), use RESTORRB to undo the changes FIPS made, reboot again and 
  254. reinstall dual boot. 
  255.  
  256. So far I did not find out what OS/2 complains about. Since I do not use 
  257. OS/2, I have to rely on user reports. If you try FIPS with dual boot, 
  258. I would like to hear about it. Any information is welcome, even if it 
  259. is just "it worked" or "it did not work". If you have an idea what might 
  260. be the problem or any technical information, please tell me about it. 
  261.  
  262. I don't have any reports about OS/2 boot manager - I don't know if FIPS 
  263. will work with it. Again: if you want to try FIPS, make sure to save root 
  264. and boot sector to floppy in case boot manager does not like FIPS. 
  265.  
  266.  
  267. 7. Use with a multitasking OS 
  268.  
  269. You should not use FIPS in multitasking environments like OS/2, Desqview, 
  270. Windows, Novell Task Manager or the Linux DOS Emulator. These systems might 
  271. still write to the disk after FIPS has changed the hard disk structure, 
  272. which may result in corrupting the disk. This is not necessarily so, I'd 
  273. suppose that in most cases it would work nevertheless. But since safety is my 
  274. first concern with FIPS, I would recommend booting from a DOS boot disk and 
  275. then running FIPS, that should be safe. 
  276. In version 1.0 I added some code by Dave McCaldon to detect Windows and 
  277. Desqview (thanks, Dave!). OS/2 and Novell Task Manager are not yet detected. 
  278. I had to remove the code for detecting the Linux DOS emulator because it 
  279. caused a hangup on many machines. 
  280.  
  281.  
  282. 8. Using FIPS 
  283.  
  284. If you have prepared a bootable floppy disk as described in section 4, 
  285. boot from it now. 
  286.  
  287. You start FIPS by typing FIPS at the DOS prompt, followed by <ENTER>. 
  288. You may exit from the program at any time by pressing <CTRL-C>. 
  289.  
  290. FIPS will first try to detect under which OS it is running. If it is 
  291. Windows or Desqview, it will complain and tell you to boot from a floppy 
  292. disk. You can proceed nevertheless, but this is at your own risk (see 
  293. section 7). 
  294.  
  295. Then FIPS will detect you hard disks, if you have more than one, it will 
  296. ask you which one you want to work on. 
  297. In previous releases, FIPS failed to detect the right number of hard disks 
  298. with some BIOSes (esp. in Gateway Pentium machines). I hope I have corrected 
  299. this. If FIPS fails to detect the correct number of disks, please let me 
  300. know. In the meantime you may use the '-d' switch to select the drive 
  301. by hand (see below). 
  302.  
  303. FIPS then reads the rootsector of the hard disk and display the partition 
  304. table. 
  305.  
  306. Example: 
  307.  
  308.      |        |     Start      |      |      End       | Start  |Number of| 
  309. Part.|bootable|Head Cyl. Sector|System|Head Cyl. Sector| Sector |Sectors  |  MB 
  310. -----+--------+----------------+------+----------------+--------+---------+---- 
  311. 1    |    yes |   0  148      1|   83h|  15  295     63|  149184|   149184|  72 
  312. 2    |     no |   1    0      1|   06h|  15  139     63|      63|   141057|  68 
  313. 3    |     no |   0  140      1|   06h|  15  147     63|  141120|     8064|   3 
  314. 4    |     no |   0    0      0|   00h|   0    0      0|       0|        0|   0 
  315.  
  316.  
  317. If you don't know what to make of this, don't worry too much. You may just use 
  318. the number of Megabytes to identify your partitions. 
  319.  
  320. The rootsector is then checked for errors. 
  321.  
  322. If you have more than one partition on the disk, you will be asked which one 
  323. you want to split. 
  324.  
  325. The bootsector of the chosen partition is read and some information is dis- 
  326. played. 
  327.  
  328. Example: 
  329.  
  330. Bytes per sector: 512 
  331. Sectors per cluster: 8 
  332. Reserved sectors: 1 
  333. Number of FATs: 2 
  334. Number of rootdirectory entries: 512 
  335. Number of sectors (short): 0 
  336. Media descriptor byte: f8h 
  337. Sectors per FAT: 145 
  338. Sectors per track: 63 
  339. Drive heads: 16 
  340. Hidden sectors: 63 
  341. Number of sectors (long): 141057 
  342. Physical drive number: 80h 
  343. Signature: 29h 
  344.  
  345.  
  346. FIPS checks if this information is consistent with the partition table and 
  347. tries to detect other errors. 
  348.  
  349. It then verifies if the two copies of the FAT are identical, if they are not, 
  350. FIPS will exit with an error message. 
  351.  
  352. If everything checks out ok, FIPS now looks for free space at the end of 
  353. the partition. The new partition must have at least one cylinder, so if 
  354. the last cylinder is not free, you have no chance of splitting the 
  355. partition: FIPS will exit with an error message. Probably you forgot 
  356. to remove a mirror or image file (see above). 
  357.  
  358. You must now enter on which cylinder the new partition should start. 
  359. Use the cursor keys right/left to increase or decrease the cylinder 
  360. count. The size of the remaining partition and the new partition are 
  361. displayed in the process, so you will have no trouble choosing the 
  362. right cylinder. With cursor up/down you can change the count in steps 
  363. of 10. When ready, press enter to continue. 
  364.  
  365. FIPS will check again if the space for the new partition is empty - 
  366. this is an additional security measure and should never show an error, 
  367. since the free space is already determined before. 
  368.  
  369. After this, FIPS will calculate the changes to the rootsector, check the 
  370. changes and display the new partition table. You may now choose to reedit the 
  371. partition table (this will return you to the point where you select the par- 
  372. tition) or to continue. If you type 'c', FIPS will calculate the changed 
  373. bootsector, check it again and prompt you if you want to proceed. If you type 
  374. 'y' then, FIPS will write the changes to the disk and exit. 
  375.  
  376.  
  377. 9. After splitting the partition 
  378.  
  379. Your new partition will be recognized by DOS after your first reboot. Make 
  380. sure to disable all programs that write to your disk in config.sys and 
  381. autoexec.bat before rebooting. Your best bet is to rename these two files 
  382. or to boot from floppy. You should especially disable MIRROR or IMAGE. 
  383. After rebooting, use CHKDSK or Norton Disk Doctor to make sure your old (now 
  384. smaller) partition is ok. If you don't find any errors, you may now reboot 
  385. with your normal config.sys and autoexec.bat. Start some programs and make 
  386. sure you can still read your data. 
  387.  
  388. If you want to use your new partition under DOS, you must format it. If you 
  389. have multiple partitions, make sure to format the right one, the drive names 
  390. may have changed! 
  391. If you want to use the partition under Linux, you may now change the system 
  392. indicator byte with Linux' fdisk, then use MKFS. 
  393.  
  394. If you want to split the new partition again in two smaller ones, you must 
  395. first format it under DOS, otherwise FIPS will complain (btw. since the 
  396. new partition does not yet contain any data, you could as well use fdisk 
  397. to delete it and create two new ones). 
  398.  
  399.  
  400. 10. Commandline Switches 
  401.  
  402. Here is the explanation of FIPS' commandline switches. If you prefer the DOS 
  403. style, you may use '/' instead of '-' as the switch character. The switches 
  404. may be arbitrarily combined. Type 'FIPS -help' to get a list of the switches. 
  405. Here is a more detailed explanation: 
  406.  
  407. -t or -test : test mode (no writes to disk) 
  408.  
  409. This doesn't need much explanation. 
  410.  
  411. -d or -debug : debug mode 
  412.  
  413. In this mode, a complete transcript of your session along with some additio- 
  414. nal information is written to the file FIPSINFO.DBG in the current directory. 
  415. You can send this file to me in case of trouble (see below). 
  416. This switch does not interfere with the -d<num> switch. 
  417.  
  418. -h or -help or -? : help page 
  419.  
  420. A short summary of the switches 
  421.  
  422. -d<num>   : select drive <num> 
  423.  
  424. Preselect the drive number with this switch. Valid numbers are 128 to 255. 
  425. This may also be used to override the automatic drive detection - if for any 
  426. reason the drive is not found by FIPS, you may try this switch. 
  427.  
  428. -p<num>   : select partition <num> 
  429.  
  430. Preselect the partition number (1-4). Only valid partitions are accepted. 
  431.  
  432. -c<num>   : new start cylinder = <num> 
  433.  
  434. Preselect the new start cylinder - only valid cylinder numbers are accepted. 
  435.  
  436. -omb      : override 'More than one bootable Partition' 
  437.  
  438. There are some bootprograms that do not complain about more than one bootable 
  439. partition - they will just use the first one. If you have such a program in 
  440. your rootsector and the PC boots normally, you may use this switch to skip 
  441. the error message. I would recommend however to delete the wrong flags, if 
  442. you have a suitable program. 
  443.  
  444. -obf      : override 'Invalid bootable-flag' 
  445.  
  446. By modifying the bootable flag and the bootprogram it is theoretically pos- 
  447. sible to boot from the second harddrive. If you happen to have such a confi- 
  448. guration, use this switch to skip the error message. 
  449.  
  450. -ore      : override 'Number of Rootdir entries must be multiple of 16' 
  451.  
  452. An invalid number of Rootdir entries is accepted by DOS. If you have no other 
  453. means to correct the entry, you may use this switch to skip the error message. 
  454.  
  455. -olf      : override 'FAT too large' 
  456.  
  457. Since the number of sectors per FAT is a 2 byte number, it is theoretically 
  458. possible to have up to 65535 sectors per FAT. This is accepted by DOS, but a 
  459. number greater than 256 is not useful, since the largest possible FAT has 256 
  460. sectors. 
  461.  
  462. -osf      : override 'FAT too small' 
  463.  
  464. If the number of clusters in the partition is larger than there are entries 
  465. in the FAT, DOS uses only part of the partition. Something has gone *very* 
  466. wrong with this partition, but all is not lost - use this switch and reduce 
  467. the new partition to a size that can be properly managed. 
  468.  
  469. -omd      : override 'Wrong Media Descriptor Byte in FAT/Bootsector' 
  470.  
  471. The media descriptor byte should be F8h for a harddisk, but other values like 
  472. FCh are accepted by DOS (perhaps used for removable media ?), so you can 
  473. override the error message with this switch. 
  474.  
  475.  
  476. 11. Troubleshooting 
  477.  
  478. FIPS is still somewhat experimental, although it has been used by many 
  479. people successfully and without serious problems. 
  480. When in doubt I usually decided to stay safe and display error messages 
  481. when encountering suspicious configurations. For some of the minor errors 
  482. I added override switches (see section 10). 
  483. If you can't resolve a problem yourself, or have a configuration not sup- 
  484. ported by FIPS, or if you suspect a bug in FIPS, make a transcript of your 
  485. session using the -d switch and send the file FIPSINFO.DBG along with a 
  486. short comment to schaefer@rbg.informatik.th-darmstadt.de. Possibly your 
  487. problem has already been solved. 
  488.  
  489.  
  490. 12. Credits 
  491.  
  492. FIPS is based on the procedure described by Drew Eckhardt in Linux digest132. 
  493. Most of what I know about Harddisk structures comes from the excellent german 
  494. book 'Scheibenkleister II' by Claus Brod and Anton Stepper. It is for the 
  495. Atari ST, but much of it applies to PCs also. 
  496. Information on the Harddisk Interrupts was drawn from Ralf Brown's Interrupt 
  497. List. Thanks to Hamish Coleman for some useful info and to Paul Smith for 
  498. his good suggestions. Gunnar Hilmarsson suggested the procedure for stacked 
  499. drives, and Miguel Alvarez helped me improve the partition ordering. Chetan 
  500. Patil, Rand Phares and Eric Jung pointed me at bugs in the program and 
  501. documentation. Stefan Andreasen provided important informations about OS/2. 
  502. Keith Crews suggested some additions to the documentation concerning the 
  503. preparation of the boot disk and new features of DOS 6.x. Dave McCaldon 
  504. wrote the code for detecting the OS FIPS is running under. 
  505. Thanks to all others who sent me feedback. 
  506.  
  507.  
  508. Arno Schaefer 
  509. schaefer@rbg.informatik.th-darmstadt.de 
  510.