home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume15 / bootmenu / part01 next >
SHell self-extracting ARchive  |  1990-12-16  |  46.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 58 2d |.sources|.misc.X-|
|00000020| 55 4e 49 58 2d 46 72 6f | 6d 3a 20 67 77 72 40 6c |UNIX-Fro|m: gwr@l|
|00000030| 69 6e 75 73 2e 6d 69 74 | 72 65 2e 6f 72 67 0a 6b |inus.mit|re.org.k|
|00000040| 65 79 77 6f 72 64 73 3a | 20 66 64 69 73 6b 20 70 |eywords:| fdisk p|
|00000050| 61 72 74 69 74 69 6f 6e | 20 62 6f 6f 74 20 6d 65 |artition| boot me|
|00000060| 6e 75 20 62 6f 6f 74 6d | 65 6e 75 20 70 66 64 69 |nu bootm|enu pfdi|
|00000070| 73 6b 0a 6f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |sk.organ|ization:|
|00000080| 20 54 68 65 20 4d 49 54 | 52 45 20 43 6f 72 70 6f | The MIT|RE Corpo|
|00000090| 72 61 74 69 6f 6e 2c 20 | 42 65 64 66 6f 72 64 2c |ration, |Bedford,|
|000000a0| 20 4d 41 2e 0a 73 75 6d | 6d 61 72 79 3a 20 70 72 | MA..sum|mary: pr|
|000000b0| 69 6d 61 72 79 20 62 6f | 6f 74 20 73 65 63 74 6f |imary bo|ot secto|
|000000c0| 72 20 70 72 6f 67 72 61 | 6d 20 77 69 74 68 20 6d |r progra|m with m|
|000000d0| 65 6e 75 0a 73 75 62 6a | 65 63 74 3a 20 76 31 35 |enu.subj|ect: v15|
|000000e0| 69 30 38 34 3a 20 42 4f | 4f 54 4d 45 4e 55 20 61 |i084: BO|OTMENU a|
|000000f0| 6e 64 20 50 46 44 49 53 | 4b 20 31 2e 33 20 28 70 |nd PFDIS|K 1.3 (p|
|00000100| 61 72 74 20 31 2f 32 29 | 0a 66 72 6f 6d 3a 20 67 |art 1/2)|.from: g|
|00000110| 77 72 40 6c 69 6e 75 73 | 2e 6d 69 74 72 65 2e 6f |wr@linus|.mitre.o|
|00000120| 72 67 0a 53 65 6e 64 65 | 72 3a 20 61 6c 6c 62 65 |rg.Sende|r: allbe|
|00000130| 72 79 40 75 75 6e 65 74 | 2e 55 55 2e 4e 45 54 20 |ry@uunet|.UU.NET |
|00000140| 28 42 72 61 6e 64 6f 6e | 20 53 2e 20 41 6c 6c 62 |(Brandon| S. Allb|
|00000150| 65 72 79 20 2d 20 63 6f | 6d 70 2e 73 6f 75 72 63 |ery - co|mp.sourc|
|00000160| 65 73 2e 6d 69 73 63 29 | 0a 0a 50 6f 73 74 69 6e |es.misc)|..Postin|
|00000170| 67 2d 6e 75 6d 62 65 72 | 3a 20 56 6f 6c 75 6d 65 |g-number|: Volume|
|00000180| 20 31 35 2c 20 49 73 73 | 75 65 20 38 34 0a 53 75 | 15, Iss|ue 84.Su|
|00000190| 62 6d 69 74 74 65 64 2d | 62 79 3a 20 67 77 72 40 |bmitted-|by: gwr@|
|000001a0| 6c 69 6e 75 73 2e 6d 69 | 74 72 65 2e 6f 72 67 0a |linus.mi|tre.org.|
|000001b0| 41 72 63 68 69 76 65 2d | 6e 61 6d 65 3a 20 62 6f |Archive-|name: bo|
|000001c0| 6f 74 6d 65 6e 75 2f 70 | 61 72 74 30 31 0a 0a 48 |otmenu/p|art01..H|
|000001d0| 65 72 65 20 69 73 20 70 | 61 72 74 20 31 20 6f 66 |ere is p|art 1 of|
|000001e0| 20 74 68 65 20 42 4f 4f | 54 4d 45 4e 55 20 61 6e | the BOO|TMENU an|
|000001f0| 64 20 50 46 44 49 53 4b | 20 31 2e 33 20 64 69 73 |d PFDISK| 1.3 dis|
|00000200| 74 72 69 62 75 74 69 6f | 6e 2e 0a 0a 42 4f 4f 54 |tributio|n...BOOT|
|00000210| 4d 45 4e 55 20 69 73 20 | 61 20 72 65 70 6c 61 63 |MENU is |a replac|
|00000220| 65 6d 65 6e 74 20 70 72 | 69 6d 61 72 79 20 62 6f |ement pr|imary bo|
|00000230| 6f 74 20 73 65 63 74 6f | 72 20 66 6f 72 20 4d 53 |ot secto|r for MS|
|00000240| 2d 44 4f 53 20 63 6f 6d | 70 61 74 69 62 6c 65 0a |-DOS com|patible.|
|00000250| 6d 61 63 68 69 6e 65 73 | 20 77 68 69 63 68 20 61 |machines| which a|
|00000260| 6c 6c 6f 77 73 20 62 6f | 6f 74 2d 74 69 6d 65 20 |llows bo|ot-time |
|00000270| 73 65 6c 65 63 74 69 6f | 6e 20 6f 66 20 74 68 65 |selectio|n of the|
|00000280| 20 61 63 74 69 76 65 20 | 68 61 72 64 20 64 69 73 | active |hard dis|
|00000290| 6b 0a 70 61 72 74 69 74 | 69 6f 6e 20 75 73 69 6e |k.partit|ion usin|
|000002a0| 67 20 61 20 6d 65 6e 75 | 2e 20 20 46 6f 72 20 65 |g a menu|. For e|
|000002b0| 78 61 6d 70 6c 65 2c 20 | 75 73 65 72 73 20 77 69 |xample, |users wi|
|000002c0| 74 68 20 62 6f 74 68 20 | 55 4e 49 58 20 61 6e 64 |th both |UNIX and|
|000002d0| 20 44 4f 53 0a 6f 6e 20 | 74 68 65 69 72 20 68 61 | DOS.on |their ha|
|000002e0| 72 64 20 64 69 73 6b 20 | 63 61 6e 20 63 68 6f 6f |rd disk |can choo|
|000002f0| 73 65 20 77 68 69 63 68 | 20 73 79 73 74 65 6d 20 |se which| system |
|00000300| 74 6f 20 75 73 65 20 61 | 74 20 62 6f 6f 74 20 74 |to use a|t boot t|
|00000310| 69 6d 65 2e 0a 0a 50 46 | 44 49 53 4b 20 69 73 20 |ime...PF|DISK is |
|00000320| 61 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 20 22 66 |a replac|ement "f|
|00000330| 64 69 73 6b 22 20 63 6f | 6d 6d 61 6e 64 20 66 6f |disk" co|mmand fo|
|00000340| 72 0a 69 6e 73 74 61 6c | 6c 69 6e 67 20 42 4f 4f |r.instal|ling BOO|
|00000350| 54 4d 45 4e 55 20 77 69 | 74 68 6f 75 74 20 63 6c |TMENU wi|thout cl|
|00000360| 6f 62 62 65 72 69 6e 67 | 20 79 6f 75 72 20 70 61 |obbering| your pa|
|00000370| 72 74 69 74 69 6f 6e 20 | 74 61 62 6c 65 2e 0a 0a |rtition |table...|
|00000380| 53 65 65 20 74 68 65 20 | 52 45 41 44 4d 45 20 66 |See the |README f|
|00000390| 69 6c 65 20 61 74 20 74 | 68 65 20 62 65 67 69 6e |ile at t|he begin|
|000003a0| 6e 69 6e 67 20 6f 66 20 | 74 68 65 20 73 68 65 6c |ning of |the shel|
|000003b0| 6c 20 61 72 63 68 69 76 | 65 20 62 65 6c 6f 77 20 |l archiv|e below |
|000003c0| 66 6f 72 20 61 0a 67 65 | 6e 65 72 61 6c 20 64 65 |for a.ge|neral de|
|000003d0| 73 63 72 69 70 74 69 6f | 6e 20 6f 66 20 74 68 69 |scriptio|n of thi|
|000003e0| 73 20 70 61 63 6b 61 67 | 65 2e 20 20 50 72 6f 67 |s packag|e. Prog|
|000003f0| 72 61 6d 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |ram docu|mentatio|
|00000400| 6e 20 66 6f 72 20 62 6f | 74 68 0a 42 4f 4f 54 4d |n for bo|th.BOOTM|
|00000410| 45 4e 55 20 61 6e 64 20 | 50 46 44 49 53 4b 20 61 |ENU and |PFDISK a|
|00000420| 72 65 20 61 74 20 74 68 | 65 20 62 65 67 69 6e 6e |re at th|e beginn|
|00000430| 69 6e 67 20 6f 66 20 74 | 68 65 20 73 65 63 6f 6e |ing of t|he secon|
|00000440| 64 20 70 6f 73 74 69 6e | 67 2e 0a 0a 47 6f 72 64 |d postin|g...Gord|
|00000450| 6f 6e 20 57 2e 20 52 6f | 73 73 20 20 28 4d 2f 53 |on W. Ro|ss (M/S|
|00000460| 20 45 30 39 35 29 09 69 | 6e 74 65 72 6e 65 74 3a | E095).i|nternet:|
|00000470| 20 67 77 72 40 6c 69 6e | 75 73 2e 6d 69 74 72 65 | gwr@lin|us.mitre|
|00000480| 2e 6f 72 67 0a 54 68 65 | 20 4d 49 54 52 45 20 43 |.org.The| MITRE C|
|00000490| 6f 72 70 6f 72 61 74 69 | 6f 6e 20 20 20 20 09 75 |orporati|on .u|
|000004a0| 75 63 70 3a 20 7b 64 65 | 63 76 61 78 7c 70 68 69 |ucp: {de|cvax|phi|
|000004b0| 6c 61 62 73 7d 21 6c 69 | 6e 75 73 21 67 77 72 0a |labs}!li|nus!gwr.|
|000004c0| 42 75 72 6c 69 6e 67 74 | 6f 6e 20 52 6f 61 64 20 |Burlingt|on Road |
|000004d0| 20 20 20 20 20 20 20 20 | 20 09 6f 66 66 69 63 65 | | .office|
|000004e0| 20 70 68 6f 6e 65 3a 20 | 36 31 37 2d 32 37 31 2d | phone: |617-271-|
|000004f0| 33 32 30 35 0a 42 65 64 | 66 6f 72 64 2c 20 4d 41 |3205.Bed|ford, MA|
|00000500| 20 30 31 37 33 30 20 28 | 55 2e 53 2e 41 2e 29 0a | 01730 (|U.S.A.).|
|00000510| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|00000520| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|00000530| 63 68 69 76 65 2c 20 6d | 65 61 6e 69 6e 67 3a 0a |chive, m|eaning:.|
|00000540| 23 20 31 2e 20 52 65 6d | 6f 76 65 20 65 76 65 72 |# 1. Rem|ove ever|
|00000550| 79 74 68 69 6e 67 20 61 | 62 6f 76 65 20 74 68 65 |ything a|bove the|
|00000560| 20 23 21 20 2f 62 69 6e | 2f 73 68 20 6c 69 6e 65 | #! /bin|/sh line|
|00000570| 2e 0a 23 20 32 2e 20 53 | 61 76 65 20 74 68 65 20 |..# 2. S|ave the |
|00000580| 72 65 73 75 6c 74 69 6e | 67 20 74 65 78 74 20 69 |resultin|g text i|
|00000590| 6e 20 61 20 66 69 6c 65 | 2e 0a 23 20 33 2e 20 45 |n a file|..# 3. E|
|000005a0| 78 65 63 75 74 65 20 74 | 68 65 20 66 69 6c 65 20 |xecute t|he file |
|000005b0| 77 69 74 68 20 2f 62 69 | 6e 2f 73 68 20 28 6e 6f |with /bi|n/sh (no|
|000005c0| 74 20 63 73 68 29 20 74 | 6f 20 63 72 65 61 74 65 |t csh) t|o create|
|000005d0| 20 74 68 65 20 66 69 6c | 65 73 3a 0a 23 09 52 45 | the fil|es:.#.RE|
|000005e0| 41 44 4d 45 0a 23 09 70 | 66 64 69 73 6b 2e 6d 61 |ADME.#.p|fdisk.ma|
|000005f0| 6e 0a 23 09 43 68 61 6e | 67 65 73 0a 23 09 4d 61 |n.#.Chan|ges.#.Ma|
|00000600| 6b 65 66 69 6c 65 0a 23 | 09 70 66 64 69 73 6b 2e |kefile.#|.pfdisk.|
|00000610| 63 0a 23 09 73 79 73 63 | 6f 64 65 73 2e 63 0a 23 |c.#.sysc|odes.c.#|
|00000620| 09 73 79 73 63 6f 64 65 | 73 2e 68 0a 23 09 73 79 |.syscode|s.h.#.sy|
|00000630| 73 64 65 70 2e 68 0a 23 | 09 73 5f 65 73 69 78 2e |sdep.h.#|.s_esix.|
|00000640| 63 0a 23 09 73 5f 69 33 | 38 36 2e 63 0a 23 09 73 |c.#.s_i3|86.c.#.s|
|00000650| 5f 75 6e 69 78 2e 63 0a | 23 09 73 5f 6d 73 64 6f |_unix.c.|#.s_msdo|
|00000660| 73 2e 63 0a 23 20 54 68 | 69 73 20 61 72 63 68 69 |s.c.# Th|is archi|
|00000670| 76 65 20 63 72 65 61 74 | 65 64 3a 20 54 75 65 20 |ve creat|ed: Tue |
|00000680| 4f 63 74 20 32 33 20 31 | 33 3a 35 33 3a 31 37 20 |Oct 23 1|3:53:17 |
|00000690| 31 39 39 30 0a 23 20 42 | 79 3a 09 47 6f 72 64 6f |1990.# B|y:.Gordo|
|000006a0| 6e 20 57 2e 20 52 6f 73 | 73 20 28 54 68 65 20 4d |n W. Ros|s (The M|
|000006b0| 49 54 52 45 20 43 6f 72 | 70 6f 72 61 74 69 6f 6e |ITRE Cor|poration|
|000006c0| 2c 20 42 65 64 66 6f 72 | 64 2c 20 4d 41 2e 29 0a |, Bedfor|d, MA.).|
|000006d0| 65 78 70 6f 72 74 20 50 | 41 54 48 3b 20 50 41 54 |export P|ATH; PAT|
|000006e0| 48 3d 2f 62 69 6e 3a 24 | 50 41 54 48 0a 65 63 68 |H=/bin:$|PATH.ech|
|000006f0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00000700| 6e 67 20 22 27 52 45 41 | 44 4d 45 27 22 20 27 28 |ng "'REA|DME'" '(|
|00000710| 33 31 34 38 20 63 68 61 | 72 61 63 74 65 72 73 29 |3148 cha|racters)|
|00000720| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 52 45 |'.if tes|t -f 'RE|
|00000730| 41 44 4d 45 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |ADME'.th|en..echo|
|00000740| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00000750| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00000760| 69 6e 67 20 66 69 6c 65 | 20 22 27 52 45 41 44 4d |ing file| "'READM|
|00000770| 45 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |E'".else|.cat << |
|00000780| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 52 45 41 |\SHAR_EO|F > 'REA|
|00000790| 44 4d 45 27 0a 0a 42 4f | 4f 54 4d 45 4e 55 20 69 |DME'..BO|OTMENU i|
|000007a0| 73 20 61 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |s a repl|acement |
|000007b0| 70 72 69 6d 61 72 79 20 | 62 6f 6f 74 20 73 65 63 |primary |boot sec|
|000007c0| 74 6f 72 20 66 6f 72 20 | 4d 53 2d 44 4f 53 20 63 |tor for |MS-DOS c|
|000007d0| 6f 6d 70 61 74 69 62 6c | 65 0a 6d 61 63 68 69 6e |ompatibl|e.machin|
|000007e0| 65 73 20 77 68 69 63 68 | 20 61 6c 6c 6f 77 73 20 |es which| allows |
|000007f0| 62 6f 6f 74 2d 74 69 6d | 65 20 73 65 6c 65 63 74 |boot-tim|e select|
|00000800| 69 6f 6e 20 6f 66 20 74 | 68 65 20 61 63 74 69 76 |ion of t|he activ|
|00000810| 65 20 68 61 72 64 20 64 | 69 73 6b 0a 70 61 72 74 |e hard d|isk.part|
|00000820| 69 74 69 6f 6e 20 75 73 | 69 6e 67 20 61 20 6d 65 |ition us|ing a me|
|00000830| 6e 75 2e 20 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |nu. For| example|
|00000840| 2c 20 75 73 65 72 73 20 | 77 69 74 68 20 62 6f 74 |, users |with bot|
|00000850| 68 20 55 4e 49 58 20 61 | 6e 64 20 44 4f 53 0a 6f |h UNIX a|nd DOS.o|
|00000860| 6e 20 74 68 65 69 72 20 | 68 61 72 64 20 64 69 73 |n their |hard dis|
|00000870| 6b 20 63 61 6e 20 63 68 | 6f 6f 73 65 20 77 68 69 |k can ch|oose whi|
|00000880| 63 68 20 73 79 73 74 65 | 6d 20 74 6f 20 75 73 65 |ch syste|m to use|
|00000890| 20 61 74 20 62 6f 6f 74 | 20 74 69 6d 65 2e 0a 0a | at boot| time...|
|000008a0| 42 4f 4f 54 41 55 54 4f | 20 69 73 20 73 69 6d 69 |BOOTAUTO| is simi|
|000008b0| 6c 61 72 20 74 6f 20 42 | 4f 4f 54 4d 45 4e 55 20 |lar to B|OOTMENU |
|000008c0| 62 75 74 20 61 6c 6c 6f | 77 73 20 62 6f 74 68 20 |but allo|ws both |
|000008d0| 75 6e 61 74 74 65 6e 64 | 65 64 20 72 65 62 6f 6f |unattend|ed reboo|
|000008e0| 74 0a 61 6e 64 20 74 68 | 65 20 61 62 69 6c 69 74 |t.and th|e abilit|
|000008f0| 79 20 74 6f 20 6f 76 65 | 72 72 69 64 65 20 74 68 |y to ove|rride th|
|00000900| 65 20 61 75 74 6f 6d 61 | 74 69 63 20 73 65 6c 65 |e automa|tic sele|
|00000910| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 61 63 74 |ction of| the act|
|00000920| 69 76 65 0a 70 61 72 74 | 69 74 69 6f 6e 20 61 74 |ive.part|ition at|
|00000930| 20 62 6f 6f 74 2d 74 69 | 6d 65 2e 20 20 28 49 20 | boot-ti|me. (I |
|00000940| 75 73 65 64 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |used to |call thi|
|00000950| 73 20 76 65 72 73 69 6f | 6e 20 62 6f 6f 74 2d 68 |s versio|n boot-h|
|00000960| 64 70 29 2e 0a 0a 42 4f | 4f 54 4d 45 4e 55 20 63 |dp)...BO|OTMENU c|
|00000970| 61 6e 6e 6f 74 20 64 6f | 20 61 6e 20 75 6e 61 74 |annot do| an unat|
|00000980| 74 65 6e 64 65 64 20 72 | 65 62 6f 6f 74 20 62 75 |tended r|eboot bu|
|00000990| 74 20 69 73 20 76 65 72 | 79 20 73 6d 61 6c 6c 20 |t is ver|y small |
|000009a0| 61 6e 64 0a 28 61 73 20 | 61 20 72 65 73 75 6c 74 |and.(as |a result|
|000009b0| 29 20 77 69 6c 6c 20 6e | 6f 74 20 62 65 20 63 6c |) will n|ot be cl|
|000009c0| 6f 62 62 65 72 65 64 20 | 69 66 20 79 6f 75 20 75 |obbered |if you u|
|000009d0| 73 65 20 74 68 65 20 53 | 70 65 65 64 53 74 6f 72 |se the S|peedStor|
|000009e0| 0a 64 69 73 6b 20 66 6f | 72 6d 61 74 74 69 6e 67 |.disk fo|rmatting|
|000009f0| 2f 64 69 61 67 6e 6f 73 | 74 69 63 73 20 70 72 6f |/diagnos|tics pro|
|00000a00| 67 72 61 6d 2e 20 20 28 | 4e 6f 74 65 73 20 61 62 |gram. (|Notes ab|
|00000a10| 6f 75 74 20 53 70 65 65 | 64 53 74 6f 72 27 73 0a |out Spee|dStor's.|
|00000a20| 75 73 61 67 65 20 6f 66 | 20 74 68 65 20 70 72 69 |usage of| the pri|
|00000a30| 6d 61 72 79 20 62 6f 6f | 74 20 73 65 63 74 6f 72 |mary boo|t sector|
|00000a40| 20 61 72 65 20 69 6e 20 | 74 68 65 20 66 69 6c 65 | are in |the file|
|00000a50| 20 53 53 74 6f 72 2e 74 | 78 74 29 2e 0a 0a 50 46 | SStor.t|xt)...PF|
|00000a60| 44 49 53 4b 20 69 73 20 | 61 20 72 65 70 6c 61 63 |DISK is |a replac|
|00000a70| 65 6d 65 6e 74 20 66 6f | 72 20 62 6f 74 68 20 44 |ement fo|r both D|
|00000a80| 4f 53 20 61 6e 64 20 55 | 4e 49 58 20 66 64 69 73 |OS and U|NIX fdis|
|00000a90| 6b 20 70 72 6f 67 72 61 | 6d 73 2e 0a 54 68 69 73 |k progra|ms..This|
|00000aa0| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 69 73 20 | replace|ment is |
|00000ab0| 64 69 73 74 69 6e 67 75 | 69 73 68 65 64 20 66 6f |distingu|ished fo|
|00000ac0| 72 20 69 74 73 20 61 62 | 69 6c 69 74 79 20 74 6f |r its ab|ility to|
|00000ad0| 20 70 75 74 0a 61 6e 20 | 61 72 62 69 74 72 61 72 | put.an |arbitrar|
|00000ae0| 79 20 62 69 6e 61 72 79 | 20 69 6d 61 67 65 20 69 |y binary| image i|
|00000af0| 6e 74 6f 20 74 68 65 20 | 70 72 69 6d 61 72 79 20 |nto the |primary |
|00000b00| 62 6f 6f 74 20 73 65 63 | 74 6f 72 20 77 69 74 68 |boot sec|tor with|
|00000b10| 6f 75 74 0a 63 6c 6f 62 | 62 65 72 69 6e 67 20 61 |out.clob|bering a|
|00000b20| 6e 20 65 78 69 73 74 69 | 6e 67 20 70 61 72 74 69 |n existi|ng parti|
|00000b30| 74 69 6f 6e 20 74 61 62 | 6c 65 2e 20 20 50 46 44 |tion tab|le. PFD|
|00000b40| 49 53 4b 20 68 61 73 20 | 6e 6f 20 62 6f 6f 74 0a |ISK has |no boot.|
|00000b50| 70 72 6f 67 72 61 6d 20 | 62 75 69 6c 74 2d 69 6e |program |built-in|
|00000b60| 2c 20 62 75 74 20 61 6c | 6c 6f 77 73 20 79 6f 75 |, but al|lows you|
|00000b70| 20 74 6f 20 74 61 6b 65 | 20 74 68 65 20 62 6f 6f | to take| the boo|
|00000b80| 74 20 70 72 6f 67 72 61 | 6d 0a 66 72 6f 6d 20 61 |t progra|m.from a|
|00000b90| 20 66 69 6c 65 2e 20 20 | 41 74 20 6c 65 61 73 74 | file. |At least|
|00000ba0| 20 6f 6e 65 20 6f 66 20 | 74 68 65 20 62 6f 6f 74 | one of |the boot|
|00000bb0| 20 70 72 6f 67 72 61 6d | 20 66 69 6c 65 73 2c 20 | program| files, |
|00000bc0| 73 75 63 68 20 61 73 0a | 42 4f 4f 54 4d 45 4e 55 |such as.|BOOTMENU|
|00000bd0| 2c 20 6d 75 73 74 20 62 | 65 20 61 76 61 69 6c 61 |, must b|e availa|
|00000be0| 62 6c 65 20 74 6f 20 50 | 46 44 49 53 4b 20 69 66 |ble to P|FDISK if|
|00000bf0| 20 69 74 20 69 73 20 65 | 78 70 65 63 74 65 64 20 | it is e|xpected |
|00000c00| 74 6f 0a 69 6e 69 74 69 | 61 6c 69 7a 65 20 61 20 |to.initi|alize a |
|00000c10| 6e 65 77 6c 79 20 66 6f | 72 6d 61 74 74 65 64 20 |newly fo|rmatted |
|00000c20| 64 69 73 6b 2e 20 20 55 | 6e 6c 69 6b 65 20 4d 53 |disk. U|nlike MS|
|00000c30| 44 4f 53 20 66 64 69 73 | 6b 2c 0a 50 46 44 49 53 |DOS fdis|k,.PFDIS|
|00000c40| 4b 20 63 6f 72 72 65 63 | 74 6c 79 20 68 61 6e 64 |K correc|tly hand|
|00000c50| 6c 65 73 20 70 61 72 74 | 69 74 69 6f 6e 20 65 6e |les part|ition en|
|00000c60| 74 72 69 65 73 20 77 68 | 69 63 68 20 65 78 74 65 |tries wh|ich exte|
|00000c70| 6e 64 0a 62 65 79 6f 6e | 64 20 63 79 6c 20 31 30 |nd.beyon|d cyl 10|
|00000c80| 32 33 2e 20 20 55 6e 6c | 69 6b 65 20 55 4e 49 58 |23. Unl|ike UNIX|
|00000c90| 20 66 64 69 73 6b 2c 20 | 50 46 44 49 53 4b 20 69 | fdisk, |PFDISK i|
|00000ca0| 73 20 6e 6f 74 20 63 6f | 6e 66 75 73 65 64 0a 61 |s not co|nfused.a|
|00000cb0| 62 6f 75 74 20 74 68 65 | 20 64 69 66 66 65 72 65 |bout the| differe|
|00000cc0| 6e 63 65 20 62 65 74 77 | 65 65 6e 20 68 69 67 68 |nce betw|een high|
|00000cd0| 65 73 74 2d 75 73 61 62 | 6c 65 2d 63 79 6c 69 6e |est-usab|le-cylin|
|00000ce0| 64 65 72 2d 6e 75 6d 62 | 65 72 0a 61 6e 64 20 28 |der-numb|er.and (|
|00000cf0| 62 65 67 69 6e 6e 69 6e | 67 2d 63 79 6c 69 6e 64 |beginnin|g-cylind|
|00000d00| 65 72 20 70 6c 75 73 20 | 6e 75 6d 62 65 72 2d 6f |er plus |number-o|
|00000d10| 66 2d 63 79 6c 69 6e 64 | 65 72 73 29 2e 0a 0a 44 |f-cylind|ers)...D|
|00000d20| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 69 6e 63 |ocumenta|tion inc|
|00000d30| 6c 75 64 65 64 3a 0a 0a | 54 68 65 20 66 69 6c 65 |luded:..|The file|
|00000d40| 20 62 6f 6f 74 6d 65 6e | 75 2e 64 6f 63 20 65 78 | bootmen|u.doc ex|
|00000d50| 70 6c 61 69 6e 73 20 68 | 6f 77 20 74 6f 20 69 6e |plains h|ow to in|
|00000d60| 73 74 61 6c 6c 20 61 6e | 64 20 75 73 65 20 74 68 |stall an|d use th|
|00000d70| 65 20 6e 65 77 0a 62 6f | 6f 74 20 70 72 6f 67 72 |e new.bo|ot progr|
|00000d80| 61 6d 73 2e 20 20 54 68 | 65 20 66 69 6c 65 20 70 |ams. Th|e file p|
|00000d90| 66 64 69 73 6b 2e 6d 61 | 6e 20 69 73 20 6d 61 6e |fdisk.ma|n is man|
|00000da0| 75 61 6c 20 65 6e 74 72 | 79 20 69 6e 20 55 4e 49 |ual entr|y in UNI|
|00000db0| 58 20 2a 72 6f 66 66 0a | 66 6f 72 6d 61 74 2c 20 |X *roff.|format, |
|00000dc0| 61 6e 64 20 70 66 64 69 | 73 6b 2e 64 6f 63 20 69 |and pfdi|sk.doc i|
|00000dd0| 73 20 61 20 66 6f 72 6d | 61 74 74 65 64 20 63 6f |s a form|atted co|
|00000de0| 70 79 20 66 6f 72 20 74 | 68 6f 73 65 20 77 69 74 |py for t|hose wit|
|00000df0| 68 6f 75 74 20 6e 72 6f | 66 66 2e 0a 0a 48 6f 77 |hout nro|ff...How|
|00000e00| 20 74 6f 20 63 6f 6d 70 | 69 6c 65 3a 0a 0a 54 6f | to comp|ile:..To|
|00000e10| 20 62 75 69 6c 64 20 70 | 66 64 69 73 6b 2c 20 65 | build p|fdisk, e|
|00000e20| 69 74 68 65 72 20 65 64 | 69 74 20 74 68 65 20 4d |ither ed|it the M|
|00000e30| 61 6b 65 66 69 6c 65 20 | 74 6f 20 75 6e 63 6f 6d |akefile |to uncom|
|00000e40| 6d 65 6e 74 20 74 68 65 | 0a 61 70 70 72 6f 70 72 |ment the|.appropr|
|00000e50| 69 61 74 65 20 6c 69 6e | 65 20 28 69 2e 65 2e 20 |iate lin|e (i.e. |
|00000e60| 53 59 53 3d 69 33 38 36 | 29 20 61 6e 64 20 74 79 |SYS=i386|) and ty|
|00000e70| 70 65 20 22 6d 61 6b 65 | 22 2c 20 6f 72 0a 75 73 |pe "make|", or.us|
|00000e80| 65 20 61 20 6d 61 6b 65 | 20 63 6f 6d 6d 61 6e 64 |e a make| command|
|00000e90| 20 6c 69 6e 65 20 6c 69 | 6b 65 3a 0a 09 6d 61 6b | line li|ke:..mak|
|00000ea0| 65 20 53 59 53 3d 69 33 | 38 36 0a 54 68 69 73 20 |e SYS=i3|86.This |
|00000eb0| 77 69 6c 6c 20 6a 75 73 | 74 20 62 75 69 6c 64 20 |will jus|t build |
|00000ec0| 74 68 65 20 70 66 64 69 | 73 6b 20 70 72 6f 67 72 |the pfdi|sk progr|
|00000ed0| 61 6d 20 61 6e 64 20 62 | 6f 6f 74 20 73 65 63 74 |am and b|oot sect|
|00000ee0| 6f 72 20 62 69 6e 61 72 | 69 65 73 2e 0a 49 74 20 |or binar|ies..It |
|00000ef0| 77 69 6c 6c 20 6e 6f 74 | 20 74 72 79 20 74 6f 20 |will not| try to |
|00000f00| 6d 6f 64 69 66 79 20 74 | 68 65 20 68 61 72 64 20 |modify t|he hard |
|00000f10| 64 69 73 6b 20 62 6f 6f | 74 20 73 65 63 74 6f 72 |disk boo|t sector|
|00000f20| 2e 0a 0a 54 68 65 20 62 | 6f 6f 74 20 70 72 6f 67 |...The b|oot prog|
|00000f30| 72 61 6d 20 62 69 6e 61 | 72 69 65 73 20 61 72 65 |ram bina|ries are|
|00000f40| 20 64 69 73 74 72 69 62 | 75 74 65 64 20 61 73 20 | distrib|uted as |
|00000f50| 73 69 6d 70 6c 65 20 48 | 45 58 20 65 6e 63 6f 64 |simple H|EX encod|
|00000f60| 65 64 0a 74 65 78 74 20 | 66 69 6c 65 73 2e 20 20 |ed.text |files. |
|00000f70| 54 68 65 20 28 69 6e 63 | 6c 75 64 65 64 29 20 70 |The (inc|luded) p|
|00000f80| 72 6f 67 72 61 6d 20 68 | 65 78 32 62 69 6e 20 77 |rogram h|ex2bin w|
|00000f90| 69 6c 6c 20 63 6f 6e 76 | 65 72 74 20 74 68 65 6d |ill conv|ert them|
|00000fa0| 0a 66 6f 72 20 74 68 65 | 20 62 65 6e 65 66 69 74 |.for the| benefit|
|00000fb0| 20 6f 66 20 74 68 6f 73 | 65 20 77 69 74 68 6f 75 | of thos|e withou|
|00000fc0| 74 20 74 68 65 20 4d 41 | 53 4d 20 28 44 4f 53 29 |t the MA|SM (DOS)|
|00000fd0| 20 61 73 73 65 6d 62 6c | 65 72 2e 0a 0a 52 65 6c | assembl|er...Rel|
|00000fe0| 61 74 65 64 20 70 61 63 | 6b 61 67 65 73 20 28 61 |ated pac|kages (a|
|00000ff0| 76 61 69 6c 61 62 6c 65 | 20 73 65 70 61 72 61 74 |vailable| separat|
|00001000| 65 6c 79 29 3a 0a 0a 54 | 68 65 20 4c 4f 53 53 31 |ely):..T|he LOSS1|
|00001010| 30 32 34 2e 46 49 58 20 | 70 61 63 6b 61 67 65 20 |024.FIX |package |
|00001020| 63 6f 6e 74 61 69 6e 73 | 20 70 61 74 63 68 65 73 |contains| patches|
|00001030| 20 66 6f 72 20 4d 53 44 | 4f 53 20 33 2e 33 20 74 | for MSD|OS 3.3 t|
|00001040| 6f 20 61 6c 6c 6f 77 20 | 75 73 65 0a 6f 66 20 74 |o allow |use.of t|
|00001050| 68 65 20 66 69 72 73 74 | 20 31 30 32 34 20 63 79 |he first| 1024 cy|
|00001060| 6c 69 6e 64 65 72 73 20 | 6f 66 20 61 20 68 61 72 |linders |of a har|
|00001070| 64 20 64 69 73 6b 20 77 | 68 65 6e 20 74 68 65 20 |d disk w|hen the |
|00001080| 64 69 73 6b 20 63 6f 6e | 74 72 6f 6c 6c 65 72 0a |disk con|troller.|
|00001090| 42 49 4f 53 20 68 61 73 | 20 69 6e 73 74 61 6c 6c |BIOS has| install|
|000010a0| 65 64 20 64 69 73 6b 20 | 70 61 72 61 6d 65 74 65 |ed disk |paramete|
|000010b0| 72 73 20 73 68 6f 77 69 | 6e 67 20 6d 6f 72 65 20 |rs showi|ng more |
|000010c0| 74 68 61 6e 20 31 30 32 | 34 20 63 79 6c 69 6e 64 |than 102|4 cylind|
|000010d0| 65 72 73 2e 0a 4e 6f 74 | 65 20 74 68 61 74 20 74 |ers..Not|e that t|
|000010e0| 68 69 73 20 70 61 74 63 | 68 20 69 73 20 64 65 73 |his patc|h is des|
|000010f0| 69 67 6e 65 64 20 66 6f | 72 20 75 73 65 20 6f 6e |igned fo|r use on|
|00001100| 20 50 43 2f 41 54 20 63 | 6f 6d 70 61 74 69 62 6c | PC/AT c|ompatibl|
|00001110| 65 20 64 69 73 6b 0a 63 | 6f 6e 74 72 6f 6c 6c 65 |e disk.c|ontrolle|
|00001120| 72 73 20 74 68 61 74 20 | 68 61 76 65 20 61 20 42 |rs that |have a B|
|00001130| 49 4f 53 20 70 61 72 61 | 6d 65 74 65 72 20 6f 76 |IOS para|meter ov|
|00001140| 65 72 72 69 64 65 20 66 | 65 61 74 75 72 65 2c 20 |erride f|eature, |
|00001150| 73 75 63 68 20 61 73 20 | 74 68 65 0a 52 4c 4c 20 |such as |the.RLL |
|00001160| 61 6e 64 20 45 53 44 49 | 20 63 6f 6e 74 72 6f 6c |and ESDI| control|
|00001170| 6c 65 72 73 20 62 79 20 | 41 64 61 70 74 65 63 20 |lers by |Adaptec |
|00001180| 61 6e 64 20 57 65 73 74 | 65 72 6e 20 44 69 67 69 |and West|ern Digi|
|00001190| 74 61 6c 2e 0a 0a 54 68 | 65 20 45 53 49 58 2d 42 |tal...Th|e ESIX-B|
|000011a0| 4f 4f 54 20 70 61 63 6b | 61 67 65 20 63 6f 6e 74 |OOT pack|age cont|
|000011b0| 61 69 6e 73 20 70 61 74 | 63 68 65 73 20 74 6f 20 |ains pat|ches to |
|000011c0| 6d 61 6b 65 20 45 53 49 | 58 20 28 45 76 65 72 65 |make ESI|X (Evere|
|000011d0| 78 20 53 79 73 74 65 6d | 73 0a 53 79 73 56 2f 33 |x System|s.SysV/3|
|000011e0| 38 36 29 20 62 6f 6f 74 | 20 66 72 6f 6d 20 61 6e |86) boot| from an|
|000011f0| 20 69 6e 61 63 74 69 76 | 65 20 70 61 72 74 69 74 | inactiv|e partit|
|00001200| 69 6f 6e 2e 20 20 4e 6f | 72 6d 61 6c 6c 79 2c 20 |ion. No|rmally, |
|00001210| 45 53 49 58 20 77 69 6c | 6c 20 72 65 66 75 73 65 |ESIX wil|l refuse|
|00001220| 0a 74 6f 20 62 6f 6f 74 | 20 75 6e 6c 65 73 73 20 |.to boot| unless |
|00001230| 69 74 73 20 70 61 72 74 | 69 74 69 6f 6e 20 69 73 |its part|ition is|
|00001240| 20 6d 61 72 6b 65 64 20 | 61 73 20 61 63 74 69 76 | marked |as activ|
|00001250| 65 2e 20 20 54 68 65 73 | 65 20 70 61 74 63 68 65 |e. Thes|e patche|
|00001260| 73 20 61 6c 6c 6f 77 0a | 6f 6e 65 20 74 6f 20 63 |s allow.|one to c|
|00001270| 6f 6e 66 69 67 75 72 65 | 20 74 68 65 20 70 61 72 |onfigure| the par|
|00001280| 74 69 74 69 6f 6e 20 74 | 61 62 6c 65 20 73 75 63 |tition t|able suc|
|00001290| 68 20 74 68 61 74 20 62 | 6f 6f 74 6d 65 6e 75 20 |h that b|ootmenu |
|000012a0| 77 69 6c 6c 20 61 6c 77 | 61 79 73 0a 70 72 65 73 |will alw|ays.pres|
|000012b0| 65 6e 74 20 69 74 73 20 | 62 6f 6f 74 20 6d 65 6e |ent its |boot men|
|000012c0| 75 20 28 6e 6f 20 70 61 | 72 74 69 74 69 6f 6e 20 |u (no pa|rtition |
|000012d0| 6d 61 72 6b 65 64 20 61 | 63 74 69 76 65 29 2e 0a |marked a|ctive)..|
|000012e0| 0a 53 65 6e 64 20 65 2d | 6d 61 69 6c 20 69 66 20 |.Send e-|mail if |
|000012f0| 79 6f 75 20 61 72 65 20 | 69 6e 74 65 72 65 73 74 |you are |interest|
|00001300| 65 64 20 69 6e 20 65 69 | 74 68 65 72 20 6f 66 20 |ed in ei|ther of |
|00001310| 74 68 65 20 61 62 6f 76 | 65 2e 0a 0a 47 6f 72 64 |the abov|e...Gord|
|00001320| 6f 6e 20 57 2e 20 52 6f | 73 73 20 20 28 4d 2f 53 |on W. Ro|ss (M/S|
|00001330| 20 45 30 39 35 29 09 69 | 6e 74 65 72 6e 65 74 3a | E095).i|nternet:|
|00001340| 20 67 77 72 40 6c 69 6e | 75 73 2e 6d 69 74 72 65 | gwr@lin|us.mitre|
|00001350| 2e 6f 72 67 0a 54 68 65 | 20 4d 49 54 52 45 20 43 |.org.The| MITRE C|
|00001360| 6f 72 70 6f 72 61 74 69 | 6f 6e 20 20 20 20 09 75 |orporati|on .u|
|00001370| 75 63 70 3a 20 7b 64 65 | 63 76 61 78 7c 70 68 69 |ucp: {de|cvax|phi|
|00001380| 6c 61 62 73 7d 21 6c 69 | 6e 75 73 21 67 77 72 0a |labs}!li|nus!gwr.|
|00001390| 42 75 72 6c 69 6e 67 74 | 6f 6e 20 52 6f 61 64 20 |Burlingt|on Road |
|000013a0| 20 20 20 20 20 20 20 20 | 20 09 6f 66 66 69 63 65 | | .office|
|000013b0| 20 70 68 6f 6e 65 3a 20 | 36 31 37 2d 32 37 31 2d | phone: |617-271-|
|000013c0| 33 32 30 35 0a 42 65 64 | 66 6f 72 64 2c 20 4d 41 |3205.Bed|ford, MA|
|000013d0| 20 30 31 37 33 30 20 28 | 55 2e 53 2e 41 2e 29 0a | 01730 (|U.S.A.).|
|000013e0| 0a 53 48 41 52 5f 45 4f | 46 0a 69 66 20 74 65 73 |.SHAR_EO|F.if tes|
|000013f0| 74 20 33 31 34 38 20 2d | 6e 65 20 22 60 77 63 20 |t 3148 -|ne "`wc |
|00001400| 2d 63 20 3c 20 27 52 45 | 41 44 4d 45 27 60 22 0a |-c < 'RE|ADME'`".|
|00001410| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00001420| 20 65 72 72 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 | error t|ransmitt|
|00001430| 69 6e 67 20 22 27 52 45 | 41 44 4d 45 27 22 20 27 |ing "'RE|ADME'" '|
|00001440| 28 73 68 6f 75 6c 64 20 | 68 61 76 65 20 62 65 65 |(should |have bee|
|00001450| 6e 20 33 31 34 38 20 63 | 68 61 72 61 63 74 65 72 |n 3148 c|haracter|
|00001460| 73 29 27 0a 66 69 0a 66 | 69 20 23 20 65 6e 64 20 |s)'.fi.f|i # end |
|00001470| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|00001480| 68 65 63 6b 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |heck.ech|o shar: |
|00001490| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 70 66 64 |extracti|ng "'pfd|
|000014a0| 69 73 6b 2e 6d 61 6e 27 | 22 20 27 28 36 33 38 36 |isk.man'|" '(6386|
|000014b0| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|000014c0| 20 74 65 73 74 20 2d 66 | 20 27 70 66 64 69 73 6b | test -f| 'pfdisk|
|000014d0| 2e 6d 61 6e 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |.man'.th|en..echo|
|000014e0| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|000014f0| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00001500| 69 6e 67 20 66 69 6c 65 | 20 22 27 70 66 64 69 73 |ing file| "'pfdis|
|00001510| 6b 2e 6d 61 6e 27 22 0a | 65 6c 73 65 0a 63 61 74 |k.man'".|else.cat|
|00001520| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00001530| 27 70 66 64 69 73 6b 2e | 6d 61 6e 27 0a 2e 54 48 |'pfdisk.|man'..TH|
|00001540| 20 50 46 44 49 53 4b 20 | 38 20 22 4f 63 74 20 31 | PFDISK |8 "Oct 1|
|00001550| 39 39 30 22 20 22 52 65 | 6c 65 61 73 65 20 31 2e |990" "Re|lease 1.|
|00001560| 33 22 0a 2e 53 48 20 4e | 41 4d 45 0a 70 66 64 69 |3"..SH N|AME.pfdi|
|00001570| 73 6b 20 5c 2d 20 70 61 | 72 74 69 74 69 6f 6e 20 |sk \- pa|rtition |
|00001580| 66 69 78 65 64 20 64 69 | 73 6b 0a 2e 53 48 20 53 |fixed di|sk..SH S|
|00001590| 59 4e 4f 50 53 49 53 0a | 2e 42 20 70 66 64 69 73 |YNOPSIS.|.B pfdis|
|000015a0| 6b 0a 2e 49 20 64 65 76 | 69 63 65 0a 2e 53 48 20 |k..I dev|ice..SH |
|000015b0| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 2e 4c 50 0a |DESCRIPT|ION..LP.|
|000015c0| 2e 42 20 70 66 64 69 73 | 6b 0a 70 61 72 74 69 74 |.B pfdis|k.partit|
|000015d0| 69 6f 6e 73 20 74 68 65 | 20 66 69 78 65 64 20 64 |ions the| fixed d|
|000015e0| 69 73 6b 20 69 64 65 6e | 74 69 66 69 65 64 20 61 |isk iden|tified a|
|000015f0| 73 0a 2e 49 20 64 65 76 | 69 63 65 0a 69 6e 74 6f |s..I dev|ice.into|
|00001600| 20 28 61 74 20 6d 6f 73 | 74 29 20 66 6f 75 72 20 | (at mos|t) four |
|00001610| 70 61 72 74 73 2c 20 65 | 61 63 68 20 6f 66 20 77 |parts, e|ach of w|
|00001620| 68 69 63 68 20 6d 61 79 | 0a 62 65 20 69 6e 64 65 |hich may|.be inde|
|00001630| 70 65 6e 64 65 6e 74 6c | 79 20 6c 6f 61 64 65 64 |pendentl|y loaded|
|00001640| 20 77 69 74 68 20 61 6e | 20 6f 70 65 72 61 74 69 | with an| operati|
|00001650| 6e 67 20 73 79 73 74 65 | 6d 2e 0a 54 68 65 20 61 |ng syste|m..The a|
|00001660| 63 74 75 61 6c 20 6e 61 | 6d 65 20 6f 66 0a 2e 49 |ctual na|me of..I|
|00001670| 20 64 65 76 69 63 65 0a | 64 65 70 65 6e 64 73 20 | device.|depends |
|00001680| 6f 6e 20 74 68 65 20 6f | 70 65 72 61 74 69 6e 67 |on the o|perating|
|00001690| 20 73 79 73 74 65 6d 20 | 69 6e 20 75 73 65 2e 0a | system |in use..|
|000016a0| 46 6f 72 20 45 53 49 58 | 20 28 53 79 73 74 65 6d |For ESIX| (System|
|000016b0| 20 56 2f 33 38 36 29 20 | 74 68 65 20 64 65 76 69 | V/386) |the devi|
|000016c0| 63 65 20 6e 61 6d 65 20 | 69 73 20 65 69 74 68 65 |ce name |is eithe|
|000016d0| 72 0a 22 2f 64 65 76 2f | 72 64 73 6b 2f 30 73 30 |r."/dev/|rdsk/0s0|
|000016e0| 22 20 6f 72 20 22 2f 64 | 65 76 2f 72 64 73 6b 2f |" or "/d|ev/rdsk/|
|000016f0| 31 73 30 22 2e 0a 46 6f | 72 20 4d 69 6e 69 78 2c |1s0"..Fo|r Minix,|
|00001700| 20 69 74 20 69 73 20 22 | 2f 64 65 76 2f 68 64 30 | it is "|/dev/hd0|
|00001710| 22 20 6f 72 20 22 2f 64 | 65 76 2f 68 64 35 22 2e |" or "/d|ev/hd5".|
|00001720| 0a 46 6f 72 20 4d 53 2d | 44 4f 53 20 69 74 20 69 |.For MS-|DOS it i|
|00001730| 73 20 61 20 73 69 6e 67 | 6c 65 20 64 69 67 69 74 |s a sing|le digit|
|00001740| 20 28 7a 65 72 6f 20 6f | 72 20 6f 6e 65 29 2e 0a | (zero o|r one)..|
|00001750| 2e 4c 50 0a 2e 42 20 70 | 66 64 69 73 6b 0a 72 65 |.LP..B p|fdisk.re|
|00001760| 61 64 73 20 74 68 65 20 | 68 61 72 64 20 64 69 73 |ads the |hard dis|
|00001770| 6b 20 70 61 72 74 69 74 | 69 6f 6e 20 74 61 62 6c |k partit|ion tabl|
|00001780| 65 20 66 72 6f 6d 20 62 | 6c 6f 63 6b 20 7a 65 72 |e from b|lock zer|
|00001790| 6f 20 6f 66 0a 2e 49 20 | 64 65 76 69 63 65 0a 69 |o of..I |device.i|
|000017a0| 6e 74 6f 20 6d 65 6d 6f | 72 79 20 61 6e 64 20 61 |nto memo|ry and a|
|000017b0| 6c 6c 6f 77 73 20 74 68 | 65 20 75 73 65 72 20 74 |llows th|e user t|
|000017c0| 6f 20 65 78 61 6d 69 6e | 65 2c 20 6d 6f 64 69 66 |o examin|e, modif|
|000017d0| 79 2c 20 6f 72 20 73 61 | 76 65 20 74 68 65 0a 70 |y, or sa|ve the.p|
|000017e0| 61 72 74 69 74 69 6f 6e | 20 74 61 62 6c 65 2e 20 |artition| table. |
|000017f0| 20 41 20 72 65 67 75 6c | 61 72 20 66 69 6c 65 20 | A regul|ar file |
|00001800| 6d 61 79 20 62 65 20 75 | 73 65 64 20 69 6e 73 74 |may be u|sed inst|
|00001810| 65 61 64 20 6f 66 20 61 | 20 72 65 61 6c 0a 2e 49 |ead of a| real..I|
|00001820| 20 64 65 76 69 63 65 0a | 66 6f 72 20 74 65 73 74 | device.|for test|
|00001830| 69 6e 67 20 70 75 72 70 | 6f 73 65 73 2c 20 74 68 |ing purp|oses, th|
|00001840| 6f 75 67 68 20 74 68 65 | 20 64 65 76 69 63 65 20 |ough the| device |
|00001850| 67 65 6f 6d 65 74 72 79 | 20 6d 75 73 74 20 62 65 |geometry| must be|
|00001860| 20 73 70 65 63 69 66 69 | 65 64 0a 6d 61 6e 75 61 | specifi|ed.manua|
|00001870| 6c 6c 79 2c 20 61 6e 64 | 20 73 6f 6d 65 20 73 79 |lly, and| some sy|
|00001880| 73 74 65 6d 73 20 77 69 | 6c 6c 20 72 65 71 75 72 |stems wi|ll requr|
|00001890| 69 72 65 20 61 20 66 69 | 6c 65 2d 6e 61 6d 65 20 |ire a fi|le-name |
|000018a0| 61 72 67 75 6d 65 6e 74 | 20 77 69 74 68 0a 74 68 |argument| with.th|
|000018b0| 65 20 22 52 22 20 61 6e | 64 20 22 57 22 20 63 6f |e "R" an|d "W" co|
|000018c0| 6d 6d 61 6e 64 73 20 28 | 44 4f 53 2c 20 45 53 49 |mmands (|DOS, ESI|
|000018d0| 58 29 2e 0a 2e 4c 50 0a | 54 68 65 20 70 61 72 74 |X)...LP.|The part|
|000018e0| 69 74 69 6f 6e 20 74 61 | 62 6c 65 20 6f 6e 0a 2e |ition ta|ble on..|
|000018f0| 49 20 64 65 76 69 63 65 | 0a 69 73 20 4e 4f 54 20 |I device|.is NOT |
|00001900| 6d 6f 64 69 66 69 65 64 | 20 75 6e 6c 65 73 73 20 |modified| unless |
|00001910| 74 68 65 20 77 72 69 74 | 65 20 63 6f 6d 6d 61 6e |the writ|e comman|
|00001920| 64 20 28 57 29 20 69 73 | 20 75 73 65 64 20 77 69 |d (W) is| used wi|
|00001930| 74 68 20 6e 6f 20 61 72 | 67 75 6d 65 6e 74 2e 0a |th no ar|gument..|
|00001940| 2e 53 48 20 55 53 41 47 | 45 0a 2e 53 53 20 43 6f |.SH USAG|E..SS Co|
|00001950| 6d 6d 61 6e 64 73 0a 2e | 4c 50 0a 41 6c 6c 0a 2e |mmands..|LP.All..|
|00001960| 42 20 70 66 64 69 73 6b | 0a 63 6f 6d 6d 61 6e 64 |B pfdisk|.command|
|00001970| 73 20 63 6f 6e 73 69 73 | 74 20 6f 66 20 61 20 63 |s consis|t of a c|
|00001980| 6f 6d 6d 61 6e 64 20 77 | 6f 72 64 20 66 6f 6c 6c |ommand w|ord foll|
|00001990| 6f 77 65 64 20 62 79 20 | 6f 70 74 69 6f 6e 61 6c |owed by |optional|
|000019a0| 0a 62 6c 61 6e 6b 2d 73 | 65 70 61 72 61 74 65 64 |.blank-s|eparated|
|000019b0| 20 63 6f 6d 6d 61 6e 64 | 20 61 72 67 75 6d 65 6e | command| argumen|
|000019c0| 74 73 2e 0a 4e 6f 74 65 | 20 74 68 61 74 20 6f 6e |ts..Note| that on|
|000019d0| 6c 79 20 74 68 65 20 66 | 69 72 73 74 20 6c 65 74 |ly the f|irst let|
|000019e0| 74 65 72 20 6f 66 20 61 | 20 63 6f 6d 6d 61 6e 64 |ter of a| command|
|000019f0| 20 77 6f 72 64 20 69 73 | 20 73 69 67 6e 69 66 69 | word is| signifi|
|00001a00| 63 61 6e 74 0a 28 65 78 | 63 65 70 74 20 66 6f 72 |cant.(ex|cept for|
|00001a10| 20 22 77 71 22 20 61 6e | 64 20 22 71 21 22 29 2e | "wq" an|d "q!").|
|00001a20| 0a 41 6c 6c 20 63 6f 6d | 6d 61 6e 64 20 6c 65 74 |.All com|mand let|
|00001a30| 74 65 72 73 20 61 72 65 | 20 61 63 63 65 70 74 65 |ters are| accepte|
|00001a40| 64 20 69 6e 20 65 69 74 | 68 65 72 20 75 70 70 65 |d in eit|her uppe|
|00001a50| 72 20 6f 72 20 6c 6f 77 | 65 72 20 63 61 73 65 2e |r or low|er case.|
|00001a60| 0a 4e 75 6d 65 72 69 63 | 20 61 72 67 75 6d 65 6e |.Numeric| argumen|
|00001a70| 74 73 20 61 72 65 20 73 | 70 65 63 69 66 69 65 64 |ts are s|pecified|
|00001a80| 20 75 73 69 6e 67 20 43 | 20 73 79 6e 74 61 78 2e | using C| syntax.|
|00001a90| 0a 45 78 74 72 61 20 61 | 72 67 75 6d 65 6e 74 73 |.Extra a|rguments|
|00001aa0| 20 61 72 65 20 73 69 6c | 65 6e 74 6c 79 20 69 67 | are sil|ently ig|
|00001ab0| 6e 6f 72 65 64 2e 0a 2e | 4c 50 0a 54 68 65 20 63 |nored...|LP.The c|
|00001ac0| 6f 6d 6d 61 6e 64 73 20 | 61 72 65 3a 0a 2e 54 50 |ommands |are:..TP|
|00001ad0| 0a 2e 42 20 3f 0a 50 72 | 69 6e 74 73 20 61 20 63 |..B ?.Pr|ints a c|
|00001ae0| 6f 6d 6d 61 6e 64 20 73 | 75 6d 6d 61 72 79 20 28 |ommand s|ummary (|
|00001af0| 68 65 6c 70 29 2e 0a 2e | 54 50 0a 2e 42 49 20 31 |help)...|TP..BI 1|
|00001b00| 20 22 20 73 79 73 5f 69 | 64 20 66 69 72 73 74 20 | " sys_i|d first |
|00001b10| 6c 61 73 74 20 73 79 73 | 5f 6e 61 6d 65 22 0a 53 |last sys|_name".S|
|00001b20| 65 74 20 74 68 65 20 70 | 61 72 74 69 74 69 6f 6e |et the p|artition|
|00001b30| 20 74 61 62 6c 65 20 65 | 6e 74 72 79 20 66 6f 72 | table e|ntry for|
|00001b40| 20 70 61 72 74 20 6f 6e | 65 2c 20 75 73 69 6e 67 | part on|e, using|
|00001b50| 3a 0a 2e 49 20 73 79 73 | 5f 69 64 0a 61 73 20 69 |:..I sys|_id.as i|
|00001b60| 74 73 20 73 79 73 74 65 | 6d 20 49 44 20 63 6f 64 |ts syste|m ID cod|
|00001b70| 65 2c 0a 2e 49 20 66 69 | 72 73 74 0a 61 73 20 74 |e,..I fi|rst.as t|
|00001b80| 68 65 20 6c 6f 77 65 73 | 74 20 6e 75 6d 62 65 72 |he lowes|t number|
|00001b90| 65 64 20 63 79 6c 69 6e | 64 65 72 20 69 74 20 75 |ed cylin|der it u|
|00001ba0| 73 65 73 2c 0a 2e 49 20 | 6c 61 73 74 0a 61 73 20 |ses,..I |last.as |
|00001bb0| 74 68 65 20 68 69 67 68 | 65 73 74 20 6e 75 6d 62 |the high|est numb|
|00001bc0| 65 72 65 64 20 63 79 6c | 69 6e 64 65 72 20 69 74 |ered cyl|inder it|
|00001bd0| 20 75 73 65 73 2c 20 61 | 6e 64 0a 2e 49 20 73 79 | uses, a|nd..I sy|
|00001be0| 73 5f 6e 61 6d 65 0a 28 | 6f 70 74 69 6f 6e 61 6c |s_name.(|optional|
|00001bf0| 29 20 61 73 20 74 68 65 | 20 73 79 73 74 65 6d 20 |) as the| system |
|00001c00| 6e 61 6d 65 20 28 69 6e | 20 74 68 65 20 6d 65 6e |name (in| the men|
|00001c10| 75 20 6e 61 6d 65 20 74 | 61 62 6c 65 29 2e 0a 2e |u name t|able)...|
|00001c20| 54 50 0a 2e 42 49 20 32 | 7c 33 7c 34 20 22 20 73 |TP..BI 2||3|4 " s|
|00001c30| 79 73 2d 69 64 20 66 69 | 72 73 74 20 6c 61 73 74 |ys-id fi|rst last|
|00001c40| 20 73 79 73 2d 6e 61 6d | 65 22 0a 53 69 6d 69 6c | sys-nam|e".Simil|
|00001c50| 61 72 20 74 6f 0a 2e 42 | 20 31 0a 62 75 74 20 73 |ar to..B| 1.but s|
|00001c60| 65 74 73 20 70 61 72 74 | 69 74 69 6f 6e 20 74 77 |ets part|ition tw|
|00001c70| 6f 2c 20 74 68 72 65 65 | 2c 20 6f 72 20 66 6f 75 |o, three|, or fou|
|00001c80| 72 2c 20 72 65 73 70 65 | 63 74 69 76 65 6c 79 2e |r, respe|ctively.|
|00001c90| 0a 2e 54 50 0a 2e 42 49 | 20 41 20 22 20 6e 75 6d |..TP..BI| A " num|
|00001ca0| 62 65 72 22 0a 4d 61 72 | 6b 20 70 61 72 74 69 74 |ber".Mar|k partit|
|00001cb0| 69 6f 6e 0a 2e 49 20 6e | 75 6d 62 65 72 0a 61 73 |ion..I n|umber.as|
|00001cc0| 20 61 63 74 69 76 65 20 | 28 73 6f 20 69 74 20 77 | active |(so it w|
|00001cd0| 69 6c 6c 20 62 65 20 75 | 73 65 64 20 66 6f 72 20 |ill be u|sed for |
|00001ce0| 62 6f 6f 74 69 6e 67 29 | 2e 20 20 49 66 0a 2e 49 |booting)|. If..I|
|00001cf0| 20 6e 75 6d 62 65 72 0a | 69 73 20 7a 65 72 6f 2c | number.|is zero,|
|00001d00| 20 6e 6f 20 70 61 72 74 | 69 74 69 6f 6e 20 77 69 | no part|ition wi|
|00001d10| 6c 6c 20 62 65 20 61 63 | 74 69 76 65 2e 0a 2e 54 |ll be ac|tive...T|
|00001d20| 50 0a 2e 42 49 20 47 20 | 22 20 63 79 6c 69 6e 64 |P..BI G |" cylind|
|00001d30| 65 72 73 20 68 65 61 64 | 73 20 73 65 63 74 6f 72 |ers head|s sector|
|00001d40| 73 22 0a 49 6e 66 6f 72 | 6d 0a 2e 42 20 70 66 64 |s".Infor|m..B pfd|
|00001d50| 69 73 6b 0a 77 68 61 74 | 20 74 68 65 20 67 65 6f |isk.what| the geo|
|00001d60| 6d 65 74 72 79 20 6f 66 | 20 74 68 65 20 64 65 76 |metry of| the dev|
|00001d70| 69 63 65 20 69 73 2e 0a | 2e 54 50 0a 2e 42 20 49 |ice is..|.TP..B I|
|00001d80| 0a 50 72 69 6e 74 20 61 | 20 73 75 6d 6d 61 72 79 |.Print a| summary|
|00001d90| 20 6f 66 20 74 68 65 20 | 6b 6e 6f 77 6e 20 49 44 | of the |known ID|
|00001da0| 20 63 6f 64 65 73 2e 0a | 2e 54 50 0a 2e 42 20 4c | codes..|.TP..B L|
|00001db0| 0a 4c 69 73 74 20 74 68 | 65 20 70 61 72 74 69 74 |.List th|e partit|
|00001dc0| 69 6f 6e 20 74 61 62 6c | 65 2e 0a 53 65 65 0a 2e |ion tabl|e..See..|
|00001dd0| 42 20 22 4f 75 74 70 75 | 74 20 46 6f 72 6d 61 74 |B "Outpu|t Format|
|00001de0| 22 0a 62 65 6c 6f 77 2e | 0a 2e 54 50 0a 2e 42 20 |".below.|..TP..B |
|00001df0| 51 0a 51 75 69 74 20 77 | 69 74 68 6f 75 74 20 73 |Q.Quit w|ithout s|
|00001e00| 61 76 69 6e 67 2e 20 20 | 49 66 20 74 68 65 20 6d |aving. |If the m|
|00001e10| 65 6d 6f 72 79 20 63 6f | 70 79 20 6f 66 20 74 68 |emory co|py of th|
|00001e20| 65 20 70 61 72 74 69 74 | 69 6f 6e 20 74 61 62 6c |e partit|ion tabl|
|00001e30| 65 20 77 61 73 0a 6d 6f | 64 69 66 69 65 64 2c 20 |e was.mo|dified, |
|00001e40| 61 20 77 61 72 6e 69 6e | 67 20 77 69 6c 6c 20 62 |a warnin|g will b|
|00001e50| 65 20 69 73 73 75 65 64 | 20 61 6e 64 20 74 68 65 |e issued| and the|
|00001e60| 20 63 6f 6d 6d 61 6e 64 | 20 69 67 6e 6f 72 65 64 | command| ignored|
|00001e70| 2e 0a 2e 54 50 0a 2e 42 | 20 51 21 0a 51 75 69 74 |...TP..B| Q!.Quit|
|00001e80| 2c 20 65 76 65 6e 20 69 | 66 20 74 68 65 20 6d 65 |, even i|f the me|
|00001e90| 6d 6f 72 79 20 63 6f 70 | 79 20 6f 66 20 74 68 65 |mory cop|y of the|
|00001ea0| 20 70 61 72 74 69 74 69 | 6f 6e 20 74 61 62 6c 65 | partiti|on table|
|00001eb0| 20 77 61 73 20 6e 6f 74 | 20 73 61 76 65 64 2e 0a | was not| saved..|
|00001ec0| 2e 54 50 0a 2e 42 49 20 | 52 20 22 20 66 69 6c 65 |.TP..BI |R " file|
|00001ed0| 2d 6e 61 6d 65 22 0a 52 | 65 61 64 20 62 6f 6f 74 |-name".R|ead boot|
|00001ee0| 20 73 65 63 74 6f 72 20 | 66 72 6f 6d 0a 2e 49 20 | sector |from..I |
|00001ef0| 66 69 6c 65 2d 6e 61 6d | 65 0a 28 69 66 20 67 69 |file-nam|e.(if gi|
|00001f00| 76 65 6e 29 20 6f 74 68 | 65 72 77 69 73 65 20 72 |ven) oth|erwise r|
|00001f10| 65 61 64 20 66 72 6f 6d | 0a 2e 49 20 64 65 76 69 |ead from|..I devi|
|00001f20| 63 65 2e 0a 2e 54 50 0a | 2e 42 49 20 57 20 22 20 |ce...TP.|.BI W " |
|00001f30| 66 69 6c 65 2d 6e 61 6d | 65 22 0a 57 72 69 74 65 |file-nam|e".Write|
|00001f40| 20 62 6f 6f 74 20 73 65 | 63 74 6f 72 20 74 6f 0a | boot se|ctor to.|
|00001f50| 2e 49 20 66 69 6c 65 2d | 6e 61 6d 65 2e 0a 28 69 |.I file-|name..(i|
|00001f60| 66 20 67 69 76 65 6e 29 | 20 6f 74 68 65 72 77 69 |f given)| otherwi|
|00001f70| 73 65 20 77 72 69 74 65 | 20 74 6f 0a 2e 49 20 64 |se write| to..I d|
|00001f80| 65 76 69 63 65 2e 0a 2e | 54 50 0a 2e 42 20 57 51 |evice...|TP..B WQ|
|00001f90| 0a 53 61 6d 65 20 61 73 | 20 22 77 72 69 74 65 22 |.Same as| "write"|
|00001fa0| 20 66 6f 6c 6c 6f 77 65 | 64 20 62 79 20 22 71 75 | followe|d by "qu|
|00001fb0| 69 74 22 2e 0a 2e 54 50 | 0a 2e 42 20 23 0a 54 68 |it"...TP|..B #.Th|
|00001fc0| 69 73 20 6c 69 6e 65 20 | 69 73 20 61 20 63 6f 6d |is line |is a com|
|00001fd0| 6d 65 6e 74 20 28 74 6f | 20 62 65 20 69 67 6e 6f |ment (to| be igno|
|00001fe0| 72 65 64 29 2e 0a 2e 53 | 53 20 22 4f 75 74 70 75 |red)...S|S "Outpu|
|00001ff0| 74 20 46 6f 72 6d 61 74 | 22 0a 2e 4c 50 0a 48 65 |t Format|"..LP.He|
|00002000| 72 65 20 69 73 20 61 20 | 73 61 6d 70 6c 65 20 6f |re is a |sample o|
|00002010| 66 20 74 68 65 20 6f 75 | 74 70 75 74 20 66 72 6f |f the ou|tput fro|
|00002020| 6d 20 74 68 65 0a 2e 42 | 20 4c 0a 63 6f 6d 6d 61 |m the..B| L.comma|
|00002030| 6e 64 3a 0a 2e 4c 50 0a | 2e 6e 66 0a 23 20 50 61 |nd:..LP.|.nf.# Pa|
|00002040| 72 74 69 74 69 6f 6e 20 | 74 61 62 6c 65 20 6f 6e |rtition |table on|
|00002050| 20 64 65 76 69 63 65 3a | 20 2f 64 65 76 2f 72 64 | device:| /dev/rd|
|00002060| 73 6b 2f 30 73 30 0a 67 | 65 6f 6d 65 74 72 79 20 |sk/0s0.g|eometry |
|00002070| 31 32 32 32 20 31 35 20 | 33 34 20 28 63 79 6c 73 |1222 15 |34 (cyls|
|00002080| 20 68 65 61 64 73 20 73 | 65 63 74 6f 72 73 29 0a | heads s|ectors).|
|00002090| 23 20 20 49 44 20 20 46 | 69 72 73 74 28 63 79 6c |# ID F|irst(cyl|
|000020a0| 29 20 20 4c 61 73 74 28 | 63 79 6c 29 20 20 4e 61 |) Last(|cyl) Na|
|000020b0| 6d 65 20 20 20 20 20 23 | 20 73 74 61 72 74 2c 20 |me #| start, |
|000020c0| 6c 65 6e 67 74 68 20 28 | 73 65 63 74 6f 72 73 29 |length (|sectors)|
|000020d0| 0a 31 20 20 20 34 20 20 | 20 20 20 20 30 20 20 20 |.1 4 | 0 |
|000020e0| 20 20 20 20 20 31 32 37 | 20 20 20 20 20 20 20 4d | 127| M|
|000020f0| 53 2d 4c 4f 53 53 20 20 | 23 20 33 34 2c 20 36 35 |S-LOSS |# 34, 65|
|00002100| 32 34 36 0a 32 20 31 32 | 39 20 20 20 20 31 32 38 |246.2 12|9 128|
|00002110| 20 20 20 20 20 20 20 20 | 32 35 35 20 20 20 20 20 | |255 |
|00002120| 20 20 4d 69 6e 69 78 20 | 20 20 20 23 20 36 35 32 | Minix | # 652|
|00002130| 38 30 2c 20 36 35 32 38 | 30 0a 33 20 20 20 30 20 |80, 6528|0.3 0 |
|00002140| 20 20 20 20 20 30 20 20 | 20 20 20 20 20 20 20 20 | 0 | |
|00002150| 30 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0 | |
|00002160| 20 23 20 30 2c 20 30 0a | 34 20 20 39 39 20 20 20 | # 0, 0.|4 99 |
|00002170| 20 32 35 36 20 20 20 20 | 20 20 20 31 32 32 30 20 | 256 | 1220 |
|00002180| 20 20 20 20 20 20 45 53 | 49 58 20 20 20 20 20 23 | ES|IX #|
|00002190| 20 31 33 30 35 36 30 2c | 20 34 39 32 31 35 30 0a | 130560,| 492150.|
|000021a0| 23 20 6e 6f 74 65 3a 20 | 20 6c 61 73 74 28 34 29 |# note: | last(4)|
|000021b0| 3a 20 70 68 79 73 3d 28 | 31 30 32 33 2c 31 34 2c |: phys=(|1023,14,|
|000021c0| 33 34 29 20 6c 6f 67 69 | 63 61 6c 3d 28 31 32 32 |34) logi|cal=(122|
|000021d0| 30 2c 31 34 2c 33 34 29 | 0a 61 63 74 69 76 65 3a |0,14,34)|.active:|
|000021e0| 20 34 0a 2e 66 69 0a 2e | 4c 50 0a 54 68 69 73 20 | 4..fi..|LP.This |
|000021f0| 6f 75 74 70 75 74 20 66 | 6f 72 6d 61 74 20 69 73 |output f|ormat is|
|00002200| 20 63 61 72 65 66 75 6c | 6c 79 20 63 6f 6e 73 74 | careful|ly const|
|00002210| 72 75 63 74 65 64 20 73 | 6f 20 74 68 61 74 20 69 |ructed s|o that i|
|00002220| 74 0a 6d 61 79 20 62 65 | 20 73 61 76 65 64 20 69 |t.may be| saved i|
|00002230| 6e 20 61 20 66 69 6c 65 | 20 20 28 62 79 20 72 65 |n a file| (by re|
|00002240| 64 69 72 65 63 74 69 6e | 67 20 73 74 61 6e 64 61 |directin|g standa|
|00002250| 72 64 20 6f 75 74 70 75 | 74 29 0a 61 6e 64 20 6c |rd outpu|t).and l|
|00002260| 61 74 65 72 20 75 73 65 | 64 20 61 73 20 69 6e 70 |ater use|d as inp|
|00002270| 75 74 20 28 62 79 20 72 | 65 64 69 72 65 63 74 69 |ut (by r|edirecti|
|00002280| 6e 67 20 73 74 61 6e 64 | 61 72 64 20 69 6e 70 75 |ng stand|ard inpu|
|00002290| 74 29 2e 0a 4f 6e 20 61 | 20 55 4e 49 58 20 73 79 |t)..On a| UNIX sy|
|000022a0| 73 74 65 6d 2c 20 6f 6e | 65 20 63 61 6e 20 73 61 |stem, on|e can sa|
|000022b0| 76 65 20 74 68 69 73 20 | 6f 75 74 70 75 74 20 75 |ve this |output u|
|000022c0| 73 69 6e 67 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |sing the| command|
|000022d0| 3a 0a 2e 49 50 0a 28 65 | 63 68 6f 20 4c 29 20 7c |:..IP.(e|cho L) ||
|000022e0| 20 70 66 64 69 73 6b 20 | 64 65 76 69 63 65 2d 6e | pfdisk |device-n|
|000022f0| 61 6d 65 20 3e 0a 2e 49 | 20 73 61 76 65 2d 66 69 |ame >..I| save-fi|
|00002300| 6c 65 0a 2e 4c 50 20 54 | 68 65 20 70 72 69 6e 74 |le..LP T|he print|
|00002310| 61 62 6c 65 20 72 65 70 | 72 65 73 65 6e 74 61 74 |able rep|resentat|
|00002320| 69 6f 6e 20 73 61 76 65 | 64 20 69 6e 0a 2e 49 20 |ion save|d in..I |
|00002330| 73 61 76 65 2d 66 69 6c | 65 0a 69 73 20 61 20 63 |save-fil|e.is a c|
|00002340| 6f 6d 70 6c 65 74 65 20 | 72 65 63 6f 72 64 20 6f |omplete |record o|
|00002350| 66 20 74 68 65 20 70 61 | 72 74 69 74 69 6f 6e 20 |f the pa|rtition |
|00002360| 74 61 62 6c 65 2e 0a 4f | 6e 20 61 20 55 4e 49 58 |table..O|n a UNIX|
|00002370| 20 73 79 73 74 65 6d 2c | 20 6f 6e 65 20 63 6f 75 | system,| one cou|
|00002380| 6c 64 20 75 73 65 0a 2e | 49 20 73 61 76 65 2d 66 |ld use..|I save-f|
|00002390| 69 6c 65 0a 74 6f 20 72 | 65 2d 69 6e 69 74 69 61 |ile.to r|e-initia|
|000023a0| 6c 69 7a 65 20 74 68 65 | 20 70 61 72 74 69 74 69 |lize the| partiti|
|000023b0| 6f 6e 20 74 61 62 6c 65 | 20 75 73 69 6e 67 20 74 |on table| using t|
|000023c0| 68 65 20 63 6f 6d 6d 61 | 6e 64 3a 0a 2e 49 50 0a |he comma|nd:..IP.|
|000023d0| 28 63 61 74 20 73 61 76 | 65 2d 66 69 6c 65 20 3b |(cat sav|e-file ;|
|000023e0| 20 65 63 68 6f 20 77 71 | 29 20 7c 20 70 66 64 69 | echo wq|) | pfdi|
|000023f0| 73 6b 20 64 65 76 69 63 | 65 2d 6e 61 6d 65 0a 2e |sk devic|e-name..|
|00002400| 4c 50 0a 43 6f 6e 73 69 | 73 74 65 6e 63 79 20 6f |LP.Consi|stency o|
|00002410| 66 20 65 61 63 68 20 70 | 61 72 74 69 74 69 6f 6e |f each p|artition|
|00002420| 20 74 61 62 6c 65 20 65 | 6e 74 72 79 20 69 73 20 | table e|ntry is |
|00002430| 63 68 65 63 6b 65 64 0a | 77 68 69 6c 65 20 74 68 |checked.|while th|
|00002440| 65 20 74 61 62 6c 65 20 | 69 73 20 6c 69 73 74 65 |e table |is liste|
|00002450| 64 2e 20 20 41 6e 79 20 | 69 6e 63 6f 6e 73 69 73 |d. Any |inconsis|
|00002460| 74 65 6e 63 69 65 73 20 | 64 69 73 63 6f 76 65 72 |tencies |discover|
|00002470| 65 64 0a 61 72 65 20 72 | 65 70 6f 72 74 65 64 20 |ed.are r|eported |
|00002480| 69 6e 20 61 20 63 6f 6d | 6d 65 6e 74 61 72 79 20 |in a com|mentary |
|00002490| 6e 6f 74 65 20 61 73 20 | 73 68 6f 77 6e 20 61 62 |note as |shown ab|
|000024a0| 6f 76 65 2e 0a 2e 53 53 | 20 22 50 68 79 73 69 63 |ove...SS| "Physic|
|000024b0| 61 6c 20 76 73 2e 20 4c | 6f 67 69 63 61 6c 22 0a |al vs. L|ogical".|
|000024c0| 2e 4c 50 0a 45 61 63 68 | 20 70 61 72 74 69 74 69 |.LP.Each| partiti|
|000024d0| 6f 6e 20 74 61 62 6c 65 | 20 65 6e 74 72 79 20 68 |on table| entry h|
|000024e0| 61 73 20 62 6f 74 68 20 | 22 70 68 79 73 69 63 61 |as both |"physica|
|000024f0| 6c 22 20 61 6e 64 20 61 | 20 22 6c 6f 67 69 63 61 |l" and a| "logica|
|00002500| 6c 22 20 66 69 65 6c 64 | 73 2e 0a 54 68 65 20 70 |l" field|s..The p|
|00002510| 68 79 73 69 63 61 6c 20 | 66 69 65 6c 64 73 20 73 |hysical |fields s|
|00002520| 70 65 63 69 66 79 20 74 | 68 65 20 6c 6f 77 65 73 |pecify t|he lowes|
|00002530| 74 20 61 6e 64 20 68 69 | 67 68 65 73 74 20 63 79 |t and hi|ghest cy|
|00002540| 6c 69 6e 64 65 72 2c 68 | 65 61 64 2c 73 65 63 74 |linder,h|ead,sect|
|00002550| 6f 72 0a 63 6f 6d 62 69 | 6e 61 74 69 6f 6e 73 20 |or.combi|nations |
|00002560| 74 6f 20 62 65 20 75 73 | 65 64 20 69 6e 20 74 68 |to be us|ed in th|
|00002570| 61 74 20 70 61 72 74 69 | 74 69 6f 6e 2e 20 20 54 |at parti|tion. T|
|00002580| 68 65 20 6c 6f 67 69 63 | 61 6c 20 73 74 61 72 74 |he logic|al start|
|00002590| 20 66 69 65 6c 64 0a 68 | 61 73 20 74 68 65 20 74 | field.h|as the t|
|000025a0| 6f 74 61 6c 20 6e 75 6d | 62 65 72 20 6f 66 20 73 |otal num|ber of s|
|000025b0| 65 63 74 6f 72 73 20 77 | 68 69 63 68 20 70 72 65 |ectors w|hich pre|
|000025c0| 63 65 64 65 20 74 68 69 | 73 20 70 61 72 74 69 74 |cede thi|s partit|
|000025d0| 69 6f 6e 2c 20 61 6e 64 | 0a 74 68 65 20 6c 6f 67 |ion, and|.the log|
|000025e0| 69 63 61 6c 20 6c 65 6e | 67 74 68 20 66 69 65 6c |ical len|gth fiel|
|000025f0| 64 20 68 61 73 20 74 68 | 65 20 74 6f 74 61 6c 20 |d has th|e total |
|00002600| 6e 75 6d 62 65 72 20 6f | 66 20 73 65 63 74 6f 72 |number o|f sector|
|00002610| 73 20 63 6f 6e 74 61 69 | 6e 65 64 0a 69 6e 20 74 |s contai|ned.in t|
|00002620| 68 69 73 20 70 61 72 74 | 69 74 69 6f 6e 2e 20 20 |his part|ition. |
|00002630| 54 68 65 73 65 20 66 69 | 65 6c 64 73 20 73 68 6f |These fi|elds sho|
|00002640| 75 6c 64 20 62 65 20 73 | 65 6c 66 20 63 6f 6e 73 |uld be s|elf cons|
|00002650| 69 73 74 65 6e 74 20 75 | 6e 6c 65 73 73 0a 74 68 |istent u|nless.th|
|00002660| 65 20 64 69 73 6b 20 68 | 61 73 20 6d 6f 72 65 20 |e disk h|as more |
|00002670| 74 68 61 6e 20 31 30 32 | 34 20 63 79 6c 69 6e 64 |than 102|4 cylind|
|00002680| 65 72 73 2e 0a 2e 4c 50 | 0a 54 68 65 20 70 68 79 |ers...LP|.The phy|
|00002690| 73 69 63 61 6c 20 63 79 | 6c 69 6e 64 65 72 20 66 |sical cy|linder f|
|000026a0| 69 65 6c 64 73 20 61 72 | 65 20 6f 6e 6c 79 20 74 |ields ar|e only t|
|000026b0| 65 6e 2d 62 69 74 73 20 | 77 69 64 65 20 73 6f 20 |en-bits |wide so |
|000026c0| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 0a 61 72 65 |the cont|ents.are|
|000026d0| 20 6c 69 6d 69 74 65 64 | 20 74 6f 20 31 30 32 33 | limited| to 1023|
|000026e0| 2e 20 54 68 65 20 6c 6f | 67 69 63 61 6c 20 73 65 |. The lo|gical se|
|000026f0| 63 74 6f 72 20 66 69 65 | 6c 64 73 20 61 72 65 20 |ctor fie|lds are |
|00002700| 33 32 20 62 69 74 73 20 | 77 69 64 65 20 61 6e 64 |32 bits |wide and|
|00002710| 0a 61 6c 77 61 79 73 20 | 73 68 6f 77 20 74 68 65 |.always |show the|
|00002720| 20 74 72 75 65 20 6c 6f | 67 69 63 61 6c 20 62 65 | true lo|gical be|
|00002730| 67 69 6e 6e 69 6e 67 20 | 61 6e 64 20 6c 65 6e 67 |ginning |and leng|
|00002740| 74 68 20 6f 66 20 74 68 | 65 20 70 61 72 74 69 74 |th of th|e partit|
|00002750| 69 6f 6e 2e 0a 47 65 6e | 65 72 61 6c 6c 79 2c 20 |ion..Gen|erally, |
|00002760| 74 68 65 20 70 68 79 73 | 69 63 61 6c 20 73 74 61 |the phys|ical sta|
|00002770| 72 74 20 66 69 65 6c 64 | 20 69 73 20 75 73 65 64 |rt field| is used|
|00002780| 20 6f 6e 6c 79 20 74 6f | 20 6c 6f 63 61 74 65 20 | only to| locate |
|00002790| 74 68 65 0a 73 65 63 6f | 6e 64 61 72 79 20 62 6f |the.seco|ndary bo|
|000027a0| 6f 74 20 73 65 63 74 6f | 72 2c 20 61 6e 64 20 74 |ot secto|r, and t|
|000027b0| 68 65 20 6c 6f 67 69 63 | 61 6c 20 73 74 61 72 74 |he logic|al start|
|000027c0| 20 61 6e 64 20 6c 65 6e | 67 74 68 20 66 69 65 6c | and len|gth fiel|
|000027d0| 64 73 20 61 72 65 0a 75 | 73 65 64 20 74 6f 20 61 |ds are.u|sed to a|
|000027e0| 63 74 75 61 6c 6c 79 20 | 64 65 6c 69 6d 69 74 20 |ctually |delimit |
|000027f0| 74 68 65 20 70 61 72 74 | 69 74 69 6f 6e 20 75 73 |the part|ition us|
|00002800| 65 64 20 62 79 20 61 20 | 70 61 72 74 69 63 75 6c |ed by a |particul|
|00002810| 61 72 20 73 79 73 74 65 | 6d 2e 0a 2e 53 53 20 22 |ar syste|m...SS "|
|00002820| 50 61 72 74 69 74 69 6f | 6e 20 4e 61 6d 65 73 22 |Partitio|n Names"|
|00002830| 0a 2e 4c 50 0a 54 68 65 | 0a 2e 42 20 4e 61 6d 65 |..LP.The|..B Name|
|00002840| 0a 66 69 65 6c 64 20 69 | 6e 20 74 68 65 20 70 61 |.field i|n the pa|
|00002850| 72 74 69 74 69 6f 6e 20 | 74 61 62 6c 65 20 69 73 |rtition |table is|
|00002860| 20 74 72 65 61 74 65 64 | 20 73 70 65 63 69 61 6c | treated| special|
|00002870| 6c 79 20 69 66 20 74 68 | 65 0a 2e 42 20 62 6f 6f |ly if th|e..B boo|
|00002880| 74 6d 65 6e 75 0a 70 72 | 6f 67 72 61 6d 20 69 73 |tmenu.pr|ogram is|
|00002890| 20 69 6e 73 74 61 6c 6c | 65 64 20 69 6e 20 74 68 | install|ed in th|
|000028a0| 65 20 70 72 69 6d 61 72 | 79 20 62 6f 6f 74 20 73 |e primar|y boot s|
|000028b0| 65 63 74 6f 72 2e 0a 28 | 53 65 65 20 74 68 65 20 |ector..(|See the |
|000028c0| 66 69 6c 65 20 62 6f 6f | 74 6d 65 6e 75 2e 64 6f |file boo|tmenu.do|
|000028d0| 63 20 66 6f 72 20 6d 6f | 72 65 20 69 6e 66 6f 72 |c for mo|re infor|
|000028e0| 6d 61 74 69 6f 6e 2e 29 | 0a 2e 42 20 70 66 64 69 |mation.)|..B pfdi|
|000028f0| 73 6b 0a 63 61 6e 20 72 | 65 63 6f 67 6e 69 7a 65 |sk.can r|ecognize|
|00002900| 20 74 68 65 20 6e 61 6d | 65 20 74 61 62 6c 65 20 | the nam|e table |
|00002910| 75 73 65 64 20 62 79 0a | 2e 42 20 62 6f 6f 74 6d |used by.|.B bootm|
|00002920| 65 6e 75 0a 61 6e 64 20 | 77 69 6c 6c 20 73 68 6f |enu.and |will sho|
|00002930| 77 20 74 68 65 20 61 63 | 74 75 61 6c 20 6e 61 6d |w the ac|tual nam|
|00002940| 65 73 20 70 72 65 73 65 | 6e 74 20 69 6e 20 74 68 |es prese|nt in th|
|00002950| 61 74 20 6e 61 6d 65 20 | 74 61 62 6c 65 2e 0a 49 |at name |table..I|
|00002960| 66 20 61 6e 79 20 6f 74 | 68 65 72 20 62 6f 6f 74 |f any ot|her boot|
|00002970| 20 70 72 6f 67 72 61 6d | 20 69 73 20 75 73 65 64 | program| is used|
|00002980| 20 74 68 65 6e 20 74 68 | 65 0a 2e 42 20 4e 61 6d | then th|e..B Nam|
|00002990| 65 0a 66 69 65 6c 64 20 | 72 65 66 6c 65 63 74 73 |e.field |reflects|
|000029a0| 20 74 68 65 20 72 65 73 | 75 6c 74 20 6f 66 20 61 | the res|ult of a|
|000029b0| 20 74 61 62 6c 65 2d 6c | 6f 6f 6b 75 70 20 6f 66 | table-l|ookup of|
|000029c0| 20 74 68 65 20 73 79 73 | 74 65 6d 20 49 44 2e 0a | the sys|tem ID..|
|000029d0| 2e 4c 50 0a 49 66 20 79 | 6f 75 20 70 72 6f 76 69 |.LP.If y|ou provi|
|000029e0| 64 65 20 61 20 6e 61 6d | 65 20 77 68 65 6e 20 73 |de a nam|e when s|
|000029f0| 65 74 74 69 6e 67 20 61 | 6e 79 20 70 61 72 74 69 |etting a|ny parti|
|00002a00| 74 69 6f 6e 20 65 6e 74 | 72 79 2c 20 74 68 65 0a |tion ent|ry, the.|
|00002a10| 62 6f 6f 74 2d 73 65 63 | 74 6f 72 20 69 73 20 6d |boot-sec|tor is m|
|00002a20| 61 72 6b 65 64 20 61 73 | 20 75 73 69 6e 67 20 61 |arked as| using a|
|00002a30| 20 6e 61 6d 65 20 74 61 | 62 6c 65 2c 20 73 6f 20 | name ta|ble, so |
|00002a40| 74 68 61 74 20 6f 6e 0a | 73 75 62 73 65 71 75 65 |that on.|subseque|
|00002a50| 6e 74 20 75 73 65 73 20 | 6f 66 0a 2e 42 20 70 66 |nt uses |of..B pf|
|00002a60| 64 69 73 6b 0a 79 6f 75 | 20 77 69 6c 6c 20 73 65 |disk.you| will se|
|00002a70| 65 20 74 68 65 20 70 61 | 72 74 69 74 69 6f 6e 20 |e the pa|rtition |
|00002a80| 6e 61 6d 65 73 20 79 6f | 75 20 68 61 76 65 20 73 |names yo|u have s|
|00002a90| 70 65 63 69 66 69 65 64 | 2e 0a 2e 53 53 20 22 42 |pecified|...SS "B|
|00002aa0| 6f 6f 74 20 70 72 6f 67 | 72 61 6d 20 72 65 70 6c |oot prog|ram repl|
|00002ab0| 61 63 65 6d 65 6e 74 22 | 0a 2e 4c 50 0a 59 6f 75 |acement"|..LP.You|
|00002ac0| 20 63 61 6e 20 72 65 70 | 6c 61 63 65 20 74 68 65 | can rep|lace the|
|00002ad0| 20 62 6f 6f 74 20 70 72 | 6f 67 72 61 6d 20 69 6e | boot pr|ogram in|
|00002ae0| 20 79 6f 75 72 20 62 6f | 6f 74 20 73 65 63 74 6f | your bo|ot secto|
|00002af0| 72 20 77 69 74 68 6f 75 | 74 0a 61 66 66 65 63 74 |r withou|t.affect|
|00002b00| 69 6e 67 20 74 68 65 20 | 70 61 72 74 69 74 69 6f |ing the |partitio|
|00002b10| 6e 20 74 61 62 6c 65 20 | 62 79 20 75 73 69 6e 67 |n table |by using|
|00002b20| 0a 2e 42 20 70 66 64 69 | 73 6b 0a 61 73 20 66 6f |..B pfdi|sk.as fo|
|00002b30| 6c 6c 6f 77 73 2e 20 20 | 46 69 72 73 74 2c 20 28 |llows. |First, (|
|00002b40| 61 73 20 61 6c 77 61 79 | 73 29 20 73 61 76 65 20 |as alway|s) save |
|00002b50| 61 20 63 6f 70 79 20 6f | 66 20 74 68 65 20 63 75 |a copy o|f the cu|
|00002b60| 72 72 65 6e 74 20 62 6f | 6f 74 0a 73 65 63 74 6f |rrent bo|ot.secto|
|00002b70| 72 20 28 6f 6e 20 61 20 | 66 6c 6f 70 70 79 29 20 |r (on a |floppy) |
|00002b80| 75 73 69 6e 67 20 74 68 | 65 20 22 57 20 66 69 6c |using th|e "W fil|
|00002b90| 65 22 20 63 6f 6d 6d 61 | 6e 64 2e 20 20 54 68 65 |e" comma|nd. The|
|00002ba0| 6e 2c 20 75 73 65 20 74 | 68 65 0a 22 52 20 66 69 |n, use t|he."R fi|
|00002bb0| 6c 65 22 20 63 6f 6d 6d | 61 6e 64 20 74 6f 20 72 |le" comm|and to r|
|00002bc0| 65 61 64 20 74 68 65 20 | 6e 65 77 20 62 6f 6f 74 |ead the |new boot|
|00002bd0| 20 70 72 6f 67 72 61 6d | 2e 0a 49 66 20 74 68 65 | program|..If the|
|00002be0| 20 62 6f 6f 74 20 70 72 | 6f 67 72 61 6d 20 72 65 | boot pr|ogram re|
|00002bf0| 61 64 20 69 6e 20 69 73 | 20 6c 65 73 73 20 74 68 |ad in is| less th|
|00002c00| 61 6e 20 34 34 36 20 62 | 79 74 65 73 20 6c 6f 6e |an 446 b|ytes lon|
|00002c10| 67 2c 20 74 68 65 0a 70 | 61 72 74 69 74 69 6f 6e |g, the.p|artition|
|00002c20| 20 74 61 62 6c 65 20 77 | 69 6c 6c 20 62 65 20 75 | table w|ill be u|
|00002c30| 6e 63 68 61 6e 67 65 64 | 2e 0a 2e 4c 50 0a 55 6e |nchanged|...LP.Un|
|00002c40| 6c 69 6b 65 20 74 68 65 | 20 44 4f 53 20 6f 72 20 |like the| DOS or |
|00002c50| 55 4e 49 58 0a 2e 42 20 | 66 64 69 73 6b 0a 70 72 |UNIX..B |fdisk.pr|
|00002c60| 6f 67 72 61 6d 73 2c 0a | 2e 42 20 70 66 64 69 73 |ograms,.|.B pfdis|
|00002c70| 6b 0a 68 61 73 0a 2e 49 | 20 4e 4f 0a 62 6f 6f 74 |k.has..I| NO.boot|
|00002c80| 20 70 72 6f 67 72 61 6d | 20 63 6f 6d 70 69 6c 65 | program| compile|
|00002c90| 64 20 69 6e 74 6f 20 69 | 74 73 20 65 78 65 63 75 |d into i|ts execu|
|00002ca0| 74 61 62 6c 65 20 69 6d | 61 67 65 2e 0a 49 66 20 |table im|age..If |
|00002cb0| 79 6f 75 20 77 69 73 68 | 20 74 6f 20 75 73 65 0a |you wish| to use.|
|00002cc0| 2e 42 20 70 66 64 69 73 | 6b 0a 74 6f 20 70 61 72 |.B pfdis|k.to par|
|00002cd0| 74 69 74 69 6f 6e 20 61 | 20 6e 65 77 6c 79 20 66 |tition a| newly f|
|00002ce0| 6f 72 6d 61 74 74 65 64 | 20 68 61 72 64 20 64 69 |ormatted| hard di|
|00002cf0| 73 6b 2c 20 79 6f 75 20 | 6d 75 73 74 20 68 61 76 |sk, you |must hav|
|00002d00| 65 20 61 20 62 6f 6f 74 | 20 70 72 6f 67 72 61 6d |e a boot| program|
|00002d10| 0a 69 6d 61 67 65 20 61 | 76 61 69 6c 61 62 6c 65 |.image a|vailable|
|00002d20| 20 74 6f 20 72 65 61 64 | 20 69 6e 20 75 73 69 6e | to read| in usin|
|00002d30| 67 20 74 68 65 20 22 72 | 20 66 69 6c 65 22 20 63 |g the "r| file" c|
|00002d40| 6f 6d 6d 61 6e 64 2e 0a | 54 77 6f 20 62 6f 6f 74 |ommand..|Two boot|
|00002d50| 20 70 72 6f 67 72 61 6d | 73 2c 20 22 62 6f 6f 74 | program|s, "boot|
|00002d60| 6d 65 6e 75 2e 62 69 6e | 22 20 61 6e 64 20 22 62 |menu.bin|" and "b|
|00002d70| 6f 6f 74 61 75 74 6f 2e | 62 69 6e 22 20 61 72 65 |ootauto.|bin" are|
|00002d80| 20 64 69 73 74 72 69 62 | 75 74 65 64 20 77 69 74 | distrib|uted wit|
|00002d90| 68 0a 2e 42 20 70 66 64 | 69 73 6b 0a 61 6e 64 20 |h..B pfd|isk.and |
|00002da0| 73 68 6f 75 6c 64 20 62 | 65 20 66 6f 75 6e 64 20 |should b|e found |
|00002db0| 77 69 74 68 20 69 74 73 | 20 73 6f 75 72 63 65 20 |with its| source |
|00002dc0| 66 69 6c 65 73 2e 20 20 | 53 65 65 20 74 68 65 20 |files. |See the |
|00002dd0| 66 69 6c 65 20 62 6f 6f | 74 6d 65 6e 75 2e 64 6f |file boo|tmenu.do|
|00002de0| 63 0a 66 6f 72 20 66 75 | 72 74 68 65 72 20 69 6e |c.for fu|rther in|
|00002df0| 66 6f 72 6d 61 74 69 6f | 6e 20 61 62 6f 75 74 20 |formatio|n about |
|00002e00| 74 68 65 73 65 20 62 6f | 6f 74 20 70 72 6f 67 72 |these bo|ot progr|
|00002e10| 61 6d 73 2e 0a 2e 53 48 | 20 41 55 54 48 4f 52 0a |ams...SH| AUTHOR.|
|00002e20| 47 6f 72 64 6f 6e 20 57 | 2e 20 52 6f 73 73 0a 53 |Gordon W|. Ross.S|
|00002e30| 48 41 52 5f 45 4f 46 0a | 69 66 20 74 65 73 74 20 |HAR_EOF.|if test |
|00002e40| 36 33 38 36 20 2d 6e 65 | 20 22 60 77 63 20 2d 63 |6386 -ne| "`wc -c|
|00002e50| 20 3c 20 27 70 66 64 69 | 73 6b 2e 6d 61 6e 27 60 | < 'pfdi|sk.man'`|
|00002e60| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|00002e70| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|00002e80| 74 74 69 6e 67 20 22 27 | 70 66 64 69 73 6b 2e 6d |tting "'|pfdisk.m|
|00002e90| 61 6e 27 22 20 27 28 73 | 68 6f 75 6c 64 20 68 61 |an'" '(s|hould ha|
|00002ea0| 76 65 20 62 65 65 6e 20 | 36 33 38 36 20 63 68 61 |ve been |6386 cha|
|00002eb0| 72 61 63 74 65 72 73 29 | 27 0a 66 69 0a 66 69 20 |racters)|'.fi.fi |
|00002ec0| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00002ed0| 74 69 6e 67 20 63 68 65 | 63 6b 0a 65 63 68 6f 20 |ting che|ck.echo |
|00002ee0| 73 68 61 72 3a 20 65 78 | 74 72 61 63 74 69 6e 67 |shar: ex|tracting|
|00002ef0| 20 22 27 43 68 61 6e 67 | 65 73 27 22 20 27 28 31 | "'Chang|es'" '(1|
|00002f00| 31 33 31 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |131 char|acters)'|
|00002f10| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 43 68 61 |.if test| -f 'Cha|
|00002f20| 6e 67 65 73 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |nges'.th|en..echo|
|00002f30| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00002f40| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00002f50| 69 6e 67 20 66 69 6c 65 | 20 22 27 43 68 61 6e 67 |ing file| "'Chang|
|00002f60| 65 73 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |es'".els|e.cat <<|
|00002f70| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 43 68 | \SHAR_E|OF > 'Ch|
|00002f80| 61 6e 67 65 73 27 0a 4e | 65 77 20 69 6e 20 76 65 |anges'.N|ew in ve|
|00002f90| 72 73 69 6f 6e 20 31 2e | 33 3a 0a 4f 63 74 20 39 |rsion 1.|3:.Oct 9|
|00002fa0| 30 0a 09 55 70 64 61 74 | 65 64 20 64 6f 63 75 6d |0..Updat|ed docum|
|00002fb0| 65 6e 74 61 74 69 6f 6e | 20 66 6f 72 20 63 6f 6d |entation| for com|
|00002fc0| 70 2e 73 6f 75 72 63 65 | 73 2e 6d 69 73 63 20 70 |p.source|s.misc p|
|00002fd0| 6f 73 74 69 6e 67 2e 0a | 09 43 6c 65 61 6e 65 64 |osting..|.Cleaned|
|00002fe0| 20 75 70 20 73 6c 69 67 | 68 74 6c 79 2c 20 75 73 | up slig|htly, us|
|00002ff0| 69 6e 67 20 75 6e 73 69 | 67 6e 65 64 20 77 68 65 |ing unsi|gned whe|
|00003000| 72 65 20 61 70 70 72 6f | 70 72 69 61 74 65 2e 0a |re appro|priate..|
|00003010| 09 46 6f 72 63 65 64 20 | 22 73 6d 61 6c 6c 22 20 |.Forced |"small" |
|00003020| 6d 6f 64 65 6c 20 66 6f | 72 20 4d 69 63 72 6f 53 |model fo|r MicroS|
|00003030| 6f 66 74 20 43 20 63 6f | 6d 70 69 6c 65 72 2e 20 |oft C co|mpiler. |
|00003040| 28 44 4f 53 2e 2e 2e 29 | 0a 09 70 66 64 69 73 6b |(DOS...)|..pfdisk|
|00003050| 20 63 6f 6d 6d 61 6e 64 | 20 6c 65 74 74 65 72 73 | command| letters|
|00003060| 20 63 61 6e 20 62 65 20 | 75 70 70 65 72 20 6f 72 | can be |upper or|
|00003070| 20 6c 6f 77 65 72 20 63 | 61 73 65 0a 09 41 64 64 | lower c|ase..Add|
|00003080| 65 64 20 70 61 72 74 69 | 74 69 6f 6e 20 49 44 20 |ed parti|tion ID |
|00003090| 63 6f 64 65 73 20 61 73 | 20 28 67 65 6e 65 72 6f |codes as| (genero|
|000030a0| 75 73 6c 79 29 20 72 65 | 70 6f 72 74 65 64 20 62 |usly) re|ported b|
|000030b0| 79 0a 09 09 6c 65 65 6e | 64 65 72 74 40 63 73 2e |y...leen|dert@cs.|
|000030c0| 76 75 2e 6e 6c 20 28 4c | 65 65 6e 64 65 72 74 20 |vu.nl (L|eendert |
|000030d0| 76 61 6e 20 44 6f 6f 72 | 6e 29 0a 0a 4e 65 77 20 |van Door|n)..New |
|000030e0| 69 6e 20 76 65 72 73 69 | 6f 6e 20 31 2e 32 3a 0a |in versi|on 1.2:.|
|000030f0| 53 65 70 74 20 27 39 30 | 0a 09 41 64 64 65 64 20 |Sept '90|..Added |
|00003100| 6e 65 77 2c 20 73 6d 61 | 6c 6c 65 72 20 76 65 72 |new, sma|ller ver|
|00003110| 73 69 6f 6e 20 6f 66 20 | 62 6f 6f 74 20 70 72 6f |sion of |boot pro|
|00003120| 67 72 61 6d 20 28 42 4f | 4f 54 4d 45 4e 55 29 2e |gram (BO|OTMENU).|
|00003130| 0a 09 52 65 6e 61 6d 65 | 64 20 62 6f 6f 74 2d 68 |..Rename|d boot-h|
|00003140| 64 70 20 74 6f 20 42 4f | 4f 54 41 55 54 4f 20 28 |dp to BO|OTAUTO (|
|00003150| 6d 6f 72 65 20 64 65 73 | 63 72 69 70 74 69 76 65 |more des|criptive|
|00003160| 20 6f 66 20 69 74 73 20 | 66 75 6e 63 74 69 6f 6e | of its |function|
|00003170| 3f 29 0a 09 41 64 64 65 | 64 20 70 72 6f 6d 70 74 |?)..Adde|d prompt|
|00003180| 20 28 70 65 6f 70 6c 65 | 20 77 65 72 65 20 63 6f | (people| were co|
|00003190| 6e 66 75 73 65 64 20 77 | 69 68 6f 75 74 20 69 74 |nfused w|ihout it|
|000031a0| 29 0a 09 4d 61 64 65 20 | 70 66 64 69 73 6b 20 73 |)..Made |pfdisk s|
|000031b0| 68 6f 77 20 72 65 61 6c | 20 6e 61 6d 65 20 66 69 |how real| name fi|
|000031c0| 65 6c 64 20 77 69 74 68 | 20 73 79 73 69 64 3d 3d |eld with| sysid==|
|000031d0| 30 2e 0a 09 4d 61 64 65 | 20 70 66 64 69 73 6b 20 |0...Made| pfdisk |
|000031e0| 73 65 74 20 74 68 65 20 | 73 69 67 6e 61 74 75 72 |set the |signatur|
|000031f0| 65 20 77 68 65 6e 65 76 | 65 72 20 61 20 28 31 2c |e whenev|er a (1,|
|00003200| 32 2c 33 2c 34 29 20 63 | 6f 6d 6d 61 6e 64 0a 09 |2,3,4) c|ommand..|
|00003210| 09 73 70 65 63 69 66 69 | 65 73 20 74 68 65 20 6f |.specifi|es the o|
|00003220| 70 74 69 6f 6e 61 6c 20 | 6e 61 6d 65 20 61 72 67 |ptional |name arg|
|00003230| 75 6d 65 6e 74 2e 0a 09 | 4d 61 64 65 20 70 66 64 |ument...|Made pfd|
|00003240| 69 73 6b 20 63 6f 6d 70 | 6c 61 69 6e 20 61 62 6f |isk comp|lain abo|
|00003250| 75 74 20 69 6e 76 61 6c | 69 64 20 62 6f 6f 74 20 |ut inval|id boot |
|00003260| 73 65 63 74 6f 72 20 61 | 6e 64 20 6d 61 72 6b 20 |sector a|nd mark |
|00003270| 69 74 20 76 61 6c 69 64 | 2e 0a 0a 4e 65 77 20 69 |it valid|...New i|
|00003280| 6e 20 76 65 72 73 69 6f | 6e 20 31 2e 31 3a 0a 46 |n versio|n 1.1:.F|
|00003290| 65 62 20 27 39 30 0a 09 | 41 64 64 65 64 20 4d 53 |eb '90..|Added MS|
|000032a0| 44 4f 53 20 63 6f 6d 70 | 61 74 69 62 69 6c 69 74 |DOS comp|atibilit|
|000032b0| 79 20 74 6f 20 68 65 78 | 32 62 69 6e 2e 63 0a 09 |y to hex|2bin.c..|
|000032c0| 4d 6f 76 65 64 20 45 53 | 49 58 20 70 61 74 63 68 |Moved ES|IX patch|
|000032d0| 65 73 20 69 6e 74 6f 20 | 61 20 73 65 70 61 72 61 |es into |a separa|
|000032e0| 74 65 20 70 61 63 6b 61 | 67 65 2e 0a 0a 09 52 65 |te packa|ge....Re|
|000032f0| 6e 61 6d 65 64 20 73 5f | 6d 69 6e 69 78 2e 63 20 |named s_|minix.c |
|00003300| 74 6f 20 73 5f 75 6e 69 | 78 2e 63 20 28 69 74 27 |to s_uni|x.c (it'|
|00003310| 73 20 67 65 6e 65 72 69 | 63 29 0a 09 43 72 65 61 |s generi|c)..Crea|
|00003320| 74 65 64 20 61 6e 20 73 | 5f 69 73 63 2e 63 20 66 |ted an s|_isc.c f|
|00003330| 6f 72 20 49 6e 74 65 72 | 61 63 74 69 76 65 20 53 |or Inter|active S|
|00003340| 79 73 74 65 6d 73 20 55 | 4e 49 58 0a 0a 09 46 69 |ystems U|NIX...Fi|
|00003350| 78 65 64 20 69 6e 63 6f | 6e 73 69 73 74 65 6e 63 |xed inco|nsistenc|
|00003360| 69 65 73 20 69 6e 20 65 | 73 69 78 2d 66 69 78 2e |ies in e|six-fix.|
|00003370| 73 68 20 61 6e 64 0a 09 | 52 65 6d 6f 76 65 64 20 |sh and..|Removed |
|00003380| 62 79 74 65 2d 6f 72 64 | 65 72 20 64 65 70 65 6e |byte-ord|er depen|
|00003390| 64 65 6e 63 69 65 73 20 | 66 72 6f 6d 20 70 66 64 |dencies |from pfd|
|000033a0| 69 73 6b 2e 63 0a 0a 09 | 52 65 76 69 73 65 64 20 |isk.c...|Revised |
|000033b0| 69 6e 73 74 72 75 63 74 | 69 6f 6e 73 20 69 6e 20 |instruct|ions in |
|000033c0| 62 6f 6f 74 2d 68 64 70 | 2e 64 6f 63 0a 0a 56 65 |boot-hdp|.doc..Ve|
|000033d0| 72 73 69 6f 6e 20 31 2e | 30 20 72 65 6c 65 61 73 |rsion 1.|0 releas|
|000033e0| 65 64 20 28 69 6e 69 74 | 69 61 6c 20 62 65 74 61 |ed (init|ial beta|
|000033f0| 29 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |).SHAR_E|OF.if te|
|00003400| 73 74 20 31 31 33 31 20 | 2d 6e 65 20 22 60 77 63 |st 1131 |-ne "`wc|
|00003410| 20 2d 63 20 3c 20 27 43 | 68 61 6e 67 65 73 27 60 | -c < 'C|hanges'`|
|00003420| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|00003430| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|00003440| 74 74 69 6e 67 20 22 27 | 43 68 61 6e 67 65 73 27 |tting "'|Changes'|
|00003450| 22 20 27 28 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |" '(shou|ld have |
|00003460| 62 65 65 6e 20 31 31 33 | 31 20 63 68 61 72 61 63 |been 113|1 charac|
|00003470| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 20 23 20 65 |ters)'.f|i.fi # e|
|00003480| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00003490| 67 20 63 68 65 63 6b 0a | 65 63 68 6f 20 73 68 61 |g check.|echo sha|
|000034a0| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|000034b0| 4d 61 6b 65 66 69 6c 65 | 27 22 20 27 28 31 36 32 |Makefile|'" '(162|
|000034c0| 39 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |9 charac|ters)'.i|
|000034d0| 66 20 74 65 73 74 20 2d | 66 20 27 4d 61 6b 65 66 |f test -|f 'Makef|
|000034e0| 69 6c 65 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |ile'.the|n..echo |
|000034f0| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00003500| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00003510| 6e 67 20 66 69 6c 65 20 | 22 27 4d 61 6b 65 66 69 |ng file |"'Makefi|
|00003520| 6c 65 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |le'".els|e.cat <<|
|00003530| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 4d 61 | \SHAR_E|OF > 'Ma|
|00003540| 6b 65 66 69 6c 65 27 0a | 23 20 54 68 69 73 20 6d |kefile'.|# This m|
|00003550| 61 6b 65 66 69 6c 65 20 | 73 75 70 70 6f 72 74 73 |akefile |supports|
|00003560| 20 61 6c 6c 20 55 4e 49 | 58 2d 6c 69 6b 65 20 73 | all UNI|X-like s|
|00003570| 79 73 74 65 6d 73 2e 0a | 23 20 55 6e 63 6f 6d 6d |ystems..|# Uncomm|
|00003580| 65 6e 74 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 53 |ent one |of the S|
|00003590| 59 53 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 62 |YS defin|itions b|
|000035a0| 65 6c 6f 77 2c 20 6f 72 | 0a 23 20 75 73 65 20 61 |elow, or|.# use a|
|000035b0| 20 6d 61 6b 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 | make co|mmand li|
|000035c0| 6b 65 3a 0a 23 09 6d 61 | 6b 65 20 53 59 53 3d 65 |ke:.#.ma|ke SYS=e|
|000035d0| 73 69 78 0a 23 20 28 46 | 6f 72 20 63 6f 6d 70 69 |six.# (F|or compi|
|000035e0| 6c 69 6e 67 20 6f 6e 20 | 4d 53 2d 44 4f 53 2c 20 |ling on |MS-DOS, |
|000035f0| 73 65 65 20 6d 61 6b 65 | 5f 6d 73 63 2e 62 61 74 |see make|_msc.bat|
|00003600| 29 0a 23 20 28 54 6f 20 | 63 6f 6d 70 69 6c 65 20 |).# (To |compile |
|00003610| 6f 6e 20 4d 69 6e 69 78 | 2c 20 75 73 65 3a 20 20 |on Minix|, use: |
|00003620| 6d 61 6b 65 20 6d 69 6e | 69 78 29 0a 23 0a 23 20 |make min|ix).#.# |
|00003630| 55 6e 63 6f 6d 6d 65 6e | 74 20 66 6f 72 20 45 53 |Uncommen|t for ES|
|00003640| 49 58 20 20 53 79 73 2e | 56 2f 33 38 36 20 52 65 |IX Sys.|V/386 Re|
|00003650| 6c 2e 20 33 2e 32 0a 23 | 53 59 53 3d 65 73 69 78 |l. 3.2.#|SYS=esix|
|00003660| 0a 23 20 55 6e 63 6f 6d | 6d 65 6e 74 20 66 6f 72 |.# Uncom|ment for|
|00003670| 20 6f 74 68 65 72 20 53 | 79 73 2e 56 2f 33 38 36 | other S|ys.V/386|
|00003680| 20 73 79 73 74 65 6d 73 | 20 28 49 53 43 2c 53 43 | systems| (ISC,SC|
|00003690| 4f 2c 49 6e 74 65 6c 2e | 2e 2e 29 0a 23 53 59 53 |O,Intel.|..).#SYS|
|000036a0| 3d 69 33 38 36 0a 23 20 | 55 6e 63 6f 6d 6d 65 6e |=i386.# |Uncommen|
|000036b0| 74 20 66 6f 72 20 4d 53 | 44 4f 53 20 77 69 74 68 |t for MS|DOS with|
|000036c0| 20 55 4e 49 58 2d 73 74 | 79 6c 65 20 6d 61 6b 65 | UNIX-st|yle make|
|000036d0| 20 28 69 2e 65 2e 20 6e | 64 6d 61 6b 65 29 0a 23 | (i.e. n|dmake).#|
|000036e0| 53 59 53 3d 6d 73 64 6f | 73 0a 23 20 55 6e 63 6f |SYS=msdo|s.# Unco|
|000036f0| 6d 6d 65 6e 74 20 66 6f | 72 20 6f 74 68 65 72 20 |mment fo|r other |
|00003700| 55 4e 49 58 2d 6c 69 6b | 65 20 73 79 73 74 65 6d |UNIX-lik|e system|
|00003710| 73 0a 53 59 53 3d 75 6e | 69 78 0a 0a 23 20 43 6f |s.SYS=un|ix..# Co|
|00003720| 6d 70 69 6c 61 74 69 6f | 6e 20 6f 70 74 69 6f 6e |mpilatio|n option|
|00003730| 73 3a 0a 43 43 3d 63 63 | 0a 43 46 4c 41 47 53 3d |s:.CC=cc|.CFLAGS=|
|00003740| 2d 67 0a 0a 46 49 4c 45 | 53 31 3d 09 52 45 41 44 |-g..FILE|S1=.READ|
|00003750| 4d 45 20 70 66 64 69 73 | 6b 2e 6d 61 6e 20 43 68 |ME pfdis|k.man Ch|
|00003760| 61 6e 67 65 73 20 4d 61 | 6b 65 66 69 6c 65 20 70 |anges Ma|kefile p|
|00003770| 66 64 69 73 6b 2e 63 20 | 73 79 73 63 6f 64 65 73 |fdisk.c |syscodes|
|00003780| 2e 63 20 5c 0a 20 73 79 | 73 63 6f 64 65 73 2e 68 |.c \. sy|scodes.h|
|00003790| 20 73 79 73 64 65 70 2e | 68 20 73 5f 65 73 69 78 | sysdep.|h s_esix|
|000037a0| 2e 63 20 73 5f 69 33 38 | 36 2e 63 20 73 5f 75 6e |.c s_i38|6.c s_un|
|000037b0| 69 78 2e 63 20 73 5f 6d | 73 64 6f 73 2e 63 0a 46 |ix.c s_m|sdos.c.F|
|000037c0| 49 4c 45 53 32 3d 20 62 | 6f 6f 74 6d 65 6e 75 2e |ILES2= b|ootmenu.|
|000037d0| 64 6f 63 20 70 66 64 69 | 73 6b 2e 64 6f 63 20 53 |doc pfdi|sk.doc S|
|000037e0| 53 74 6f 72 2e 74 78 74 | 20 62 6f 6f 74 6d 65 6e |Stor.txt| bootmen|
|000037f0| 75 2e 61 73 6d 20 62 6f | 6f 74 61 75 74 6f 2e 61 |u.asm bo|otauto.a|
|00003800| 73 6d 20 5c 0a 20 61 73 | 6d 32 62 69 6e 2e 62 61 |sm \. as|m2bin.ba|
|00003810| 74 20 6d 61 6b 65 5f 6d | 73 63 2e 62 61 74 20 62 |t make_m|sc.bat b|
|00003820| 6f 6f 74 6d 65 6e 75 2e | 68 65 78 20 62 6f 6f 74 |ootmenu.|hex boot|
|00003830| 61 75 74 6f 2e 68 65 78 | 20 68 65 78 32 62 69 6e |auto.hex| hex2bin|
|00003840| 2e 63 0a 0a 4f 42 4a 53 | 3d 20 70 66 64 69 73 6b |.c..OBJS|= pfdisk|
|00003850| 2e 6f 20 73 79 73 63 6f | 64 65 73 2e 6f 20 73 5f |.o sysco|des.o s_|
|00003860| 24 28 53 59 53 29 2e 6f | 0a 4c 53 52 43 3d 20 70 |$(SYS).o|.LSRC= p|
|00003870| 66 64 69 73 6b 2e 63 20 | 73 79 73 63 6f 64 65 73 |fdisk.c |syscodes|
|00003880| 2e 63 20 73 5f 24 28 53 | 59 53 29 2e 63 0a 0a 74 |.c s_$(S|YS).c..t|
|00003890| 65 73 74 3a 20 70 66 64 | 69 73 6b 0a 09 28 65 63 |est: pfd|isk..(ec|
|000038a0| 68 6f 20 22 67 20 31 32 | 32 32 20 31 35 20 33 34 |ho "g 12|22 15 34|
|000038b0| 22 3b 5c 0a 09 20 65 63 | 68 6f 20 22 31 20 20 34 |";\.. ec|ho "1 4|
|000038c0| 20 20 20 30 20 20 31 32 | 37 20 4d 53 2d 4c 4f 53 | 0 12|7 MS-LOS|
|000038d0| 53 22 3b 5c 0a 09 20 65 | 63 68 6f 20 22 34 20 39 |S";\.. e|cho "4 9|
|000038e0| 39 20 31 32 38 20 31 32 | 32 31 20 45 53 49 58 22 |9 128 12|21 ESIX"|
|000038f0| 3b 5c 0a 09 20 65 63 68 | 6f 20 22 61 20 34 22 3b |;\.. ech|o "a 4";|
|00003900| 20 65 63 68 6f 20 6c 3b | 20 65 63 68 6f 20 77 71 | echo l;| echo wq|
|00003910| 20 5c 0a 09 29 20 7c 20 | 70 66 64 69 73 6b 20 2f | \..) | |pfdisk /|
|00003920| 64 65 76 2f 6e 75 6c 6c | 0a 0a 61 6c 6c 3a 20 70 |dev/null|..all: p|
|00003930| 66 64 69 73 6b 20 62 6f | 6f 74 6d 65 6e 75 2e 62 |fdisk bo|otmenu.b|
|00003940| 69 6e 20 62 6f 6f 74 61 | 75 74 6f 2e 62 69 6e 0a |in boota|uto.bin.|
|00003950| 0a 70 66 64 69 73 6b 3a | 20 24 28 4f 42 4a 53 29 |.pfdisk:| $(OBJS)|
|00003960| 0a 09 24 28 43 43 29 20 | 24 28 43 46 4c 41 47 53 |..$(CC) |$(CFLAGS|
|00003970| 29 20 2d 6f 20 24 40 20 | 24 28 4f 42 4a 53 29 0a |) -o $@ |$(OBJS).|
|00003980| 0a 6d 69 6e 69 78 3a 20 | 62 6f 6f 74 6d 65 6e 75 |.minix: |bootmenu|
|00003990| 2e 62 69 6e 20 62 6f 6f | 74 61 75 74 6f 2e 62 69 |.bin boo|tauto.bi|
|000039a0| 6e 0a 09 24 28 43 43 29 | 20 24 28 43 46 4c 41 47 |n..$(CC)| $(CFLAG|
|000039b0| 53 29 20 2d 6f 20 70 66 | 64 69 73 6b 20 24 28 4c |S) -o pf|disk $(L|
|000039c0| 53 52 43 29 0a 0a 70 66 | 64 69 73 6b 2e 6f 20 3a |SRC)..pf|disk.o :|
|000039d0| 20 73 79 73 63 6f 64 65 | 73 2e 68 20 73 79 73 64 | syscode|s.h sysd|
|000039e0| 65 70 2e 68 0a 73 79 73 | 63 6f 64 65 73 2e 6f 20 |ep.h.sys|codes.o |
|000039f0| 3a 20 73 79 73 63 6f 64 | 65 73 2e 68 0a 73 5f 24 |: syscod|es.h.s_$|
|00003a00| 28 53 59 53 29 2e 6f 20 | 3a 20 73 79 73 64 65 70 |(SYS).o |: sysdep|
|00003a10| 2e 68 0a 0a 6c 69 6e 74 | 3a 20 24 28 4c 53 52 43 |.h..lint|: $(LSRC|
|00003a20| 29 0a 09 6c 69 6e 74 20 | 24 28 43 46 4c 41 47 53 |)..lint |$(CFLAGS|
|00003a30| 29 20 24 28 4c 53 52 43 | 29 0a 0a 62 6f 6f 74 6d |) $(LSRC|)..bootm|
|00003a40| 65 6e 75 2e 62 69 6e 3a | 20 68 65 78 32 62 69 6e |enu.bin:| hex2bin|
|00003a50| 0a 09 68 65 78 32 62 69 | 6e 20 3c 62 6f 6f 74 6d |..hex2bi|n <bootm|
|00003a60| 65 6e 75 2e 68 65 78 20 | 3e 62 6f 6f 74 6d 65 6e |enu.hex |>bootmen|
|00003a70| 75 2e 62 69 6e 0a 62 6f | 6f 74 61 75 74 6f 2e 62 |u.bin.bo|otauto.b|
|00003a80| 69 6e 3a 20 68 65 78 32 | 62 69 6e 0a 09 68 65 78 |in: hex2|bin..hex|
|00003a90| 32 62 69 6e 20 3c 62 6f | 6f 74 61 75 74 6f 2e 68 |2bin <bo|otauto.h|
|00003aa0| 65 78 20 3e 62 6f 6f 74 | 61 75 74 6f 2e 62 69 6e |ex >boot|auto.bin|
|00003ab0| 0a 0a 70 66 64 69 73 6b | 2e 64 6f 63 3a 20 70 66 |..pfdisk|.doc: pf|
|00003ac0| 64 69 73 6b 2e 6d 61 6e | 0a 09 6e 72 6f 66 66 20 |disk.man|..nroff |
|00003ad0| 74 6d 61 63 2e 61 6e 20 | 70 66 64 69 73 6b 2e 6d |tmac.an |pfdisk.m|
|00003ae0| 61 6e 20 7c 63 6f 6c 20 | 2d 62 68 20 3e 70 66 64 |an |col |-bh >pfd|
|00003af0| 69 73 6b 2e 64 6f 63 0a | 0a 63 6c 65 61 6e 3a 0a |isk.doc.|.clean:.|
|00003b00| 09 72 6d 20 2d 66 20 2a | 2e 6f 0a 0a 53 68 61 72 |.rm -f *|.o..Shar|
|00003b10| 31 2e 6f 75 74 3a 20 48 | 65 61 64 31 2e 74 78 74 |1.out: H|ead1.txt|
|00003b20| 20 24 28 46 49 4c 45 53 | 31 29 0a 09 28 63 61 74 | $(FILES|1)..(cat|
|00003b30| 20 48 65 61 64 31 2e 74 | 78 74 20 3b 20 73 68 61 | Head1.t|xt ; sha|
|00003b40| 72 20 2d 76 20 2d 63 20 | 24 28 46 49 4c 45 53 31 |r -v -c |$(FILES1|
|00003b50| 29 29 20 3e 20 24 40 0a | 53 68 61 72 32 2e 6f 75 |)) > $@.|Shar2.ou|
|00003b60| 74 3a 20 48 65 61 64 32 | 2e 74 78 74 20 24 28 46 |t: Head2|.txt $(F|
|00003b70| 49 4c 45 53 32 29 0a 09 | 28 63 61 74 20 48 65 61 |ILES2)..|(cat Hea|
|00003b80| 64 32 2e 74 78 74 20 3b | 20 73 68 61 72 20 2d 76 |d2.txt ;| shar -v|
|00003b90| 20 2d 63 20 24 28 46 49 | 4c 45 53 32 29 29 20 3e | -c $(FI|LES2)) >|
|00003ba0| 20 24 40 0a 0a 53 48 41 | 52 5f 45 4f 46 0a 69 66 | $@..SHA|R_EOF.if|
|00003bb0| 20 74 65 73 74 20 31 36 | 32 39 20 2d 6e 65 20 22 | test 16|29 -ne "|
|00003bc0| 60 77 63 20 2d 63 20 3c | 20 27 4d 61 6b 65 66 69 |`wc -c <| 'Makefi|
|00003bd0| 6c 65 27 60 22 0a 74 68 | 65 6e 0a 09 65 63 68 6f |le'`".th|en..echo|
|00003be0| 20 73 68 61 72 3a 20 65 | 72 72 6f 72 20 74 72 61 | shar: e|rror tra|
|00003bf0| 6e 73 6d 69 74 74 69 6e | 67 20 22 27 4d 61 6b 65 |nsmittin|g "'Make|
|00003c00| 66 69 6c 65 27 22 20 27 | 28 73 68 6f 75 6c 64 20 |file'" '|(should |
|00003c10| 68 61 76 65 20 62 65 65 | 6e 20 31 36 32 39 20 63 |have bee|n 1629 c|
|00003c20| 68 61 72 61 63 74 65 72 | 73 29 27 0a 66 69 0a 66 |haracter|s)'.fi.f|
|00003c30| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00003c40| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|00003c50| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00003c60| 6e 67 20 22 27 70 66 64 | 69 73 6b 2e 63 27 22 20 |ng "'pfd|isk.c'" |
|00003c70| 27 28 31 35 36 39 30 20 | 63 68 61 72 61 63 74 65 |'(15690 |characte|
|00003c80| 72 73 29 27 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |rs)'.if |test -f |
|00003c90| 27 70 66 64 69 73 6b 2e | 63 27 0a 74 68 65 6e 0a |'pfdisk.|c'.then.|
|00003ca0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 77 69 6c 6c |.echo sh|ar: will|
|00003cb0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|00003cc0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 22 27 |existing| file "'|
|00003cd0| 70 66 64 69 73 6b 2e 63 | 27 22 0a 65 6c 73 65 0a |pfdisk.c|'".else.|
|00003ce0| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00003cf0| 20 3e 20 27 70 66 64 69 | 73 6b 2e 63 27 0a 2f 2a | > 'pfdi|sk.c'./*|
|00003d00| 0a 20 2a 20 70 66 64 69 | 73 6b 20 2d 20 50 61 72 |. * pfdi|sk - Par|
|00003d10| 74 69 74 69 6f 6e 20 61 | 20 46 69 78 65 64 20 44 |tition a| Fixed D|
|00003d20| 49 53 4b 0a 20 2a 09 62 | 79 20 47 6f 72 64 6f 6e |ISK. *.b|y Gordon|
|00003d30| 20 57 2e 20 52 6f 73 73 | 2c 20 4a 61 6e 2e 20 31 | W. Ross|, Jan. 1|
|00003d40| 39 39 30 0a 20 2a 0a 20 | 2a 20 53 65 65 20 74 68 |990. *. |* See th|
|00003d50| 65 20 66 69 6c 65 20 22 | 70 66 64 69 73 6b 2e 64 |e file "|pfdisk.d|
|00003d60| 6f 63 22 20 66 6f 72 20 | 75 73 65 72 20 69 6e 73 |oc" for |user ins|
|00003d70| 74 72 75 63 74 69 6f 6e | 73 2e 0a 20 2a 0a 20 2a |truction|s.. *. *|
|00003d80| 20 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 75 73 | This pr|ogram us|
|00003d90| 65 73 20 61 20 73 69 6d | 70 6c 65 2c 20 6c 69 6e |es a sim|ple, lin|
|00003da0| 65 2d 6f 72 69 65 6e 74 | 65 64 20 69 6e 74 65 72 |e-orient|ed inter|
|00003db0| 70 72 65 74 65 72 2c 0a | 20 2a 20 64 65 73 69 67 |preter,.| * desig|
|00003dc0| 6e 65 64 20 66 6f 72 20 | 62 6f 74 68 20 69 6e 74 |ned for |both int|
|00003dd0| 65 72 61 63 74 69 76 65 | 20 61 6e 64 20 6e 6f 6e |eractive| and non|
|00003de0| 2d 69 6e 74 65 72 61 63 | 74 69 76 65 20 75 73 65 |-interac|tive use|
|00003df0| 2e 0a 20 2a 20 54 6f 20 | 66 61 63 69 6c 69 74 61 |.. * To |facilita|
|00003e00| 74 65 20 6e 6f 6e 2d 69 | 6e 74 65 72 61 63 74 69 |te non-i|nteracti|
|00003e10| 76 65 20 75 73 65 2c 20 | 74 68 65 20 6f 75 74 70 |ve use, |the outp|
|00003e20| 75 74 20 66 72 6f 6d 20 | 74 68 65 0a 20 2a 20 27 |ut from |the. * '|
|00003e30| 4c 27 20 28 6c 69 73 74 | 20 70 61 72 74 69 74 69 |L' (list| partiti|
|00003e40| 6f 6e 73 29 20 63 6f 6d | 6d 61 6e 64 20 69 73 20 |ons) com|mand is |
|00003e50| 63 61 72 65 66 75 6c 6c | 79 20 61 72 72 61 6e 67 |carefull|y arrang|
|00003e60| 65 64 20 73 6f 20 69 74 | 0a 20 2a 20 63 61 6e 20 |ed so it|. * can |
|00003e70| 62 65 20 75 73 65 64 20 | 64 69 72 65 63 74 6c 79 |be used |directly|
|00003e80| 20 61 73 20 63 6f 6d 6d | 61 6e 64 20 69 6e 70 75 | as comm|and inpu|
|00003e90| 74 2e 20 20 4e 65 61 74 | 20 74 72 69 63 6b 2c 20 |t. Neat| trick, |
|00003ea0| 65 68 3f 0a 20 2a 2f 0a | 0a 63 68 61 72 20 2a 76 |eh?. */.|.char *v|
|00003eb0| 65 72 73 69 6f 6e 53 74 | 72 69 6e 67 20 3d 0a 20 |ersionSt|ring =. |
|00003ec0| 20 22 23 20 70 66 64 69 | 73 6b 20 76 65 72 73 69 | "# pfdi|sk versi|
|00003ed0| 6f 6e 20 31 2e 32 20 62 | 79 20 47 6f 72 64 6f 6e |on 1.2 b|y Gordon|
|00003ee0| 20 57 2e 20 52 6f 73 73 | 20 20 41 75 67 2e 20 31 | W. Ross| Aug. 1|
|00003ef0| 39 39 30 5c 6e 22 3b 0a | 0a 2f 2a 20 54 68 65 73 |990\n";.|./* Thes|
|00003f00| 65 20 64 6f 6e 27 74 20 | 72 65 61 6c 6c 79 20 6d |e don't |really m|
|00003f10| 61 74 74 65 72 2e 20 20 | 54 68 65 20 75 73 65 72 |atter. |The user|
|00003f20| 20 69 73 20 61 73 6b 65 | 64 20 74 6f 20 73 65 74 | is aske|d to set|
|00003f30| 20 74 68 65 6d 2e 20 2a | 2f 0a 23 64 65 66 69 6e | them. *|/.#defin|
|00003f40| 65 20 44 45 46 41 55 4c | 54 5f 43 59 4c 53 20 33 |e DEFAUL|T_CYLS 3|
|00003f50| 30 36 0a 23 64 65 66 69 | 6e 65 20 44 45 46 41 55 |06.#defi|ne DEFAU|
|00003f60| 4c 54 5f 48 45 41 44 53 | 20 34 0a 23 64 65 66 69 |LT_HEADS| 4.#defi|
|00003f70| 6e 65 20 44 45 46 41 55 | 4c 54 5f 53 45 43 54 4f |ne DEFAU|LT_SECTO|
|00003f80| 52 53 20 31 37 0a 23 64 | 65 66 69 6e 65 20 50 52 |RS 17.#d|efine PR|
|00003f90| 4f 4d 50 54 5f 53 54 52 | 49 4e 47 20 22 70 66 64 |OMPT_STR|ING "pfd|
|00003fa0| 69 73 6b 3e 20 22 0a 0a | 23 69 6e 63 6c 75 64 65 |isk> "..|#include|
|00003fb0| 20 3c 73 74 64 69 6f 2e | 68 3e 0a 23 69 6e 63 6c | <stdio.|h>.#incl|
|00003fc0| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0a 23 |ude <str|ing.h>.#|
|00003fd0| 69 6e 63 6c 75 64 65 20 | 3c 63 74 79 70 65 2e 68 |include |<ctype.h|
|00003fe0| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 22 73 79 73 64 |>.#inclu|de "sysd|
|00003ff0| 65 70 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |ep.h".#i|nclude "|
|00004000| 73 79 73 63 6f 64 65 73 | 2e 68 22 0a 0a 74 79 70 |syscodes|.h"..typ|
|00004010| 65 64 65 66 20 75 6e 73 | 69 67 6e 65 64 20 63 68 |edef uns|igned ch|
|00004020| 61 72 20 75 63 68 61 72 | 3b 0a 74 79 70 65 64 65 |ar uchar|;.typede|
|00004030| 66 20 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 75 |f unsign|ed int u|
|00004040| 69 6e 74 3b 0a 74 79 70 | 65 64 65 66 20 75 6e 73 |int;.typ|edef uns|
|00004050| 69 67 6e 65 64 20 6c 6f | 6e 67 20 75 6c 6f 6e 67 |igned lo|ng ulong|
|00004060| 3b 0a 0a 73 74 72 75 63 | 74 20 70 61 72 74 20 7b |;..struc|t part {|
|00004070| 09 2f 2a 20 41 6e 20 65 | 6e 74 72 79 20 69 6e 20 |./* An e|ntry in |
|00004080| 74 68 65 20 70 61 72 74 | 69 74 69 6f 6e 20 74 61 |the part|ition ta|
|00004090| 62 6c 65 20 2a 2f 0a 20 | 20 75 63 68 61 72 09 61 |ble */. | uchar.a|
|000040a0| 63 74 69 76 65 3b 09 09 | 2f 2a 20 61 63 74 69 76 |ctive;..|/* activ|
|000040b0| 65 20 66 6c 61 67 20 28 | 30 78 38 30 20 6f 72 20 |e flag (|0x80 or |
|000040c0| 30 29 20 2a 2f 0a 20 20 | 75 63 68 61 72 09 62 5f |0) */. |uchar.b_|
|000040d0| 68 65 61 64 3b 09 09 2f | 2a 20 62 65 67 69 6e 20 |head;../|* begin |
|000040e0| 68 65 61 64 20 2a 2f 0a | 20 20 75 63 68 61 72 09 |head */.| uchar.|
|000040f0| 62 5f 73 65 63 3b 09 09 | 2f 2a 20 09 20 73 65 63 |b_sec;..|/* . sec|
|00004100| 74 6f 72 20 2a 2f 0a 20 | 20 75 63 68 61 72 09 62 |tor */. | uchar.b|
|00004110| 5f 63 79 6c 3b 09 09 2f | 2a 09 20 63 79 6c 69 6e |_cyl;../|*. cylin|
|00004120| 64 65 72 20 2a 2f 0a 20 | 20 75 63 68 61 72 09 73 |der */. | uchar.s|
|00004130| 79 73 69 64 3b 09 09 2f | 2a 20 73 79 73 74 65 6d |ysid;../|* system|
|00004140| 20 69 64 20 28 73 65 65 | 20 73 79 73 69 64 2e 63 | id (see| sysid.c|
|00004150| 29 20 2a 2f 0a 20 20 75 | 63 68 61 72 09 65 5f 68 |) */. u|char.e_h|
|00004160| 65 61 64 3b 09 09 2f 2a | 20 65 6e 64 20 20 68 65 |ead;../*| end he|
|00004170| 61 64 20 2a 2f 0a 20 20 | 75 63 68 61 72 09 65 5f |ad */. |uchar.e_|
|00004180| 73 65 63 3b 09 09 2f 2a | 20 65 6e 64 09 73 65 63 |sec;../*| end.sec|
|00004190| 74 6f 72 20 2a 2f 0a 20 | 20 75 63 68 61 72 09 65 |tor */. | uchar.e|
|000041a0| 5f 63 79 6c 3b 09 09 2f | 2a 20 65 6e 64 09 63 79 |_cyl;../|* end.cy|
|000041b0| 6c 69 6e 64 65 72 20 2a | 2f 0a 20 20 2f 2a 20 54 |linder *|/. /* T|
|000041c0| 68 65 73 65 20 74 77 6f | 20 61 72 65 20 6a 75 73 |hese two| are jus|
|000041d0| 74 20 6c 6f 6e 67 73 2c | 20 62 75 74 20 74 68 69 |t longs,| but thi|
|000041e0| 73 20 77 61 79 20 69 73 | 20 6d 61 63 68 69 6e 65 |s way is| machine|
|000041f0| 20 69 6e 64 65 70 65 6e | 64 65 6e 74 2e 20 2a 2f | indepen|dent. */|
|00004200| 0a 20 20 75 63 68 61 72 | 09 6c 73 42 65 67 5b 34 |. uchar|.lsBeg[4|
|00004210| 5d 3b 09 2f 2a 20 6c 6f | 67 69 63 61 6c 20 73 65 |];./* lo|gical se|
|00004220| 63 74 6f 72 73 2c 20 62 | 65 67 69 6e 6e 69 6e 67 |ctors, b|eginning|
|00004230| 20 2a 2f 0a 20 20 75 63 | 68 61 72 09 6c 73 4c 65 | */. uc|har.lsLe|
|00004240| 6e 5b 34 5d 3b 09 2f 2a | 20 6c 6f 67 69 63 61 6c |n[4];./*| logical|
|00004250| 20 73 65 63 74 6f 72 73 | 2c 20 6c 65 6e 67 74 68 | sectors|, length|
|00004260| 20 2a 2f 0a 7d 3b 0a 0a | 23 64 65 66 69 6e 65 20 | */.};..|#define |
|00004270| 4c 4f 43 5f 50 54 09 09 | 30 78 31 42 45 0a 23 64 |LOC_PT..|0x1BE.#d|
|00004280| 65 66 69 6e 65 20 4c 4f | 43 5f 4e 54 09 09 30 78 |efine LO|C_NT..0x|
|00004290| 31 38 30 0a 23 64 65 66 | 69 6e 65 20 4c 4f 43 5f |180.#def|ine LOC_|
|000042a0| 47 57 52 09 09 30 78 31 | 41 30 0a 23 64 65 66 69 |GWR..0x1|A0.#defi|
|000042b0| 6e 65 20 4d 41 47 49 43 | 5f 4c 4f 43 09 30 78 31 |ne MAGIC|_LOC.0x1|
|000042c0| 46 45 0a 23 64 65 66 69 | 6e 65 20 4d 41 47 49 43 |FE.#defi|ne MAGIC|
|000042d0| 5f 30 09 09 30 78 35 35 | 0a 23 64 65 66 69 6e 65 |_0..0x55|.#define|
|000042e0| 20 4d 41 47 49 43 5f 31 | 09 09 30 78 41 41 0a 23 | MAGIC_1|..0xAA.#|
|000042f0| 64 65 66 69 6e 65 20 4d | 41 58 5f 4c 49 4e 45 09 |define M|AX_LINE.|
|00004300| 38 30 0a 0a 63 68 61 72 | 09 62 75 66 66 65 72 5b |80..char|.buffer[|
|00004310| 53 45 43 53 49 5a 45 5d | 3b 09 2f 2a 20 54 68 65 |SECSIZE]|;./* The|
|00004320| 20 62 6f 6f 74 20 62 6c | 6f 63 6b 20 62 75 66 66 | boot bl|ock buff|
|00004330| 65 72 20 2a 2f 0a 69 6e | 74 09 62 75 66 6d 6f 64 |er */.in|t.bufmod|
|00004340| 3d 30 3b 09 09 2f 2a 20 | 62 75 66 66 65 72 20 6d |=0;../* |buffer m|
|00004350| 6f 64 69 66 69 65 64 2e | 2e 2e 20 2a 2f 0a 09 09 |odified.|.. */...|
|00004360| 2f 2a 20 28 7a 65 72 6f | 20 6d 65 61 6e 73 20 62 |/* (zero| means b|
|00004370| 75 66 66 65 72 20 69 73 | 20 75 6e 6d 6f 64 69 66 |uffer is| unmodif|
|00004380| 69 65 64 29 20 2a 2f 0a | 69 6e 74 09 75 73 65 4e |ied) */.|int.useN|
|00004390| 54 61 62 6c 65 3b 09 09 | 2f 2a 20 62 6f 6f 74 20 |Table;..|/* boot |
|000043a0| 73 65 63 74 6f 72 20 75 | 73 65 73 20 6e 61 6d 65 |sector u|ses name|
|000043b0| 20 74 61 62 6c 65 20 2a | 2f 0a 0a 2f 2a 20 64 65 | table *|/../* de|
|000043c0| 76 69 63 65 20 70 61 72 | 61 6d 65 74 65 72 73 20 |vice par|ameters |
|000043d0| 28 66 6f 72 63 65 20 73 | 6f 6d 65 6f 6e 65 20 74 |(force s|omeone t|
|000043e0| 6f 20 73 65 74 20 74 68 | 65 6d 21 29 20 2a 2f 0a |o set th|em!) */.|
|000043f0| 75 6e 73 69 67 6e 65 64 | 20 63 79 6c 73 20 3d 20 |unsigned| cyls = |
|00004400| 44 45 46 41 55 4c 54 5f | 43 59 4c 53 3b 0a 75 6e |DEFAULT_|CYLS;.un|
|00004410| 73 69 67 6e 65 64 20 68 | 65 61 64 73 20 3d 20 44 |signed h|eads = D|
|00004420| 45 46 41 55 4c 54 5f 48 | 45 41 44 53 3b 0a 75 6e |EFAULT_H|EADS;.un|
|00004430| 73 69 67 6e 65 64 20 73 | 65 63 74 6f 72 73 20 3d |signed s|ectors =|
|00004440| 20 44 45 46 41 55 4c 54 | 5f 53 45 43 54 4f 52 53 | DEFAULT|_SECTORS|
|00004450| 3b 0a 0a 63 68 61 72 09 | 2a 64 65 76 6e 61 6d 65 |;..char.|*devname|
|00004460| 3b 09 09 2f 2a 20 64 65 | 76 69 63 65 20 6e 61 6d |;../* de|vice nam|
|00004470| 65 20 2a 2f 0a 63 68 61 | 72 09 63 6d 64 6c 69 6e |e */.cha|r.cmdlin|
|00004480| 65 5b 4d 41 58 5f 4c 49 | 4e 45 5d 3b 0a 63 68 61 |e[MAX_LI|NE];.cha|
|00004490| 72 09 66 69 6c 65 6e 61 | 6d 65 5b 38 30 5d 3b 09 |r.filena|me[80];.|
|000044a0| 09 2f 2a 20 75 73 65 64 | 20 62 79 20 72 2f 77 20 |./* used| by r/w |
|000044b0| 63 6f 6d 6d 61 6e 64 73 | 20 2a 2f 0a 63 68 61 72 |commands| */.char|
|000044c0| 09 2a 70 72 6f 6d 70 74 | 3b 09 09 2f 2a 20 6e 75 |.*prompt|;../* nu|
|000044d0| 6c 6c 20 69 66 20 6e 6f | 20 74 74 79 20 69 6e 70 |ll if no| tty inp|
|000044e0| 75 74 20 2a 2f 0a 0a 2f | 2a 20 53 6f 6d 65 20 6f |ut */../|* Some o|
|000044f0| 66 20 74 68 65 73 65 20 | 73 74 72 69 6e 67 73 20 |f these |strings |
|00004500| 61 72 65 20 75 73 65 64 | 20 69 6e 20 6d 6f 72 65 |are used| in more|
|00004510| 20 74 68 61 6e 20 6f 6e | 65 20 70 6c 61 63 65 2e | than on|e place.|
|00004520| 0a 20 2a 20 46 6f 72 20 | 63 6f 6e 73 69 73 74 65 |. * For |consiste|
|00004530| 6e 63 79 2c 20 49 20 70 | 75 74 20 61 20 6e 65 77 |ncy, I p|ut a new|
|00004540| 6c 69 6e 65 20 6f 6e 20 | 61 6c 6c 20 6f 66 20 74 |line on |all of t|
|00004550| 68 65 6d 2e 0a 20 2a 2f | 0a 63 68 61 72 20 68 5f |hem.. */|.char h_|
|00004560| 68 5b 5d 20 3d 20 22 3f | 20 3c 65 6e 74 65 72 3e |h[] = "?| <enter>|
|00004570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3a 20 48 | | : H|
|00004580| 65 6c 70 20 73 75 6d 6d | 61 72 79 5c 6e 22 3b 0a |elp summ|ary\n";.|
|00004590| 63 68 61 72 20 68 5f 6c | 5b 5d 20 3d 20 22 4c 20 |char h_l|[] = "L |
|000045a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045b0| 20 20 20 20 3a 20 4c 69 | 73 74 20 70 61 72 74 69 | : Li|st parti|
|000045c0| 74 69 6f 6e 20 74 61 62 | 6c 65 5c 6e 22 3b 0a 63 |tion tab|le\n";.c|
|000045d0| 68 61 72 20 68 5f 31 5b | 5d 20 3d 20 22 31 20 69 |har h_1[|] = "1 i|
|000045e0| 64 20 66 69 72 73 74 20 | 6c 61 73 74 20 6e 61 6d |d first |last nam|
|000045f0| 65 20 20 3a 20 73 65 74 | 20 70 61 72 74 69 74 69 |e : set| partiti|
|00004600| 6f 6e 20 31 5c 6e 22 3b | 0a 63 68 61 72 20 68 5f |on 1\n";|.char h_|
|00004610| 32 5b 5d 20 3d 20 22 32 | 2c 33 2c 34 20 2e 2e 2e |2[] = "2|,3,4 ...|
|00004620| 20 28 6c 69 6b 65 20 31 | 29 20 20 20 20 3a 20 73 | (like 1|) : s|
|00004630| 65 74 20 72 65 73 70 65 | 63 74 69 76 65 20 70 61 |et respe|ctive pa|
|00004640| 72 74 69 74 69 6f 6e 5c | 6e 22 3b 0a 63 68 61 72 |rtition\|n";.char|
|00004650| 20 68 5f 61 5b 5d 20 3d | 20 22 41 20 6e 20 20 20 | h_a[] =| "A n |
|00004660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004670| 3a 20 41 63 74 69 76 61 | 74 65 20 70 61 72 74 69 |: Activa|te parti|
|00004680| 74 69 6f 6e 20 6e 5c 6e | 22 3b 0a 63 68 61 72 20 |tion n\n|";.char |
|00004690| 68 5f 67 5b 5d 20 3d 20 | 22 47 20 63 79 6c 73 20 |h_g[] = |"G cyls |
|000046a0| 68 65 61 64 73 20 73 65 | 63 74 6f 72 73 20 20 3a |heads se|ctors :|
|000046b0| 20 73 65 74 20 64 69 73 | 6b 20 47 65 6f 6d 65 74 | set dis|k Geomet|
|000046c0| 72 79 5c 6e 22 3b 0a 63 | 68 61 72 20 68 5f 69 5b |ry\n";.c|har h_i[|
|000046d0| 5d 20 3d 20 22 49 20 20 | 20 20 20 20 20 20 20 20 |] = "I | |
|000046e0| 20 20 20 20 20 20 20 20 | 20 20 20 3a 20 6c 69 73 | | : lis|
|000046f0| 74 20 6b 6e 6f 77 6e 20 | 49 44 20 6e 75 6d 62 65 |t known |ID numbe|
|00004700| 72 73 5c 6e 22 3b 0a 63 | 68 61 72 20 68 5f 72 5b |rs\n";.c|har h_r[|
|00004710| 5d 20 3d 20 22 52 20 5b | 6f 70 74 69 6f 6e 61 6c |] = "R [|optional|
|00004720| 2d 66 69 6c 65 5d 20 20 | 20 20 20 3a 20 52 65 61 |-file] | : Rea|
|00004730| 64 20 20 64 65 76 69 63 | 65 20 28 6f 72 20 73 70 |d devic|e (or sp|
|00004740| 65 63 69 66 69 65 64 20 | 66 69 6c 65 29 5c 6e 22 |ecified |file)\n"|
|00004750| 3b 0a 63 68 61 72 20 68 | 5f 77 5b 5d 20 3d 20 22 |;.char h|_w[] = "|
|00004760| 57 20 5b 6f 70 74 69 6f | 6e 61 6c 2d 66 69 6c 65 |W [optio|nal-file|
|00004770| 5d 20 20 20 20 20 3a 20 | 57 72 69 74 65 20 64 65 |] : |Write de|
|00004780| 76 69 63 65 20 28 6f 72 | 20 73 70 65 63 69 66 69 |vice (or| specifi|
|00004790| 65 64 20 66 69 6c 65 29 | 5c 6e 22 3b 0a 63 68 61 |ed file)|\n";.cha|
|000047a0| 72 20 68 5f 71 5b 5d 20 | 3d 20 22 51 5b 21 5d 20 |r h_q[] |= "Q[!] |
|000047b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000047c0| 20 3a 20 51 75 69 74 20 | 28 21 20 6d 65 61 6e 73 | : Quit |(! means|
|000047d0| 20 66 6f 72 63 65 29 5c | 6e 22 3b 0a 0a 63 68 61 | force)\|n";..cha|
|000047e0| 72 20 2a 20 68 65 6c 70 | 54 61 62 6c 65 5b 5d 20 |r * help|Table[] |
|000047f0| 3d 20 7b 0a 68 5f 68 2c | 20 68 5f 6c 2c 20 68 5f |= {.h_h,| h_l, h_|
|00004800| 31 2c 20 68 5f 32 2c 20 | 68 5f 61 2c 20 68 5f 67 |1, h_2, |h_a, h_g|
|00004810| 2c 20 68 5f 69 2c 20 68 | 5f 72 2c 20 68 5f 77 2c |, h_i, h|_r, h_w,|
|00004820| 20 68 5f 71 2c 0a 22 23 | 20 28 41 6c 6c 20 63 6f | h_q,."#| (All co|
|00004830| 6d 6d 61 6e 64 20 6c 65 | 74 74 65 72 73 20 68 61 |mmand le|tters ha|
|00004840| 76 65 20 6c 6f 77 65 72 | 2d 63 61 73 65 20 65 71 |ve lower|-case eq|
|00004850| 75 69 76 61 6c 65 6e 74 | 73 2e 29 5c 6e 22 2c 0a |uivalent|s.)\n",.|
|00004860| 28 63 68 61 72 20 2a 29 | 20 30 20 7d 3b 20 2f 2a |(char *)| 0 }; /*|
|00004870| 20 54 68 69 73 20 4d 55 | 53 54 20 68 61 76 65 20 | This MU|ST have |
|00004880| 61 20 7a 65 72 6f 20 61 | 73 20 74 68 65 20 6c 61 |a zero a|s the la|
|00004890| 73 74 20 65 6c 65 6d 65 | 6e 74 20 2a 2f 0a 0a 63 |st eleme|nt */..c|
|000048a0| 68 61 72 20 2a 42 61 64 | 41 72 67 3d 22 45 72 72 |har *Bad|Arg="Err|
|000048b0| 6f 72 3a 20 62 61 64 20 | 61 72 67 75 6d 65 6e 74 |or: bad |argument|
|000048c0| 3a 20 25 73 5c 6e 22 3b | 0a 63 68 61 72 20 2a 57 |: %s\n";|.char *W|
|000048d0| 61 72 6e 4e 6f 74 53 61 | 76 65 64 20 3d 0a 09 22 |arnNotSa|ved =.."|
|000048e0| 57 61 72 6e 69 6e 67 2c | 20 6d 6f 64 69 66 69 65 |Warning,| modifie|
|000048f0| 64 20 70 61 72 74 69 74 | 69 6f 6e 20 74 61 62 6c |d partit|ion tabl|
|00004900| 65 20 6e 6f 74 20 73 61 | 76 65 64 2e 5c 6e 22 3b |e not sa|ved.\n";|
|00004910| 0a 0a 68 65 6c 70 28 29 | 0a 7b 0a 20 20 63 68 61 |..help()|.{. cha|
|00004920| 72 20 2a 2a 20 70 3b 0a | 20 20 66 6f 72 20 28 70 |r ** p;.| for (p|
|00004930| 20 3d 20 68 65 6c 70 54 | 61 62 6c 65 3b 20 2a 70 | = helpT|able; *p|
|00004940| 3b 20 70 2b 2b 29 0a 20 | 20 20 20 70 72 69 6e 74 |; p++). | print|
|00004950| 66 28 2a 70 29 3b 0a 7d | 0a 0a 2f 2a 20 66 6f 72 |f(*p);.}|../* for|
|00004960| 77 61 72 64 20 64 65 63 | 6c 61 72 61 74 69 6f 6e |ward dec|laration|
|00004970| 73 20 2a 2f 0a 76 6f 69 | 64 09 63 68 65 63 6b 56 |s */.voi|d.checkV|
|00004980| 61 6c 69 64 69 74 79 28 | 29 3b 0a 63 68 61 72 20 |alidity(|);.char |
|00004990| 2a 09 73 65 74 50 61 72 | 74 69 74 69 6f 6e 28 29 |*.setPar|tition()|
|000049a0| 3b 0a 63 68 61 72 20 2a | 09 6d 61 6b 65 41 63 74 |;.char *|.makeAct|
|000049b0| 69 76 65 28 29 3b 0a 63 | 68 61 72 20 2a 09 73 65 |ive();.c|har *.se|
|000049c0| 74 47 65 6f 6d 65 74 72 | 79 28 29 3b 0a 75 6c 6f |tGeometr|y();.ulo|
|000049d0| 6e 67 09 63 68 73 32 6c | 6f 6e 67 28 29 3b 0a 63 |ng.chs2l|ong();.c|
|000049e0| 68 61 72 20 2a 09 6e 61 | 6d 65 49 44 28 29 3b 0a |har *.na|meID();.|
|000049f0| 69 6e 74 09 70 72 69 6e | 74 49 44 73 28 29 3b 0a |int.prin|tIDs();.|
|00004a00| 0a 6d 61 69 6e 28 61 72 | 67 63 2c 61 72 67 76 29 |.main(ar|gc,argv)|
|00004a10| 0a 69 6e 74 09 61 72 67 | 63 3b 0a 63 68 61 72 09 |.int.arg|c;.char.|
|00004a20| 2a 61 72 67 76 5b 5d 3b | 0a 7b 0a 20 20 63 68 61 |*argv[];|.{. cha|
|00004a30| 72 09 2a 63 6d 64 70 3b | 09 09 2f 2a 20 70 6f 69 |r.*cmdp;|../* poi|
|00004a40| 6e 74 73 20 74 6f 20 63 | 6f 6d 6d 61 6e 64 20 77 |nts to c|ommand w|
|00004a50| 6f 72 64 20 2a 2f 0a 20 | 20 63 68 61 72 09 2a 61 |ord */. | char.*a|
|00004a60| 72 67 70 3b 09 09 2f 2a | 20 70 6f 69 6e 74 73 20 |rgp;../*| points |
|00004a70| 74 6f 20 63 6f 6d 6d 61 | 6e 64 20 61 72 67 73 20 |to comma|nd args |
|00004a80| 2a 2f 0a 0a 20 20 2f 2a | 20 63 68 65 63 6b 20 63 |*/.. /*| check c|
|00004a90| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 20 61 72 67 73 |ommand l|ine args|
|00004aa0| 20 28 64 65 76 69 63 65 | 20 6e 61 6d 65 29 20 2a | (device| name) *|
|00004ab0| 2f 0a 20 20 69 66 20 28 | 61 72 67 63 20 21 3d 20 |/. if (|argc != |
|00004ac0| 32 29 20 7b 0a 20 20 20 | 20 75 73 61 67 65 28 61 |2) {. | usage(a|
|00004ad0| 72 67 76 5b 30 5d 29 3b | 09 2f 2a 20 53 65 65 20 |rgv[0]);|./* See |
|00004ae0| 73 2d 73 79 73 6e 61 6d | 65 2e 63 20 2a 2f 0a 20 |s-sysnam|e.c */. |
|00004af0| 20 20 20 65 78 69 74 28 | 31 29 3b 0a 20 20 7d 0a | exit(|1);. }.|
|00004b00| 20 20 64 65 76 6e 61 6d | 65 20 3d 20 61 72 67 76 | devnam|e = argv|
|00004b10| 5b 31 5d 3b 0a 0a 20 20 | 2f 2a 20 53 68 6f 75 6c |[1];.. |/* Shoul|
|00004b20| 64 20 77 65 20 70 72 6f | 6d 70 74 3f 20 2a 2f 0a |d we pro|mpt? */.|
|00004b30| 20 20 70 72 6f 6d 70 74 | 20 3d 20 28 69 73 61 74 | prompt| = (isat|
|00004b40| 74 79 28 66 69 6c 65 6e | 6f 28 73 74 64 69 6e 29 |ty(filen|o(stdin)|
|00004b50| 29 29 20 3f 20 50 52 4f | 4d 50 54 5f 53 54 52 49 |)) ? PRO|MPT_STRI|
|00004b60| 4e 47 20 3a 20 28 63 68 | 61 72 20 2a 29 20 30 3b |NG : (ch|ar *) 0;|
|00004b70| 0a 0a 20 20 2f 2a 20 50 | 72 69 6e 74 20 76 65 72 |.. /* P|rint ver|
|00004b80| 73 69 6f 6e 20 6e 61 6d | 65 2e 20 2a 2f 0a 20 20 |sion nam|e. */. |
|00004b90| 66 70 75 74 73 28 76 65 | 72 73 69 6f 6e 53 74 72 |fputs(ve|rsionStr|
|00004ba0| 69 6e 67 2c 20 73 74 64 | 65 72 72 29 3b 0a 0a 20 |ing, std|err);.. |
|00004bb0| 20 2f 2a 20 67 65 74 20 | 64 69 73 6b 20 70 61 72 | /* get |disk par|
|00004bc0| 61 6d 65 74 65 72 73 20 | 2a 2f 0a 20 20 67 65 74 |ameters |*/. get|
|00004bd0| 47 65 6f 6d 65 74 72 79 | 28 64 65 76 6e 61 6d 65 |Geometry|(devname|
|00004be0| 2c 26 63 79 6c 73 2c 26 | 68 65 61 64 73 2c 26 73 |,&cyls,&|heads,&s|
|00004bf0| 65 63 74 6f 72 73 29 3b | 0a 0a 20 20 2f 2a 20 47 |ectors);|.. /* G|
|00004c00| 65 74 20 74 68 65 20 62 | 6f 6f 74 20 62 6c 6f 63 |et the b|oot bloc|
|00004c10| 6b 2e 20 2a 2f 0a 20 20 | 69 66 20 28 67 65 74 42 |k. */. |if (getB|
|00004c20| 42 6c 6b 28 64 65 76 6e | 61 6d 65 2c 20 62 75 66 |Blk(devn|ame, buf|
|00004c30| 66 65 72 29 20 3c 20 30 | 29 0a 20 20 20 20 66 70 |fer) < 0|). fp|
|00004c40| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 25 73 |rintf(st|derr,"%s|
|00004c50| 3a 20 72 65 61 64 20 66 | 61 69 6c 65 64 5c 6e 22 |: read f|ailed\n"|
|00004c60| 2c 20 64 65 76 6e 61 6d | 65 29 3b 0a 20 20 63 68 |, devnam|e);. ch|
|00004c70| 65 63 6b 56 61 6c 69 64 | 69 74 79 28 29 3b 0a 0a |eckValid|ity();..|
|00004c80| 20 20 69 66 20 28 70 72 | 6f 6d 70 74 29 20 66 70 | if (pr|ompt) fp|
|00004c90| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 46 6f |rintf(st|derr,"Fo|
|00004ca0| 72 20 68 65 6c 70 2c 20 | 65 6e 74 65 72 3a 20 27 |r help, |enter: '|
|00004cb0| 3f 27 5c 6e 22 29 3b 0a | 0c 0a 0a 20 20 2f 2a 20 |?'\n");.|... /* |
|00004cc0| 52 65 61 64 20 61 6e 64 | 20 70 72 6f 63 65 73 73 |Read and| process|
|00004cd0| 20 63 6f 6d 6d 61 6e 64 | 73 20 61 20 6c 69 6e 65 | command|s a line|
|00004ce0| 20 61 74 20 61 20 74 69 | 6d 65 2e 20 2a 2f 0a 20 | at a ti|me. */. |
|00004cf0| 20 77 68 69 6c 65 20 28 | 31 29 20 7b 0a 20 20 20 | while (|1) {. |
|00004d00| 20 69 66 20 28 70 72 6f | 6d 70 74 29 20 66 70 75 | if (pro|mpt) fpu|
|00004d10| 74 73 28 70 72 6f 6d 70 | 74 2c 73 74 64 6f 75 74 |ts(promp|t,stdout|
|00004d20| 29 3b 0a 20 20 20 20 69 | 66 20 28 21 20 66 67 65 |);. i|f (! fge|
|00004d30| 74 73 28 63 6d 64 6c 69 | 6e 65 2c 20 4d 41 58 5f |ts(cmdli|ne, MAX_|
|00004d40| 4c 49 4e 45 2c 20 73 74 | 64 69 6e 29 29 20 62 72 |LINE, st|din)) br|
|00004d50| 65 61 6b 3b 0a 0a 20 20 | 20 20 2f 2a 20 46 69 6e |eak;.. | /* Fin|
|00004d60| 64 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 63 |d beginn|ing of c|
|00004d70| 6f 6d 6d 61 6e 64 20 77 | 6f 72 64 20 2a 2f 0a 20 |ommand w|ord */. |
|00004d80| 20 20 20 63 6d 64 70 20 | 3d 20 63 6d 64 6c 69 6e | cmdp |= cmdlin|
|00004d90| 65 3b 0a 20 20 20 20 77 | 68 69 6c 65 20 28 69 73 |e;. w|hile (is|
|00004da0| 73 70 61 63 65 28 2a 63 | 6d 64 70 29 29 20 63 6d |space(*c|mdp)) cm|
|00004db0| 64 70 2b 2b 3b 0a 0a 20 | 20 20 20 2f 2a 20 66 69 |dp++;.. | /* fi|
|00004dc0| 6e 64 20 62 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |nd begin|ning of |
|00004dd0| 61 72 67 73 20 2a 2f 0a | 20 20 20 20 61 72 67 70 |args */.| argp|
|00004de0| 20 3d 20 63 6d 64 70 3b | 0a 20 20 20 20 77 68 69 | = cmdp;|. whi|
|00004df0| 6c 65 20 28 2a 61 72 67 | 70 20 26 26 20 21 69 73 |le (*arg|p && !is|
|00004e00| 73 70 61 63 65 28 2a 61 | 72 67 70 29 29 20 61 72 |space(*a|rgp)) ar|
|00004e10| 67 70 2b 2b 3b 0a 20 20 | 20 20 77 68 69 6c 65 20 |gp++;. | while |
|00004e20| 28 69 73 73 70 61 63 65 | 28 2a 61 72 67 70 29 20 |(isspace|(*argp) |
|00004e30| 7c 7c 20 2a 61 72 67 70 | 3d 3d 27 3d 27 29 20 61 ||| *argp|=='=') a|
|00004e40| 72 67 70 2b 2b 3b 0a 0a | 20 20 20 20 73 77 69 74 |rgp++;..| swit|
|00004e50| 63 68 20 28 2a 63 6d 64 | 70 29 20 7b 0a 0a 20 20 |ch (*cmd|p) {.. |
|00004e60| 20 20 63 61 73 65 20 27 | 5c 30 27 3a 09 09 2f 2a | case '|\0':../*|
|00004e70| 20 62 6c 61 6e 6b 20 6c | 69 6e 65 20 2a 2f 0a 20 | blank l|ine */. |
|00004e80| 20 20 20 63 61 73 65 20 | 27 23 27 3a 09 09 2f 2a | case |'#':../*|
|00004e90| 20 6c 69 6e 65 20 63 6f | 6d 6d 65 6e 74 20 2a 2f | line co|mment */|
|00004ea0| 0a 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 0a 20 |. b|reak;.. |
|00004eb0| 20 20 20 63 61 73 65 20 | 27 3f 27 3a 20 63 61 73 | case |'?': cas|
|00004ec0| 65 20 27 68 27 3a 20 63 | 61 73 65 20 27 48 27 3a |e 'h': c|ase 'H':|
|00004ed0| 0a 20 20 20 20 20 20 68 | 65 6c 70 28 29 3b 0a 20 |. h|elp();. |
|00004ee0| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 0a 20 20 20 | bre|ak;.. |
|00004ef0| 20 63 61 73 65 20 27 31 | 27 3a 09 2f 2a 20 73 65 | case '1|':./* se|
|00004f00| 74 20 70 61 72 74 69 74 | 69 6f 6e 20 65 6e 74 72 |t partit|ion entr|
|00004f10| 79 20 2a 2f 0a 20 20 20 | 20 63 61 73 65 20 27 32 |y */. | case '2|
|00004f20| 27 3a 20 63 61 73 65 20 | 27 33 27 3a 20 63 61 73 |': case |'3': cas|
|00004f30| 65 20 27 34 27 3a 0a 20 | 20 20 20 20 20 61 72 67 |e '4':. | arg|
|00004f40| 70 20 3d 20 73 65 74 50 | 61 72 74 69 74 69 6f 6e |p = setP|artition|
|00004f50| 28 63 6d 64 70 2c 20 61 | 72 67 70 29 3b 0a 20 20 |(cmdp, a|rgp);. |
|00004f60| 20 20 20 20 69 66 20 28 | 61 72 67 70 29 20 7b 09 | if (|argp) {.|
|00004f70| 2f 2a 20 61 72 67 20 6c | 69 73 74 20 65 72 72 6f |/* arg l|ist erro|
|00004f80| 72 20 2a 2f 0a 09 66 70 | 72 69 6e 74 66 28 73 74 |r */..fp|rintf(st|
|00004f90| 64 65 72 72 2c 42 61 64 | 41 72 67 2c 61 72 67 70 |derr,Bad|Arg,argp|
|00004fa0| 29 3b 0a 09 66 70 72 69 | 6e 74 66 28 73 74 64 65 |);..fpri|ntf(stde|
|00004fb0| 72 72 2c 68 5f 31 29 3b | 0a 09 66 70 72 69 6e 74 |rr,h_1);|..fprint|
|00004fc0| 66 28 73 74 64 65 72 72 | 2c 68 5f 32 29 3b 0a 09 |f(stderr|,h_2);..|
|00004fd0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 7d 0a 20 |break;. | }. |
|00004fe0| 20 20 20 20 20 62 75 66 | 6d 6f 64 20 3d 20 31 3b | buf|mod = 1;|
|00004ff0| 0a 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 0a 20 |. b|reak;.. |
|00005000| 20 20 20 63 61 73 65 20 | 27 61 27 3a 20 63 61 73 | case |'a': cas|
|00005010| 65 20 27 41 27 3a 09 2f | 2a 20 61 63 74 69 76 61 |e 'A':./|* activa|
|00005020| 74 65 20 70 61 72 74 69 | 74 69 6f 6e 20 2a 2f 0a |te parti|tion */.|
|00005030| 20 20 20 20 20 20 61 72 | 67 70 20 3d 20 6d 61 6b | ar|gp = mak|
|00005040| 65 41 63 74 69 76 65 28 | 61 72 67 70 29 3b 0a 20 |eActive(|argp);. |
|00005050| 20 20 20 20 20 69 66 20 | 28 61 72 67 70 29 20 7b | if |(argp) {|
|00005060| 0a 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|00005070| 2c 42 61 64 41 72 67 2c | 61 72 67 70 29 3b 0a 09 |,BadArg,|argp);..|
|00005080| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 68 |fprintf(|stderr,h|
|00005090| 5f 61 29 3b 0a 09 62 72 | 65 61 6b 3b 0a 20 20 20 |_a);..br|eak;. |
|000050a0| 20 20 20 7d 0a 20 20 20 | 20 20 20 62 75 66 6d 6f | }. | bufmo|
|000050b0| 64 20 3d 20 31 3b 0a 20 | 20 20 20 20 20 62 72 65 |d = 1;. | bre|
|000050c0| 61 6b 3b 0a 0a 20 20 20 | 20 63 61 73 65 20 27 67 |ak;.. | case 'g|
|000050d0| 27 3a 20 63 61 73 65 20 | 27 47 27 3a 09 2f 2a 20 |': case |'G':./* |
|000050e0| 73 65 74 20 64 69 73 6b | 20 70 61 72 61 6d 65 74 |set disk| paramet|
|000050f0| 65 72 73 20 28 47 65 6f | 6d 65 74 72 79 29 20 2a |ers (Geo|metry) *|
|00005100| 2f 0a 20 20 20 20 20 20 | 61 72 67 70 20 3d 20 73 |/. |argp = s|
|00005110| 65 74 47 65 6f 6d 65 74 | 72 79 28 61 72 67 70 29 |etGeomet|ry(argp)|
|00005120| 3b 0a 20 20 20 20 20 20 | 69 66 20 28 61 72 67 70 |;. |if (argp|
|00005130| 29 20 7b 09 2f 2a 20 61 | 72 67 20 6c 69 73 74 20 |) {./* a|rg list |
|00005140| 65 72 72 6f 72 20 2a 2f | 0a 09 66 70 72 69 6e 74 |error */|..fprint|
|00005150| 66 28 73 74 64 65 72 72 | 2c 42 61 64 41 72 67 2c |f(stderr|,BadArg,|
|00005160| 61 72 67 70 29 3b 0a 09 | 66 70 72 69 6e 74 66 28 |argp);..|fprintf(|
|00005170| 73 74 64 65 72 72 2c 68 | 5f 67 29 3b 0a 20 20 20 |stderr,h|_g);. |
|00005180| 20 20 20 7d 0a 20 20 20 | 20 20 20 62 72 65 61 6b | }. | break|
|00005190| 3b 0a 0a 20 20 20 20 63 | 61 73 65 20 27 69 27 3a |;.. c|ase 'i':|
|000051a0| 20 63 61 73 65 20 27 49 | 27 3a 09 2f 2a 20 4c 69 | case 'I|':./* Li|
|000051b0| 73 74 20 6b 6e 6f 77 6e | 20 49 44 20 6e 75 6d 62 |st known| ID numb|
|000051c0| 65 72 73 20 2a 2f 0a 20 | 20 20 20 20 20 70 72 69 |ers */. | pri|
|000051d0| 6e 74 49 44 73 28 29 3b | 0a 20 20 20 20 20 20 62 |ntIDs();|. b|
|000051e0| 72 65 61 6b 3b 0a 0a 20 | 20 20 20 63 61 73 65 20 |reak;.. | case |
|000051f0| 27 6c 27 3a 20 63 61 73 | 65 20 27 4c 27 3a 09 2f |'l': cas|e 'L':./|
|00005200| 2a 20 4c 69 73 74 20 74 | 68 65 20 70 61 72 74 69 |* List t|he parti|
|00005210| 74 69 6f 6e 20 74 61 62 | 6c 65 20 2a 2f 0a 20 20 |tion tab|le */. |
|00005220| 20 20 20 20 6c 69 73 74 | 50 54 61 62 6c 65 28 29 | list|PTable()|
|00005230| 3b 0a 20 20 20 20 20 20 | 62 72 65 61 6b 3b 0a 0a |;. |break;..|
|00005240| 20 20 20 20 63 61 73 65 | 20 27 71 27 3a 20 63 61 | case| 'q': ca|
|00005250| 73 65 20 27 51 27 3a 09 | 2f 2a 20 51 75 69 74 20 |se 'Q':.|/* Quit |
|00005260| 2a 2f 0a 20 20 20 20 20 | 20 69 66 20 28 62 75 66 |*/. | if (buf|
|00005270| 6d 6f 64 20 26 26 20 28 | 63 6d 64 70 5b 31 5d 20 |mod && (|cmdp[1] |
|00005280| 20 21 3d 20 27 21 27 29 | 29 20 7b 0a 09 66 70 72 | != '!')|) {..fpr|
|00005290| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 5c 30 30 |intf(std|err,"\00|
|000052a0| 37 25 73 25 73 5c 6e 22 | 2c 20 57 61 72 6e 4e 6f |7%s%s\n"|, WarnNo|
|000052b0| 74 53 61 76 65 64 2c 0a | 09 09 22 55 73 65 20 27 |tSaved,.|.."Use '|
|000052c0| 77 71 27 20 6f 72 20 27 | 71 21 27 20 28 65 6e 74 |wq' or '|q!' (ent|
|000052d0| 65 72 20 3f 20 66 6f 72 | 20 68 65 6c 70 29 2e 22 |er ? for| help)."|
|000052e0| 29 3b 0a 09 62 72 65 61 | 6b 3b 0a 20 20 20 20 20 |);..brea|k;. |
|000052f0| 20 7d 0a 20 20 20 20 20 | 20 65 78 69 74 28 30 29 | }. | exit(0)|
|00005300| 3b 0a 20 20 20 20 20 20 | 2f 2a 4e 4f 54 52 45 41 |;. |/*NOTREA|
|00005310| 43 48 45 44 2a 2f 0a 0a | 20 20 20 20 63 61 73 65 |CHED*/..| case|
|00005320| 20 27 72 27 3a 20 63 61 | 73 65 20 27 52 27 3a 09 | 'r': ca|se 'R':.|
|00005330| 2f 2a 20 72 65 61 64 20 | 66 72 6f 6d 20 64 65 76 |/* read |from dev|
|00005340| 69 63 65 20 6f 72 20 66 | 69 6c 65 20 2a 2f 0a 20 |ice or f|ile */. |
|00005350| 20 20 20 20 20 69 66 20 | 28 73 73 63 61 6e 66 28 | if |(sscanf(|
|00005360| 61 72 67 70 2c 22 25 38 | 30 73 22 2c 66 69 6c 65 |argp,"%8|0s",file|
|00005370| 6e 61 6d 65 29 20 3d 3d | 20 31 29 20 7b 0a 09 2f |name) ==| 1) {../|
|00005380| 2a 20 41 72 67 20 73 70 | 65 63 69 66 69 65 64 2c |* Arg sp|ecified,|
|00005390| 20 72 65 61 64 20 66 72 | 6f 6d 20 66 69 6c 65 6e | read fr|om filen|
|000053a0| 61 6d 65 20 2a 2f 0a 09 | 69 66 20 28 67 65 74 46 |ame */..|if (getF|
|000053b0| 69 6c 65 28 66 69 6c 65 | 6e 61 6d 65 2c 20 62 75 |ile(file|name, bu|
|000053c0| 66 66 65 72 2c 20 53 45 | 43 53 49 5a 45 29 20 3c |ffer, SE|CSIZE) <|
|000053d0| 20 30 29 0a 09 20 20 66 | 70 72 69 6e 74 66 28 73 | 0).. f|printf(s|
|000053e0| 74 64 65 72 72 2c 22 25 | 73 3a 20 72 65 61 64 20 |tderr,"%|s: read |
|000053f0| 66 61 69 6c 65 64 5c 6e | 22 2c 20 66 69 6c 65 6e |failed\n|", filen|
|00005400| 61 6d 65 29 3b 0a 09 62 | 75 66 6d 6f 64 20 3d 20 |ame);..b|ufmod = |
|00005410| 31 3b 0a 20 20 20 20 20 | 20 7d 20 65 6c 73 65 20 |1;. | } else |
|00005420| 7b 0a 09 2f 2a 20 4e 6f | 20 61 72 67 2c 20 75 73 |{../* No| arg, us|
|00005430| 65 20 64 65 76 69 63 65 | 2e 20 2a 2f 0a 09 69 66 |e device|. */..if|
|00005440| 20 28 67 65 74 42 42 6c | 6b 28 64 65 76 6e 61 6d | (getBBl|k(devnam|
|00005450| 65 2c 20 62 75 66 66 65 | 72 29 20 3c 20 30 29 0a |e, buffe|r) < 0).|
|00005460| 09 20 20 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |. fprin|tf(stder|
|00005470| 72 2c 22 25 73 3a 20 72 | 65 61 64 20 66 61 69 6c |r,"%s: r|ead fail|
|00005480| 65 64 5c 6e 22 2c 20 64 | 65 76 6e 61 6d 65 29 3b |ed\n", d|evname);|
|00005490| 0a 09 62 75 66 6d 6f 64 | 20 3d 20 30 3b 0a 20 20 |..bufmod| = 0;. |
|000054a0| 20 20 20 20 7d 0a 20 20 | 20 20 20 20 63 68 65 63 | }. | chec|
|000054b0| 6b 56 61 6c 69 64 69 74 | 79 28 29 3b 0a 20 20 20 |kValidit|y();. |
|000054c0| 20 20 20 62 72 65 61 6b | 3b 0a 0a 20 20 20 20 63 | break|;.. c|
|000054d0| 61 73 65 20 27 77 27 3a | 20 63 61 73 65 20 27 57 |ase 'w':| case 'W|
|000054e0| 27 3a 09 2f 2a 20 57 72 | 69 74 65 20 74 6f 20 66 |':./* Wr|ite to f|
|000054f0| 69 6c 65 20 6f 72 20 64 | 65 76 69 63 65 20 2a 2f |ile or d|evice */|
|00005500| 0a 20 20 20 20 20 20 69 | 66 20 28 73 73 63 61 6e |. i|f (sscan|
|00005510| 66 28 61 72 67 70 2c 22 | 25 38 30 73 22 2c 66 69 |f(argp,"|%80s",fi|
|00005520| 6c 65 6e 61 6d 65 29 20 | 3d 3d 20 31 29 20 7b 0a |lename) |== 1) {.|
|00005530| 09 2f 2a 20 41 72 67 20 | 73 70 65 63 69 66 69 65 |./* Arg |specifie|
|00005540| 64 2c 20 77 72 69 74 65 | 20 74 6f 20 66 69 6c 65 |d, write| to file|
|00005550| 6e 61 6d 65 20 2a 2f 0a | 09 69 66 20 28 70 75 74 |name */.|.if (put|
|00005560| 46 69 6c 65 28 66 69 6c | 65 6e 61 6d 65 2c 20 62 |File(fil|ename, b|
|00005570| 75 66 66 65 72 2c 20 53 | 45 43 53 49 5a 45 29 20 |uffer, S|ECSIZE) |
|00005580| 3c 20 30 29 0a 09 20 20 | 66 70 72 69 6e 74 66 28 |< 0).. |fprintf(|
|00005590| 73 74 64 65 72 72 2c 20 | 22 25 73 3a 20 77 72 69 |stderr, |"%s: wri|
|000055a0| 74 65 20 66 61 69 6c 65 | 64 5c 6e 22 2c 20 66 69 |te faile|d\n", fi|
|000055b0| 6c 65 6e 61 6d 65 29 3b | 0a 20 20 20 20 20 20 7d |lename);|. }|
|000055c0| 20 65 6c 73 65 20 7b 20 | 20 2f 2a 20 4e 6f 20 61 | else { | /* No a|
|000055d0| 72 67 2c 20 75 73 65 20 | 64 65 76 69 63 65 2e 20 |rg, use |device. |
|000055e0| 2a 2f 0a 09 69 66 20 28 | 70 75 74 42 42 6c 6b 28 |*/..if (|putBBlk(|
|000055f0| 64 65 76 6e 61 6d 65 2c | 20 62 75 66 66 65 72 29 |devname,| buffer)|
|00005600| 20 3c 20 30 29 0a 09 20 | 20 66 70 72 69 6e 74 66 | < 0).. | fprintf|
|00005610| 28 73 74 64 65 72 72 2c | 20 22 25 73 3a 20 77 72 |(stderr,| "%s: wr|
|00005620| 69 74 65 20 66 61 69 6c | 65 64 5c 6e 22 2c 20 64 |ite fail|ed\n", d|
|00005630| 65 76 6e 61 6d 65 29 3b | 0a 09 62 75 66 6d 6f 64 |evname);|..bufmod|
|00005640| 20 3d 20 30 3b 0a 20 20 | 20 20 20 20 7d 0a 20 20 | = 0;. | }. |
|00005650| 20 20 20 20 69 66 20 28 | 63 6d 64 70 5b 31 5d 20 | if (|cmdp[1] |
|00005660| 3d 3d 20 27 71 27 20 7c | 7c 20 63 6d 64 70 5b 31 |== 'q' ||| cmdp[1|
|00005670| 5d 20 3d 3d 20 27 51 27 | 29 20 65 78 69 74 28 30 |] == 'Q'|) exit(0|
|00005680| 29 3b 0a 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a |);. | break;.|
|00005690| 0a 20 20 20 20 64 65 66 | 61 75 6c 74 3a 0a 20 20 |. def|ault:. |
|000056a0| 20 20 20 20 66 70 72 69 | 6e 74 66 28 73 74 64 65 | fpri|ntf(stde|
|000056b0| 72 72 2c 22 27 25 63 27 | 3a 20 75 6e 72 65 63 6f |rr,"'%c'|: unreco|
|000056c0| 67 6e 69 7a 65 64 2e 20 | 20 45 6e 74 65 72 20 27 |gnized. | Enter '|
|000056d0| 3f 27 20 66 6f 72 20 68 | 65 6c 70 2e 5c 6e 22 2c |?' for h|elp.\n",|
|000056e0| 20 2a 63 6d 64 70 29 3b | 0a 20 20 20 20 20 20 62 | *cmdp);|. b|
|000056f0| 72 65 61 6b 3b 0a 0a 20 | 20 20 20 7d 20 2f 2a 20 |reak;.. | } /* |
|00005700| 73 77 69 74 63 68 20 2a | 2f 0a 20 20 7d 20 2f 2a |switch *|/. } /*|
|00005710| 20 77 68 69 6c 65 20 2a | 2f 0a 20 20 69 66 20 28 | while *|/. if (|
|00005720| 62 75 66 6d 6f 64 29 20 | 66 70 72 69 6e 74 66 28 |bufmod) |fprintf(|
|00005730| 73 74 64 65 72 72 2c 20 | 57 61 72 6e 4e 6f 74 53 |stderr, |WarnNotS|
|00005740| 61 76 65 64 29 3b 0a 20 | 20 65 78 69 74 28 30 29 |aved);. | exit(0)|
|00005750| 3b 0a 7d 20 2f 2a 20 6d | 61 69 6e 20 2a 2f 0a 0c |;.} /* m|ain */..|
|00005760| 0a 0a 2f 2a 20 43 68 65 | 63 6b 20 66 6f 72 20 76 |../* Che|ck for v|
|00005770| 61 6c 69 64 20 62 6f 6f | 74 20 62 6c 6f 63 6b 20 |alid boo|t block |
|00005780| 28 6d 61 67 69 63 20 6e | 75 6d 62 65 72 20 69 6e |(magic n|umber in|
|00005790| 20 6c 61 73 74 20 74 77 | 6f 20 62 79 74 65 73 29 | last tw|o bytes)|
|000057a0| 2e 0a 20 2a 20 41 6c 73 | 6f 2c 20 63 68 65 63 6b |.. * Als|o, check|
|000057b0| 20 66 6f 72 20 70 72 65 | 73 65 6e 63 65 20 6f 66 | for pre|sence of|
|000057c0| 20 70 61 72 74 69 74 69 | 6f 6e 20 6e 61 6d 65 20 | partiti|on name |
|000057d0| 74 61 62 6c 65 2e 0a 20 | 2a 2f 0a 76 6f 69 64 20 |table.. |*/.void |
|000057e0| 63 68 65 63 6b 56 61 6c | 69 64 69 74 79 28 29 0a |checkVal|idity().|
|000057f0| 7b 0a 20 20 2f 2a 20 43 | 68 65 63 6b 20 74 68 65 |{. /* C|heck the|
|00005800| 20 6d 61 67 69 63 20 6e | 75 6d 62 65 72 2e 20 2a | magic n|umber. *|
|00005810| 2f 0a 20 20 69 66 20 28 | 28 62 75 66 66 65 72 5b |/. if (|(buffer[|
|00005820| 4d 41 47 49 43 5f 4c 4f | 43 5d 20 26 20 30 78 46 |MAGIC_LO|C] & 0xF|
|00005830| 46 29 20 21 3d 20 4d 41 | 47 49 43 5f 30 20 7c 7c |F) != MA|GIC_0 |||
|00005840| 0a 20 20 20 20 20 20 28 | 62 75 66 66 65 72 5b 4d |. (|buffer[M|
|00005850| 41 47 49 43 5f 4c 4f 43 | 2b 31 5d 20 26 20 30 78 |AGIC_LOC|+1] & 0x|
|00005860| 46 46 29 20 21 3d 20 4d | 41 47 49 43 5f 31 20 29 |FF) != M|AGIC_1 )|
|00005870| 20 7b 0a 20 20 20 20 2f | 2a 20 54 68 65 20 62 6f | {. /|* The bo|
|00005880| 6f 74 20 73 65 63 74 6f | 72 20 69 73 20 6e 6f 74 |ot secto|r is not|
|00005890| 20 76 61 6c 69 64 20 2d | 2d 20 46 69 78 20 69 74 | valid -|- Fix it|
|000058a0| 2e 20 2a 2f 0a 20 20 20 | 20 62 75 66 66 65 72 5b |. */. | buffer[|
|000058b0| 4d 41 47 49 43 5f 4c 4f | 43 5d 20 3d 20 4d 41 47 |MAGIC_LO|C] = MAG|
|000058c0| 49 43 5f 30 3b 0a 20 20 | 20 20 62 75 66 66 65 72 |IC_0;. | buffer|
|000058d0| 5b 4d 41 47 49 43 5f 4c | 4f 43 2b 31 5d 20 3d 20 |[MAGIC_L|OC+1] = |
|000058e0| 4d 41 47 49 43 5f 31 3b | 0a 20 20 20 20 62 75 66 |MAGIC_1;|. buf|
|000058f0| 6d 6f 64 20 3d 20 31 3b | 0a 20 20 20 20 66 70 72 |mod = 1;|. fpr|
|00005900| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 0a 22 5c 6e |intf(std|err,."\n|
|00005910| 5c 74 57 61 72 6e 69 6e | 67 3a 20 20 54 68 65 20 |\tWarnin|g: The |
|00005920| 62 6f 6f 74 20 73 65 63 | 74 6f 72 20 68 61 73 20 |boot sec|tor has |
|00005930| 61 6e 20 69 6e 76 61 6c | 69 64 20 6d 61 67 69 63 |an inval|id magic|
|00005940| 20 6e 75 6d 62 65 72 2e | 5c 6e 5c 0a 5c 74 54 68 | number.|\n\.\tTh|
|00005950| 65 20 6d 61 67 69 63 20 | 6e 75 6d 62 65 72 20 68 |e magic |number h|
|00005960| 61 73 20 62 65 65 6e 20 | 66 69 78 65 64 2c 20 62 |as been |fixed, b|
|00005970| 75 74 20 74 68 65 20 6f | 74 68 65 72 20 63 6f 6e |ut the o|ther con|
|00005980| 74 65 6e 74 73 5c 6e 5c | 0a 5c 74 61 72 65 20 70 |tents\n\|.\tare p|
|00005990| 72 6f 62 61 62 6c 79 20 | 67 61 72 62 61 67 65 2e |robably |garbage.|
|000059a0| 20 20 49 6e 69 74 69 61 | 6c 69 7a 65 20 75 73 69 | Initia|lize usi|
|000059b0| 6e 67 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 3a 5c |ng the c|ommand:\|
|000059c0| 6e 5c 0a 5c 74 5c 74 52 | 20 62 6f 6f 74 2d 70 72 |n\.\t\tR| boot-pr|
|000059d0| 6f 67 72 61 6d 2d 66 69 | 6c 65 09 28 69 2e 65 2e |ogram-fi|le.(i.e.|
|000059e0| 20 62 6f 6f 74 6d 65 6e | 75 2e 62 69 6e 29 5c 6e | bootmen|u.bin)\n|
|000059f0| 5c 0a 5c 74 74 68 65 6e | 20 73 65 74 20 65 61 63 |\.\tthen| set eac|
|00005a00| 68 20 70 61 72 74 69 74 | 69 6f 6e 20 65 6e 74 72 |h partit|ion entr|
|00005a10| 79 20 69 66 20 6e 65 63 | 65 73 73 61 72 79 2e 5c |y if nec|essary.\|
|00005a20| 6e 22 29 3b 0a 20 20 7d | 0a 0a 20 20 2f 2a 20 44 |n");. }|.. /* D|
|00005a30| 6f 65 73 20 69 74 20 75 | 73 65 20 61 20 6e 61 6d |oes it u|se a nam|
|00005a40| 65 20 74 61 62 6c 65 20 | 28 66 6f 72 20 61 20 62 |e table |(for a b|
|00005a50| 6f 6f 74 20 6d 65 6e 75 | 29 3f 0a 20 20 20 2a 20 |oot menu|)?. * |
|00005a60| 4d 79 20 62 6f 6f 74 20 | 70 72 6f 67 72 61 6d 20 |My boot |program |
|00005a70| 64 6f 65 73 2c 20 61 6e | 64 20 63 61 6e 20 62 65 |does, an|d can be|
|00005a80| 20 69 64 65 6e 74 69 66 | 69 65 64 20 62 79 0a 20 | identif|ied by. |
|00005a90| 20 20 2a 20 66 69 6e 64 | 69 6e 67 20 6d 79 20 6e | * find|ing my n|
|00005aa0| 61 6d 65 20 69 6e 20 61 | 20 70 61 72 74 69 63 75 |ame in a| particu|
|00005ab0| 6c 61 72 20 28 75 6e 75 | 73 65 64 29 20 61 72 65 |lar (unu|sed) are|
|00005ac0| 61 2e 0a 20 20 20 2a 2f | 0a 20 20 75 73 65 4e 54 |a.. */|. useNT|
|00005ad0| 61 62 6c 65 20 3d 20 21 | 73 74 72 63 6d 70 28 26 |able = !|strcmp(&|
|00005ae0| 62 75 66 66 65 72 5b 4c | 4f 43 5f 47 57 52 5d 2c |buffer[L|OC_GWR],|
|00005af0| 20 22 47 6f 72 64 6f 6e | 20 57 2e 20 52 6f 73 73 | "Gordon| W. Ross|
|00005b00| 22 29 3b 0a 0a 7d 0a 0a | 63 68 61 72 20 2a 20 73 |");..}..|char * s|
|00005b10| 65 74 50 61 72 74 69 74 | 69 6f 6e 28 63 6d 64 70 |etPartit|ion(cmdp|
|00005b20| 2c 61 72 67 70 29 09 2f | 2a 20 72 65 74 75 72 6e |,argp)./|* return|
|00005b30| 20 73 74 72 69 6e 67 20 | 6f 6e 20 65 72 72 6f 72 | string |on error|
|00005b40| 20 2a 2f 0a 63 68 61 72 | 09 2a 63 6d 64 70 2c 2a | */.char|.*cmdp,*|
|00005b50| 61 72 67 70 3b 0a 7b 0a | 20 20 73 74 72 75 63 74 |argp;.{.| struct|
|00005b60| 20 70 61 72 74 20 2a 70 | 70 3b 09 2f 2a 20 70 61 | part *p|p;./* pa|
|00005b70| 72 74 69 74 69 6f 6e 20 | 65 6e 74 72 79 20 2a 2f |rtition |entry */|
|00005b80| 0a 20 20 63 68 61 72 20 | 2a 09 6e 70 3b 09 09 2f |. char |*.np;../|
|00005b90| 2a 20 6e 61 6d 65 20 74 | 61 62 6c 65 20 70 6f 69 |* name t|able poi|
|00005ba0| 6e 74 65 72 20 2a 2f 0a | 20 20 63 68 61 72 20 2a |nter */.| char *|
|00005bb0| 09 6e 65 77 6e 61 6d 65 | 3b 09 2f 2a 20 6e 61 6d |.newname|;./* nam|
|00005bc0| 65 20 66 69 65 6c 64 20 | 2a 2f 0a 20 20 69 6e 74 |e field |*/. int|
|00005bd0| 09 69 6e 64 65 78 3b 09 | 09 2f 2a 20 70 61 72 74 |.index;.|./* part|
|00005be0| 69 74 69 6f 6e 20 69 6e | 64 65 78 20 28 30 2e 2e |ition in|dex (0..|
|00005bf0| 33 29 20 2a 2f 0a 20 20 | 75 69 6e 74 09 69 64 3b |3) */. |uint.id;|
|00005c00| 09 09 2f 2a 20 49 44 20 | 63 6f 64 65 20 28 73 65 |../* ID |code (se|
|00005c10| 65 20 73 79 73 63 6f 64 | 65 73 2e 63 29 20 2a 2f |e syscod|es.c) */|
|00005c20| 0a 20 20 75 69 6e 74 09 | 66 69 72 73 74 2c 6c 61 |. uint.|first,la|
|00005c30| 73 74 3b 09 2f 2a 20 75 | 73 65 72 20 73 75 70 70 |st;./* u|ser supp|
|00005c40| 6c 69 65 64 20 63 79 6c | 69 6e 64 65 72 73 20 2a |lied cyl|inders *|
|00005c50| 2f 0a 20 20 75 69 6e 74 | 09 63 2c 68 2c 73 3b 09 |/. uint|.c,h,s;.|
|00005c60| 09 2f 2a 20 77 6f 72 6b | 69 6e 67 20 63 79 6c 2c |./* work|ing cyl,|
|00005c70| 68 65 61 64 2c 73 65 63 | 74 2c 20 2a 2f 0a 20 20 |head,sec|t, */. |
|00005c80| 75 69 6e 74 09 6c 65 6e | 3b 09 09 2f 2a 20 63 68 |uint.len|;../* ch|
|00005c90| 61 72 73 20 73 65 65 6e | 20 62 79 20 73 73 63 61 |ars seen| by ssca|
|00005ca0| 6e 66 20 2a 2f 0a 20 20 | 75 6c 6f 6e 67 09 6c 73 |nf */. |ulong.ls|
|00005cb0| 62 65 67 2c 20 6c 73 6c | 65 6e 3b 09 2f 2a 20 6c |beg, lsl|en;./* l|
|00005cc0| 6f 67 69 63 61 6c 20 62 | 65 67 69 6e 2c 20 6c 65 |ogical b|egin, le|
|00005cd0| 6e 67 74 68 20 2a 2f 0a | 0a 20 20 2f 2a 20 56 61 |ngth */.|. /* Va|
|00005ce0| 6c 75 65 20 63 68 65 63 | 6b 20 74 68 65 20 69 6e |lue chec|k the in|
|00005cf0| 64 65 78 20 2a 2f 0a 20 | 20 69 6e 64 65 78 20 3d |dex */. | index =|
|00005d00| 20 2a 63 6d 64 70 20 2d | 20 27 31 27 3b 0a 20 20 | *cmdp -| '1';. |
|00005d10| 69 66 20 28 69 6e 64 65 | 78 20 3c 20 30 20 7c 7c |if (inde|x < 0 |||
|00005d20| 20 69 6e 64 65 78 20 3e | 20 33 29 0a 20 20 20 20 | index >| 3). |
|00005d30| 72 65 74 75 72 6e 28 22 | 69 6e 64 65 78 22 29 3b |return("|index");|
|00005d40| 0a 20 20 70 70 20 3d 20 | 28 73 74 72 75 63 74 20 |. pp = |(struct |
|00005d50| 70 61 72 74 20 2a 29 20 | 26 62 75 66 66 65 72 5b |part *) |&buffer[|
|00005d60| 4c 4f 43 5f 50 54 20 2b | 20 69 6e 64 65 78 20 2a |LOC_PT +| index *|
|00005d70| 20 31 36 5d 3b 0a 20 20 | 6e 70 20 3d 20 26 62 75 | 16];. |np = &bu|
|00005d80| 66 66 65 72 5b 4c 4f 43 | 5f 4e 54 20 2b 20 69 6e |ffer[LOC|_NT + in|
|00005d90| 64 65 78 20 2a 20 38 5d | 3b 0a 0a 20 20 2f 2a 20 |dex * 8]|;.. /* |
|00005da0| 52 65 61 64 20 53 79 73 | 74 65 6d 20 49 44 20 2a |Read Sys|tem ID *|
|00005db0| 2f 0a 20 20 69 66 20 28 | 73 73 63 61 6e 66 28 61 |/. if (|sscanf(a|
|00005dc0| 72 67 70 2c 22 25 69 25 | 6e 22 2c 20 26 69 64 2c |rgp,"%i%|n", &id,|
|00005dd0| 20 26 6c 65 6e 29 20 3c | 20 31 29 0a 20 20 20 20 | &len) <| 1). |
|00005de0| 72 65 74 75 72 6e 28 22 | 69 64 22 29 3b 0a 20 20 |return("|id");. |
|00005df0| 61 72 67 70 20 2b 3d 20 | 6c 65 6e 3b 0a 0a 20 20 |argp += |len;.. |
|00005e00| 2f 2a 20 49 66 20 49 44 | 3d 3d 30 2c 20 6a 75 73 |/* If ID|==0, jus|
|00005e10| 74 20 63 6c 65 61 72 20 | 6f 75 74 20 74 68 65 20 |t clear |out the |
|00005e20| 65 6e 74 72 79 20 61 6e | 64 20 72 65 74 75 72 6e |entry an|d return|
|00005e30| 2e 20 2a 2f 0a 20 20 69 | 66 20 28 69 64 20 3d 3d |. */. i|f (id ==|
|00005e40| 20 30 29 20 7b 0a 20 20 | 20 20 73 74 72 6e 63 70 | 0) {. | strncp|
|00005e50| 79 28 20 28 63 68 61 72 | 20 2a 29 20 70 70 2c 20 |y( (char| *) pp, |
|00005e60| 22 22 2c 20 31 36 29 3b | 0a 20 20 20 20 69 66 20 |"", 16);|. if |
|00005e70| 28 75 73 65 4e 54 61 62 | 6c 65 29 20 73 74 72 6e |(useNTab|le) strn|
|00005e80| 63 70 79 28 20 6e 70 2c | 20 22 22 2c 20 38 29 3b |cpy( np,| "", 8);|
|00005e90| 0a 20 20 20 20 72 65 74 | 75 72 6e 28 28 63 68 61 |. ret|urn((cha|
|00005ea0| 72 20 2a 29 30 29 3b 0a | 20 20 7d 0a 0a 20 20 2f |r *)0);.| }.. /|
|00005eb0| 2a 20 52 65 61 64 20 66 | 69 72 73 74 20 61 6e 64 |* Read f|irst and|
|00005ec0| 20 6c 61 73 74 20 63 79 | 6c 69 6e 64 65 72 20 2a | last cy|linder *|
|00005ed0| 2f 0a 20 20 69 66 20 28 | 73 73 63 61 6e 66 28 61 |/. if (|sscanf(a|
|00005ee0| 72 67 70 2c 22 25 69 25 | 69 25 6e 22 2c 26 66 69 |rgp,"%i%|i%n",&fi|
|00005ef0| 72 73 74 2c 20 26 6c 61 | 73 74 2c 20 26 6c 65 6e |rst, &la|st, &len|
|00005f00| 29 20 3c 20 32 29 0a 20 | 20 20 20 72 65 74 75 72 |) < 2). | retur|
|00005f10| 6e 28 22 66 69 72 73 74 | 20 6c 61 73 74 20 28 6d |n("first| last (m|
|00005f20| 69 73 73 69 6e 67 29 22 | 29 3b 0a 20 20 61 72 67 |issing)"|);. arg|
|00005f30| 70 20 2b 3d 20 6c 65 6e | 3b 0a 0a 20 20 2f 2a 20 |p += len|;.. /* |
|00005f40| 52 65 61 73 6f 6e 61 62 | 6c 65 20 73 74 61 72 74 |Reasonab|le start|
|00005f50| 2c 65 6e 64 20 63 79 6c | 69 6e 64 65 72 20 6e 75 |,end cyl|inder nu|
|00005f60| 6d 62 65 72 73 3f 20 2a | 2f 0a 20 20 69 66 20 28 |mbers? *|/. if (|
|00005f70| 66 69 72 73 74 20 3e 20 | 6c 61 73 74 29 09 72 65 |first > |last).re|
|00005f80| 74 75 72 6e 28 22 66 69 | 72 73 74 20 3e 20 6c 61 |turn("fi|rst > la|
|00005f90| 73 74 22 29 3b 0a 20 20 | 69 66 20 28 66 69 72 73 |st");. |if (firs|
|00005fa0| 74 20 3e 20 31 30 32 33 | 29 09 72 65 74 75 72 6e |t > 1023|).return|
|00005fb0| 28 22 66 69 72 73 74 20 | 3e 20 31 30 32 33 22 29 |("first |> 1023")|
|00005fc0| 3b 0a 20 20 69 66 20 28 | 6c 61 73 74 20 3e 3d 20 |;. if (|last >= |
|00005fd0| 63 79 6c 73 29 09 72 65 | 74 75 72 6e 28 22 6c 61 |cyls).re|turn("la|
|00005fe0| 73 74 20 3e 3d 20 63 79 | 6c 73 22 29 3b 0a 0a 20 |st >= cy|ls");.. |
|00005ff0| 20 2f 2a 20 47 65 74 20 | 28 6f 70 74 69 6f 6e 61 | /* Get |(optiona|
|00006000| 6c 29 20 73 79 73 74 65 | 6d 20 6e 61 6d 65 2e 20 |l) syste|m name. |
|00006010| 2a 2f 0a 20 20 69 66 20 | 28 2a 61 72 67 70 20 3d |*/. if |(*argp =|
|00006020| 3d 20 27 5c 6e 27 29 20 | 7b 09 2f 2a 20 6e 6f 20 |= '\n') |{./* no |
|00006030| 6e 61 6d 65 20 67 69 76 | 65 6e 2c 20 75 73 65 20 |name giv|en, use |
|00006040| 64 65 66 61 75 6c 74 20 | 2a 2f 0a 20 20 20 20 6e |default |*/. n|
|00006050| 65 77 6e 61 6d 65 20 3d | 20 6e 61 6d 65 49 44 28 |ewname =| nameID(|
|00006060| 69 64 29 3b 0a 20 20 7d | 20 65 6c 73 65 20 7b 09 |id);. }| else {.|
|00006070| 09 2f 2a 20 75 73 65 20 | 74 68 65 20 67 69 76 65 |./* use |the give|
|00006080| 6e 20 6e 61 6d 65 20 2a | 2f 0a 20 20 20 20 2f 2a |n name *|/. /*|
|00006090| 20 73 6b 69 70 20 6c 65 | 61 64 69 6e 67 20 73 70 | skip le|ading sp|
|000060a0| 61 63 65 20 2a 2f 0a 20 | 20 20 20 77 68 69 6c 65 |ace */. | while|
|000060b0| 20 28 2a 61 72 67 70 20 | 3d 3d 20 27 20 27 29 20 | (*argp |== ' ') |
|000060c0| 61 72 67 70 2b 2b 3b 0a | 20 20 20 20 6e 65 77 6e |argp++;.| newn|
|000060d0| 61 6d 65 20 3d 20 61 72 | 67 70 3b 0a 20 20 20 20 |ame = ar|gp;. |
|000060e0| 2f 2a 20 52 65 6d 6f 76 | 65 20 6e 65 77 6c 69 6e |/* Remov|e newlin|
|000060f0| 65 20 66 72 6f 6d 20 65 | 6e 64 20 2a 2f 0a 20 20 |e from e|nd */. |
|00006100| 20 20 77 68 69 6c 65 20 | 28 69 73 67 72 61 70 68 | while |(isgraph|
|00006110| 28 2a 61 72 67 70 29 7c | 7c 2a 61 72 67 70 3d 3d |(*argp)|||*argp==|
|00006120| 27 20 27 29 20 61 72 67 | 70 2b 2b 3b 0a 20 20 20 |' ') arg|p++;. |
|00006130| 20 2a 61 72 67 70 20 3d | 20 27 5c 30 27 3b 0a 20 | *argp =| '\0';. |
|00006140| 20 20 20 75 73 65 4e 54 | 61 62 6c 65 20 3d 20 31 | useNT|able = 1|
|00006150| 3b 0a 20 20 7d 0a 0a 20 | 20 2f 2a 20 53 65 74 20 |;. }.. | /* Set |
|00006160| 74 68 65 20 49 44 20 61 | 6e 64 20 6e 61 6d 65 2e |the ID a|nd name.|
|00006170| 20 2a 2f 0a 20 20 70 70 | 2d 3e 73 79 73 69 64 20 | */. pp|->sysid |
|00006180| 3d 20 69 64 3b 0a 20 20 | 69 66 20 28 75 73 65 4e |= id;. |if (useN|
|00006190| 54 61 62 6c 65 29 20 7b | 0a 20 20 20 20 73 74 72 |Table) {|. str|
|000061a0| 6e 63 70 79 28 6e 70 2c | 20 6e 65 77 6e 61 6d 65 |ncpy(np,| newname|
|000061b0| 2c 20 38 29 3b 0a 20 20 | 20 20 73 74 72 63 70 79 |, 8);. | strcpy|
|000061c0| 28 26 62 75 66 66 65 72 | 5b 4c 4f 43 5f 47 57 52 |(&buffer|[LOC_GWR|
|000061d0| 5d 2c 20 22 47 6f 72 64 | 6f 6e 20 57 2e 20 52 6f |], "Gord|on W. Ro|
|000061e0| 73 73 22 29 3b 0a 20 20 | 7d 0a 0a 20 20 2f 2a 20 |ss");. |}.. /* |
|000061f0| 73 65 74 20 62 65 67 69 | 6e 6e 69 6e 67 20 63 2c |set begi|nning c,|
|00006200| 68 2c 73 20 2a 2f 0a 20 | 20 63 20 3d 20 66 69 72 |h,s */. | c = fir|
|00006210| 73 74 3b 0a 20 20 2f 2a | 20 69 66 20 63 20 3d 3d |st;. /*| if c ==|
|00006220| 20 30 2c 20 68 65 61 64 | 20 3d 3d 20 31 20 28 72 | 0, head| == 1 (r|
|00006230| 65 73 65 72 76 65 20 74 | 72 61 63 6b 20 30 29 20 |eserve t|rack 0) |
|00006240| 2a 2f 0a 20 20 68 20 3d | 20 28 66 69 72 73 74 29 |*/. h =| (first)|
|00006250| 20 3f 20 30 20 3a 20 31 | 3b 0a 20 20 73 20 3d 20 | ? 0 : 1|;. s = |
|00006260| 31 3b 0a 20 20 70 70 2d | 3e 62 5f 63 79 6c 20 3d |1;. pp-|>b_cyl =|
|00006270| 20 63 20 26 20 30 78 46 | 46 3b 0a 20 20 70 70 2d | c & 0xF|F;. pp-|
|00006280| 3e 62 5f 68 65 61 64 20 | 3d 20 68 3b 0a 20 20 70 |>b_head |= h;. p|
|00006290| 70 2d 3e 62 5f 73 65 63 | 20 3d 20 73 20 7c 20 28 |p->b_sec| = s | (|
|000062a0| 28 63 20 3e 3e 20 32 29 | 20 26 20 30 78 43 30 29 |(c >> 2)| & 0xC0)|
|000062b0| 3b 0a 20 20 2f 2a 20 53 | 65 74 20 74 68 65 20 6c |;. /* S|et the l|
|000062c0| 6f 67 69 63 61 6c 20 73 | 65 63 74 6f 72 20 62 65 |ogical s|ector be|
|000062d0| 67 69 6e 20 66 69 65 6c | 64 20 2a 2f 0a 20 20 6c |gin fiel|d */. l|
|000062e0| 73 62 65 67 20 3d 20 6c | 73 6c 65 6e 20 3d 20 63 |sbeg = l|slen = c|
|000062f0| 68 73 32 6c 6f 6e 67 28 | 63 2c 68 2c 73 29 3b 20 |hs2long(|c,h,s); |
|00006300| 2f 2a 20 75 73 69 6e 67 | 20 6c 73 6c 65 6e 20 61 |/* using| lslen a|
|00006310| 73 20 74 65 6d 70 2e 20 | 2a 2f 0a 20 20 70 70 2d |s temp. |*/. pp-|
|00006320| 3e 6c 73 42 65 67 5b 30 | 5d 20 3d 20 6c 73 6c 65 |>lsBeg[0|] = lsle|
|00006330| 6e 20 26 20 30 78 66 66 | 3b 20 6c 73 6c 65 6e 20 |n & 0xff|; lslen |
|00006340| 3e 3e 3d 20 38 3b 0a 20 | 20 70 70 2d 3e 6c 73 42 |>>= 8;. | pp->lsB|
|00006350| 65 67 5b 31 5d 20 3d 20 | 6c 73 6c 65 6e 20 26 20 |eg[1] = |lslen & |
|00006360| 30 78 66 66 3b 20 6c 73 | 6c 65 6e 20 3e 3e 3d 20 |0xff; ls|len >>= |
|00006370| 38 3b 0a 20 20 70 70 2d | 3e 6c 73 42 65 67 5b 32 |8;. pp-|>lsBeg[2|
|00006380| 5d 20 3d 20 6c 73 6c 65 | 6e 20 26 20 30 78 66 66 |] = lsle|n & 0xff|
|00006390| 3b 20 6c 73 6c 65 6e 20 | 3e 3e 3d 20 38 3b 0a 20 |; lslen |>>= 8;. |
|000063a0| 20 70 70 2d 3e 6c 73 42 | 65 67 5b 33 5d 20 3d 20 | pp->lsB|eg[3] = |
|000063b0| 6c 73 6c 65 6e 20 26 20 | 30 78 66 66 3b 20 6c 73 |lslen & |0xff; ls|
|000063c0| 6c 65 6e 20 3e 3e 3d 20 | 38 3b 0a 0a 20 20 2f 2a |len >>= |8;.. /*|
|000063d0| 20 73 65 74 20 65 6e 64 | 69 6e 67 20 63 2c 68 2c | set end|ing c,h,|
|000063e0| 73 20 28 6c 61 73 74 20 | 6d 61 79 20 62 65 20 6c |s (last |may be l|
|000063f0| 61 72 67 65 72 20 74 68 | 61 6e 20 31 30 32 33 29 |arger th|an 1023)|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.