1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
|
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN"
"../../../share/xml/freebsd45.dtd" [
<!ENTITY bibliography SYSTEM "../../../share/xml/bibliography.xml">
]>
<!-- The FreeBSD Traditional Chinese Documentation Project -->
<!-- Original Revision: 1.772 -->
<book lang='zh_tw'>
<bookinfo>
<title>FreeBSD 5.X、6.X 常見問答集</title>
<corpauthor>FreeBSD 文件計畫</corpauthor>
<copyright>
<year>1995</year>
<year>1996</year>
<year>1997</year>
<year>1998</year>
<year>1999</year>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<holder>FreeBSD 文件計畫</holder>
</copyright>
&legalnotice;
<legalnotice id="trademarks" role="trademarks">
&tm-attrib.freebsd;
&tm-attrib.3com;
&tm-attrib.adobe;
&tm-attrib.creative;
&tm-attrib.cvsup;
&tm-attrib.ibm;
&tm-attrib.ieee;
&tm-attrib.intel;
&tm-attrib.iomega;
&tm-attrib.linux;
&tm-attrib.microsoft;
&tm-attrib.mips;
&tm-attrib.netscape;
&tm-attrib.opengroup;
&tm-attrib.oracle;
&tm-attrib.sgi;
&tm-attrib.sparc;
&tm-attrib.sun;
&tm-attrib.usrobotics;
&tm-attrib.xfree86;
&tm-attrib.general;
</legalnotice>
<releaseinfo>$FreeBSD$</releaseinfo>
<abstract>
<para>這份文件是 FreeBSD 5.X 及 6.X 的常見問答集。
除非有特別加註,否則這些項目都適用於 FreeBSD 5.0 及以後的版本。
(如果條目內容中有 <XXX> 則是尚未完成中譯的部份。)
如果您對協助本文件/翻譯計畫的進行有興趣的話,請寄 e-mail 到
&a.doc;。此外,隨時可從 <ulink
url="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/index.html">
FreeBSD 網站</ulink> 拿到這份文件的最新版本。
也可以利用 HTTP 來下載一份龐大的 <ulink url="book.html">HTML</ulink>
文件,或是經由 <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">
FreeBSD FTP 站</ulink> 下載純文字、&postscript;、或 PDF 版本的檔案。
您也可以在這裡使用 <ulink
url="&url.base;/search/search.html">搜尋資料</ulink> 的功能。</para>
</abstract>
</bookinfo>
<chapter id="introduction">
<chapterinfo>
<author>
<firstname>Ying-Chieh</firstname>
<surname>Liao</surname>
<affiliation>
<address><email>ijliao@FreeBSD.org</email></address>
</affiliation>
</author>
</chapterinfo>
<title>前言、一般問題</title>
<para>歡迎使用 FreeBSD 4.X-6.X FAQ!</para>
<para>跟其他 Usenet 上的 FAQ 一樣,這份文件涵蓋了有關 FreeBSD
這套作業系統最常被問到的問題 (當然包括了回答!)。
雖然說我們本來的目的是為了減少網路頻寬的浪費,
以及避免同樣的問題一再出現,但事實上 FAQ
已被公認為是值得閱讀的文件資源。</para>
<para>我們已經儘可能地使這份 FAQ 更豐富了。如果您對如何改善、
進步方面有任何建議,請隨時寄電子郵件給 &a.doc;。</para>
<qandaset>
<qandaentry>
<question id="what-is-FreeBSD">
<para>什麼是 FreeBSD?</para>
</question>
<answer>
<para>簡單地來說,FreeBSD 是一套可以在 Alpha/AXP, AMD64 及
&intel; EM64T, &i386; IA-64, PC-98, &ultrasparc; 上執行的
UN*X-like 作業系統,它是根據 U.C. Berkeley 所開發出來的
<quote>4.4BSD-Lite</quote>,並加上了許多 <quote>4.4BSD-Lite2</quote>
的增強功能。它同時也間接使用了 U.C. Berkeley 所開發出來並由
William Jolitz 移植到 i386 的 <quote>Net/2</quote>,也就是
<quote>386BSD</quote>,
不過現在 386BSD 的程式碼只剩下極少數還留存在 FreeBSD 中。
您可以在 <ulink url="&url.base;/index.html">FreeBSD 首頁
</ulink> 找到 FreeBSD 以及它可以幫您做些什麼的相關資訊。</para>
<para>FreeBSD 已被廣泛地被世界各地的公司行號、ISP、研究人員、
電腦專家、學生,以及家庭用戶所使用,用在工作、教育以及娛樂上。</para>
<para>如果想看關於 FreeBSD 更深入的資料,請看
<ulink url="&url.books.handbook;/index.html">FreeBSD 使用手冊
</ulink>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="FreeBSD-goals">
<para>發展 FreeBSD 的目的是什麼?</para>
</question>
<answer>
<para>FreeBSD 計畫的目的是提供可以任意使用且沒有限制的軟體。
我們在程式碼 (以及計晝本身) 上付出了大量心血,
當然不會介意來點金錢上的回饋,不過我們絕對不會如此堅持。
我們相信我們首要的<quote>任務</quote>
就是提供程式碼給每一個使用者,
不管他們打算用來幹嘛;這麼一來,
這些程式碼才能被用在最多地方,也才能發揮它們最大的效益。
我們相信這就是自由軟體最基本的目標之一,
而且我們會盡全力去支持它。</para>
<para>在我們 source tree 中有部份的程式碼是採用所謂的 <ulink
url="http://www.FreeBSD.org/copyright/COPYING">GPL</ulink> 或是
<ulink url="http://www.FreeBSD.org/copyright/COPYING.LIB">LGPL
</ulink> 版權宣告,
雖然這些版權宣告是用來保障而非限制使用者的權利,
畢竟是不那麼自由了些。
由於這些 GPL 的軟體在商業使用上會引起非常複雜的版權問題,
因此只要有機會,我們會盡量以採用比較寬鬆的
<ulink url="http://www.FreeBSD.org/copyright/freebsd-license.html">
FreeBSD 版權</ulink>的軟體來取代這些 GPL 版權宣告的軟體。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="bsd-license-restrictions">
<para>FreeBSD 版權有任何限制嗎?</para>
</question>
<answer>
<para>有的。但是這並不是限制你怎麼去使用這些程式碼,而是你怎麼看待
FreeBSD 這個計畫。如果你有版權焦慮症的話,請閱讀<ulink
url="http://www.FreeBSD.org/copyright/freebsd-license.html">
版權本文</ulink>。簡單地來說,這份版權的重點可以條列如下。</para>
<itemizedlist>
<listitem>
<para>請勿宣稱是您寫了這個程式。</para>
</listitem>
<listitem>
<para>如果它出問題了,不要控告我們。</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="replace-current-OS">
<para>FreeBSD 可以取代我現在在用的作業系統嗎?</para>
</question>
<answer>
<para>對大部份的人來說是這樣沒錯,
但事實上這問題並沒有這麼好回答。</para>
<para>大部份的人並不是真正在使用一個作業系統。
他們使用的是應用程式;而那些應用程式才是真正用到作業系統的東西。
FreeBSD 是設計用來提供一個強韌且功能完整的作業環境給應用程式來執行。
它支援了多種瀏覽器,辦公室套件軟體,電子郵件閱讀軟體,繪圖程式,
程式設計環境,網路伺服器軟體,以及幾乎所有你想要的東西。
大部份的程式都可以靠 <ulink
url="http://www.freebsd.org/ports/">Ports Collection</ulink>
來管理。</para>
<para>但是如果你想要使用的應用程式只能在某個特定的作業系統上面執行
的話,你就不能輕易地把它換掉,或者指望在 FreeBSD 上有很相似的應用
程式才有機會。如果你想要的是一個強健的辦公室或是網路伺服器,或是
一部穩定的工作站,或是想在不被中斷的環境下工作的話,FreeBSD 無疑
是您的最佳選擇。世界各地有很多使用者,包括初學或資深的 &unix; 管理
人員都選用 FreeBSD 當他們唯一的桌上作業系統。</para>
<para>如果你是從其他的 &unix; 環境轉換到 FreeBSD 的話,
基本上是大同小異的。但是如果你之前用的是圖形界面的作業系統,
例如說是 &windows; 或是比較古老的 &macos; 的話,
可能就要多花一點時間來學習怎麼用 &unix; 的方式來做。
你可以從這份 FAQ 和 <ulink
url="&url.books.handbook;/index.html">
FreeBSD 使用手冊</ulink> 來入門。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="why-called-FreeBSD">
<para>為什麼要叫做 FreeBSD?</para>
</question>
<answer>
<itemizedlist>
<listitem>
<para>您可以免費使用它,即使是用於商業用途。</para>
</listitem>
<listitem>
<para>整個 FreeBSD 作業系統完整的原始程式都可以免費取得,而且不
管是在使用,散佈或是整合進其他程式等各方面也只受到最小的限
制 (不論是否用於商業用途)。</para>
</listitem>
<listitem>
<para>任何人都可以自由地把他對系統的改良或錯誤修正的程式碼加入
source tree 之中 (當然要符合幾個先決條件)。</para>
</listitem>
</itemizedlist>
<para>特別值得注意的是這裡的 <quote>free</quote> 出現了兩次,而且它們
的意思是不一樣的:一種代表 <quote>免費</quote>,另一種代表
<quote>自由</quote>。您可以拿 FreeBSD 去做任何您想要做的事,除了一些
<emphasis>例外</emphasis>,例如您宣稱 FreeBSD 是您寫的。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="differences-to-other-bsds">
<para>FreeBSD 及 NetBSD, OpenBSD 以及其他
open source BSD 作業系統之間有何不同之處呢?</para>
</question>
<answer>
<para>James Howard 在 <ulink url="http://www.daemonnews.org/">
DaemonNews</ulink> 上面寫了 <ulink
url="http://ezine.daemonnews.org/200104/bsd_family.html">
The BSD Family Tree</ulink> 的文件,裡面說明了這些歷史淵源及這些
*BSD 家族計畫之間的差異。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="latest-version">
<para>最新版的 FreeBSD 是那一版?</para>
</question>
<!--
This answer is a hack to deal with the fact that for now there are
multiple "latest" versions of FreeBSD.
這個有點難以回答,事實上 FreeBSD 有許多種類的『最新版』。
-->
<answer>
<para>就 FreeBSD 目前的發展而言,有兩個主要發展分支:
由 <emphasis>5-STABLE</emphasis> 所發行(release)的 5.X 系列、
由 <emphasis>6-STABLE</emphasis> 所發行(release)的 6.X
系列這兩個分支。</para>
<para>在 5.3 release 之前,4.X 系列仍屬
<emphasis>-STABLE</emphasis> 分支。
自從 5.3 開始,5.X 系列開始規劃新的
<emphasis>-STABLE</emphasis> 分支發展重點,
而 4.X 將只著重在重大問題上(比如:漏洞修補、安全維護)
以及所謂的 "extended support"
,不再會有新的突破性發展。另一方面,5-STABLE
分支雖然仍將繼續發行,但是由於它只是 “legacy” 過渡期分支,
所以大多數主力都已轉移到 6-STABLE 繼續開發。</para>
<!-- note: the entity definitions are out of date -->
<para>於 &rel.current.date; 所發行的 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE">&rel.current;</ulink>
版是目前最新的 <emphasis>6-STABLE</emphasis> 分支;
而於 &rel2.current.date; 所發行的 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel2.current;-RELEASE/">&rel2.current;</ulink>
版則是目前最新的 <emphasis>5-STABLE</emphasis> 分支。</para>
<para>簡單地來說,<emphasis>-STABLE</emphasis> 的主要訴求對象是對於
穩定性及低變異性的需求遠勝過對最新 <emphasis>-CURRENT</emphasis>
snapshot 中特別新功能的需求,例如 ISP 或公司行號的使用者。這兩個
branch 都有可能會產生 release 版,但只有當你能接受
<emphasis>-CURRENT</emphasis> 遠比 <emphasis>-STABLE</emphasis>
容易更動這一點,才應該用 <emphasis>-CURRENT</emphasis>。</para>
<para>Release 版<link linkend="release-freq">每幾個月</link>才會發
行一次。雖然如此,有很多人和 FreeBSD 原始碼同步更新(詳見
<link linkend="current">&os.current;</link> 和 <link
linkend="stable">&os.stable;</link> 的相關問題),但因為原始碼
是一直不斷地在變動的,所以如果要這麼做的話得要花上更多的精
力。</para>
<para>其他更多相關 FreeBSD 發行情報,可由 FreeBSD 網站上的 <ulink
url="http://www.FreeBSD.org/releng/index.html">
Release Engineering</ulink> 得知。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="current">
<para>什麼是 &os.current;?</para>
</question>
<answer>
<para><ulink
url="&url.books.handbook;/cutting-edge.html#CURRENT">
&os.current;</ulink> 指的是正在發展中的作業系統版本,
它終將在適當的時機成為 &os.stable; 分支。
它實在是只適合給系統發展者以及有毅力的業餘愛好者使用。
如果想要得到有關如何使用 -CURRENT 的深入資訊,請參考 <ulink
url="&url.books.handbook;/index.html">使用手冊</ulink> 的 <ulink
url="&url.books.handbook;/cutting-edge.html#CURRENT">相關部份
</ulink>。</para>
<para>如果您對作業系統本身並不是很熟悉,或是您沒辦法分辨您遇到的問
題是真的發生了問題亦或是暫時性的小狀況,那麼您就不應該使用
&os.current;。這個分支的程式碼有時候變動得很快,而且可能會因此
而使您有好幾天的時間無法更新您的系統。我們假設使用
&os.current; 的使用者都有能力去分析他們所遇到的問題並且只回報
真正的問題而非<quote>小狀況</quote>。如果您在 -CURRENT mailing
list 中提到類似<quote>make world 造成一些有關 groups 的錯
誤</quote>之類的問題的話,也許會被其他人輕視。</para>
<para>我們每天都會根據目前 -CURRENT 和 -STABLE 的狀況對這兩個分支各
發行一個 <ulink url="&url.base;/snapshots/">snapshot
</ulink> 版。有的時候甚至還會發行可供取得的版本。發表這些 snapshot
的目的在於:</para>
<itemizedlist>
<listitem>
<para>測試最新版的安裝程式。</para>
</listitem>
<listitem>
<para>提供一個簡單的方法給那些喜歡使用 -CURRENT 或是 -STABLE,
但是沒有時間和頻寬去每天昇級的使用者。</para>
</listitem>
<listitem>
<para>為了替我們發展中的程式保留一個固定的參考點,以防止我們未
來造成不幸。(雖然一般而言 CVS 可以防止類似這種的可怕事件 :)
</para>
</listitem>
<listitem>
<para>為了確保所有需要測試的新功能都可以得到最多的測試。</para>
</listitem>
</itemizedlist>
<para>我們不對 -CURRENT snapshot 做任何形式的<quote>品質保
證</quote>。如果你想要的是一個穩定且經過充分測試過的系統的話,
最好選擇使用完整 release 的版本,或是使用 -STABLE snapshots。</para>
<para>您可以直接從 <ulink
url="&url.base;/snapshots/">
snapshots</ulink> 處取得 -CURRENT 的
snapshot release。</para>
<para>對每個有在活動的分支而言,平均每天都會產生一次 snapshots。
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="stable">
<para>什麼是 &os.stable;?</para>
</question>
<answer>
<para>回溯到 FreeBSD 2.0.5 剛發表的時候,我們決定把 FreeBSD 的發展
分成兩支。一支叫做 <ulink
url="&url.books.handbook;/current-stable.html#STABLE">-STABLE
</ulink>,我們只對它做錯誤修正及小幅度的修改 (這是給 ISP
和商業公司等,對實驗中功能不感興趣的單位所使用的)。
另外一支叫做 <ulink
url="&url.books.handbook;/current-stable.html#CURRENT">-CURRENT
</ulink>,從 2.0 版發行以後,就不斷地朝著 6.2-RELEASE
(含後續的版本)前進著。</para>
<para>6-STABLE 分支是從 6.0-RELEASE 開始 (5-STABLE 分支算是
5.3-RELEASE 之後才開始的),然後原本的 &os.current;
就會成為 7-CURRENT。</para>
<para>2.2-STABLE 這個分支隨著 2.2.8 的發表而功成身退。3-STABLE 這個
分支則是結束在 3.5.1 發表之後,它也是 3.X 的最後一次發表。之後除了
安全漏洞的後續修正之外,這些分支就幾乎沒有再更動過。 而
5-STABLE 分支的支援將仍持續一段時間,
但主要焦點僅在於安全方面的漏洞、臭蟲及其他嚴重問題的修補。</para>
<para>6-STABLE 是目前正在發展中的 -STABLE 分支。 6-STABLE
的最新的一次發表是在 &rel.current.date; 發行的
&rel.current;-RELEASE。</para>
<para>7-CURRENT 這個分支是 &os; 的 -CURRENT 分支,
仍然不斷地在發展當中。 如果想要知道更多關於這個分支的資訊的話,
請參考 <link
linkend="current">什麼是 &os;-CURRENT?</link>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="naming">
<para>FreeBSD 版本命名原則是什麼呢?</para>
</question>
<answer>
<para>您可能會看到以下幾種 FreeBSD 的版本名稱:</para>
<itemizedlist>
<listitem>
<para>1) 4.4.2-RELEASE、4.4-BETA:最前面的數字 A.B.C 裡,
A 表示主要的作業系統版本(Major),
B 表示次要的作業系統版本(Minor),
C 表示些微修正版本(Patch)。 後面的英文表示是否為正式版,
通常是測試版(ALPHA、BETA、GAMMA)、正式版(RELEASE)。</para>
</listitem>
<listitem>
<para>2) 6.0-STABLE、7.0-CURRENT:
通常 FreeBSD 會有一個以發展新功能為主的版本,稱為 -CURRENT
,目前 CURRENT 版本是 7.0; FreeBSD
也會有一個以維護穩定性及系統安全為主的版本,稱為 -STABLE,
目前 STABLE 的版本是 6.0。 雖然如此,並不代表 -STABLE
就沒有新功能,也不代表 _CURRENT 就不穩定不安全,
這兩個版本是相輔相成的,而且終有一天 7.0-CURRENT
會變成 7.0-STABLE,而開始 8.0-CURRENT 的發展。 不過一般來說,
由於 -CURRENT 系統開發的速度相當快,跟 -STABLE
相比較不穩定,而且最好是有相當經驗的使用者才來使用。
如果是商業環境或是伺服器站台,最好還是跑 -STABLE 與
-RELEASE 比較好。 由於 -STABLE 與 -CURRENT
都是一直在開發維護中的版本,
因此沒有一個特定的數字版本可以稱呼,
因此通常我們會以編譯日期來代表是哪個時候的 -STABLE 或 -CURRENT
,例如「4.4-STABLE、編譯日期 2001/10/08」。</para>
</listitem>
<listitem><para>
3) 5.0-011025-SNAP、4.2-010816-RELENG:
SNAP 與 RELENG 並不是正式發行的版本,其中 3.0-970625-SNAP 表示是
在 2001 年 10 月 25 日發行的 5.0 測試版(SNAPshot),通常是指 CURRENT
的版本。而 4.2-010816-RELENG 表示是在 2001 年 8 月 16 日發行的
4.2 非正式的穩定版,通常是指 STABLE 的版本。
通常 FreeBSD 核心小組會不定時釋出 SNAP 以供測試,然後有一天 SNAP
會變成 ALPHA->BETA->GAMMA,再來是 RELEASE,而後可能會有不定時的
RELENG 以供測試使用,但是 RELENG 的穩定性通常又比前期的 RELEASE
來的好。</para>
</listitem>
</itemizedlist>
<para>
您要是習慣微軟的術語,這樣說好了,SNAP 是開發期間的內部流出版,
那個日期(011025)就是Build Number,而 ALPHA 與 BETA 是搶鮮版,
RELEASE(RELENG 勉強也算)是正式版,這樣應該了解了吧。
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="release-freq">
<para>每次新的 FreeBSD 將於什麼時候推出?</para>
</question>
<answer>
<para>一般而言,&a.re; 平均每四個月發行一次 release,每次新版本的發表時程都會事先公告,
相關的開發人員就會知道,什麼時候該先把手邊的計劃完成並且測試過,
此外,這些更動都已經完整地測試過,且不會影響系統穩定度。
雖然,等這些好東西進入 -STABLE 的時間令人等得有些不耐煩,
但是大多數的使用者都認為這種謹慎的態度是 FreeBSD 最好的優點之一。</para>
<para>有關發行情報的更多細節部分(包括 release 的行程表、進度),都可在 FreeBSD 網站上的
<ulink url="http://www.FreeBSD.org/releng/index.html">發行情報</ulink> 上面獲得。</para>
<para>為了滿足那些需要 (或想要) 新鮮刺激感的使用者,
上面(-CURRENT的部分)已經提到我們每天都會發行 snapshots 版可供使用。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="responsible">
<para>誰負責 FreeBSD 的發展?</para>
</question>
<answer>
<para>如果是一些有關 FreeBSD 計畫的關鍵性決定,像是整個計畫的走向
或是決定誰可以改 source tree 裡的程式碼這類的事,是由一個由 9 個
人所組成的 <ulink
url="&url.articles.contributors;/article.html#STAFF-CORE">core
team</ulink> 來決定。而有另一群超過 300 個人的 <ulink
url="&url.articles.contributors;/article.html#STAFF-COMMITTERS">
commiters</ulink> 有權利可以直接修改 FreeBSD 的 source tree。
</para>
<para>無論如何,大多數的改變都會事前在 <link linkend="mailing">
mailing lists</link> 先討論過,而且不分角色,每個人都可以參與討論。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="where-get">
<para>我要如何取得 FreeBSD?</para>
</question>
<answer>
<para>每個 FreeBSD 的重要版本都可以經由匿名 ftp 從 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/">FreeBSD FTP 站</ulink>取得:</para>
<itemizedlist>
<listitem>
<para>如果需要 6-STABLE 的最新版,也就是 &rel.current;-RELEASE,請到 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/">&rel.current;-RELEASE </ulink>這個目錄</para>
</listitem>
<listitem>
<para><ulink url="ftp://current.FreeBSD.org/pub/FreeBSD/">7-CURRENT Snapshot</ulink>
通常也是每天都會做一份,這是從 <link linkend="current">-CURRENT</link> 分支做出來的,
主要是為了提供給那些熱心的測試者和開發人員。</para>
</listitem>
<listitem>
<para>如果需要 5-STABLE 的最新版,也就是 &rel2.current;-RELEASE,請到 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel2.current;-RELEASE/">&rel2.current;-RELEASE </ulink>這個目錄</para>
</listitem>
<listitem>
<para><ulink
url="ftp://current.FreeBSD.org/pub/FreeBSD/snapshots/">5.X、6X snapshots</ulink>
通常每天都會做一份。</para>
</listitem>
</itemizedlist>
<para>FreeBSD 的 CD、DVD,還有其他取得方式可以在 <ulink url="&url.books.handbook;/mirrors.html">使用手冊</ulink> 中找到解答。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="access-pr">
<para>我要如何去查詢、提交問題回報(Problem Report,簡稱PR)資料庫呢?</para>
</question>
<answer>
<para>所有使用者的變更要求都可以經由網頁介面的
<ulink url="http://www.FreeBSD.org/cgi/query-pr-summary.cgi?query">
PR查詢介面</ulink> 來察看 (或是回報) 我們的錯誤回報資料庫。</para>
<para>也可以使用 &man.send-pr.1; 這個指令透過電子郵件來回報問題、要求變更。
或者是經由 <ulink url="http://www.FreeBSD.org/send-pr.html">網頁介面的 PR</ulink> 來送出問題回報。</para>
<para>然而,在您回報問題之前,請先閱讀 <ulink
url="&url.articles.problem-reports;/article.html">如何撰寫
FreeBSD 的問題回報單</ulink>,這是一篇告訴你怎樣才能寫出一篇真正有用的
問題回報單。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="other-info-sources">
<para>還有其他有關 FreeBSD 的資訊嗎?</para>
</question>
<answer>
<para>詳見 <ulink
url="http://www.FreeBSD.org">FreeBSD</ulink> 網站上的 <ulink
url="http://www.FreeBSD.org/docs.html">文件</ulink> 列表。</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="support">
<chapterinfo>
<author>
<firstname>Chin-San</firstname>
<surname>Huang</surname>
<affiliation>
<address><email>chinsan.tw@gmail.com</email></address>
</affiliation>
</author>
</chapterinfo>
<title>文件與技術支援</title>
<qandaset>
<qandaentry>
<question id="books">
<para>關於 FreeBSD 有哪些好書可以推薦閱讀的嗎?</para>
</question>
<answer>
<para>FreeBSD 文件計畫已陸續發表了相當廣泛範圍的文件,可在 <ulink
url="http://www.FreeBSD.org/docs.html"></ulink> 取得。另外,
FreeBSD 本身的 manual(一般通稱的man)、doc也如同套件軟體一樣,可以輕鬆地裝在您系統上。
</para>
<para>此外,也建議參閱本份 FAQ 最後所列的參考書目表(Bibliography)與 FreeBSD 使用手冊。
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="doc-formats">
<para>這些文件有其他格式的嗎?像是:純文字(ASCII)或 &postscript; 之類的格式?</para>
</question>
<answer>
<para>有的。這些文件都分別以不同格式儲存以及壓縮處理,放在
FTP 上面,可以從各 FreeBSD FTP 站的 <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">/pub/FreeBSD/doc/</ulink>
目錄內找到你要的。</para>
<para>文件的分類方面主要是一些不同性質所組成:</para>
<itemizedlist>
<listitem>
<para>文件名稱,比如:<literal>faq(常見問答集)</literal>或是
<literal>handbook(FreeBSD 使用手冊)</literal>等等。</para>
</listitem>
<listitem>
<para>各國翻譯的的文件:這主要是由 locale 名稱來決定的
(不清楚的話,可參考您的 FreeBSD 作業系統上的 <filename>/usr/share/locale</filename>)
目前文件總共有下列幾種語言(及編碼)有翻譯:</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="2">
<thead>
<row>
<entry>Locale 名稱</entry>
<entry>說明(所代表的語系、編碼)</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>en_US.ISO8859-1</literal></entry>
<entry>美式英文(US English)</entry>
</row>
<row>
<entry><literal>de_DE.ISO8859-1</literal></entry>
<entry>德文(German)</entry>
</row>
<row>
<entry><literal>es_ES.ISO8859-1</literal></entry>
<entry>西班牙文(Spanish)</entry>
</row>
<row>
<entry><literal>fr_FR.ISO8859-1</literal></entry>
<entry>法文(French)</entry>
</row>
<row>
<entry><literal>it_IT.ISO8859-15</literal></entry>
<entry>義大利文(Italian)</entry>
</row>
<row>
<entry><literal>ja_JP.eucJP</literal></entry>
<entry>日文(Japanese,編碼方式:EUC)</entry>
</row>
<row>
<entry><literal>ru_RU.KOI8-R</literal></entry>
<entry>俄文(Russian,編碼方式:KOI8-R)</entry>
</row>
<row>
<entry><literal>zh_CN.GB2312</literal></entry>
<entry>簡體中文(Simplified Chinese,編碼方式:GB2312)</entry>
</row>
<row>
<entry><literal>zh_TW.UTF-8</literal></entry>
<entry>正體中文(Traditional Chinese,編碼方式:UTF-8)</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<note>
<para>上列的各國翻譯語系文件中,並非所有文件都有翻譯。</para>
</note>
</listitem>
<listitem>
<para>文件的格式:每份文件都以各種不同格式儲存,每種格式都各有好壞,
有些格式適合線上閱讀,而有些則適合列印出美觀的文件。
我們都提供這些不同格式的文件,來確保無論是螢幕上、列印紙本,每個人都可以正常地閱讀內容,
目前可供使用的格式如下:</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="2">
<thead>
<row>
<entry>格式</entry>
<entry>說明</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>html-split</literal></entry>
<entry>章節模式</entry>
</row>
<row>
<entry><literal>html</literal></entry>
<entry>完整模式</entry>
</row>
<row>
<entry><literal>pdb</literal></entry>
<entry>Palm Pilot 資料格式,使用
<ulink url="http://www.iSilo.com/">iSilo</ulink>
程式來閱讀</entry>
</row>
<row>
<entry><literal>pdf</literal></entry>
<entry>Adobe's PDF 格式</entry>
</row>
<row>
<entry><literal>ps</literal></entry>
<entry>&postscript; 格式</entry>
</row>
<row>
<entry><literal>rtf</literal></entry>
<entry>Microsoft's RTF格式<footnote>
<para>當使用 MS Word 來開啟 RTF 格式的話,頁數顯示並不會自動更新。
(在開啟文件後,要按 <keycombo
action="simul"><keycap>CTRL</keycap><keycap>A</keycap></keycombo>,
<keycombo
action="simul"><keycap>CTRL</keycap><keycap>END</keycap></keycombo>,
<keycap>F9</keycap>,這樣子才會更新頁數的顯示。)</para>
</footnote>
</entry>
</row>
<row>
<entry><literal>txt</literal></entry>
<entry>純文字(ASCII)</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</listitem>
<listitem>
<para>文件的壓縮、打包方式:目前有三種方式:</para>
<orderedlist>
<listitem>
<para>當採用
<literal>章節模式(html-split)</literal>,章節模式所產生的各檔案會先使用
&man.tar.1; 來壓縮。檔名結尾有 <filename>.tar</filename> 的檔案就是 tar 格式。
接著,會再以下列方式再壓縮。
</para>
</listitem>
<listitem>
<para>其他格式的檔案都會是單一檔案,檔名通常會是:
<filename>book.<replaceable>格式</replaceable></filename>
(舉例: <filename>book.pdb</filename>,
<filename>book.html</filename> 等等..後面通常加上『.格式』).</para>
<para>而這些檔案會分別以兩種壓縮型態進行壓縮,而存成兩種壓縮型態。</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="2">
<thead>
<row>
<entry>格式</entry>
<entry>說明</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>zip</literal></entry>
<entry>Zip 格式,若要在 FreeBSD 上解壓 zip 檔,則必須先安裝
<filename role="package">chinese/unzip</filename> 或
<filename role="package">archivers/unzip</filename>。
</entry>
</row>
<row>
<entry><literal>bz2</literal></entry>
<entry>BZip2 格式,雖然不如 zip 格式的廣泛使用,但是好處在於可壓縮成更小的檔案。
要解壓 bz2 格式的話,需先安裝 <filename role="package">archivers/bzip2
</filename>。</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>所以像是 Handbook 的 &postscript; 版格式,會以 BZip2 格式壓縮,
存放在 <filename>handbook/</filename> 目錄內,
檔名就是<filename>book.ps.bz2</filename>。</para>
</listitem>
</orderedlist>
</listitem>
</itemizedlist>
<para>選擇想要下載的文件格式與壓縮型態之後,則要決定是否以 FreeBSD <emphasis>套件(package)</emphasis>
型態來下載。</para>
<para>下載、安裝『package』的好處在於:可以透過一般 FreeBSD
套件管理方式來進行管理,比如 &man.pkg.add.1; 及
&man.pkg.delete.1;。</para>
<para>若決定好要下載、安裝『package』的話,必須要確認所要下載的檔名。
文件計畫的套件(package)通常是放在是 <filename>packages</filename> 的目錄內,
每個文件計畫的套件檔名通常是:
<filename><replaceable>文件名稱</replaceable>.<replaceable>語系</replaceable>.<replaceable>編碼</replaceable>.<replaceable>格式</replaceable>.tgz</filename>
。</para>
<para>舉個例子,英文版的 FAQ (格式選擇 PDF)在 package 就叫做
<filename>faq.en_US.ISO8859-1.pdf.tgz</filename>。</para>
<para>再舉個例子,中文版的 FAQ (格式選擇 PDF)在 package 就叫做
<filename>faq.zh_TW.UTF-8.pdf.tgz</filename>。</para>
<para>知道這點之後,就可以用下面指令來安裝中文版 FAQ 套件:</para>
<screen>&prompt.root; <userinput>pkg_add ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/packages/faq.zh_TW.UTF-8.pdf.tgz</userinput></screen>
<para>完成之後,可以用 &man.pkg.info.1; 來找出檔案裝在哪邊:</para>
<screen>&prompt.root; <userinput>pkg_info -f faq.zh_TW.UTF-8.pdf</userinput>
Information for faq.zh_TW.UTF-8.pdf:
Packing list:
Package name: faq.zh_TW.UTF-8.pdf
CWD to /usr/share/doc/zh_TW.UTF-8/books/faq
File: book.pdf
CWD to .
File: +COMMENT (ignored)
File: +DESC (ignored)</screen>
<para>如同您所看到的 <filename>book.pdf</filename> 會被安裝到
<filename>/usr/share/doc/zh_TW.UTF-8/books/faq</filename> 內。</para>
<para>若不想用 package 方式安裝,那麼就需手動下載、解壓縮、複製到你想要擺放的位置去。</para>
<para>舉例,章節模式(split HTML)版的英文 FAQ (壓縮為 &man.bzip2.1;)會放在
<filename>doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2</filename>
要下載、解壓的話,則要打:</para>
<screen>&prompt.root; <userinput>fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2</userinput>
&prompt.root; <userinput>bzip2 -d book.html-split.tar.bz2</userinput>
&prompt.root; <userinput>tar xvf book.html-split.tar</userinput></screen>
<para>這時你會看到一堆 <filename>.html</filename> 的檔案,
主要的目錄檔為 <filename>index.html</filename>
內含主目錄及連結到其他文件。(若有需要的話,也可以複製或搬移這些檔案到同一目錄下)</para>
</answer>
</qandaentry>
<qandaentry>
<question id="mailing">
<para>哪裡有關於 FreeBSD 的郵遞論壇(mailing lists)呢?</para>
</question>
<answer>
<para>這個問題,可以從 FreeBSD 使用手冊上面的 <ulink
url="&url.books.handbook;/eresources.html#ERESOURCES-MAIL">郵遞論壇(mailing-lists)</ulink>
部分獲得答案。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="newsgroups">
<para>有哪些可以使用的 FreeBSD 新聞群組(news groups)呢?</para>
</question>
<answer>
<para>這答案可以從 FreeBSD 使用手冊上面的 <ulink
url="&url.books.handbook;/eresources-news.html">新聞群組(newsgroups)</ulink>
部分獲得答案。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="man">
<para>在文件中常看到類似 "pf(4)"、"pfctl(8)" 等這些字樣代表什麼意思呢?</para>
</question>
<answer>
<para>這表示 man 的章節,系統上一般有八個章節:</para>
<itemizedlist>
<listitem>
<para>1->generl commands</para>
</listitem>
<listitem>
<para>2->system calls and error numbers </para>
</listitem>
<listitem>
<para>3->C libraries</para>
</listitem>
<listitem>
<para>4->devices and device drivers</para>
</listitem>
<listitem>
<para>5->file formats</para>
</listitem>
<listitem>
<para>6->games</para>
</listitem>
<listitem>
<para>7->miscellaneous information pages</para>
</listitem>
<listitem>
<para>8->system maintenance and operation commands</para>
</listitem>
</itemizedlist>
<para>比如:pf(4) 就是指 <command>man 4 pf</command>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="irc">
<para>有哪些 FreeBSD IRC (Internet Relay Chat)頻道呢?</para>
</question>
<answer>
<para>有的,大部分的 IRC 主機都有 FreeBSD 聊天頻道:</para>
<itemizedlist>
<listitem>
<para><ulink url="http://www.efnet.org/index.php">EFNet</ulink> 的
<literal>#FreeBSD</literal> 頻道是個 FreeBSD 論壇,
但可不適合那些想不勞而獲或者搬救兵用的。
這裡是聊天用的頻道,話題範圍甚至涉及『性、運動、核武』等,
請注意:我們已經警告過你了!本頻道可經由
<hostid>irc.chat.org</hostid> 進入。</para>
</listitem>
<listitem>
<para><ulink url="http://www.efnet.org/index.php">EFNet</ulink> 的
<literal>#FreeBSDhelp</literal> 頻道乃是給 FreeBSD
使用者之間交流的,來這裡提問會比 <literal>#FreeBSD</literal>
好一些,當然請不要一股腦隨便亂問。</para>
</listitem>
<listitem>
<para><ulink url="http://www.dal.net/">DALNET</ulink> 的
<literal>#FreeBSD</literal> 頻道,可由
<hostid>irc.dal.net</hostid>(位於美國)及
<hostid>irc.eu.dal.net</hostid>(位於歐洲)進入。</para>
</listitem>
<listitem>
<para><ulink url="http://www.dal.net/">DALNET</ulink> 的
<literal>#FreeBSDHelp</literal> 頻道,可由
<hostid>irc.dal.net</hostid>(位於美國)及
<hostid>irc.eu.dal.net</hostid>(位於歐洲)進入。</para>
</listitem>
<listitem>
<para><ulink url="http://www.undernet.org/">UNDERNET</ulink> 的
<literal>#FreeBSD</literal> 頻道,可由
<hostid>us.undernet.org</hostid>(位於美國)及
<hostid>eu.undernet.org</hostid>(位於歐洲)進入。
由於這是個輔助新手用的頻道,
請記得閱讀別人向你提及的連結或檔案。</para>
</listitem>
<listitem>
<para><ulink url="http://www.rusnet.org.ru/">RUSNET</ulink> 的
<literal>#FreeBSD</literal> 頻道是俄語國家的 &os; 使用者頻道。
這裡同時也是一般交流的討論好去處。</para>
</listitem>
<listitem>
<para><ulink
url="http://freenode.net/irc_servers.shtml">freebsd-gnome
</ulink> 的 <literal>#FreeBSD</literal> 頻道,可由
<hostid>irc.freenode.net</hostid> 進入,
這是 Gnome 的 &os; 使用者頻道。</para>
</listitem>
<listitem>
<para><ulink url="http://freenode.net/irc_servers.shtml">freenode</ulink>
的 <literal>#bsdchat</literal> 頻道,可由
<hostid>irc.freenode.net</hostid> 進入,
這是台灣的 &os; 使用者頻道。(UTF-8 編碼)</para>
</listitem>
</itemizedlist>
<para>上述每個頻道都不一樣,風格迥異而各具特色,且並沒有相連,
因此,你得多方嘗試才能找到適合自己的頻道。
而有些地方與所有的 IRC 文化類似,就是請注意自己言行是否恰當,
另外可能跟頻道內一些年輕/老一輩的會有些代溝需要適應,
總之請多保持禮貌。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="training">
<para>可以從哪邊獲得 FreeBSD 的教育課程訓練及技術支援呢?</para>
</question>
<answer>
<para>DaemonNews 有專門提供 FreeBSD 的教育課程訓練及技術支援。
詳情請到 <ulink url="http://www.bsdmall.com/">BSD Mall</ulink>
察看,謝謝。</para>
<para>FreeBSD Mall 有提供 BSD 技術支援付費服務,
詳情請到 <ulink
url="http://www.freebsdmall.com/">FreeBSD Mall</ulink> 察看,謝謝。</para>
<para>其他任何有提供教育課程訓練及技術支援的組織、單位,若也想列表於此的話,
請與 &a.doc; 聯絡,謝謝。</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter
id="install">
<chapterinfo>
<author>
<firstname>Nik</firstname>
<surname>Clayton</surname>
<affiliation>
<address><email>nik@FreeBSD.org</email></address>
</affiliation>
</author>
</chapterinfo>
<title>安裝</title>
<qandaset>
<qandaentry>
<question id="floppy-download">
<para>若要用軟碟片開機來安裝 FreeBSD 的話,要下載哪些檔案呢?</para>
</question>
<answer>
<para>&os; 4.X 的話,需要兩個 image 檔:
<filename>floppies/kernel.flp</filename> 及
<filename>floppies/mfsroot.flp</filename>。image 檔必須用工具像是
<command>fdimage</command> 或 &man.dd.1; 來傳送到磁片上。
若是在 &os; 5.3 (及之後版本)有重新規劃開機片架構,所以要抓的是
<filename>floppies/boot.flp</filename> 以及 <filename>floppies/kern<replaceable>X</replaceable></filename>
檔案(目前 X 為 1 跟 2 兩個,加上 <filename>floppies/boot.flp</filename>,總共是 3 個檔案)。</para>
<para>若想自己下載 distributions 的話(比如以 &ms-dos; 檔案系統格式安裝),
以下是建議要抓的 distributions :</para>
<itemizedlist>
<listitem>
<para>base/ (4.X 版本則為 bin/)</para>
</listitem>
<listitem>
<para>manpages/</para>
</listitem>
<listitem>
<para>compat*/</para>
</listitem>
<listitem>
<para>doc/</para>
</listitem>
<listitem>
<para>src/ssys.*</para>
</listitem>
</itemizedlist>
<para>完整安裝步驟以及大部分的安裝問題,請參閱 FreeBSD 使用手冊的
<ulink url="&url.books.handbook;/install.html">安裝 FreeBSD</ulink> 章節</para>
</answer>
</qandaentry>
<qandaentry>
<question id="floppy-image-too-large">
<para>若磁片裝不下 image 檔的話,該怎麼辦呢?</para>
</question>
<answer>
<para>一張 3.5 英吋(1.44MB) 的磁碟片是可以裝上 1474560 bytes 的資料
,而開機片的 image 檔案大小實際上也是 1474560 bytes。</para>
<para>在製作開機片時,常見錯誤有:</para>
<itemizedlist>
<listitem>
<para>使用 <acronym>FTP</acronym> 來下載檔案時,
未選擇 <emphasis>binary</emphasis> 傳輸模式來下載。</para>
<para>有些 FTP client端程式,是預設將傳輸模式設定為
<emphasis>ascii</emphasis> 模式,而且會修改接收到的檔案行尾字串為 client 端的作業系統方式
,比如 newline(&unix;格式) 到了作業系統為 &windows; 的 client 端會被改為 CR-LF(&ms-dos;格式),
這會使得 image 檔本身遭到修改而無法正常使用。因此,如果下載的 image
檔案大小若與 FTP 主機上面的檔案『<emphasis>不一致</emphasis>』
的話,請重新使用 binary 傳輸模式下載即可。</para>
<para>FTP 指令: 進入 FTP 之後,打 <emphasis>binary</emphasis>
指令,即可切換到 binary 傳輸模式,然後再下載相關 image 檔案。</para>
</listitem>
<listitem>
<para>直接用 &ms-dos; 的 <command>copy</command> 指令(或類似
的 GUI 程式、或是視窗上直接複製)來複製開機用的 image 檔到磁片上。
</para>
<para>不可以用像是 <command>copy</command> 這類程式直接將 image
檔複製到磁片上,因為 image 檔本身包含了完整的磁軌資料,所以不能單純用複製方式,
而必須使用低階工具程式(像是 <command>fdimage</command> 或 <command>rawrite</command>),
以 <quote>raw</quote> 方式傳送到磁片上。(這部分可參閱 FreeBSD 使用手冊上的 <ulink
url="&url.books.handbook;/install.html">安裝 FreeBSD</ulink>)</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="install-instructions-location">
<para>可以在哪邊找到安裝 FreeBSD 的解說步驟呢?</para>
</question>
<answer>
<para>安裝步驟的解說,請參閱 FreeBSD 使用手冊上的
<ulink url="&url.books.handbook;/install.html">安裝 FreeBSD</ulink> 章節部分。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="need-to-run">
<para>要跑 FreeBSD 需要什麼的配備呢?</para>
</question>
<answer>
<para>&os; 4.X 之前的版本,硬體需求為 386 或更高級的 PC
,記憶體(RAM)至少要 5 MB 或更多,硬碟空間至少要 60 MB 或更多。
不過,&os; 『系統安裝程式』的記憶體(RAM)需求為至少 16 MB。</para>
<para>從 &os; 5.X 起,硬體需求為 486 或更高級的 PC
,記憶體(RAM)至少要 24 MB 或更多,硬碟空間至少要 150 MB 或更多。
</para>
<para>&os; 的所有版本都可以只用低階的 MDA 規格顯示卡,不過...要跑 X11R6 視窗的話,
還是至少用 VGA 或更好規格的顯示卡來用吧。</para>
<para>這部分也可參閱 <xref linkend="hardware"/>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="four-meg-ram-install">
<para>我電腦 RAM 只有 4MB 而已,可以裝 FreeBSD 嗎?</para>
</question>
<answer>
<para>安裝 &os; 4.X 的記憶體需求為至少 5 MB ,而
安裝 &os; 5.X (含之後版本) 則是至少要 8 MB 。</para>
<para>在 5.X 之前的所有 &os; 版本,都可以只用 4 MB 的記憶體來
<emphasis>『運作』</emphasis>,不過,前面那節我們說過了『系統安裝程式』的話,
則無法只用 4 MB 的記憶體來執行。因此,你可以先在『系統安裝程式』這步驟之前,
先將記憶體加到 16 MB 以上,安裝完 FreeBSD 之後,就可以把多餘的記憶體拿下來。
或者是,先把要安裝的硬碟拿到有足夠記憶體的機器上先裝好,
然後再把硬碟放回原機器。</para>
<para>此外,只用 4 MB 的記憶體來運作的話,必須要自製 kernel(拿掉不必要的以及犧牲一些東西)。
也有人成功只用 2 MB 的記憶體以 &os; 開機(雖然這樣的系統幾乎等於廢了..)</para>
</answer>
</qandaentry>
<qandaentry>
<question id="custom-boot-floppy">
<para>要怎樣才能自行打造專用的開機、安裝磁片呢?</para>
</question>
<answer>
<para>目前,還沒有辦法<emphasis>『只』</emphasis>自製專用的開機、安裝磁片。
必須透過自行打造完整作業系統的 release(發行),這樣裡面才會包括自己的開機、安裝磁片。</para>
<para>若想自行打造、發行(release)一個完整的作業系統,請參閱這篇
<ulink url="&url.articles.releng;/article.html">Release Engineering</ulink> 文章。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="windows-coexist">
<para>&windows; 可以與 FreeBSD 共存於電腦上嗎?</para>
</question>
<answer>
<para>先裝 &windows; 再裝 FreeBSD。
那麼 FreeBSD 多重開機管理員(boot manager)就會出現選單讓你選擇要以 &windows; 或
FreeBSD 來開機。不過,若你是先裝 FreeBSD 再裝 &windows; 的話,
那麼 &windows; 將會不問先宰,把 FreeBSD 的多重開機管理員(boot manager)蓋掉,
當你遇上這種情況時,請參考下一節說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="win95-damaged-boot-manager">
<para>嗚.. &windows; 把我的多重開機管理員(boot manager)拿掉了!要怎麼救回來呢?</para>
</question>
<answer>
<para>可以用以下三種方式之一,來救回你的 FreeBSD 多重開機管理員(boot manager):</para>
<itemizedlist>
<listitem>
<para>可以從各 FreeBSD FTP 站的 <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">/pub/FreeBSD/tools/</ulink>
找到 <filename>bootinst.exe</filename> 及 <filename>boot.bin</filename> 這兩個檔,
以 binary 傳輸模式下載後,複製到磁片上,再用 DOS 開機片開機,
接著打類似下面的指令:</para>
<screen><prompt>></prompt> <userinput>bootinst.exe boot.bin</userinput></screen>
<para>這樣,多重開機管理員(boot manager)就會重裝完畢了。</para>
</listitem>
<listitem>
<para>用 FreeBSD 開機片開機,然後選單那邊選 Custom installation(自訂安裝),
再選 Partition,接著選擇你要裝多重開機管理員(boot manager)的硬碟(通常是第一顆),
然後會出現 partition editor 的畫面,這時請不要做任何修改,直接按 W 儲存,
這時程式就會問是否要確定 Write ,最後出現 Boot Manager 選擇畫面,
記得要選 <quote>Boot Manager</quote> ,這樣就會重新將多重開機管理員(boot manager)
安裝到硬碟上。現在,就大功告成可以離開安裝選單並重開機了。</para>
</listitem>
<listitem>
<para>用 FreeBSD 開機片或是開機光碟開機,然後選單那邊選 <quote>Fixit</quote>
,或是以 Fixit 開機片或是光碟安裝的第二片(選擇 <quote>live</quote> filesystem
選項)然後就會進入 fixit shell 了,接著打下列指令:</para>
<screen><prompt>Fixit#</prompt> <userinput>fdisk -B -b /boot/boot0 <replaceable>bootdevice</replaceable></userinput></screen>
<para>請將上面的 <replaceable>bootdevice</replaceable> 修改為您實際的開機硬碟代號
比如 <devicename>ad0</devicename> (第一顆 IDE 硬碟)
,或是<devicename>ad4</devicename> (first IDE disk on
auxiliary controller), <devicename>da0</devicename> (第一顆
SCSI 硬碟)等等。</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="boot-on-thinkpad">
<para>IBM Thinkpad A系列、T系列或 X系列的筆記型電腦裝完 FreeBSD 之後重開機,就當了,該怎麼辦呢?</para>
</question>
<answer>
<para>(本問題主要是發生在 2000 ~ 2001 四月間時)這些 IBM 機器上的 BIOS 早期版本有個臭蟲(bug)會把
FreeBSD 分割區誤認為是 FAT 格式分割區,然後當 BIOS 試著偵測 FreeBSD 分割區時,就會當了。</para>
<para>根據 IBM 方面的說法<footnote><para>一封來自 Keith
Frechette 的 e-mail <email>kfrechet@us.ibm.com</email>。</para></footnote>
,以下型號/BIOS版本的機種,已經都有修正:</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="2">
<thead>
<row>
<entry>型號</entry>
<entry>BIOS 版本</entry>
</row>
</thead>
<tbody>
<row>
<entry>T20</entry>
<entry>IYET49WW(含之後)</entry>
</row>
<row>
<entry>T21</entry>
<entry>KZET22WW(含之後)</entry>
</row>
<row>
<entry>A20p</entry>
<entry>IVET62WW(含之後)</entry>
</row>
<row>
<entry>A20m</entry>
<entry>IWET54WW(含之後)</entry>
</row>
<row>
<entry>A21p</entry>
<entry>KYET27WW(含之後)</entry>
</row>
<row>
<entry>A21m</entry>
<entry>KXET24WW(含之後)</entry>
</row>
<row>
<entry>A21e</entry>
<entry>KUET30WW</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>這些後期的 IBM BIOS 修訂版大多已經修正此一臭蟲。Jacques Vidrine 寫給 &a.mobile; 的
<ulink url="http://docs.FreeBSD.org/cgi/mid.cgi?20010427133759.A71732">這封信
</ulink> 上面說明了若你新的 IBM 筆記型電腦無法順利以 FreeBSD 開機的解法步驟
(假設可以升級或降級 BIOS 版本的話)。</para>
<para>如果機器用的是較古早版本的 BIOS,而且不適合更新 BIOS 的話,那麼以下我們會介紹暫時解法,
教你如何修改 FreeBSD 分割區所使用的 ID ,並安裝相關修補程式。</para>
<para>First, you will need to restore the machine to a state where
it can get through its self-test screen. Doing this requires
powering up the machine without letting it find a FreeBSD
partition on its primary disk. One way is to remove the hard disk
and temporarily move it to an older ThinkPad (such as a ThinkPad
600) or a desktop PC with an appropriate conversion cable. Once
it is there, you can delete the FreeBSD partition and move the hard
disk back. The ThinkPad should now be in a bootable state
again.</para>
<para>With the machine functional again, you can use the workaround
procedure described here to get a working FreeBSD
installation.</para>
<procedure>
<step>
<para>從 <ulink url="http://people.FreeBSD.org/~bmah/ThinkPad/"></ulink>
來下載 <filename>boot1</filename> 及 <filename>boot2</filename> 這兩個檔。
把這兩個檔案放在磁片、光碟或其他硬碟上。</para>
</step>
<step>
<para>以一般安裝 FreeBSD 裝到 ThinkPad 上,記得
<emphasis>『不要用』</emphasis> <literal>Dangerously
Dedicated</literal> 模式。 此外,<emphasis>『不要』</emphasis>
在完成安裝之後就重開機。</para>
</step>
<step>
<para>進入 shell:(按 <keycombo action="simul"><keycap>ALT</keycap><keycap>F4</keycap></keycombo>)
切換到<quote>Emergency Holographic Shell</quote> 或是選單上面選擇
<quote>fixit</quote> shell。</para>
</step>
<step>
<para>用 &man.fdisk.8; 把 FreeBSD 分割區 ID 由 <literal>165</literal> 改為
<literal>166</literal>(OpenBSD所使用的ID)。</para>
</step>
<step>
<para>把剛剛提的 <filename>boot1</filename> 跟
<filename>boot2</filename> 這兩個檔案放到目前的硬碟檔案系統上。</para>
</step>
<step>
<para>以 &man.disklabel.8; 把 <filename>boot1</filename> 及
<filename>boot2</filename> 存到你的 FreeBSD slice 上面。</para>
<screen>&prompt.root; <userinput>disklabel -B -b boot1 -s boot2 ad0s<replaceable>n</replaceable></userinput></screen>
<para><replaceable>「n」</replaceable> 是你裝 FreeBSD 的 slice,
請將 <replaceable>「n」</replaceable> 改為符合你系統現況的 slice。</para>
</step>
<step>
<para>重開機,在 boot prompt 會看到有 <literal>OpenBSD</literal> 的選項,
選它,這樣就會以 FreeBSD 開機。</para>
</step>
</procedure>
<para>另外,至於如何讓 OpenBSD 及 FreeBSD 並存在同一台 IBM ThinkPad 上...
這個問題就交給各位看倌們去嘗試了 :p</para>
</answer>
</qandaentry>
<qandaentry>
<question id="install-bad-blocks">
<para>有壞軌的硬碟可以拿來裝 FreeBSD 嘛?</para>
</question>
<answer>
<para>(如果很堅持的話)也是可以,不過這想法顯然不太明智。:(</para>
<para>如果在一般較新的 IDE 硬碟上看到有壞軌,很有可能代表:這顆硬碟即將掛點了。
(因為目前所有較新的 IDE 硬碟,內部都有自動 remapping 壞軌的能力。
如果看到有壞軌,則表示它內部自動 remapping 功能失效,無法處理壞軌,
也就是說這顆硬碟已經是嚴重損壞程度了。)我們建議買顆新硬碟比較乾脆些唷。</para>
<para>如果是 SCSI 硬碟有壞軌的話,請試著參考這個
<link linkend="awre">解法</link>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="boot-floppy-strangeness">
<para>用安裝磁片開機時,卻有些怪現象發生!這是什麼情況呢?</para>
</question>
<answer>
<para>若看到一些怪異現象,像是開機片開機開到一半就當了,磁碟機完全沒任何動作、
或是不斷反覆重開機,請先檢查以下幾個線索:</para>
<orderedlist>
<listitem>
<para>請確定是否為全新、沒有磁軌錯誤的磁片?
(最好使用新買的,而非雜誌、書本附贈的,甚至還放在床底下三年了...=_="")</para>
</listitem>
<listitem>
<para>請確定是否有用 binary(或image)傳輸模式來下載 image 檔?
(不用覺得不好意思,即使是我們也曾意外以 ASCII 傳輸模式來下載 binary 檔案!)</para>
</listitem>
<listitem>
<para>若你是 &windows; 95/98/ME/NT/2000/XP/2003 來下載、製作開機磁片的話,
請確定是否有在 DOS 模式使用 <command>fdimage</command> 或
<command>rawrite</command> 這兩個工具程式?剛講的這些作業系統,
都會影響程式去直接寫入硬體,像是製作開機片之類的動作。
有時候,在 GUI 介面上的 DOS shell 也可能會發生這樣的問題。
</para>
</listitem>
</orderedlist>
<para>此外,直接透過 &netscape; 瀏覽器下載 image 檔的話,也有類似現象。
所以,如果可以的話,請改用其他可以調整設定的 FTP client端程式來進行下載。
(當然,要記得調 binary 傳輸模式)</para>
</answer>
</qandaentry>
<qandaentry>
<question id="no-install-cdrom">
<para>用光碟開機片來安裝,但光碟開機後,安裝程式說找不到光碟...這是怎麼了?</para>
</question>
<answer>
<para>通常問題在於光碟機設定錯誤。目前很多電腦的出廠標準配備都有光碟機,並且
會預先設定為 IDE 通道上面 Secondary 的 Slave 設備,而 Secondary 上面的
卻沒有 Master 設備。以 ATAPI 的規格而言,這是錯誤的設定,然而 &windows; 的作法
是不理會這些規格上的設定問題,而且開機時 BIOS 偵測也會略過這點。
這也就是為什麼 BIOS 可以看到光碟,並且可用光碟開機,但 FreeBSD
無法正常抓到光碟以順利進行安裝。</para>
<para>解法:重新設定系統,讓光碟成為它所連接那條 IDE 通道的 Master,
或者只有一條 IDE 通道的話,那就讓光碟機成為 Slave
,當然該 IDE 通道上至少要有 Master 設備。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="install-PLIP">
<para>我可以用 PLIP(Parallel Line IP)方式來安裝 FreeBSD 到筆記型電腦上嗎?</para>
</question>
<answer>
<para>可以,用一條普通的 Laplink 線就可以囉。若有這方面需求的話,請參閱 FreeBSD 使用手冊中的
<ulink url="&url.books.handbook;/network-plip.html">PLIP
章節</ulink> 的細部設定</para>
</answer>
</qandaentry>
<qandaentry>
<question id="geometry">
<para>該用哪一種硬碟設定參數(geometry)呢?</para>
</question>
<answer>
<note>
<para>這裡的『硬碟設定參數(geometry)』,指的是硬碟上的
「cylinders」、「heads」、「sectors/track」 這三個設定參數。
接下來的文章內,為了方便介紹,將簡稱為『C/H/S』。
這些設定參數是讓 PC 上的 BIOS 能順利地正常判別硬碟,
與硬碟本身讀寫的重要因素。</para>
</note>
<para>對剛接手的系統管理者新手而言,這些設定參數常造成一些困擾。
首先,SCSI 硬碟上的 <emphasis>physical</emphasis> geometry
跟 FreeBSD 上的 disk blocks 是完全無關的。事實上,
就硬碟上磁區密度的變化而言,並沒有所謂『physical geometry』這種東西。
硬碟製造商所說的『physical geometry』通常是指:
硬碟上所使用最小空間來存放資料的設定參數(geometry)。
以 IDE 硬碟而言,FreeBSD 用以存取硬碟設定的方式是 C/H/S ,
然而,目前市面上的硬碟早就在內部運作時,就自動轉換為 block 方式
了。</para>
<para>真正關鍵的地方,其實是在於 『<emphasis>logical</emphasis>
geometry』— 這是 BIOS 偵測硬碟時所得到的設定,並且用來決定硬碟存取方式。
由於 FreeBSD 是採用 BIOS 的偵測設定值,所以如何來讓 BIOS 偵測到的設定值保持正確,
是十分重要。尤其是同一顆硬碟上有多個作業系統的情況,
它們都必須採用一致的硬碟設定參數(geometry),
否則就會有開機進不去作業系統的嚴重問題了。</para>
<para>以 SCSI 硬碟而言,硬碟設定參數(geometry)是由 SCSI 卡上的
extended translation(通常指的是有標示 <quote>support >1GB</quote>(支援 1GB 以上容量,或類似名詞)
支援與否來作決定。
如果不支援,那麼就會採用 <replaceable>N</replaceable> cylinders、
64 heads、 32 sectors/track 作為硬碟設定參數(geometry),這裡講的『<replaceable>N</replaceable>』
是指硬碟的容量(單位:MB)。舉個例子來說,一顆 2GB 硬碟應該是
2048 cylinders、64 heads、32 sectors/track。</para>
<para>如果該 SCSI 有支援使用 extended translation 的話,
(通常這個方式在 &ms-dos; 使用上有某些限制),並且硬碟容量大於 1GB,
那麼硬碟設定參數(geometry)就會使用像是:
M cylinders、255 heads、每磁軌 63 sectors(請注意:不是『64』哦),
這裡講的『<literal>M</literal>』是指硬碟的容量(單位:MB)再除以
7.844238 所得出的數值喔!所以,這個例子的話,同樣是 2GB 硬碟應該是
261 cylinders、255 heads、每磁軌 63 sectors。</para>
<para>若對上面講的不瞭解,或是 FreeBSD 在安裝時所偵測到的硬碟設定參數(geometry)
有問題的話,最簡單的解法通常是在硬碟上建立一塊小小的 DOS 分割區(partition)。
這樣一來,就可以偵測到正確的硬碟設定參數了,而且,
如果不想繼續留著那小塊 DOS 分割區的話,可以隨時用 partition editor
來拿掉它。或者把它留著當作網路卡驅動程式使用,或隨你高興怎麼用它。</para>
<para>此外呢,有個免費好用的工具程式叫做『<filename>pfdisk.exe</filename>』,
這個程式放在各 FreeBSD FTP 站或光碟的 <filename>tools</filename> 目錄下,
它可以用來找出硬碟上其他作業系統所使用的硬碟設定參數,
然後就可以在 partition editor 內輸入剛剛找到的那些設定參數就可以了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="disk-divide-restrictions">
<para>分割磁碟機時有任何限制嗎﹖</para>
</question>
<answer>
<para>有,你必須確認你的 root 分割區是在 1024 cylinders 之內,讓
BIOS 可以從其中啟動核心。(注意:這是 PC 的 BIOS 功能限制,而不
是 FreeBSD 的)</para>
<para>以 SCSI 硬碟而言,通常是把 <literal>root</literal> (<filename>/</filename>)
分割區放到硬碟最前面的 1024MB (如果有支援 extended translation 的話,
那麼是最前面的 4096MB — 這點請參考上一小節)。而 IDE 硬碟的話,相對應的則是 504MB。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="disk-manager">
<para>可以使用哪些磁碟管理程式(disk managers)呢?</para>
</question>
<answer>
<para>FreeBSD 可以用 Ontrack Disk Manager 並且運作正常,
至於其他的 disk manager 則不在正式支援之列。</para>
<para>若整顆硬碟只裝 FreeBSD ,那麼就不用再裝 disk manager 了。
只要把硬碟設定為 BIOS 所能抓到的最大空間,那麼 FreeBSD 就可算出實際上可使用的空間了。
如果,正在使用的是古早 MFM 控制卡的舊式硬碟,
那麼就需要在 FreeBSD內作 cylinders 相關設定了。</para>
<para>如果想在磁碟上使用 FreeBSD 和另外的作業系統,也可以不裝 disk manager,
只要確定 FreeBSD 的啟動分割區跟其他作業系統的 slice 都位於開始的 1024 cylinders
內就可以了。如果你相當地高明的話,一個 20MB 的啟動分割區應該就夠用了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="missing-os">
<para>FreeBSD 安裝完畢後重開機,但是電腦卻說 <errorname>Missing Operating
System</errorname>這是怎麼了?</para>
</question>
<answer>
<para>通常原因出在 FreeBSD 及 DOS 或其他作業系統在硬碟的 <link
linkend="geometry">設定參數(geometry)</link>上的規劃有相衝。解法是重裝,但是請照
上述的相關章節步驟來做。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="stop-at-boot-manager">
<para>為什麼機器上多重開機管理員(boot manager)出現了 <prompt>F?</prompt> 這個選單畫面,
但卻不會自動跳過而繼續開機呢?</para>
</question>
<answer>
<para>這個症狀是本文上面所提的另外一個問題了,原因在於 BIOS 上跟 FreeBSD
上面兩邊的硬碟的 <link linkend="geometry">設定參數(geometry)</link> 並不一致。
若你硬碟或 BIOS 支援 cylinder translation
(通常會被標為 <quote>support >1GB(支援 1 GB以上容量)</quote>的話,
試試看更改相關設定,並重裝 FreeBSD。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="need-complete-sources">
<para>安裝 FreeBSD 時,需要安裝完整的 sources 嗎?</para>
</question>
<answer>
<para>一般來說,這是用不著的。然而,我們強烈建議您的 source 至少要裝
<literal>base</literal>(包含了本文中所提的一些檔案)、以及
<literal>sys</literal> (kernel 的 source 檔)。
雖然,作業系統本身運是不需要裝 source 檔,但是 &man.config.8; 這個 kernel設定程式則需要 src 。
若沒裝 kernel 的 source 檔,仍然可以用其他地方透過 NFS 掛載的唯讀檔案系統,
來編譯程式。
但由於 kernel-source 本身的限制,我們建議不要直接 mount 在 <filename>/usr/src</filename>,
最好是用 symbolic link(參閱 &man.ln.1;) 將掛載的路徑,設定連結到<filename>/usr/src</filename>
目錄。</para>
<para>在機器上直接裝有 source 並且瞭解相關編譯過程,這樣子日後升級
FreeBSD 會來得方便多。</para>
<para>若忘了裝相關 source 的話,可以事後用 <command>sysinstalll</command>
(&os; 5.2 之前版本則是 <command>/stand/sysinstall</command>) 來補裝,選單:Configure → Distributions → src。
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="need-kernel">
<para>需要重新 build kernel 嗎?</para>
</question>
<answer>
<para>在很久很久以前,原本重新 build kernel 在 FreeBSD 安裝過程中,
是絕對必需的步驟之一。但目前早就不用這麼麻煩了,
目前主要常見的版本都使用更友善的 kernel 設定指令。
&os; 4.X(含之前版本),在 FreeBSD 啟動提示號(boot:)時,使用 <option>"-c"</option> flag
就會進入設定畫面,來對 kernel 作常見的 ISA 卡細節設定。
而 &os; 5.X(含之後版本)的話,則是以更具彈性的 "hints" 設定方式。</para>
<para>如果想更節省 RAM 的使用、縮短開機流程,那麼建議:新的 kernel 設定檔只要包含你需要的驅動程式,
然後重新編譯、安裝 kernel 並重開機。然而呢,這點對大多數的系統來說,
這不一定是必要的。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="password-encryption">
<para>密碼編碼該採用 DES、Blowfish 或 MD5 的哪一種?該怎麼設定呢?</para>
</question>
<answer>
<para>FreeBSD 預設的密碼編碼方式是採 <emphasis>MD5</emphasis>。
就密碼編碼方式而言,MD5 方式一般被視為比傳統 &unix; 的 <emphasis>DES</emphasis> 方式較為安全。
然而,若有需要在使用舊環境(較不安全的密碼編碼方式的),DES 密碼編碼方式一樣可以使用。
(若使用 sysinstall 時有選擇 <quote>crypto</quote> 套件,或是從 source 內編譯安裝)
有裝 crypto 的話,crypto libraries 也支援更安全的 Blowfish 編碼方式。</para>
<para>密碼編碼的方式是由 <filename>/etc/login.conf</filename> 內的
<quote>passwd_format</quote> 欄位來決定的。該欄設定值,(若有裝 crypto 的話)可以是
<quote>des</quote> 或 <quote>blf</quote> 或是原本的 <quote>md5</quote>。
詳情請參閱 &man.login.conf.5; 說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="boot-floppy-hangs">
<para>為什麼開機磁片開到一半,就出現
<literal>Probing Devices...</literal> 的畫面訊息,然後就停住了?</para>
</question>
<answer>
<para>若機器上有裝 IDE 介面的 Iomega &iomegazip; 或是 &jaz; 的話,
因為這些設備可能跟開機片有相衝,請先拿掉這些設備再重試。
當整個作業系統裝好後,就可以把這些設備接回去使用了。
希望這點在日後 release 的 FreeBSD 可以獲得徹底解決。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="panic-on-install-reboot">
<para>系統裝完並重開機後,為什麼卻出現 <errorname>panic: can't mount root</errorname>?</para>
</question>
<answer>
<para>這個錯誤是因為啟動磁區跟 kernel 兩者對磁碟裝置的認知不相同。
通常這問題會發生在有兩顆 IDE 硬碟的系統,比如:硬碟 Jumper 設定為 Master、
或是兩條 IDE 排線各只連接一顆硬碟,但是裝 FreeBSD 那顆開機硬碟,
卻接在 Secondary IDE 排線上。
如此一來,在開機時當 kernel 指定第二個 IDE 控制器的第一個磁碟機 ad2,
啟動磁區卻認為系統是裝在 ad0(BIOS偵測的第二顆硬碟)!
偵測完裝置後,kernel 試著把啟動磁區所認為的開機硬碟(ad0) mount
起來,事實上應該是 ad2 才對,所以就會出現上面的錯誤訊息了。</para>
<para>解法如下,請選擇其中一種方式就好:</para>
<orderedlist>
<listitem>
<para>重開機並在出現『<literal>Booting kernel in 10 seconds; hit [Enter] to interrupt</literal>』
提示的時候,按下 <keycap>Enter</keycap>鍵。
這樣子就會進入 boot loader 畫面:</para>
<para>請輸入
<literal>
set
root_disk_unit="<replaceable>disk_number</replaceable>"
</literal> 這裡的『<replaceable>disk_number</replaceable>』請依據情況換成相關代號:
若 FreeBSD 硬碟是設定裝在 Primary IDE 接線的 Master,就設為 0 ;
若是 Primary IDE 接線的 Slave,就設為 1;
若是 Secondary IDE 接線的 Master,就設為 2;
若是 Secondary IDE 接線的 Slave,就設為 3。</para>
<para>接著請再輸入 <literal>boot</literal>,然後系統應該就可以正常開機了。</para>
<para>若要每次開機都自動設定,而不必每次都打一次,那麼就在 <filename>/boot/loader.conf.local</filename>
檔案內加上 <literal>root_disk_unit="<replaceable>disk_number</replaceable>"</literal>
這行
(當然,『<replaceable>disk_number</replaceable>』要改成相關代號)</para>
</listitem>
<listitem>
<para>把 FreeBSD 硬碟改接到 Primary IDE 接線上,如此一來就可順利使用。</para>
</listitem>
</orderedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="memory-limits">
<para>記憶體最大限制為多少?</para>
</question>
<answer>
<para>一般 &i386; 機器上最多可支援到 4 GB(gigabytes)。
而自 &os; 4.9 及 5.1 可以開始使用 &man.pae.4; 來支援更多的記憶體。
有關這點,需要在 kernel 設定檔內加入下列內容並重新編譯 kernel,才能使用 PAE。</para>
<programlisting>options PAE</programlisting>
<para>&os; 在 pc98 機器上最多則只支援 4 GB ,而且不能使用 PAE。
在 Alpha 機器上,記憶體限制方面要視所使用的型號支援程度而定,這點請參閱
所使用的 Alpha 硬體規格表。至於其他架構的 &os; 理論上最多可使用的記憶體,有較多的限制。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="ffs-limits">
<para>檔案系統最大限制為多少?</para>
</question>
<answer>
<para>就檔案系統方面,理論上的限制是最多到 8TB(2G blocks),
或是使用內定 8K block 大小時,限制是 16TB。
實際上,目前軟體使用上限制只能用到 1 TB,
然而如果是有另行改造過檔案系統,那麼達到 4TB 的目標是可行的
(也有人成功過)。</para>
<para>單一檔案的大小方面,假如 block 以 4K 作規劃的話,
則最大是趨近 1G blocks(4TB)。</para>
<table>
<title>檔案大小的最大限制</title>
<tgroup cols="3">
<thead>
<row>
<entry>檔案系統 block 大小</entry>
<entry>works</entry>
<entry>should work</entry>
</row>
</thead>
<tbody>
<row>
<entry>4K</entry>
<entry>4T-1</entry>
<entry>>4T</entry>
</row>
<row>
<entry>8K</entry>
<entry>>32G</entry>
<entry>32T-1</entry>
</row>
<row>
<entry>16K</entry>
<entry>>128G</entry>
<entry>32T-1</entry>
</row>
<row>
<entry>32K</entry>
<entry>>512G</entry>
<entry>64T-1</entry>
</row>
<row>
<entry>64K</entry>
<entry>>2048G</entry>
<entry>128T-1</entry>
</row>
</tbody>
</tgroup>
</table>
<para>When the fs block size is 4K, triple indirect blocks work
and everything should be limited by the maximum fs block number
that can be represented using triple indirect blocks (approx.
1K^3 + 1K^2 + 1K), but everything is limited by a (wrong) limit
of 1G-1 on fs block numbers. The limit on fs block numbers
should be 2G-1. There are some bugs for fs block numbers near
2G-1, but such block numbers are unreachable when the fs block
size is 4K.</para>
<para>block 大小如果是 8K 或更大,檔案系統 block 數目會被限制在 2G-1
,但實際上應該說限制是 1G-1 才對,因為採用 2G-1 block 的檔案系統會導致一些問題。
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="archsw-readin-failed-error">
<para>為何在啟動新的 kernel 時,看到
<errorname>archsw.readin.failed</errorname> 錯誤訊息?</para>
</question>
<answer>
<para>原因出在你的 world 以及 kernel 並不同步,舉例:kernel 用 4.11,
而 world 卻是 4.8,這樣是會有問題的。
請再次確認,是否有以 <command>make buildworld</command> 及
<command>make buildkernel</command> 來正常更新 kernel。</para>
<para>在啟動 loader 之前,會看到 "|" 這個符號在轉動,這時可以按任何鍵中斷,
然後再指定要載入哪個 kernel 來開機。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="security-profiles">
<para><quote>security profiles</quote> 是指什麼?</para>
</question>
<answer>
<para>A <quote>security profile</quote> is a set of configuration
options that attempts to achieve the desired ratio of security
to convenience by enabling and disabling certain programs and
other settings. For full details, see the <ulink
url="&url.books.handbook;/install-post.html#SECURITYPROFILE">Security
Profile</ulink> section of the Handbook's <ulink
url="&url.books.handbook;/install-post.html">post-install
chapter</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="boot-acpi">
<para>在開機時,選擇使用 ACPI 則在安裝過程就掛了,該怎麼辦?</para>
</question>
<answer>
<para>試試看關閉 ACPI support。 當在載入 bootloader時,按下空白鍵。
系統會顯示 <screen>OK</screen> 這時輸入
<screen><userinput>unset acpi_load</userinput></screen> 接著打
<screen><userinput>boot</userinput></screen>
以繼續開機,這樣子應該就可以了。</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter
id="hardware">
<title>硬體支援方面</title>
<sect1 id="compatibility-general">
<title>一般問題</title>
<qandaset>
<qandaentry>
<question id="which-hardware-to-get">
<para>我想組裝自己的 FreeBSD 機器,有哪些型號、品牌、規格是支援程度最好的呢?</para>
</question>
<answer>
<para>有關這點,在 FreeBSD 討論區上時常有人討論。雖然硬體汰換速度很快,
可能隨時有新規格、新產品出現,然而這些都在我們意料之中,
我們 <emphasis>仍然</emphasis> 強烈建議:在詢問有關最新規格硬體的支援問題之前,
請先參閱 &os;
<ulink url="&rel.current.hardware;">&rel.current;</ulink>
或
<ulink url="&rel2.current.hardware;">&rel2.current;</ulink>的支援硬體列表,
或是搜尋<ulink url="http://www.FreeBSD.org/search/#mailinglists">討論區的舊文章</ulink>,
也許,上週才剛恰巧有人討論過你所要問的硬體。</para>
<para>如果要找有關筆記型電腦方面,請到 FreeBSD-mobile 筆記型電腦討論區。
不然,就到 FreeBSD-questions 討論區,或是特定硬體規格(比如 pc98, Alpha)的專屬討論區吧。
</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-processors">
<title>硬體架構及 CPU</title>
<qandaset>
<qandaentry>
<question id="architectures">
<para>FreeBSD 有支援 x86 之外的硬體架構平台嗎?</para>
</question>
<answer>
<para>有的,FreeBSD 目前可以在 Intel x86 and DEC
(現在的 HP-Compaq) Alpha 架構上面運作。自 FreeBSD 5.0 之後的版本,則
可支援 AMD64 及 Intel EM64T, IA-64 以及 &sparc64; 架構。
未來平台支援上還會有 &mips; 及
&powerpc;,細節請分別參閱 &a.mips; 或 &a.ppc;。
一般而言,新的硬體架構平台方面,都是到 &a.platforms; 討論。</para>
<para>若你機器不是以上架構或是比較奇特的,而想立刻試試看 BSD 的魔力,
我們建議你可以考慮使用 <ulink
url="http://www.netbsd.org/">NetBSD</ulink> 或 <ulink
url="http://www.openbsd.org/">OpenBSD</ulink>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="smp-support">
<para>FreeBSD 支援 CPU 對稱多工處理(SMP, Symmetric Multiprocessing)嗎?</para>
</question>
<answer>
<para>有的。 SMP 在 &os; 5.2 預設的 kernel(<emphasis>GENERIC</emphasis>)已有啟動。
</para>
<para>在 &os; 5.3 要 release 時,SMP相關設定也是預設就有啟動。
然而,在一些較新型的機器(像是 emt64)上卻又有些問題,
所以還是決定在相關問題、安全議題未獲解決前,先關閉 SMP 的相關啟動。
這點,正是 &os; 5.4 所優先考慮的方向。</para>
<para>&os; 4.X 的話,預設的 kernel 並沒有啟動 SMP,
因此,必須要把 options SMP 加入 kernel 設定檔並重新編譯才能啟動。
至於還有哪些相關設定要放入 kernel 設定檔,請參閱<filename>/sys/i386/conf/LINT</filename>。
</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-drives">
<title>硬碟、磁帶機以及光碟、DVD、燒錄機</title>
<qandaset>
<qandaentry>
<question id="supported-hard-drives">
<para>FreeBSD 可支援哪些種類的硬碟呢?</para>
</question>
<answer>
<para>FreeBSD 都支援 EIDE 及 SCSI 介面的硬碟(以及 SCSI 卡,請看下一節說明)
以及 <quote>Western Digital</quote> 介面的硬碟 (MFM、 RLL、
ESDI,當然包含 IDE),不過有一些少數的 ESDI 晶片組的(型號:WD1002/3/6/7)
可能無法正常運作。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="supported-scsi-controllers">
<para>支援哪些 SCSI 卡、設備呢?</para>
</question>
<answer>
<para>請參閱 &os; 的硬體支援表(
<ulink url="&rel.current.hardware;">&rel.current;</ulink> 或
<ulink url="&rel2.current.hardware;">&rel2.current;</ulink>)</para>
</answer>
</qandaentry>
<qandaentry>
<question id="tape-support">
<para>支援哪些磁帶機呢?</para>
</question>
<answer>
<para>FreeBSD 支援 SCSI 及 QIC-36 (QIC-02 介面) 規格的磁帶機。
同時包含了 8-mm (也就是 Exabyte) 及 DAT 磁帶機。</para>
<para>有些早期版本的 8-mm 磁帶機並不是完全相容於 SCSI-2 規格,
所以可能在 FreeBSD 上表現不是很好。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="tape-changer-support">
<para>FreeBSD 支援磁帶自動換帶機嗎?</para>
</question>
<answer>
<para>FreeBSD 可以用 &man.ch.4; 上面所列的機種,搭配 &man.chio.1; 指令,
來使用 SCSI 種類的自動換帶機,細節部分請參閱 &man.chio.1; 說明。</para>
<para>If you are not using <application>AMANDA</application>
or some other product that already understands changers,
remember that they only know how to move a tape from one
point to another, so you need to keep track of which slot a
tape is in, and which slot the tape currently in the drive
needs to go back to.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="supported-cdrom-drives">
<para>FreeBSD 可支援哪些種類的光碟機呢?</para>
</question>
<answer>
<para>只要是有支援的 SCSI 卡上所接的任一 SCSI 光碟機都有支援。</para>
<para>此外,也支援下列的光碟機:</para>
<itemizedlist>
<listitem>
<para>Mitsumi LU002 (8bit), LU005 (16bit) 及 FX001D
(16bit 2x Speed)</para>
</listitem>
<listitem>
<para>Sony CDU 31/33A</para>
</listitem>
<listitem>
<para>Sound Blaster 非 SCSI 介面的光碟機</para>
</listitem>
<listitem>
<para>Matsushita/Panasonic 光碟機</para>
</listitem>
<listitem>
<para>相容 ATAPI 規格的 IDE CDROMs</para>
</listitem>
</itemizedlist>
<para>相對於 SCSI 機種而言,其他非 SCSI 的光碟機都是比較慢,
此外,有些 ATAPI 種類的光碟機可能無法順利運作</para>
<para>Daemon News 以及 FreeBSD Mall 所發行的正式 FreeBSD 光碟以及燒錄用的影像檔(ISO),
都可以直接用於開機光碟使用。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="supported-cdrw-drives">
<para>FreeBSD 支援哪些光碟燒錄機的驅動程式呢?</para>
</question>
<answer>
<para>FreeBSD 支援任何相容 ATAPI 標準的 IDE CD-R 或 CD-RW 光碟燒錄機,
細節請參閱 &man.burncd.8; 說明。</para>
<para>FreeBSD 也支援任何 SCSI CD-R 或 CD-RW 光碟燒錄機。
請用 port 或 packag 機制來安裝、使用 <command>cdrecord</command> ,
並確定您的 kernel 內有將 <devicename>pass</devicename>設備一併編譯在內。
(預設的 kernel.GENERIC 都會有 device pass 這段)</para>
</answer>
</qandaentry>
<qandaentry>
<question id="zip-support">
<para>FreeBSD 支援 Iomega &iomegazip; 嗎?</para>
</question>
<answer>
<para>FreeBSD 支援外接式的 SCSI 及 ATAPI(IDE) 介面的 Iomega &iomegazip;。
不過 SCSI ZIP 只能被設為 SCSI ID 5 或是 6 才可以運作,但如果
SCSI 卡上的 BIOS 支援它,你甚至可以用它來開機。
我們不曉得哪一塊卡可以把卡的 ID 設在除了 0 或 1 以外的地方而開機成功,
因此,如果想改 SCSI ID 的話,請務必參閱該型號的說明手冊。</para>
<para>FreeBSD 同時也支援 Parallel Port Zip磁碟機。請檢查 kernel
設定檔是否有:
<devicename>scbus0</devicename>、
<devicename>da0</devicename>、
<devicename>ppbus0</devicename>,以及
<devicename>vp0</devicename> 這些驅動程式 (預設的 GENERIC kernel
除了 <devicename>vp0</devicename> 沒包進去,其他三者都會有)。
加了這幾個驅動程式之後,Parallel Port Zip 就會成為
<devicename>/dev/da0s4</devicename>。</para>
<para>這時,就可以用像是 <command>mount /dev/da0s4 /mnt</command> 或
(DOS 檔案系統)<command>mount_msdos /dev/da0s4 /mnt</command>
之類的指令來掛載、讀寫。</para>
<para>也可以參閱下面有關<link linkend="media-change">隨身磁片
</link>部分,以及<link
linkend="removable-drives">抽取碟、隨身碟的『格式化』討論</link>
的部分</para>
</answer>
</qandaentry>
<qandaentry>
<question id="jaz-zip-removable-support">
<para>FreeBSD 有支援 &jaz;、EZ 及其他類似的隨身磁片嗎?</para>
</question>
<answer>
<para>可以啊,除了 IDE 的 EZ drive 外,其他的應該都是 SCSI 介面,
所以在 FreeBSD 上都會以 SCSI 硬碟來處理。</para>
<para>當然,你必須確定在開機時,這些設備的電源是打開的,
以便讓 FreeBSD 可以偵測到。</para>
<para><anchor id="media-change"/>如果在磁碟運中狀態中,要更換磁片的話,
記得先看一下 &man.mount.8;、&man.umount.8;、
以及(SCSI的話)&man.camcontrol.8; 或 &man.atacontrol.8; 還有 FAQ 後面有關
<link linkend="removable-drives">使用抽取碟、隨身碟的討論
</link>。</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-kbd-mice">
<title>鍵盤、滑鼠</title>
<qandaset>
<qandaentry>
<question id="usbkbd">
<para>FreeBSD 有支援 USB 鍵盤嗎?</para>
</question>
<answer>
<para>FreeBSD (尤其是有支援 USB keyboards。 Enable USB support in
<filename>/etc/rc.conf</filename>.</para>
<para>若有開 USB 鍵盤支援而且同時接上 AT 跟 USB 鍵盤的話,那麼 AT 鍵盤會變成
<devicename>/dev/kbd0</devicename>,而 USB 鍵盤則是
<devicename>/dev/kbd1</devicename>。如果只接 USB 鍵盤,那麼它就是
<devicename>/dev/ukbd0</devicename> 囉。</para>
<para>如果想在 console 上使用 USB 鍵盤的話,那麼必須設定 console 指定用 USB 鍵盤。
可以在系統開機程序時,加上下列指令:</para>
<screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null</userinput></screen>
<para>注意:若只有 USB 鍵盤的話,也就是 <devicename>/dev/ukbd0</devicename>,
那麼請改用下列指令:</para>
<screen>&prompt.root; <userinput>kbdcontrol -k /dev/ukbd0 < /dev/ttyv0 > /dev/null</userinput></screen>
<para>建議:可以把上述指令放入 <filename>/etc/rc.i386</filename> 。</para>
<para>設定成功之後,USB 鍵盤不用作任何特別設定,就可以在 X 視窗環境上正常運作囉。</para>
<para>USB 鍵盤的熱插拔(Hot-plugging and unplugging)在 &os; 可能還無法完全正常運作,
建議:在系統開機前就先接上鍵盤,直到關機為止,以避免不必要的困擾。</para>
<para>相關細節請參閱 &man.ukbd.4; 的說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="busmouse">
<para>古早的 bus 滑鼠,要怎麼設定呢?</para>
</question>
<answer>
<para>FreeBSD 支援一些廠商(像是:Microsoft、Logitech、ATI)所做的 bus 及 InPort bus 介面的滑鼠。
然而,預設的 kernel(GENERIC)已經不內含它們的驅動程式。
因此,要加入下列到 kernel 設定檔並重新編譯、安裝,才能啟用:</para>
<programlisting>device mse0 at isa? port 0x23c irq5</programlisting>
<para>Bus 滑鼠通常要搭配專用的介面卡才能使用。
這些卡可以設定 port address 及 IRQ 值,這些細節請參閱你的滑鼠說明手冊及
&man.mse.4; 說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="ps2mouse">
<para>PS/2 (<quote>mouse port</quote> 或
<quote>keyboard</quote>)的滑鼠要怎麼設定才好呢?</para>
</question>
<answer>
<para>PS/2 滑鼠都有支援,所需要用到的驅動程式 <devicename>psm</devicename>
在預設的 kernel(GENERIC)已有內含了。</para>
<para>若你自訂的 kernel 內漏了 psm 的話,那麼就再把下列內容加到 kernel
設定檔並重新編譯、安裝:</para>
<programlisting>device psm0 at atkbdc? irq 12</programlisting>
<para>當開機時 kernel 有正確偵測到 <devicename>psm0</devicename>
,請務必確認在 <filename>/dev</filename> 內有
<devicename>psm0</devicename> 。
如果沒有的話,那麼就用 <username>root</username> 來打下列指令來建立吧:</para>
<screen>&prompt.root; <userinput>cd /dev; sh MAKEDEV psm0</userinput></screen>
<note>
<para>如果是 &os; 5.0-RELEASE(含之後版本)的話,因為採用 &man.devfs.5; 機制的因素,
所以會自動在 <filename>/dev</filename> 下建立相關設備的節點,因此就可以略過上面這一步。</para>
</note>
</answer>
</qandaentry>
<qandaentry>
<question id="moused">
<para>如果不用 X Window 環境的話,也可以用滑鼠嗎?</para>
</question>
<answer>
<para>若使用 console 的預設驅動程式(也就是 &man.syscons.4;),
那麼就可以在文字介面的 console 上面用滑鼠來剪貼文字了。
那麼要啟動 &man.moused.8; 並開啟游標顯示,
請打下列指令:</para>
<screen>&prompt.root; <userinput>moused -p /dev/<replaceable>xxxx</replaceable> -t <replaceable>yyyy</replaceable></userinput>
&prompt.root; <userinput>vidcontrol -m on</userinput></screen>
<para>其中『<replaceable>xxxx</replaceable>』是滑鼠的設備名稱,而
『<replaceable>yyyy</replaceable>』則是滑鼠所使用的 protocol 種類。
目前的 moused 可以自動偵測(除了舊式的 serial
滑鼠之外)大多數滑鼠所使用的 protocol 種類,而不用刻意去指定。
『protocol 種類』設定用
<literal>auto</literal> 就會自動偵測了。若自動偵測失敗的話,請參閱 &man.moused.8;
裡面的 type 那段說明。</para>
<para>如果用的是 PS/2 滑鼠,只要把
<literal>moused_enable="YES"</literal> 加到
<filename>/etc/rc.conf</filename> ,這樣每次開機就會自動啟動了。
此外,如果要在所有 virtual terminals 上也能使用滑鼠,
而不限定只有 console 的話,那麼請再把
<literal>allscreens_flags="-m on"</literal> 加到 <filename>/etc/rc.conf</filename> 裡面即可。</para>
<para>moused 在執行中的時候,如果要使用滑鼠相關功能,都必須透過 moused
或其他程式像是 X 視窗來進行。請參閱 FAQ 中有關<link
linkend="x-and-moused">『為什麼不能在 X 視窗裡使用滑鼠?』</link>以瞭解相關細節。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="text-mode-cut-paste">
<para>在文字模式的 console 環境要怎麼用滑鼠來剪貼文字呢?</para>
</question>
<answer>
<para>當執行 moused 後,(參閱<link linkend="moused">前一節</link>)
按住左鍵,接著移動滑鼠來選擇一個區域之後放開,這樣就完成『複製』。
要『貼上』的話,按滑鼠中鍵就可以了。
要『延伸選取區』的話,按滑鼠右鍵</para>
<para>如果你的滑鼠沒有中鍵,你可以用模擬的方式,或是重新定義滑鼠按鍵的方式,
來達成「延伸」的功能。詳情請參閱 &man.moused.8; 說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="mouse-wheel-buttons">
<para>我滑鼠上面的滾輪、滾輪按鈕,可以在 console 上使用嗎?</para>
</question>
<answer>
<para>這個答案嘛...,很不幸地,在大多數的情況下不行。
這些有滾輪的滑鼠需要用特殊驅動程式才行,
除非,滑鼠驅動程式或使用者自己的應用程式有支援,
不然,這些滑鼠只能夠當成是普通的兩鍵或三鍵的滑鼠來用而已。
</para>
<para>如果要在 X 視窗環境上使用滾輪的話,請參閱
<link linkend="x-and-wheel"> X 視窗上的滾輪使用
</link>說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="laptop-mouse-trackball">
<para>要怎麼在筆記型電腦上使用滑鼠、軌跡球、觸控板呢?</para>
</question>
<answer>
<para>請參閱<link linkend="ps2mouse">前面的 PS/2 滑鼠的問答
</link>。</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-networking">
<title>網路跟 serial 設備</title>
<qandaset>
<qandaentry>
<question id="network-cards">
<para>FreeBSD 支援哪些網路卡呢?</para>
</question>
<answer>
<para>請參考 &os; 各版本的硬體支援列表。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="internal-plugnplay-modem">
<para>為什麼 FreeBSD 找不到 PnP(隨插隨用,Plug & Play)規格的 modem?</para>
</question>
<answer>
<para>原因在於:需要把 modem 的 PnP ID 加到 serial 驅動程式的 PnP ID 表,作法如下:</para>
<orderedlist>
<listitem>
<para>首先,在 kernel 設定檔內加入 <literal>controller pnp0</literal>,
並重新編譯、安裝 kernel,最後重開機就會啟動 PnP 支援。</para>
</listitem>
<listitem>
<para>然後,kernel 會把偵測到所有設備上的 PnP ID 都列出。
這時,修改 <filename>/usr/src/sys/isa/sio.c</filename>(大約第752行左右的地方),
可以搜尋 <literal>SUP1310</literal> 當關鍵字(位於 <literal>sio_ids[]</literal> 表內),
請將剛才 kernel 顯示的 modem 的 PnP ID 複製到相關位置。</para>
</listitem>
<listitem>
<para>這時,再重新編譯、安裝 kernel,最後重開機應該就會正確偵測到 modem 了。</para>
</listitem>
</orderedlist>
<para>此外,也可以在開機時以 <literal>pnp</literal> 指令來手動設定 PnP 設備,
來讓 kernel 得以正確偵測,舉例:</para>
<programlisting>pnp 1 0 enable os irq0 3 drq0 0 port0 0x2f8</programlisting>
</answer>
</qandaentry>
<qandaentry>
<question id="support-winmodem">
<para>FreeBSD 支援像是 Winmodems 之類的軟體 modem 嗎?</para>
</question>
<answer>
<para>FreeBSD 可以安裝額外的軟體來支援軟體 modem。
像是 <filename role="package">comms/ltmdm</filename> 可支援常見的 Lucent LT 晶片,
<filename role="package">comms/mwavem</filename> 則可支援 IBM Thinkpad 600 及 700
筆記型電腦上面的 modem。</para>
<para>然而,並不能用軟體 modem 來安裝 FreeBSD,
因為:這類軟體必須在作業系統安裝完畢之後,才能安裝。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="support-broadcom">
<para>有 Broadcom 43xx 無線網卡的原生驅動程式(Native driver)嗎?</para>
</question>
<answer>
<para>沒有,而且也不太可能會有。</para>
<para>Broadcom 拒絕公開有關無線網卡晶片的驅動程式相關說明,
主因大概是他們用軟體來控制無線傳輸方式。
事實上,因為要能通過美國聯邦電信委員會(FCC)檢磁安規的話,
必須確保產品不能讓使用者不能隨意更動相關設定,比如:電磁波頻率、相關模組參數、輸出電源等。
但是,如果我們不知道如何去控制晶片的話,那麼撰寫驅動程式之路恐怕不太可行。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="multiport-serial-support">
<para>FreeBSD 支援哪些 multi-port serial卡呢?</para>
</question>
<answer>
<para>請參閱使用手冊上的 <ulink
url="&url.books.handbook;/install.html#INSTALL-MISC">安裝篇—其他硬體
</ulink> 列表。</para>
<para>雖然有些卡是沒牌的(尤其是有標明:相容 AST 規格)但也可以正常使用。</para>
<para>至於卡的設定方面,請參閱 &man.sio.4; 的說明。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="serial-console-prompt">
<para>在 serial console 上要如何才會出現 boot: 提示呢?</para>
</question>
<answer>
<orderedlist>
<listitem>
<para>kernel 設定檔加入
<literal>options COMCONSOLE</literal></para>
</listitem>
<listitem>
<para>建立 /boot.config 檔,並且該檔裡面內容只填上 <option>-P</option></para>
</listitem>
<listitem>
<para>把鍵盤從機器上拔掉</para>
</listitem>
</orderedlist>
<para>細節請看
<filename>/usr/src/sys/i386/boot/biosboot/README.serial</filename>
</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-sound">
<title>音效卡</title>
<qandaset>
<qandaentry>
<question id="sound-card-support">
<para>FreeBSD 支援哪些音效卡?</para>
</question>
<answer>
<para>&os; 支援各種音效卡,包括了 &soundblaster;、
&soundblaster; Pro、&soundblaster; 16、Pro Audio Spectrum 16、
AdLib、及 Gravis UltraSound sound cards (細節請參閱
<ulink url="&url.base;/releases/">&os; 發行情報</ulink>
以及 &man.snd.4; 的說明)。
此外,對 MPU-401 及 MIDI 相容規格的也有一定程度的支援,而
µsoft; Sound System 規格也有支援。</para>
<note>
<para>驅動程式僅適用於『音效』部分! 除了 &soundblaster; 之外,
目前音效驅動程式並不支援這些音效卡上的光碟機, SCSI設備或搖桿。
&soundblaster; 的 SCSI 介面及某些非 SCSI 的光碟機是有支援,但無法用來開機。
</para>
</note>
</answer>
</qandaentry>
<qandaentry>
<question id="es1370-silent-pcm">
<para>&man.pcm.4; 所支援的音效卡沒有聲音,有什麼暫時解決方式嗎?</para>
</question>
<answer>
<para>因為有些像是 es1370 晶片的音效卡會在每次開機時把音量調為零。
暫時解法是在每次開機時執行下面指令,或是加到 /etc/rc.local 內:</para>
<screen>&prompt.root; <userinput>mixer pcm 100 vol 100 cd 100</userinput></screen>
</answer>
</qandaentry>
</qandaset>
</sect1>
<sect1 id="compatibility-other">
<title>其他怪異問題(ACPI、重開機後掛了..等)</title>
<qandaset>
<qandaentry>
<question id="other-device-support">
<para>FreeBSD 還支援其他哪些硬體呢?</para>
</question>
<answer>
<para>請參閱使用手冊上的 <ulink
url="&url.books.handbook;/install.html#INSTALL-MISC">安裝篇—其他硬體</ulink>
。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="power-management-support">
<para>FreeBSD 支援筆記型電腦的省電管理功能嗎?</para>
</question>
<answer>
<para>FreeBSD 4.X(含之後版本)在某些機種上都有支援 <acronym>APM</acronym>。
細節請參閱 &man.apm.4; 的說明。</para>
<para>FreeBSD 5.X(含之後版本)支援在目前大部分機種上都有的
<acronym>ACPI</acronym> 功能。
細節請參閱 &man.acpi.4; 的說明。若機器上同時都有 <acronym>APM</acronym>
及 <acronym>ACPI</acronym> 功能的話,我們建議你可以兩者都試試看,
看看哪一種比較符合你的需求。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="disable-acpi">
<para>該如何關閉 ACPI?</para>
</question>
<answer>
<para>把 <screen>hint.acpi.0.disabled="1"</screen>
這段加到 <filename>/boot/device.hints</filename> 即可。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="micron-hang-boot">
<para>Micron 電腦總是在 &os; 啟動時就掛掉,該怎麼辦呢?</para>
</question>
<answer>
<para>有些 Micron 主機板上的 BIOS 在 PCI 方面會有問題,
這會導致 PCI 設備會被 BIOS 偵測為不正確設定,而進入 FreeBSD 就掛掉。</para>
<para>暫時解決方式:關閉 BIOS 內 <quote>Plug and Play Operating System</quote>
的設定。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="micron-3comnic-failure">
<para>&tm.3com; PCI 介面網路卡無法在 Micron 電腦上使用,該怎麼辦?</para>
</question>
<answer>
<para>這問題跟前面的問題因素一樣,總之,就是關閉 BIOS 中有關 OS PnP 的設定。</para>
<para>暫時解決方式:關閉 BIOS 內 <quote>Plug and Play Operating System</quote>
的設定。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="asusk7v-boot-failure">
<para>主機板是用華碩(ASUS) K7V,可是用開機片開到一半就當了,怎麼辦呢?</para>
</question>
<answer>
<para>進入 BIOS 設定,並關閉 <quote>boot virus protection</quote> 設定即可。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="newcard-does-not-work">
<para>PCMCIA 卡無法使用,並出現錯誤訊息
<quote>cbb0: unsupported card type detected.</quote>
該怎麼辦?</para>
</question>
<answer>
<para>可以試試看改用舊的方式,請先修改 kernel 設定檔,拿掉下面這幾行:
<programlisting>device cbb
device pccard
device cardbus</programlisting>
然後加上:
<programlisting>device pcic
device card 1</programlisting>
最後請參閱 Handbook 中
<ulink url="&url.books.handbook;/kernelconfig.html">調整 FreeBSD Kernel</ulink>
章節,以重新編譯、安裝新的 kernel。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="dell-poweredge-failure">
<para>為什麼 &dell; &poweredge; 2850 裝完 FreeBSD 之後,重開機接著鍵盤就掛了?</para>
</question>
<answer>
<para>(本題由 cdsheen 提供)嚐試在 &dell; &poweredge; 2850 上面安裝 &os; 6.0,
不過安裝完成、並重新開機之後,發現 console 的鍵盤不能動了,
同樣的情況似乎也存在於 &os; 5.3 及 &os; 5.4,
經過一番搜尋,發覺是因為這台機器上面有一個 <quote>Dell Remote Access Controller (DRAC)</quote>,
這個裝置會被系統辨識成一個 USB Keyboard,所以導致開完機之後,正常的 PS/2 鍵盤反而不能動了!</para>
<para>暫時解決方式如下:</para>
<orderedlist>
<listitem>
<para>先以 Single User Mode 進入系統</para>
</listitem>
<listitem>
<para>在命令列模式下,先執行下列命令:</para>
<screen>&prompt.root; <userinput>fsck -y <filename>/</filename></userinput></screen>
<screen>&prompt.root; <userinput>mount -u <filename>/</filename></userinput></screen>
</listitem>
<listitem>
<para>然後編輯 <filename>/etc/devd.conf</filename>,把對於 USB Keyboard 的支援暫時拿掉,
也就是把下面幾行開頭加上 #</para>
<programlisting>
# When a USB keyboard arrives, attach it as the console keyboard.
#attach 100 {
# device-name "ukbd0";
# action "kbdcontrol -k /dev/ukbd0 < /dev/console && /etc/rc.d/syscons restart";
#};
#detach 100 {
# device-name "ukbd0";
# action "kbdcontrol -k /dev/kbd0 < /dev/console";
#};
</programlisting>
</listitem>
<listitem>
<para>然後輸入 <command>exit</command>離開 Single User Mode 之後,
就可以順利進入系統、而且鍵盤也可以正常運作,下次開機也不會有問題!</para>
</listitem>
</orderedlist>
<para>另外,&dell; 的 DRAC/BMC 看起來有蠻多不錯的遠端存取功能,有興趣的人可以玩玩看...</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
</chapter>
<chapter id="troubleshoot">
<chapterinfo>
<author>
<firstname>William</firstname>
<surname>Liao</surname>
<affiliation>
<address><email>chliao@tpts4.seed.net.tw</email></address>
</affiliation>
</author>
</chapterinfo>
<title>常見問題解決</title>
<qandaset>
<qandaentry>
<question id="pae">
<para>為什麼 &os; 抓到錯誤的記憶體容量?</para>
</question>
<answer>
<para>抓到錯誤的記憶體容量是因為物理位址跟虛擬位址兩者是不同的。</para>
<para>The convention for most PC hardware is to use the memory area
between 3.5G and 4G for a special purpose (usually for PCI). This
address space is used to access PCI hardware. As a result real,
physical memory can not appear in that address space.</para>
<para>What happens to the memory that should appear in that location
is dependent on your hardware. Unfortunately, some hardware does
nothing and the ability to use that last 500M of RAM is entirely
lost.</para>
<para>Luckily, most hardware remaps the memory to a higher location
so that it can still be used. However, this can cause some
confusion if you watch the boot messages.</para>
<para>On a 32 bit version of &os;, the memory appears lost, since it
will be remapped above 4G, which a 32 bit kernel is unable to
access. In this case, the solution is to build a PAE enabled
kernel. See <link linkend="memory-limits">this FAQ entry</link>
for more information.</para>
<para>On a 64 bit version of &os;, or when running a PAE-enabled
kernel, &os; will correctly detect and remap the memory so it is
usable. During boot, however, it may seem as if &os; is detecting
more memory than the system really has. This is normal and the
available memory will be corrected as the boot process
completes.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="awre">
<para>硬碟有壞軌時該怎麼辦?</para>
</question>
<answer>
<para>若是 SCSI 硬碟的話,那麼磁碟機應該有能力自動作 re-mapping
的動作。然而,因為一些未知的因素,在出廠時,很多硬碟的這項
功能是關閉的...</para>
<para>要將其重新開啟,您需要編輯裝置的第一個 page 模式
(first device page mode),在 FreeBSD 上可以用下面的指令辦到
(以 <username>root</username>身分執行)</para>
<screen>&prompt.root; <userinput>scsi -f /dev/rsd0c -m 1 -e -P 3</userinput></screen>
<para>然後將 AWRE 和 ARRE 的數值從 0 變成 1:-</para>
<programlisting>AWRE(Auto Write Reallocation Enbld): 1
ARRE(Auto Read Reallocation Enbld): 1</programlisting>
<para>以下這段是由 Ted Mittelstaedt
<email>tedm@toybox.placo.com</email>所提供:</para>
<para>若為 IDE 硬碟,任何的壞軌通常都是麻煩的預兆。目前所有較新的
IDE 硬碟,內部都有自動 remapping 壞軌的能力。目前所有 IDE 硬碟
製造商,都提供了更久的保證,而且會幫您更換出現壞軌的硬碟。</para>
<para>如果您仍想要修復產生壞軌的 IDE 硬碟,您仍可以試著去下載 IDE
硬碟製造商所提供的檢測程式,並用它來檢查您的硬碟。有時這些軟體可
以強迫重新檢查硬碟的壞軌,並將它們標示出來。</para>
<para>對 ESDI,RLL 及 MFM 的硬碟來說,通常壞軌是正常現象,也不是什
麼麻煩的前兆。在 PC 上,磁碟控制卡和 BIOS 負責標示壞軌的任務。這
對一些使用 BIOS來存取磁碟的作業環境(如 DOS)是沒有問題的。然而,
FreeBSD 的磁碟驅動程式並不經過 BIOS 來存取磁碟,所以,有個 bad144
的機制用來取代這項功能。bad144 只能用在 wd 這個磁碟驅動程式上(這
個代表了 FreeBSD 4.0 並不支援它),它也無法用在 SCSI 硬碟上。
bad144的工作方法是將所有找到的壞軌資料存到一個特別的檔案裏。</para>
<para>使用 bad144 的警告 - 存著壞軌資料的特別檔案是放在硬碟的最後
一軌上。因為這個檔案儲存的壞軌資料中,有可能有些資料是指向硬碟最
前端所發生的壞軌情形,就是可能儲存 /kernel 這個檔的地方,所以它
一定要能被開機程式所讀取,而開機程式是透過 BIOS 來讀取 kernel
檔。這表示了使用 bad144 的硬碟絕不能擁有超過 1024 個 cylinder,
16 個 head 及 63 個 sector。而這使得欲使用 bad144 的硬碟的大小不
能大於 500 MB。</para>
<para>要使用 bad144 很簡單,只要在開始安裝時,在 FreeBSD fdisk 畫面
把<quote>Bad Block</quote> 掃瞄設為 ON 即可。在 FreeBSD 2.2.7 以
後都可以使用此方法。但這個硬碟的 cylinder 一定要在 1024 以下。使
用前,我們建議這個硬碟要至少先使用四個小時,以便熱膨脹與磁軌偏移
達一般狀態。</para>
<para>如果這個硬碟擁有超過 1024 個 cylinder(像大容量的 ESDI 硬碟)
,ESDI 控制卡利用一個特別的轉換模式使它能在 DOS 下工作。而如果您
在 fdisk 裏的 <quote>set geometry</quote> 中輸入
<quote>轉換過</quote> 的 geometry,wd 這個驅動程式能了解這些轉換
模式。您也絕對不能使用 dangerously dedicated 模式來建立 FreeBSD
的分割區,因為它會忽略 geometry 這個參數。此外,就算 fdisk 使用
您所輸入的 geometry 參數,它依然會去讀取這硬碟的真正資料,而會嘗
試去建立一個過大的 FreeBSD 分割區。如果磁碟的 geometry 已經被
<quote>轉換</quote> 過了,那麼 這個分割區 <quote>必須</quote>
以手動輸入 block 數目的方法來建立。</para>
<para>一個快速的小技巧是利用 ESDI 控制卡來設定大容量的 ESDI 硬碟,
用 DOS 開機片開機,再將它 format 為 DOS 的分割區。然後重開機進入
FreeBSD 安裝程序,在 fdisk 畫面,把DOS 分割區的 blocksize 和
block number 抄下來。然後重新設定 geometry 使其跟 DOS 使用的一樣。
刪除 DOS 分割區,然後使用您剛剛抄下的 blocksize 來建立一個
<quote>cooperative</quote> FreeBSD 分割區。然後設定這個分割區為可
開機,再打開壞軌掃瞄。在真正的安裝過程中,bad144 會在任何檔案系統
被建立前先被執行。(您可以按 Alt-F2 來監看這一切)如果在建立壞軌資
料檔時發生了問題,您會需要設定一個較大的磁碟 geometry - 這表示您
需要重開機,然後全部再重新開始(包括重新分割以及在 DOS 下重新
format)。</para>
<para>如果 remapping 的功能已經啟動了,而您依然一直看到壞軌產生,
那麼考慮換一台硬碟吧。壞軌的情形只會隨時間增加而更為嚴重。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="hpnetserver-scsi-failure">
<para>為什麼 FreeBSD 抓不到 HP Netserver 的 SCSI 控制卡?</para>
</question>
<answer>
<para>基本上這個是一個已知的問題。在 HP Netserver 機器上的 on-board
EISA 介面 SCSI 控制卡占據了定址為第 11 的 EISA 槽,因此所有的
<quote>真實</quote> EISA 槽都在它之前。可是,在 EISA 定址空間
>= 10 時,會與指定給 PCI 用的定址空間相衝突,且 FreeBSD 的
auto-configuration 無法正確的處理這個情形。</para>
<para>因此,現在你能做的最好事情就是在 kernel 裏設定
<literal>EISA_SLOTS</literal> 這個選項為 12 ,然後當作沒有這個
問題 :)。請依照 <ulink url="../../handbook/kernelconfig.html">
Handbook 中有關 kernel 的設定</ulink> 裏所說的方法來設定與編譯
您的 kernel。</para>
<para>當然,在安裝 FreeBSD 到這種機器上時,這是一個雞生蛋蛋生雞的
問題。為了解決這個問題,在 <emphasis>UserConfig</emphasis> 中有
一個特別的方法,安裝時不要進入 <quote>visual</quote> 介面,相反
的,在命令列模式中,鍵入</para>
<programlisting>eisa 12
quit</programlisting>
<para>然後就如以往一樣安裝您的系統。不過我們建議您編譯與安裝一個
屬於自己的 kernel,但</para>
<para>希望在未來的版本中能對這個問題有一個好的解決方法。</para>
<note>
<para>您無法在 HP Netserver 上使用
<literal>dangerously dedicated</literal> 磁碟模式。您可以參考
<link linkend="dedicate">這份註解</link> 以獲得更多資訊。</para>
</note>
</answer>
</qandaentry>
<qandaentry>
<question id="ed1-timeout">
<para>一直看到類似
<errorname>ed1: timeout</errorname> 的訊息。它們是什麼意思呢?
</para>
</question>
<answer>
<para>這個通常是由於中斷衝突(interrupt conflict)所造成的
(例如:兩塊卡使用到了相同的 IRQ)。 FreeBSD 在 2.0.5 版以前都容許這個情形,
就算有 IRQ 衝突情形,網路卡也應該仍可正常運作。然而,在 2.0.5 版及其以後,
已不再容許有 IRQ 衝突的情形了。請於開機時使用 -c 這個選項,
然後更改 ed0/de0/..等的設定,使其和您網路卡本身的設定一致。</para>
<para>如果您是使用您網路卡上的 BNC 接頭,您或許也會因不良的終端電阻設定,
而發生裝置(device) timeout 的情形。要檢查是否有這種情形,
您可以在網路卡上直接接上終端電阻(不要接網路線),
然後,看看這個錯誤訊息是不是就消失了。</para>
<para>有些 NE2000 的相容卡,如果它的 UTP 埠沒有接網路線,
或是該網路線並沒被使用的話,也會出現這個錯誤訊息。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="bad-3c509">
<para>&tm.3com; 3C509 網路卡莫名其妙罷工?</para>
</question>
<answer>
<para>這塊卡有個不好的地方在於它常常會遺失本身的設定資料。請使用該
卡的 DOS 工具 <command>3c5x9.exe</command> 來更新卡上設定。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="printer-slow">
<para>平行埠印表速度破天荒的慢,該怎麼辦?</para>
</question>
<answer>
<para>如果唯一的問題就是速度很慢的話,試著改變您的 <ulink
url="../handbook/printing-intro-setup.html#PRINTING-PARALLEL-PORT-MODE">
印表機連接埠設定</ulink> 這個在手冊中的
<ulink url="../handbook/printing-intro-setup.html">印表機設定
</ulink> 這個章節有加以討論。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="signal11">
<para>程式有時會因 <errorname>Signal 11</errorname> 錯誤而停止?</para>
</question>
<answer>
<para>Signal 11 這個錯誤是因為你的 process 嘗試要存取一塊記憶體,
而你的作業系統並不允許它做這個動作而發生的。如果這種情形常常不
定時發生,那麼你應該要開始看看是不是哪裡出問題了。</para>
<para>這些問題可能是與下列情形有關:</para>
<orderedlist>
<listitem>
<para>如果這個問題只在某一個您自己寫的某個特定程式發生,那
麼很有可能是您的程式碼有問題。</para>
</listitem>
<listitem>
<para>如果這個問題是在 FreeBSD 的某些系統檔案發生,有可能是
因為程式有問題,但通常在我們這群讀 FAQ 的使用者去跑這些有
問題的程式碼前,它們早就就已經被解決了(這是 -current 在做
的事)。</para>
</listitem>
</orderedlist>
<para>尤其如果你在編譯一個程式,但是每次編譯器跑出來的結果都不一樣
的話,這是一個無解的問題,而<emphasis>不是</emphasis> FreeBSD 臭蟲。</para>
<para>舉例來說,假設您正在跑 <quote>make buildworld</quote>,
而 compiler 在將 <filename>ls.c</filename> 編譯成
<filename>ls.o</filename> 時發生錯誤,這時請再跑一次
<quote>make buildworld</quote>,如果 compiler 依然在同樣的地方發
生問題,那麼就是程式碼有問題--請更新原始碼然後再試試看。而如果
compiler 是在其他的地方發生錯誤,那麼幾乎可以確定是硬體的問題了。
</para>
<para>您這時應該做什麼:</para>
<para>如果是第一種情形,可以使用一些 debugger,如:gdb,來找出程式
是在那兒會去嘗試存取錯誤的記憶體位址,然後再修正它。</para>
<para>如果是第二種情形,就需要檢查看看是不是硬體的問題了。</para>
<para>一些造成硬體不穩的原因包括:</para>
<orderedlist>
<listitem>
<para>可能是硬碟過熱:請檢查機殼內的風扇是否運作正常,因為您
的硬碟(或者還有其他的硬體裝置)過熱了。</para>
</listitem>
<listitem>
<para>處理器過熱:這個有可能是因為超頻,或者是處理器的風扇掛了。
不論是哪種原因,您都需要將所有的元件回復到它們原先設定的工作狀
態,這樣才能解決這個問題。舉個例子來說:將處理器調回原先的工作
頻率。</para>
<para>如果您還是堅持要超頻的話,請謹記,與其燒壞而需要換新的一台
主機,不如將速度調慢一點!除此之外,不管你覺得它安不安全,一般
人對於您因為超頻而發生的問題,是不會有什麼同情心的。</para>
</listitem>
<listitem>
<para>不穩定的記憶體:如果主機上有安裝數根 SIMM/DIMM 記憶體,
試著把它們全拆下來,然後一根一根插上去做測試,藉此縮小範圍,
以便找出有問題的某根記憶體或是某種記憶體組合。</para>
</listitem>
<listitem>
<para>最佳化過頭的主機板設定:在 BIOS 裏或是有些主機板的 jumper
上,有時可以更改一些 timing,但在大多數的情形裏,使用預設值就
已經足夠了。況且有時候把 RAM 的 wait states 設太小,或是在
BIOS 裏,把 <quote>RAM Speed: Turbo</quote> 這個或是其他類似
的選項打開都有可能會造成一些不正常的現象。一個解決的方法是把
BIOS 設回預設值,不過在這之前記得先記下目前的設定!</para>
</listitem>
<listitem>
<para>供給主機板的電力不乾淨或是不足。試著把系統內沒有用到的
I/O 卡.硬碟或是 CDROM 暫時拆掉或是拔掉電源線,看看你的電源
供應器是不是能夠在小一點的負荷下正常工作。不然就是換上另一
個新的電源供應器,最好是瓦數高一點的(打個比方來說,如果原
先的電源供應器是 250 瓦的,那麼就換上 300 瓦的試試)。</para>
</listitem>
</orderedlist>
<para>請順便參閱 SIG11 FAQ(連結在下面),雖然它是站在 Linux 的角
度寫的,可是裡面對這些問題有許多很棒的解說。它裡面也有討論為什麼
有問題的記憶體能通過軟體或硬體的測試的原因。</para>
<para>最後,如果上面這些原因都排除了,那麼有可能是遇到了 FreeBSD
裏的一隻臭蟲,請參閱指示做一個問題回報。</para>
<para>這兒有一個更詳細的 FAQ - <ulink
url="http://www.bitwizard.nl/sig11/">
the SIG11 problem FAQ</ulink></para>
</answer>
</qandaentry>
<qandaentry>
<question id="trap-12-panic">
<para>當機時出現:<errorname>Fatal trap 12: page fault in kernel mode</errorname>
,或是 <errorname>panic:</errorname> 以及一堆錯誤訊息,該怎麼辦?</para>
</question>
<answer>
<para>FreeBSD 的開發者對於這些錯誤訊息相當的有興趣,但是他們需要
更詳細的一些細節。請把您的當機的訊息全部複製下來,接著查閱 FAQ
裏 <link linkend="kernel-panic-troubleshooting">kernel
panics</link> 這節,依說明編譯一個含除錯碼的 kernel,以取得函式
呼叫順序(backtrace)。這個聽起來很難,但實際上並不需要任何程式
設計的能力,您只需要依照指示做即可。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="screen-loses-sync">
<para>為什麼當我開機時,螢幕變黑,且不停閃動?</para>
</question>
<answer>
<para>這個問題,已知是由 ATI Mach 64 顯示卡所引起的。因為這塊卡
使用到 <literal>2e8</literal> 這個位址,而這與第四個序列埠
(serial port)所使用的位址相同。而在 &man.sio.4; 這個驅動
程式裏,不知道是 bug 或是功能(feature),就算您沒有第四個序
列埠,或是已經將 sio3(第四個序列埠)取消了,它
<emphasis>依然</emphasis>會去嘗試驅動它。</para>
<para>直到這個問題被解決以前,您可以使用這個方法:</para>
<orderedlist>
<listitem>
<para>在看到開機提示時輸入 <option>-c</option>
(這會讓 kernel 進入設定模式)。</para>
</listitem>
<listitem>
<para>取消 <devicename>sio0</devicename> ,
<devicename>sio1</devicename> ,
<devicename>sio2</devicename> 和
<devicename>sio3</devicename>(全部)。
這可以讓 sio 驅動程式不動作 -> 於是問題解決。</para>
</listitem>
<listitem>
<para>輸入 exit 以繼續啟動程序。</para>
</listitem>
</orderedlist>
<para>如果您想要使用您的序列埠,您需要修改
<filename>/usr/src/sys/i386/isa/sio.c</filename>,在該檔中找出
<literal>0x2e8</literal> 這個字串,移除這個字串及它前面的逗號
(保留後面的),然後重新編譯一個新的 kernel。</para>
<para>就算使用了上面這些方法,X Window 仍然有可能無法順利執行。
如果發生了這種情形,請確定你用的 XFree86 的版本是最新的 XFree86
3.3.3 或是其後的版本。它們有內建支援 Mach 64 這張卡,甚至為了這
些卡還附有一個特別的 X Server</para>
</answer>
</qandaentry>
<qandaentry>
<question id="reallybigram">
<para>為什麼我的系統裝有 128 MB 的 RAM,而 FreeBSD 只用了其中的
64MB?</para>
</question>
<answer>
<para>因為 FreeBSD 是使用呼叫 BIOS 來取得記憶體大小的方法,因此它
只能偵測到 16 bits 位元長度的 KByte 大小(65535 KBytes = 64MB)
(或者更少..。有些 BIOS 將最高記憶體大小限為只有 16MB)
如果您擁有 64MB 以上的 RAM,FreeBSD 會嘗試去偵測出它,但是有可能
會失敗。</para>
<para>要解決這個問題,您需要使用下面所提的 kernel 設定選項。雖然有
方法可以從 BIOS 中取得記憶體的完整資訊,但是目前我們在開機區中並
沒有多餘的空間來做這件事。當某天開機區空間不足的情形獲得解決時,
我們將會使用 BIOS 的延伸功能來取得記憶體的完整資訊...但現在我們
將它放在 kernel 設定選項中。</para>
<para><literal>options "MAXMEM=<replaceable>n</replaceable>"</literal></para>
<para><replaceable>n</replaceable> 是指您的記憶體大小,以 KB
為單位。以一台有 128MB RAM 的機器來說,您可使用
<literal>131072</literal>這個數字。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="kmem-map-too-small">
<para>機器上的 RAM 有 1GB 以上,可是為何卻收到 <quote>kmem_map too small</quote>
的 panic 錯誤訊息?
</para>
</question>
<answer>
<para>通常 FreeBSD 會依據機器狀況來自動調整 kernel 相關參數設定,比如:
根據機器所裝的 RAM 大小來決定同時可開啟的檔案數量多寡。
然而,在 1GB RAM(含以上) 的機器上,這個『自動調整』的機制可能有時會高估:
比方說..開機時,kernel 會先配置各種不同用途的表格及其他架構放到記憶體上,
然後,當整個作業系統都開始運作之後,kernel 就會開始不夠空間來做記憶體配置的動態調整,
於是就 panic 掛了。</para>
<para>解法是:把 <option>VM_KMEM_SIZE_MAX</option> 加到 kernel 設定檔內,
並重新編譯 kernel,比如:</para>
<para><literal><option>options VM_KMEM_SIZE_MAX=419430400</option></literal></para>
<para>
這樣會設定 400 MB 來給 kernel 使用,而且採用 400 MB 的話,
目前在 6GB RAM 的機器上都可被有效運用。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="panic-kmemmap-too-small">
<para>機器上 RAM 不到 1GB ,但仍會出現
<errorname>kmem_map too small!</errorname> 的 panic 錯誤訊息
</para>
</question>
<answer>
<para>之所以 panic 的原因在於系統用光了給 network buffer 用途的 virtual memory
(尤其是 mbuf clusters)。解法是增加給 mbuf clusters 用的 virtual memory
數量,這步驟請參閱 FreeBSD 使用手冊的
<ulink
url="&url.books.handbook;/configtuning-kernel-limits.html#NMBCLUSTERS">網路限制篇</ulink>
。</para>
</answer>
</qandaentry>
<!--
以下為舊版 faq 內容
<para>這個 panic 的原因是表示系統用光了給網路緩衝區的所有的虛
擬記憶體(特別是 mbuf clusters)。您可以增加給 mbuf clusters
的 VM 的數量,只要加入:</para>
<para><literal>options "NMBCLUSTERS=<replaceable>n</replaceable>"</literal></para>
<para>在您的 kernel 設定檔中,<replaceable>n</replaceable>
是一個在 512-4096 間的數字,依您想提供多少同時的 TCP 連接數目
多寡而定。我會建議試試 2048 - 這數字應該可以完全避免這個 panic
了。您可以執行: <command>netstat -m</command>
(see &man.netstat.1;)來監看有多少 mbuf clusters 在系統上正被
配置/使用。NMBCLUSTERS 的數值內定為 <literal>512 + MAXUSERS * 16
</literal>。</para>
-->
<qandaentry>
<question id="proc-table-full">
<para>為什麼我一直看到 <errorname>/kernel: proc: table
is full</errorname> 這個錯誤訊息?</para>
</question>
<answer>
<para>FreeBSD kernel 只允許一定數量的 process 在同一時間裡同
時運作。而這個數目是根據 kernel 設定檔裡面的
<literal>MAXUSERS</literal> 值來決定的。<literal>MAXUSERS</literal>
這個值也會影響其他的 kernel 內定值,比如說 network buffer
(請參閱<link linkend="panic-kmemmap-too-small">這個</link>之前討
論過的問題)。如果機器負荷(load)很重,您可能需要增加
<literal>MAXUSERS</literal> 這個值。這麼作會一併提高系統的其他內
定值,包括最大可擁有的 process 數等。</para>
<para>若要調整 <literal>MAXUSERS</literal>,請參閱 FreeBSD 使用手冊中的 <ulink
url="&url.books.handbook;/configtuning-kernel-limits.html#KERN-MAXFILES">
檔案/Process的限制</ulink> 章節。
(雖然該處指的是『檔案的開啟數量限制』,但也適用於 process部分。)</para>
<para>在 FreeBSD 4.4 之後,<literal>MAXUSERS</literal> 已經變成可
以靠著更改 <filename>/boot/loader.conf</filename> 裏的
<varname>kern.maxusers</varname> 這個值而調整的變數了。而在之前
的 FreeBSD 版本中,這個值只能在 kernel 設定檔裏調整。</para>
<para>如果機器負荷並不重,而您只是需要同時跑很多很多 process,
那麼也可以直接用 sysctl 調整 <varname>kern.maxproc</varname> 值。
假如這些 process 都是屬於某個使用者的,那麼您還需要另
外調整 <varname>kern.maxprocperuid</varname> 這個值,使它比新
的 <varname>kern.maxproc</varname> 這個值少 1 (一定要少 1 ,
因為 &man.init.8; 這個系統程式絕對要保持在運作狀態)。</para>
<para>如果想在每次開機都要更改 sysctl 的值,而且您的 FreeBSD 是
最近的版本的話,請在 <filename>/etc/sysctl.conf</filename> 這
個檔中設定,而如果是舊的版本,可以在
<filename>/etc/rc.local</filename> 中作設定。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="cmap-busy-panic">
<para>為什麼用新 kernel 開機時,出現 <errorname>CMAP
busy</errorname> 這個錯誤訊息?</para>
</question>
<answer>
<para>用來偵測 <filename>/var/db/kvm_*.db</filename> 過時檔案的機制偶爾會發生問題,而使用到了一個不協調
(mismatch)的檔案有時就會導致 panic。</para>
<para>如果發生了這個問題,請重新開機,進入 single 使用者模式,然後執行:</para>
<screen>&prompt.root; <userinput>rm /var/db/kvm_*.db</userinput></screen>
</answer>
</qandaentry>
<qandaentry>
<question id="brkadrint-illegal-host-access">
<para>請問這個訊息:<errorname>ahc0: brkadrint, Illegal Host Access at seqaddr 0x0</errorname>
是什麼意思?</para>
</question>
<answer>
<para>這是一個和 Ultrastor SCSI 控制卡有關的衝突(conflict)。</para>
<para>在開機時,進入 kernel 設定選單取消
<devicename>uha0</devicename>,它是造成這個問題的原因。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="aci0-illegal-cable">
<para>開機時,看到這個錯誤訊息 <errorname>ahc0: illegal cable configuration</errorname>。
我的排線確定有接對。 是出了什麼問題呢?</para>
</question>
<answer>
<para>您的主機板可能不支援自動終端電阻設定。請進到 SCSI 的 BIOS
裡面手動指定正確的終端電阻順序,而不要使用自動設定。
AIC7XXX 的驅動程式並無法知道有沒有這些排線偵測(以及自動終端電阻設定)的電路(external logic)
存在。如果 EEPROM 裡面的設定是 "automatic termination" 時,它只會單純假定這些電路當然是存在的。
若缺少了這個電路,驅動程式在設定終端電阻時就常常出問題。
而這種問題將導致 SCSI 匯流排的可靠性降低。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="mail-loopback">
<para>為什麼 Sendmail 一直出現
<quote><errorname>mail loops back to myself</errorname></quote>
這個錯誤訊息?</para>
</question>
<answer>
<para>這個問題在 sendmail 的 FAQ 中是這樣回答的:-</para>
<literallayout> * 我一直收到有關 "Local configuration error" 的信件,例如:
553 relay.domain.net config error: mail loops back to myself
554 <user@domain.net>... Local configuration error
我要如何解決這個問題?
您利用 MX 設定,讓要寄到某 domain(如: domain.net)的信件,
寄到您所指定的機器(在這個例子中為 relay.domain.net),但是這
部機器並未被設定接受 domain.net 的信件。請把 domain.net 加到
/etc/sendmail.cw 中(如果您有使用 FEATURE(use_cw_file)) 或是
在 sendmail.cf 中加入 "Cw domain.net"
</literallayout>
<para>最新版本的 <ulink url="ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/sendmail-faq">sendmail
FAQ</ulink> 現在已不再隨著 sendmail <quote>出貨</quote>。
它目前是被定期的發表在 <ulink
url="news:comp.mail.sendmail">comp.mail.sendmail</ulink>,
<ulink url="news:comp.mail.misc">comp.mail.misc</ulink>,<ulink
url="news:comp.mail.smail">comp.mail.smail</ulink>,<ulink
url="news:comp.answers">comp.answers</ulink>,和 <ulink
url="news:news.answers">news.answers</ulink>. 您也可以寄一封
Email 到 <email>mail-server@rtfm.mit.edu</email>,然後在信件內文
中寫上
<literal>send usenet/news.answers/mail/sendmail-faq</literal>
以取得這份 FAQ 文件。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="remote-fullscreen">
<para>為什麼執行遠端機器(remote machine)的全螢幕的軟體時,
有不正常的情形?</para>
</question>
<answer>
<para>或許遠端機器並非將您的終端機模式設為 FreeBSD console 所用的
<literal>cons25</literal>,而是設為其它模式。</para>
<para>這兒有幾個解決這個問題的方法:</para>
<itemizedlist>
<listitem>
<para>在 logging 進遠端機器後,更改您的 shell 變數 TERM 為
<literal>ansi</literal> 或是 <literal>sco</literal>
﹙如果遠端機器支援這些模式的話)。</para>
</listitem>
<listitem>
<para>使用支援 VT100 的模擬軟體,如 FreeBSD console 下的
<application>screen</application> 軟體。
<application>screen</application> 提供您在一個 terminal
裏同時跑好幾個 session 的能力,而且它本身也是一個相當好
的軟體。每個 <application>screen</application> 都像是一個
VT100 的終端機,所以遠端機器的 TERM 變數應該設為
<literal>vt100</literal>。</para>
</listitem>
<listitem>
<para>在遠端機器的終端機資料庫(terminal database)中加入
<literal>cons25</literal> 的資料。加入的方法視遠端機器的
作業系統不同而有所差異。請參閱遠端機器給系統管理員的說明
書,應該會有所幫助。</para>
</listitem>
<listitem>
<para>啟動 FreeBSD 的 X 伺服器,然後使用一些 X Window 下的
終端機模擬器來登入遠端機器,例如 <command>xterm</command>
或 <command>rxvt</command>。而遠端機器的 TERM 變數應該要
設為 <literal>xterm</literal> 或 <literal>vt100</literal>。
</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="calcru-negative">
<para>為什麼我的機器一直顯示
<errorname>calcru: negative time...</errorname>?</para>
</question>
<answer>
<para>跟中斷(interrupt)有關的不同硬體 與/或 軟體的搭配都有可能造成
這個問題。這有可能是 bug 或是某個裝置本身的問題。在平行埠上使用
大的 MTU 來作 TCP/IP 傳輸可以重現這個問題。若是圖形加速卡造成這個
問題的話,您應該先檢查卡的中斷設定。</para>
<para>這個問題的邊際效應是會造成有些 process 出現
<quote>SIGXCPU exceeded cpu time limit</quote> 的訊息,而不正常
停止。</para>
<para>若是 FreeBSD 3.0 或是 1998 年 11 月 29 日以後其他版本,萬一
這個問題一直無法以其他方法解決,就只能設定 sysctl 變數:</para>
<screen>&prompt.root; <userinput>sysctl -w kern.timecounter.method=1</userinput></screen>
<para>這樣會對效能有些影響,但是若考慮到這個問題帶來的後果,這樣做
是值得的。如果這個問題還是存在的話,讓 sysctl 那個值依然設為 1,
然後增加 kernel 設定檔中 <literal>NTIMECOUNTER</literal> 這個選
項的數值。如果您將 <literal>NTIMECOUNTER</literal> 增加到 20 依
然無法解決這個問題,那麼您機器上的中斷已經多到無法讓計數器維持在
可靠的狀態了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="pcm0-not-found">
<para>出現 <errorname>pcm0 not found</errorname> 這個訊息,或者是
我的音效卡變成了 <devicename>pcm1</devicename>,但在 kernel 設定
檔裏我是設 <literal>device pcm0</literal> 啊。這是怎麼回事呢?
</para>
</question>
<answer>
<para>如果您在 FreeBSD 3.x 上使用 PCI 音效卡就會發生這種問題。
因為<devicename>pcm0</devicename> 這個 device 是內定保留給 ISA
的音效卡的,所以如果您有一張 PCI 的音效卡,您就會遇到這個問題,
而您的卡會變成 <devicename>pcm1</devicename>。</para>
<note>
<para>如果您只把 kernel 設定檔中的設定改成
<literal>device pcm1</literal> 是無法除去這個警告訊息的,
這樣會造成 <devicename>pcm1</devicename> 被保留給 ISA 音效卡,
而 PCI 音效卡則會變成 <devicename>pcm2</devicename>
(外加 <errorname>pcm1 not found</errorname> 的警告訊息)。
</para>
</note>
<para>如果您有一張 PCI 的音效卡,您需要 make
<devicename>snd1</devicename> 這個 device,而不是
<devicename>snd0</devicename>:</para>
<screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>./MAKEDEV snd1</userinput></screen>
<para>這個問題在 FreeBSD 4.x 上並不會發生,因為很多人投下了許多心
力讓它更<emphasis>PnP 導向</emphasis>,而且
<devicename>pcm0</devicename> 這個 device 也不再是只保留給 ISA
的音效卡了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="pnp-not-found">
<para>為什麼在更新到 FreeBSD 4.X 後會抓不到我的 PnP 卡
(或者是抓成 <literal>unknown</literal>)?</para>
</question>
<answer>
<para>FreeBSD 4.X 現在已經更 <emphasis>PnP 導向</emphasis>了,
而邊際效應就是會發生有些在 FreeBSD 3.X 可以用的 PnP 裝置
(如音效卡或是內插式數據機)變成無法使用。</para>
<para>這個原因可以用一封由 Peter Wemm 發到 freebsd-questions
這個 mailing list 上的信來解釋,它原本是解釋為什麼有一個內
插式數據機,在系統升級到 FreeBSD 4.x 後,就沒法被抓到了
(在 <literal>[]</literal> 裏的是另外加的註解,讓內容更易懂)。
</para>
<blockquote>
<para>The PNP bios preconfigured it [the modem] and left it
laying around in port space,so [in 3.x] the old-style ISA
probes <quote>found</quote> it there.</para>
<para>Under 4.0,the ISA code is much more PnP-centric. It was
possible [in 3.x] for an ISA probe to find a
<quote>stray</quote> device and then for the PNP device id to
match and then fail due to resource conflicts. So,it
disables the programmable cards first so this double probing
cannot happen. It also means that it needs to know the PnP
id's for supported PnP hardware. Making this more user
tweakable is on the TODO list.</para>
</blockquote>
<para>如果要讓裝置能再度運作,我們需要找出它的 PnP id,然後再將它
加入一份在偵測 ISA 裝置時會使用的表中。可以執行 &man.pnpinfo.8;
來偵測這個裝置,舉例來說,下面是 &man.pnpinfo.8; 抓到的一個內插
式數據機的資料:</para>
<screen>&prompt.root; <userinput>pnpinfo</userinput>
Checking for Plug-n-Play devices...
Card assigned CSN #1
Vendor ID PMC2430 (0x3024a341),Serial Number 0xffffffff
PnP Version 1.0,Vendor Version 0
Device Description: Pace 56 Voice Internal Plug & Play Modem
Logical Device ID: PMC2430 0x3024a341 #0
Device supports I/O Range Check
TAG Start DF
I/O Range 0x3f8 .. 0x3f8,alignment 0x8,len 0x8
[16-bit addr]
IRQ: 4 - only one type (true/edge)</screen>
<para>[more TAG lines elided]</para>
<screen>TAG End DF
End Tag
Successfully got 31 resources,1 logical fdevs
-- card select # 0x0001
CSN PMC2430 (0x3024a341),Serial Number 0xffffffff
Logical device #0
IO: 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8 0x03e8
IRQ 5 0
DMA 4 0
IO range check 0x00 activate 0x01</screen>
<para>您所需要的資訊是一開始看到的 <quote>Vendor ID</quote>
這一行。括號中的十六位元碼(這個例子中是 0x3024a341)就是
PnP id,而在這之前的字串(PMC2430)則是一個獨一無二的 ASCII id。
而這些資料需要被加到 <filename>/usr/src/sys/isa/sio.c</filename>
這個檔案裏。</para>
<para>為了防止任何東西出錯,您應該要先備份目前的
<filename>sio.c</filename>。而且您要 submit PR 時也需要這個
原始檔案來做出 patch(您應該會將它 submit PR 吧..:)..)。
接著就編輯 <filename>sio.c</filename> 找尋下面這行</para>
<programlisting>static struct isa_pnp_id sio_ids[] = {</programlisting>
<para>接著往下捲動,找個正確的位置來插入您的裝置資訊。您看到的就
下面這個樣子,它們是照右邊註解裡面的 ASCII 這個 Vender ID 做排
序的,或是 &man.pnpinfo.8; 所找到的一部分
<emphasis>裝置描述</emphasis>:</para>
<programlisting>{0x0f804f3f,NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
{0x39804f3f,NULL}, /* OZO8039 - Zoom 56k flex */
{0x3024a341,NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
{0x1000eb49,NULL}, /* ROK0010 - Rockwell ? */
{0x5002734a,NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */</programlisting>
<para>把您這個裝置的十六進位的 Vender ID 加到正確的地方,存檔,
然後重新編一個 kernel,再重開機。之後這個裝置應該就會像在
FreeBSD 3.X 下,被偵測為 <literal>sio</literal> 裝置了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="nlist-failed">
<para>為什麼我常常在跑一些程式(例如 <command>top</command> 或
<command>systat</command>)的時候出現
<errorname>nlist failed</errorname> 這個錯誤訊息?</para>
</question>
<answer>
<para>這個問題是因為您跑的程式需要一個特別的 kernel symbol,可是
不知道什麼原因而找不到﹔而會發生這個問題可能是因為下面兩個原因:
</para>
<itemizedlist>
<listitem>
<para>您的 kernel 和 userland 的檔案版本並不一致(例如說,您
編了一個新的 kernel,但是並沒有執行對應的
<maketarget>installworld</maketarget>,或是其他類似情形),
因此 symbol table 的內容就和應用程式編譯時的不太一樣了。如
果是這種情形,請執行完整的升級步驟(請參閱
<filename>/usr/src/UPDATING</filename> 以得知正確的流
程)。</para>
</listitem>
<listitem>
<para>您沒有用 <command>/boot/loader</command> 來載入您的
kernel,而是直接由 boot2 開機(請參閱 &man.boot.8;)。
雖然說跳過 <command>/boot/loader</command> 並沒有什麼錯,
但是它在 kernel symbols 跟應用程式的溝通方面佔了很重的份量。
</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="connection-delay">
<para>為什麼我用 <command>ssh</command> 或 <command>telnet</command>
連到我的電腦時,會等待很長的一段時間才能連上?</para>
</question>
<answer>
<para>症狀:TCP 連線建立之後和詢問密碼之前(如果是在說 &man.telnet.1;
的話,則是 login 提示符號跳出來之前),要等待很長的一段時
間。</para>
<para>問題所在:這種延遲情形常常是因為伺服軟體(server software)
嘗試要將客戶端(client)的 IP 位址轉換成主機名稱。因為很多伺服
軟體,包括 FreeBSD 內建的 Telnet 和 SSH,為了將主機名稱寫入紀
錄檔中以供管理者作參考,而會做這項動作。</para>
<para>解決方法:如果這個問題在您連接不同的伺服器時都會發生,那麼
問題是在您客戶端這一方﹔同樣的,如果別人只有在連到您的伺服器上
才會發生這個情形,那麼問題就是在伺服器這邊了。</para>
<para>如果是客戶端這方有問題,唯一的方法就是將 DNS 伺服器修好,
這樣對方伺服器才能正確的轉換名稱。如果問題是在內部區域網路發
生的,這應該是伺服器有問題,請詳細檢查一下﹔相反的,如果是您
在上 Internet 時發生的,那麼您需要跟您的 ISP 聯絡,請他們解決
這個問題。</para>
<para>如果是伺服器這邊的問題,而且是發生在內部區域網路,那麼您需
要設定這個伺服器,使它能正確將內部網路的 IP 位址轉換為主機名稱。
請參閱 &man.hosts.5; 和 &man.named.8; 的說明以獲得更多資訊。如
果是在 Internet 上的伺服器發生這個問題,那麼有可能是您伺服器的
轉換功能出問題。您可以試試查詢另一個主機名稱,比如:
<hostid>www.yahoo.com</hostid>。如果查不到,那麼可以確定是您這
邊出問題了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="stray-irq">
<para><errorname>stray IRQ</errorname> 這個錯誤訊息是什麼意思?</para>
</question>
<answer>
<para>Stray IRQs 是硬體 IRQ 有點小問題的現象,大多是因為硬體本身
在發出中斷需求後,又取消了它自己的中斷要求。</para>
<para>有三個方法可以應付這個問題:</para>
<itemizedlist>
<listitem>
<para>不理會這個警告。反正一個 irq 出現五次警告後系統就不會
再顯示了。</para>
</listitem>
<listitem>
<para>把 <function>isa_strayintr()</function> 裏的值,由 5
改成 0,這樣所有的警告訊息都不會出現。</para>
</listitem>
<listitem>
<para>安裝使用 irq 7 的平行埠硬體設備,以及它的 PPP 驅動程式
(這個大部分系統都有做),接著安裝 ide 硬碟或是其他會使用
irq 15 的硬體設備以及它的驅動程式。</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
<qandaentry>
<question id="file-table-full">
<para>為什麼 <errorname>file: table is full</errorname> 這個訊息
一直在 dmesg 裏重複出現?</para>
</question>
<answer>
<para>這個錯誤訊息代表了您系統的 file descriptors 已經使用光了。
請參閱手冊內 <ulink url="../handbook/configtuning-kernel-limits.html">
Tuning Kernel Limits</ulink> 裡面的 <ulink
url="../handbook/configtuning-kernel-limits.html#KERN-MAXFILES">
kern.maxfiles</ulink> 這個章節,裡面有一些討論及解決方法。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="laptop-clock-skew">
<para>為什麼我筆記型電腦上的時鐘一直顯示錯誤的時間?</para>
</question>
<answer>
<para>您的筆記型電腦裡有兩個以上的時鐘,而 FreeBSD 選到了錯的
那個。</para>
<para>執行 &man.dmesg.8;,檢查一下有 <literal>Timecounter</literal>
字串的那幾行。最後一行是 FreeBSD 選用的,通常是
<literal>TSC</literal>。</para>
<screen>&prompt.root; <userinput>dmesg | grep Timecounter</userinput>
Timecounter "i8254" frequency 1193182 Hz
Timecounter "TSC" frequency 595573479 Hz</screen>
<para>您可以執行 &man.sysctl.3; 看一下
<varname>kern.timecounter.hardware</varname> 這個值做確認。</para>
<screen>&prompt.root; <userinput>sysctl kern.timecounter.hardware</userinput>
kern.timecounter.hardware: TSC</screen>
<para>BIOS 可能在一些情形下會更改 TSC 的時脈—有時候是因為
在使用電池工作時會更改處理器的速度,另外也有可能是進入了省電模
式,可是 FreeBSD 並不會察覺到這些調整,而會發生時間增加或是減
少的情形。</para>
<para>在上面的例子當中,我們看到還有 <literal>i8254</literal>
這個時鐘可以選擇,執行 &man.sysctl.3; 用手動的方式將這個值寫入
<varname>kern.timecounter.hardware</varname> 中。</para>
<screen>&prompt.root; <userinput>sysctl -w kern.timecounter.hardware=i8254</userinput>
kern.timecounter.hardware: TSC -> i8254</screen>
<para>這樣您的筆記型電腦應該就可以保持正確的時間了。</para>
<para>如果要讓這個更改的動作再每次開機時自動執行,在
<filename>/etc/sysctl.conf</filename> 裏加入下面這行。</para>
<programlisting>kern.timecounter.hardware=i8254</programlisting>
</answer>
</qandaentry>
<qandaentry>
<question id="null-null">
<para>為什麼我的筆記型電腦無法正確的偵測到 PC card ?</para>
</question>
<answer>
<para>這個問題常常發生在灌了多個作業系統的筆記型電腦上。有些非
BSD 的作業系統會讓 PC card 的硬體裝置處在一個不一致的狀態下
(inconsistent state)。使得 <command>pccardd</command> 在偵
測這片卡時,無法抓到正確的型號,而是
<errorname>"(null)""(null)"</errorname>。</para>
<para>您需要移除 PC card 插槽的電源以重置這個硬體裝置。一個方法是
將您的筆記型電腦關機(不是休眠模式,也不是待命模式﹔要完全的關
機)。等個幾秒鐘再重開機。這樣您的 PC card 應該就正常了。</para>
<para>有時有些筆記型電腦雖然看起來已經關機了,但實際上並沒有。
如果您發現上面那個方法沒有用,請關機,移除電池,等個幾秒鐘,
把電池裝上去然後重開機。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="boot-read-error">
<para>為什麼在 BIOS 畫面之後,FreeBSD 的 boot loader 顯示
<errorname>Read error</errorname> 然後就停止不動了?</para>
</question>
<answer>
<para>這是因為FreeBSD 的 boot loader 無法正確的找出硬碟的
geometry。這樣的話,就需要在用 fdisk 分割或是修改 FreeBSD
的 slice 時,手動將正確的值輸入進去了。</para>
<para>正確的硬碟 geometry 值在 BIOS 裡面可以查的到。注意該硬碟的
cylinders,heads 以及 sectors 這些數值。</para>
<para>在執行 &man.sysinstall.8;的 fdisk 時,按下 <keycap>G</keycap>
以便手動設定硬碟的 geometry。</para>
<para>這時會有一個對話框跳出來,詢問您有關 cylinders,heads 以及
sectors 這些東西的值。請將剛剛在 BIOS 查到的數字,以 / 作分隔輸
入進去。</para>
<para>舉例來說,如果是 5000 cylinders,250 sectors 和 60 sectors
就輸入 <userinput>5000/250/60</userinput></para>
<para>輸入完後請按 enter 鍵確認,最後按下 <keycap>W</keycap> 鍵把
新的分割區表寫入硬碟當中。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="bootmanager-restore">
<para>另一個作業系統摧毀了我的 Boot Manager。我要怎麼樣才能把它還
原回來?</para>
</question>
<answer>
<para>執行 &man.sysinstall.8; 接著選 Configure,然後選 Fdisk。
再來用<keycap>空白</keycap>鍵選擇原先 Boot Manager 所在的硬碟。
按下 <keycap>W</keycap> 鍵來作寫入的動作。這時會跳出一個提示
訊息,詢問您要安裝哪一個 boot loader。請選擇 Boot Manager,
這樣就可以將它還原了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="indefinite-wait-buffer">
<para>這個錯誤訊息:<errorname>swap_pager: indefinite
wait buffer:</errorname> 是什麼意思呢?</para>
</question>
<answer>
<para>這個訊息是說有一個執行程序正在嘗試將分頁記憶體(page memory)
寫入硬碟中,而這個動作嘗試了 20 秒鐘仍然無法成功。這個有可能是因為
硬碟有壞軌、電路或排線有問題、以及其他跟硬碟讀出寫入有關的硬體設備。
如果真的是硬碟壞軌的問題,您應該會在
<filename>/var/log/messages</filename>這個檔案中,或是在執行
<command>dmesg</command>這個指令後,看到有關磁碟錯誤的訊息。
如果沒有,那麼請檢查您的排線還有接頭連接是否良好。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="touch-not-found">
<para>為何在 buildworld/installworld 時,會趴在
<errorname>touch: not found</errorname> 的錯誤訊息?</para>
</question>
<answer>
<para>這錯誤訊息並不是指 &man.touch.1; 程式不見了,事實上可能是該檔檔案時間被設為未來的時間。
若機器上的 CMOS-clock 時鐘設定為當地時間
(非格林威治時間,比如台灣時間為 GMT +08:00 ,也就是 CST 中原標準時間),
那麼請在開機時,先選 single user 模式進入,然後打
<command>adjkerntz -i</command>
來調整 kernel clock 與機器上的 CMOS-clock 來同步。</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="commercial">
<chapterinfo>
<author>
<firstname>Vanilla</firstname>
<surname>Shu</surname>
<affiliation>
<address><email>vanilla@FreeBSD.org</email></address>
</affiliation>
</author>
</chapterinfo>
<title>商業軟體</title>
<note>
<para>這一節的內容還是相當少,不過我們當然希望各個公司能為它加點內容 :)
FreeBSD 組織和列在這裡的任何一家公司都沒有金錢上的利害關係,列出來純粹只是對大眾公開介紹(同時也認為在 FreeBSD
上的商機若興旺,會對 FreeBSD 可長可久有極正面的效益)。我們鼓勵商業軟體的廠商把他們的產品包括在下面的名單中,在
<ulink url="../../../../commercial/index.html">Vendors page</ulink> 可以看到更長的列表。</para>
</note>
<qandaset>
<qandaentry>
<question id="officesuite">
<para>在哪邊找到給 FreeBSD 用的 Office 套件呢?</para>
</question>
<answer>
<para><ulink
url="http://www.openoffice.org">OpenOffice</ulink> 這套 open-source 性質的 office
可以在 FreeBSD 上正常運用自如,而 &linux; 版的
<ulink
url="http://www.sun.com/staroffice/">StarOffice</ulink>,
這套 closed-source 的 OpenOffice 加值版,也可以在 FreeBSD 上正常使用。</para>
<para>FreeBSD 上還有許多編排軟體、試算表(Spreadsheet)以及繪圖軟體都可用 Ports
Collection 來安裝喔。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="motif">
<para>在哪邊可找到給 FreeBSD 用的 Motif?</para>
</question>
<answer>
<para>Open Group 釋出了 Motif 2.1.30 的原始碼,可以透過
<literal>open-motif</literal> package 安裝,或是由 ports 自行
編譯。相關的資訊,請參考 handbook 中的 <ulink
url="../handbook/ports.html">ports</ulink> 章節。
<note>
<para>Open Motif 只能在同樣也是 <ulink
url="http://www.opensource.org/">open source</ulink>
的作業系統或計劃中使用。</para>
</note>
</para>
<para>另外,也是有商業版本的 Motif 存在。也許這種版本的 Motif
不是免費的,但是絕對允許用在 closed-source 的環境下。
<link linkend="apps2go">Apps2go</link> 提供了最便宜的 FreeBSD
(包括 i386 跟 alpha)版本的 ELF Motif 2.1.20 套件。
<anchor id="apps2go"/></para>
<para>目前提供兩種不同環境的版本, <quote>發展用版本</quote> 及
<quote>runtime 版本</quote> 。這兩種套件都包括:</para>
<itemizedlist>
<listitem>
<para>OSF/Motif manager, xmbind, panner, wsm.</para>
</listitem>
<listitem>
<para>Development kit with uil, mrm, xm, xmcxx, include
and Imake files.</para>
</listitem>
<listitem>
<para>Static and dynamic ELF libraries (for use with
FreeBSD 3.0 and above).</para>
</listitem>
<listitem>
<para>Demonstration applets.</para>
</listitem>
</itemizedlist>
<para>因為 <emphasis>Apps2go</emphasis> 也有提供 NetBSD 和 OpenBSD
的版本,所以在訂購時請特別指定是要 FreeBSD 版本的 Motif!
他們目前只提供以 FTP 的方式取得這份套件。</para>
<variablelist>
<varlistentry>
<term>更多資訊</term>
<listitem>
<para><ulink url="http://www.apps2go.com/">
Apps2go WWW page</ulink></para>
</listitem>
</varlistentry>
<varlistentry>
<term>或</term>
<listitem>
<para>
<email>sales@apps2go.com</email> 或
<email>support@apps2go.com</email>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>或</term>
<listitem>
<para>phone (817) 431 8775 or +1 817 431-8775</para>
</listitem>
</varlistentry>
</variablelist>
<para>也可以聯絡 <link linkend="xig">Xi Graphics</link>,他們提供了一個
FreeBSD a.out 格式的 Motif 2.0 套件。</para>
<para>在這套件中包括了:</para>
<itemizedlist>
<listitem>
<para>OSF/Motif manager, xmbind, panner, wsm.</para>
</listitem>
<listitem>
<para>Development kit with uil, mrm, xm, xmcxx, include
and Imake files.</para>
</listitem>
<listitem>
<para>Static and dynamic libraries (for use with FreeBSD
2.2.8 and earlier).</para>
</listitem>
<listitem>
<para>Demonstration applets.</para>
</listitem>
<listitem>
<para>Preformatted man pages.</para>
</listitem>
</itemizedlist>
<para>在你跟他們訂購 Motif 時,請一定註明你要的是 FreeBSD 的版本!
因為 <emphasis>Xi Graphics</emphasis> 也同時提供了 BSDI 跟 Linux
版本的 Motif。目前發行的版本是放在四塊磁片中,將來他們會將所有的
東西都放到光碟裡,就像他們所發行的 CDE 一樣。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="cde">
<para>在哪邊可找到給 FreeBSD 用的 CDE?</para>
</question>
<answer>
<para><link linkend="xig">Xi Graphics</link> 以前有賣 FreeBSD 用的
CDE,不過現已停止發售了。</para>
<para>就許多方面而言,<ulink url="http://www.kde.org/">KDE</ulink> 這個 open
source 的桌面環境與 CDE 相當類似。此外,你可能會喜歡使用 <ulink
url="http://www.xfce.org/">xfce</ulink>。KDE 及 xfce 都可由 <ulink url="&url.base;/ports/index.html">ports
機制</ulink>來安裝。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="commercial-xserver">
<para>有沒有要錢,但是高效率的 X servers?</para>
</question>
<answer>
<para>有, <ulink url="http://www.xig.com/">Xi Graphics</ulink>
有提供給 FreeBSD(或其他 Intel 平台上)用的 X 視窗加速產品。</para>
<para>Xi Graphics 所提供的高效能 X Server 有非常簡單的設定方式,
並且支援了目前市面上當紅的各大廠牌的顯示卡。它只給你 Binary 檔案,
是用磁片的方式發行,FreeBSD 跟 Linux 版本都相同。Xi Graphics 同時
也提供了專門給筆記型電腦用的高效能 X Server。<anchor id="xig"/></para>
<para>5.0 版有提供免費的相容 <quote>demo</quote> 版本</para>
<para>Xi Graphics 也有在賣 FreeBSD 用的 Motif 跟 CDE(往上面看看)。
</para>
<variablelist>
<varlistentry>
<term>更多的資訊</term>
<listitem>
<para><ulink url="http://www.xig.com/">
Xi Graphics WWW page</ulink></para>
</listitem>
</varlistentry>
<varlistentry>
<term>或</term>
<listitem>
<para><email>sales@xig.com</email>
或 <email>support@xig.com</email>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>或</term>
<listitem>
<para>phone (800) 946 7433 or +1 303 298-7478.</para>
</listitem>
</varlistentry>
</variablelist>
</answer>
</qandaentry>
<qandaentry>
<question id="database-systems">
<para>在 FreeBSD 上有任何的資料庫嗎?</para>
</question>
<answer>
<para>有! 請看 FreeBSD 網站上 <ulink
url="../../../../commercial/software_bycat.html#CATEGORY_DATABASE">
商業軟體公司 </ulink> 這一部份。</para>
<para>還有請參考 ports 中 <ulink
url="../../../../ports/databases.html">
Databases</ulink> 相關的收集。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="oracle-support">
<para>可以在 FreeBSD 上執行 Oracle 嗎?</para>
</question>
<answer>
<para>可以,下面這個網頁會說明如何在 FreeBSD 上執行 Linux
版的 Oracle:</para>
<itemizedlist>
<listitem>
<para><ulink
url="http://www.scc.nl/~marcel/howto-oracle.html">
http://www.scc.nl/~marcel/howto-oracle.html</ulink></para>
</listitem>
<listitem>
<para><ulink
url="http://www.lf.net/lf/pi/oracle/install-linux-oracle-on-freebsd">
http://www.lf.net/lf/pi/oracle/install-linux-oracle-on-freebsd</ulink></para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="applications">
<chapterinfo>
<author>
<firstname>Kang-min</firstname>
<surname>Liu</surname>
<affiliation>
<address><email>gugod@gugod.org</email></address>
</affiliation>
</author>
</chapterinfo>
<title>一般應用程式</title>
<qandaset>
<qandaentry>
<question id="user-apps">
<para>嗯..我要在哪找到我要的程式呢?</para>
</question>
<answer>
<para>請看看 <ulink url="../../../../ports/index.html">ports
目錄</ulink> 吧。這邊有份已經 port 到 FreeBSD 的軟體列表。
目前有超過 &os.numports; 個軟體已經被port 到 FreeBSD 上,並且每天
都在增加中。所以有空就多看看這份列表,不然你也可以訂閱
<literal>freebsd-announce</literal> <link linkend="mailing">
這份 mailing list</link>,會有人將每個星期最新的軟體列表貼在上面。</para>
<para>大部份的 ports 應該都可以在 4.X、5.X 跟 6.X 的系統上使用。
每次當 FreeBSD release 新版時,都會有一份 ports tree 被放在這一個
release cd 裡面的 <filename>ports/</filename> 目錄裡。</para>
<para>我們也支援一種叫 <quote>package</quote> 的概念,基本上
就是 gzip 壓縮、可用來發行的 binary 檔案,但是裡面藏了一
些相當有用的資訊,可以給各種自訂安裝來使用。使用者不必知
道某個 package 裡究竟有包括哪些檔案,就可`以很方便地重複將
它安裝/反安裝。</para>
<para>你可以執行 <filename>sysinstall</filename>(&os; 5.2 之前版本則是 <command>/stand/sysinstall</command>) 後,
在 post-configuration 選單下選擇 package 這個安裝選項;或
是對某個有興趣的 package 檔案執行 &man.pkg.add.1;
把它裝起來。Package 檔案通常以 <filename>.tgz</filename> 或 <filename>.tbz</filename>
為副檔名,手上有 FreeBSD CDROM 的人可以在 <filename>packages/All</filename> 這個目錄下找到這類檔案。
對不同的 FreeBSD 版本,也可以從下列位址由網路上取得:</para>
<variablelist>
<varlistentry>
<term>給 4.X-RELEASE/4-STABLE 用的</term>
<listitem>
<para><ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/">
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/</ulink></para>
</listitem>
</varlistentry>
<varlistentry>
<term>給 5.X-RELEASE/5-STABLE 用的</term>
<listitem>
<para><ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-stable/">
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-stable</ulink></para>
</listitem>
</varlistentry>
<varlistentry>
<term>給 6.X-RELEASE/6-STABLE 用的</term>
<listitem>
<para><ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-6-stable/">
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-6-stable</ulink></para>
</listitem>
</varlistentry>
<varlistentry>
<term>給 7-CURRENT 用的</term>
<listitem>
<para><ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-7-current/">
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-7-current</ulink></para>
</listitem>
</varlistentry>
</variablelist>
<para>或是離你最近的 mirror 站。</para>
<para>要注意的是,因為新的 port 一直在增加中,所以並不是所有 port
都有相對應的 package。最好定時檢查<ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/">ftp.FreeBSD.org</ulink>
,看看有哪些 package 可以用。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="configure-inn">
<para>該怎麼設定 INN(Internet News) 來當 news server?</para>
</question>
<answer>
<para>以 package 或 port 方式來裝好 <filename
role="package">news/inn</filename> 之後,<ulink
url="http://www.visi.com/~barr/INN.html">Dave
Barr's INN Page</ulink> 是個非常好的 INN 入門處,你可以在那邊找到 INN 的 FAQ。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="java">
<para>FreeBSD 有支援 &java; 嗎?</para>
</question>
<answer>
<para>有啊,請看 <ulink
url="&url.base;/java/index.html">
http://www.FreeBSD.org/java/</ulink></para>
</answer>
</qandaentry>
<qandaentry>
<question id="missing-libcso30">
<para>我可以在哪邊找到 libc.so.3.0?</para>
</question>
<answer>
<para>你可能在一台 2.1.x 的機器上,跑著給 2.2/3.x/4.0 的軟體。
請再往上面一個章節看,正確的取得給你機器用的 port/package。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="missing-libcso40">
<para>為何我得到了這個訊息 ?<errorname>Error: can't find
libc.so.4.0</errorname>?</para>
</question>
<answer>
<para>你不小心抓了給 4.X 及 5.X 系統用的 package,並且嘗試著
去裝在你的 2.X 或 3.X 的系統上面。請下載正確版本的 package。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="emul">
<para> ghostscript 在我的 386/486SX 上有點問題呢!</para>
</question>
<answer>
<para>你沒有浮點運算器,對吧?你必須在你的 kernel 中加入數學
運算模擬器,你可以跟著下面的步驟做,並在更改過你的 kernel 設定
檔後,重新編譯過一次。</para>
<programlisting>options GPL_MATH_EMULATE</programlisting>
<note>
<para>當你加入上一行的同時,你必須將
<literal>MATH_EMULATE</literal> 移除掉。</para>
</note>
</answer>
</qandaentry>
<qandaentry>
<question id="sco-socksys">
<para>為什麼當我執行 SCO/iBCS2 的程式時,它在
<errorname>socksys</errorname> 這個地方出了問題?
(FreeBSD 3.0 以及更早的版本才有此問題。)</para></question>
<answer>
<para>你必須先修改 <filename>/etc/sysconfig</filename> (或是
<filename>/etc/rc.conf</filename>, 請讀 &man.rc.conf.5;)
這檔案最後一個章節,將下面所講到的變數設成
<literal>YES</literal>:</para>
<programlisting># Set to YES if you want ibcs2 (SCO) emulation
loaded at startup ibcs2=NO</programlisting>
<para>這會在開機時將 ibcs2 這一個 kernel 模組載入。</para>
<para>你還要將你的 /compat/ibcs2/dev 改成下面這樣:</para>
<screen>lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null
lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys
-rw-rw-r-- 1 root wheel 0 Oct 28 12:02 null
lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null
crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx</screen>
<para>你只需要將 socksys 轉向到 <devicename>/dev/null</devicename>
(請讀 &man.null.4;) 去騙過 open & close 的動作。在 -current
裡面的 ibcs2 相關程式碼將會處理其餘的部份,這種作法比以前的方式
乾淨太多了。假如你想要使用 <devicename>spx</devicename> 方面的
程式,在你的 kernel 設定檔裡面 加上<literal>SPX_HACK</literal>。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="ms-frontpage">
<para>我該使用那個版本的 Microsoft FrontPage?</para>
</question>
<answer>
<para>Use the Port, Luke!在 ports tree 中已經有一個包含 FrontPage
的 Apache 版本了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="ports-3x">
<para>為什麼我無法在 3.X-STABLE 機器上順利編好這個 port?</para>
</question>
<answer>
<para>如果你的 FreeBSD 版本相較 -CURRENT 或 -STABLE 之下是很古
早的話,或許你會需要一個升級 ports 的工具,在
<ulink url="../../../../ports/index.html">
http://www.FreeBSD.org/ports/</ulink>。如果你以將其更新卻仍無用,
那麼一定是某人更動之後造成 -CURRENT 才能用,-STABLE 無法用的情況。
由於 ports 內所收集的軟體在 -CURRENT 或是 -STABLE 上都要能用,
所以請儘速送出關於此問題的蟲報告;請使用 &man.send-pr.1; 這個指
令來送蟲報告。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="find-ldso">
<para>那裡可以找得到 ld.so?</para>
</question>
<answer>
<para>有些 a.out 格式的應用程式會需要 a.out 格式的函式庫,
Netscape Navigator 就是一個例子。不過用 ELF 函式庫編起來
的 FreeBSD 預設並不會安裝舊的 a.out 函式庫,所以您可能會得
到類似找不到 <filename>/usr/libexec/ld.so</filename> 的抱怨訊
息。如果說您的系統有這安裝 a.out 函式庫的必要,這些函式庫
(compat22) 也能夠利用 &man.sysinstall.8; 來安裝。或者利用
FreeBSD 原始碼來安裝:</para>
<screen>&prompt.root; <userinput>cd /usr/src/lib/compat/compat22</userinput>&prompt.root; <userinput>make install clean</userinput></screen>
<para>如果你希望每次 <command>make world</command> 時會自動更新
compat22 函式庫,那麼修改 <filename>/etc/make.conf</filename>,
加入 <varname>COMPAT22=YES</varname>。這些相容於古老版本的函式庫
已經沒什麼在更新了,所以一般說來是不需要這樣的。</para>
<para>同時也請您看一下 3.1-RELEASE 和 3.2-RELEASE 的勘誤表(ERRATA)。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="ports-update">
<para>我更新了系統原始碼,現在我要怎樣升級某個已經安裝上
的 ports ?</para>
</question>
<answer>
<para>FreeBSD 本身並沒有自動升級 ports 的工具,但有一些可以讓升級
簡化一些的小程式。你也可以自己裝上額外的工具來處理。</para>
<para>&man.pkg.version.1; 指令可以自動產生用來達到自動升級到
ports tree 最新版本的 script。</para>
<screen>&prompt.root; <userinput>pkg_version <option>-c</option> > <replaceable>/tmp/myscript</replaceable></userinput></screen>
<para><emphasis>一定要</emphasis>在手動修改一下產生出來的 script。
目前的 &man.pkg.version.1; 在 script 最前面加入 &man.exit.1; 強
迫你去修改它。</para>
<para>你應將執行 script 所產生的輸出記錄下來,因為裡面會有記載某些
尚未升級但已經更新的 ports。不過你不一定要去升級它們。通常是因為
有某個共用的函式庫已經改變版本號了,才要去重編一次那些使用到該函
式庫的 ports。</para>
<para>如果你的硬碟空間很夠,那麼可以用 <command>portupgrade</command>
這個工具來做全自動處裡。<command>portupgrade</command> 裡面也有
一些小程式來簡化 package 升級,它在
<filename role="package">sysutils/portupgrade</filename>。
這個工具是用 Ruby 這個語言寫的,所以並不適合加入到 FreeBSD 的原
始碼中,不過並不會因此讓某些人不用它。</para>
<para>如果你的系統一直都處於開機狀態,可利用 &man.periodic.8; 系統,
每個星期產生一張需要升級的清單。只要在
<filename>/etc/periodic.conf</filename> 加入
<literal>weekly_status_pkg_enable="YES"</literal> 就可以了。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="minima-sh">
<para>為什麼 <command>/bin/sh</command>這麼的小?為什麼 FreeBSD
不改用 <command>bash</command> 或者是其他比較強悍的 shell?</para>
</question>
<answer>
<para>因為 POSIX 說,該要有這麼樣的一個 shell 在才行。</para>
<para>比較繁瑣的答案:許多人需要寫可以跨很多平台的 shell script 。
這也是為何 POSIX 將 shell 以及工具命稱都定義的非常詳細的緣故。
大部份的 script 都適用於 Bourne shell,又因為有幾個重要的
寫程式所用到的程式或者函式 (&man.make.1; , &man.system.3;,
&man.popen.3;, 還有在 Perl 或者 Tcl 裡面呼叫系統程式的地方)
都指定用 Bourne shell 。那麼因為 Bourne Shell 如此的廣泛常用,
那麼它的執行效率便很重要,快速是它決定性的要點之一,還要不佔太多
記憶體。</para>
<para>目前的 <command>/bin/sh</command> 已是我們嘔心瀝血之作,它已
經盡量地符合標準規定。為了讓它非常小,我們拿掉了一些其他 shell
有的方便功能。這也是為什麼 ports 裡面還有很多強悍的 shell ,像是
bash, scsh, tcsh 以及 zsh 。 (你可以自己比較一下這些 shell 執行
時所佔的記憶體大小,去看看 <command>ps -u</command> 列出來的
<quote>VSZ</quote> 和 <quote>RSS</quote> 這兩個欄位就知道了。)
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="netscape-slow-startup">
<para>為什麼 Netscape 和 Opera 要花好久的時間才能啟動?</para>
</question>
<answer>
<para>通常是因為你的 DNS 沒有設定好。 Netscape 跟 Opera 在啟動的時候
都會去檢查一下 DNS。直到 DNS 有回應,或者是斷定網路目前是斷線之後,
它們才會顯示畫面出來。</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="kernelconfig">
<chapterinfo>
<author>
<firstname>Kang-min</firstname>
<surname>Liu</surname>
<affiliation>
<address><email>gugod@gugod.org</email></address>
</affiliation>
</author>
</chapterinfo>
<title>kernel 設定</title>
<qandaset>
<qandaentry>
<question id="make-kernel">
<para>我想自訂 kernel,這會很困難嗎?</para>
</question>
<answer>
<para>不會!請查閱 <ulink url="../../handbook/kernelconfig.html">
使用手冊中的 kernel 設定一節</ulink>。</para>
<note>
<para>我會建議你在你讓核心能正常工作後,做一個
<filename>kernel.YYMMDD</filename> 日期形式的備份,同時也備份
<filename>/module</filename>這個目錄至
<filename>/modules.YYMMDD</filename>。這樣下次如果你很不幸的玩
壞了設定,至少可以不需要使用最原始的
<filename>kernel.GENERIC</filename>。如你正從一個 GENERIC
kernel 裡面不支援的控制器裡啟動時,這就顯得特別重要。</para>
</note>
</answer>
</qandaentry>
<qandaentry>
<question id="missing-hw-float">
<para>我的核心因為 <literal>_hw_float</literal>遺失而編譯失敗。
該怎麼修正呢?</para>
</question>
<answer>
<para>讓我猜看看,你把 <devicename>npx0</devicename>
(詳見 &man.npx.4;) 從你的 kernel 設定檔移除了,因為你沒有數學運算器,
對嗎?錯了!:-) 這個 <devicename>npx0</devicename>是
<emphasis>必須要有的</emphasis>。就算你沒有數學運算器,你還是
<emphasis>必須</emphasis> 引入 <devicename>npx0</devicename> 裝置。
</para>
</answer>
</qandaentry>
<qandaentry>
<question id="why-kernel-big">
<para>為什麼造出來的 kernel 這麼大 (10MB 以上) ?</para>
</question>
<answer>
<para>這很有可能是因為,你把 kernel 編成 <emphasis>偵錯模式</emphasis>
了。偵錯模式之下的 kernel 裡面會存著偵錯用的許多符號,因此會大幅
增加 kernel 的大小。如果說你的 FreeBSD 是 3.0 以後的版本,這對於
效能來說影響並不大,幾乎是沒有。而在系統會因某些原因 panic 時,
有個偵錯模式的 kernel 在也挺有用的。</para>
<para>不過呢,如果你的磁碟空間很小,或者你就是不想用偵錯模式的
kernel 的話,請確認以下事情:</para>
<itemizedlist>
<listitem>
<para>kernel 設定檔裡面沒有這一行:</para>
<programlisting>makeoptions DEBUGS=-g </programlisting>
</listitem>
<listitem>
<para>執行 &man.config.8; 時沒有加上 <option>-g</option>
這個選項。</para>
</listitem>
</itemizedlist>
<para>以上兩件事情都會讓你編出一個偵錯模式的 kernel。但只要避免之,
就可以編出一個正常的 kernel,而你也會注意到,kernel 明顯的變小了;
大部份的 kernel 都差不多在 1.5MB 到 2MB 之間。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="multiport-serial-interrupts">
<para>為何出現了 multi-port serial code 的中斷衝突?</para>
</question>
<answer>
<para>當我編譯一個 multi-port serial code 的核心時,它告訴我只有
第一個被偵測到,其他的則因中斷衝突而跳過了,我該怎麼修正它?</para>
<para>這個問題是因為 FreeBSD 使用內建程式碼避免因為硬體或軟體衝突
導致 kernel 過於肥大或無用。要修正這種情形的方法是除了一個 port
外把其他所有的 IRQ 設定都做保留。這裡有一個範例:</para>
<programlisting>#
# Multiport high-speed serial line - 16550 UARTS
#
device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr
device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr
device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr
device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr</programlisting>
</answer>
</qandaentry>
<qandaentry>
<question id="generic-kernel-build-failure">
<para>為什麼我一個 kernel 都編不起來?甚至 GENERIC 也不行?</para>
</question>
<answer>
<para>這有很多種可能的原因:</para>
<itemizedlist>
<listitem>
<para>你沒有用新的 <command>make buildkernel</command> 與
<command>make installkernel</command> 這兩個方法來編,而正好
你的系統原始碼的版本和正在執行的系統核心版本不一樣 (像是,
在跑 4.0-RELEASE 的系統上嘗試著編 4.3-RELEASE)。如果說你要升
級系統的話,請務必去看看 <filename>/usr/src/UPDATING</filename>
這個檔案,特別注意最後面的 <quote>COMMON ITEMS</quote>
這個小節。</para>
</listitem>
<listitem>
<para>你已經用上 <command>make buildkernel</command> 以及
<command>make installkernel</command> 了,但是在
<command>make buildworld</command> 時失敗了。可惜的是,
<command>make buildkernel</command> 要成功,需要依賴
<command>make buildworld</command> 後造出來的一些檔案。</para>
</listitem>
<listitem>
<para>就算是你在編 <link linkend="stable">&os.stable;</link>,
還是有可能你抓到了正在修改中,或著因為某些緣故而根本還沒改好
的原始碼;雖然說 <link linkend="stable">&os.stable;</link>
大部份的時候都是可以編的,但只有 RELEASE 才是保證可以編的。碰
到這個問題時,再次更新原始碼並且再試試看。也有可能是放原始碼的
伺服器出現某些問題,所以更新原始碼時也試試從不同伺服器來更新看
看。</para>
</listitem>
</itemizedlist>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="disks">
<title>硬碟、檔案系統、Boot Loader</title>
<qandaset>
<qandaentry>
<question id="new-huge-disk">
<para>我要怎麼把我的系統搬到新硬碟上面去?</para>
</question>
<answer>
<para>理想的方式是先在新硬碟上重裝好作業系統,然後把使用者相關程式、資料搬過去就好。
This is highly
recommended if you have been tracking -STABLE for more
than one release, or have updated a release instead of
installing a new one. You can install booteasy on both
disks with &man.boot0cfg.8;, and dual boot them until
you are happy with the new configuration. Skip the
next paragraph to find out how to move the data after
doing this.</para>
<para>Should you decide not to do a fresh install, you
need to partition and label the new disk with either
<filename>sysinstall</filename>(&os; 5.2 之前版本則是 <command>/stand/sysinstall</command>), or &man.fdisk.8;
and &man.disklabel.8;. You should also install booteasy
on both disks with &man.boot0cfg.8;, so that you can
dual boot to the old or new system after the copying
is done.</para>
<para>Now you have the new disk set up, and are ready
to move the data. Unfortunately, you cannot just blindly
copy the data. Things like device files (in
<filename>/dev</filename>), flags, and links tend to
screw that up. You need to use tools that understand
these things, which means &man.dump.8;.
Although it is suggested that you move the data in single user
mode, it is not required.</para>
<para>You should never use anything but &man.dump.8; and
&man.restore.8; to move the root filesystem. The
&man.tar.1; command may work - then again, it may not.
You should also use &man.dump.8; and &man.restore.8;
if you are moving a single partition to another empty
partition. The sequence of steps to use dump to move
a partitions data to a new partition is:</para>
<procedure>
<step>
<para>newfs the new partition.</para>
</step>
<step>
<para>mount it on a temporary mount point.</para>
</step>
<step>
<para>cd to that directory.</para>
</step>
<step>
<para>dump the old partition, piping output to the
new one.</para>
</step>
</procedure>
<para>For example, if you are going to move root to
<devicename>/dev/ad1s1a</devicename>, with
<filename>/mnt</filename> as the temporary mount point,
it is:</para>
<screen>&prompt.root; <userinput>newfs /dev/ad1s1a</userinput>
&prompt.root; <userinput>mount /dev/ad1s1a /mnt</userinput>
&prompt.root; <userinput>cd /mnt</userinput>
&prompt.root; <userinput>dump 0af - / | restore xf -</userinput></screen>
<para>Rearranging your partitions with dump takes a bit more
work. To merge a partition like <filename>/var</filename>
into its parent, create the new partition large enough
for both, move the parent partition as described above,
then move the child partition into the empty directory
that the first move created:</para>
<screen>&prompt.root; <userinput>newfs /dev/ad1s1a</userinput>
&prompt.root; <userinput>mount /dev/ad1s1a /mnt</userinput>
&prompt.root; <userinput>cd /mnt</userinput>
&prompt.root; <userinput>dump 0af - / | restore xf -</userinput>
&prompt.root; <userinput>cd var</userinput>
&prompt.root; <userinput>dump 0af - /var | restore xf -</userinput></screen>
<para>To split a directory from its parent, say putting
<filename>/var</filename> on its own partition when it was not
before, create both partitions, then mount the child partition
on the appropriate directory in the temporary mount point, then
move the old single partition:</para>
<screen>&prompt.root; <userinput>newfs /dev/ad1s1a</userinput>
&prompt.root; <userinput>newfs /dev/ad1s1d</userinput>
&prompt.root; <userinput>mount /dev/ad1s1a /mnt</userinput>
&prompt.root; <userinput>mkdir /mnt/var</userinput>
&prompt.root; <userinput>mount /dev/ad1s1d /mnt/var</userinput>
&prompt.root; <userinput>cd /mnt</userinput>
&prompt.root; <userinput>dump 0af - / | restore xf -</userinput></screen>
<para>You might prefer &man.cpio.1;, &man.pax.1;,
&man.tar.1; to &man.dump.8; for user data. At the time of
this writing, these are known to lose file flag information,
so use them with caution.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="dangerously-dedicated">
<para>Will a <quote>dangerously dedicated</quote> disk endanger
my health?</para>
</question>
<answer>
<para><anchor id="dedicate"/>The installation procedure allows
you to chose two different methods in partitioning your
hard disk(s). The default way makes it compatible with other
operating systems on the same machine, by using fdisk table
entries (called <quote>slices</quote> in FreeBSD), with a
FreeBSD slice that employs partitions of its own. Optionally,
one can chose to install a boot-selector to switch between the
possible operating systems on the disk(s). The alternative uses
the entire disk for FreeBSD, and makes no attempt to be
compatible with other operating systems.</para>
<para>So why it is called <quote>dangerous</quote>? A disk
in this mode does not contain what normal PC utilities
would consider a valid fdisk table. Depending on how well
they have been designed, they might complain at you once
they are getting in contact with such a disk, or even
worse, they might damage the BSD bootstrap without even
asking or notifying you. In addition, the
<quote>dangerously dedicated</quote> disk's layout is
known to confuse many BIOSes, including those from AWARD
(e.g. as found in HP Netserver and Micronics systems as
well as many others) and Symbios/NCR (for the popular
53C8xx range of SCSI controllers). This is not a complete
list, there are more. Symptoms of this confusion include
the <errorname>read error</errorname> message printed by
the FreeBSD bootstrap when it cannot find itself, as well
as system lockups when booting.</para>
<para>Why have this mode at all then? It only saves a few kbytes
of disk space, and it can cause real problems for a new
installation. <quote>Dangerously dedicated</quote> mode's
origins lie in a desire to avoid one of the most common
problems plaguing new FreeBSD installers - matching the BIOS
<quote>geometry</quote> numbers for a disk to the disk
itself.</para>
<para><quote>Geometry</quote> is an outdated concept, but one
still at the heart of the PC's BIOS and its interaction with
disks. When the FreeBSD installer creates slices, it has to
record the location of these slices on the disk in a fashion
that corresponds with the way the BIOS expects to find them. If
it gets it wrong, you will not be able to boot.</para>
<para><quote>Dangerously dedicated</quote> mode tries to work
around this by making the problem simpler. In some cases, it
gets it right. But it is meant to be used as a last-ditch
alternative - there are better ways to solve the problem 99
times out of 100.</para>
<para>So, how do you avoid the need for <quote>DD</quote> mode
when you are installing? Start by making a note of the geometry
that your BIOS claims to be using for your disks. You can
arrange to have the kernel print this as it boots by specifying
<option>-v</option> at the <literal>boot:</literal> prompt, or
using <command>boot -v</command> in the loader. Just before the
installer starts, the kernel will print a list of BIOS
geometries. Do not panic - wait for the installer to start and
then use scrollback to read the numbers. Typically the BIOS
disk units will be in the same order that FreeBSD lists your
disks, first IDE, then SCSI.</para>
<para>When you are slicing up your disk, check that the disk
geometry displayed in the FDISK screen is correct (ie. it
matches the BIOS numbers); if it is wrong, use the
<keycap>g</keycap> key to fix it. You may have to do this if
there is absolutely nothing on the disk, or if the disk has been
moved from another system. Note that this is only an issue with
the disk that you are going to boot from; FreeBSD will sort
itself out just fine with any other disks you may have.</para>
<para>Once you have got the BIOS and FreeBSD agreeing about the
geometry of the disk, your problems are almost guaranteed to be
over, and with no need for <quote>DD</quote> mode at all. If,
however, you are still greeted with the dreaded <errorname>read
error</errorname> message when you try to boot, it is time to cross
your fingers and go for it - there is nothing left to
lose.</para>
<para>To return a <quote>dangerously dedicated</quote> disk
for normal PC use, there are basically two options. The first
is, you write enough NULL bytes over the MBR to make any
subsequent installation believe this to be a blank disk. You
can do this for example with</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda0 count=15</userinput></screen>
<para>Alternatively, the undocumented DOS
<quote>feature</quote></para>
<screen><prompt>C:\></prompt> <userinput>fdisk /mbr</userinput></screen>
<para>will to install a new master boot record as well, thus
clobbering the BSD bootstrap.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="safe-softupdates">
<para>Which partitions can safely use Soft Updates? I have
heard that Soft Updates on <filename>/</filename> can cause
problems.</para>
</question>
<answer>
<para>Short answer: you can usually use Soft Updates safely
on all partitions.</para>
<para>Long answer: There used to be some concern over using
Soft Updates on the root partition. Soft Updates has two
characteristics that caused this. First, a Soft Updates
partition has a small chance of losing data during a
system crash. (The partition will not be corrupted; the
data will simply be lost.) Also, Soft Updates can cause
temporary space shortages.</para>
<para>When using Soft Updates, the kernel can take up to
thirty seconds to actually write changes to the physical
disk. If you delete a large file, the file still resides
on disk until the kernel actually performs the deletion.
This can cause a very simple race condition. Suppose you
delete one large file and immediately create another large
file. The first large file is not yet actually removed
from the physical disk, so the disk might not have enough
room for the second large file. You get an error that the
partition does not have enough space, although you know
perfectly well that you just released a large chunk of
space! When you try again mere seconds later, the file
creation works as you expect. This has left more than one
user scratching his head and doubting his sanity, the
FreeBSD filesystem, or both.</para>
<para>If a system should crash after the kernel accepts a
chunk of data for writing to disk, but before that data is
actually written out, data could be lost or corrupted.
This risk is extremely small, but generally manageable.
Use of IDE write caching greatly increases this risk; it
is strongly recommended that you disable IDE write caching
when using Soft Updates.</para>
<para>These issues affect all partitions using Soft Updates.
So, what does this mean for the root partition?</para>
<para>Vital information on the root partition changes very
rarely. Files such as <filename>/kernel</filename> and
the contents of <filename>/etc</filename> only change
during system maintenance, or when users change their
passwords. If the system crashed during the
thirty-second window after such a change is made, it is
possible that data could be lost. This risk is negligible
for most applications, but you should be aware that it
exists. If your system cannot tolerate this much risk,
do not use Soft Updates on the root filesystem!</para>
<para><filename>/</filename> is traditionally one of the
smallest partitions. By default, FreeBSD puts the
<filename>/tmp</filename> directory on
<filename>/</filename>. If you have a busy
<filename>/tmp</filename>, you might see intermittent
space problems. Symlinking <filename>/tmp</filename> to
<filename>/var/tmp</filename> will solve this
problem.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="inappropriate-ccd">
<para>What is inappropriate about my ccd?</para>
</question>
<answer>
<para>The symptom of this is:</para>
<screen>&prompt.root; <userinput>ccdconfig -C</userinput>
ccdconfig: ioctl (CCDIOCSET): /dev/ccd0c: Inappropriate file type or format</screen>
<para>This usually happens when you are trying to concatenate
the <literal>c</literal> partitions, which default to type
<literal>unused</literal>. The ccd driver requires the
underlying partition type to be FS_BSDFFS. Edit the disklabel
of the disks you are trying to concatenate and change the types
of partitions to <literal>4.2BSD</literal>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="ccd-disklabel">
<para>Why can I not edit the disklabel on my ccd?</para>
</question>
<answer>
<para>The symptom of this is:</para>
<screen>&prompt.root; <userinput>disklabel ccd0</userinput>
(it prints something sensible here, so let us try to edit it)
&prompt.root; <userinput>disklabel -e ccd0</userinput>
(edit, save, quit)
disklabel: ioctl DIOCWDINFO: No disk label on disk;
use "disklabel -r" to install initial label</screen>
<para>This is because the disklabel returned by ccd is actually
a <quote>fake</quote> one that is not really on the disk.
You can solve this problem by writing it back explicitly,
as in:</para>
<screen>&prompt.root; <userinput>disklabel ccd0 > /tmp/disklabel.tmp</userinput>
&prompt.root; <userinput>disklabel -Rr ccd0 /tmp/disklabel.tmp</userinput>
&prompt.root; <userinput>disklabel -e ccd0</userinput>
(this will work now)</screen>
</answer>
</qandaentry>
<qandaentry>
<question id="mount-foreign-fs">
<para>Can I mount other foreign filesystems under FreeBSD?</para>
</question>
<answer>
<para>FreeBSD supports a variety of other
filesystems.</para>
<variablelist>
<varlistentry>
<term>Digital UNIX</term>
<listitem>
<para>UFS CDROMs can be mounted directly on FreeBSD.
Mounting disk partitions from Digital UNIX and other
systems that support UFS may be more complex, depending
on the details of the disk partitioning for the operating
system in question.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>&linux;</term>
<listitem>
<para>FreeBSD supports <literal>ext2fs</literal>
partitions. See &man.mount.ext2fs.8; for more
information.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>&windowsnt;</term>
<listitem>
<para>FreeBSD includes a read-only NTFS driver. For
more information, see &man.mount.ntfs.8;.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>FAT</term>
<listitem>
<para>FreeBSD includes a read-write FAT driver. For
more information, see &man.mount.msdosfs.8;.</para>
</listitem>
</varlistentry>
</variablelist>
<para>FreeBSD also supports network filesystems such as NFS
(see &man.mount.nfs.8;), NetWare (see &man.mount.nwfs.8;),
and Microsoft-style SMB filesystems (see
&man.mount.smbfs.8;).</para>
</answer>
</qandaentry>
<qandaentry>
<question id="mount-dos">
<para>How do I mount a secondary DOS partition?</para>
</question>
<answer>
<para>The secondary DOS partitions are found after ALL the
primary partitions. For example, if you have an
<quote>E</quote> partition as the second DOS partition on
the second SCSI drive, you need to create the special files
for <quote>slice 5</quote> in <filename>/dev</filename>,
then mount <devicename>/dev/da1s5</devicename>:</para>
<screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV da1s5</userinput>
&prompt.root; <userinput>mount -t msdos /dev/da1s5 /dos/e</userinput></screen>
<note>
<para>You can omit this step if you are running FreeBSD
5.0-RELEASE or newer with &man.devfs.5;
enabled.</para>
</note>
</answer>
</qandaentry>
<qandaentry>
<question id="crypto-filesystem">
<para>&os; 有檔案加密系統嗎?</para>
</question>
<answer>
<para>有啊! FreeBSD 5.0 起內建 &man.gbde.8;,而 FreeBSD 6.0
又加上 &man.geli.8;。 而較早期的版本,請多利用 <filename
role="package">security/cfs</filename> port,謝謝。</para>
</answer>
</qandaentry>
<qandaentry>
<question id="nt-bootloader">
<para>How can I use the &windowsnt; loader to boot FreeBSD?</para>
</question>
<answer>
<para>The general idea is that you copy the first sector of your
native root FreeBSD partition into a file in the DOS/&windowsnt;
partition. Assuming you name that file something like
<filename>c:\bootsect.bsd</filename> (inspired by
<filename>c:\bootsect.dos</filename>), you can then edit the
<filename>c:\boot.ini</filename> file to come up with something
like this:</para>
<programlisting>[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT"
C:\BOOTSECT.BSD="FreeBSD"
C:\="DOS"</programlisting>
<para>If FreeBSD is installed on the same disk as the &windowsnt; boot
partition simply copy <filename>/boot/boot1</filename> to
<filename>C:\BOOTSECT.BSD</filename>. However, if FreeBSD is
installed on a different disk <filename>/boot/boot1</filename>
will not work, <filename>/boot/boot0</filename> is needed.</para>
<para><filename>/boot/boot0</filename> needs to be installed
using sysinstall(&os; 5.2 之前版本則是 <command>/stand/sysinstall</command>) by selecting the FreeBSD boot manager on
the screen which asks if you wish to use a boot
manager. This is because <filename>/boot/boot0</filename>
has the partition table area filled with NULL characters
but sysinstall copies the partition table before copying
<filename>/boot/boot0</filename> to the MBR.</para>
<warning>
<para><emphasis>Do not simply copy <filename>/boot/boot0</filename>
instead of <filename>/boot/boot1</filename>; you will
overwrite your partition table and render your computer
un-bootable!</emphasis></para>
</warning>
<para>When the FreeBSD boot manager runs it records the last
OS booted by setting the active flag on the partition table
entry for that OS and then writes the whole 512-bytes of itself
back to the MBR so if you just copy
<filename>/boot/boot0</filename> to
<filename>C:\BOOTSECT.BSD</filename> then it writes an empty
partition table, with the active flag set on one entry, to the
MBR.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="lilo-bootloader">
<para>How do I boot FreeBSD and &linux; from LILO?</para>
</question>
<answer>
<para>If you have FreeBSD and &linux; on the same disk, just follow
LILO's installation instructions for booting a non-&linux;
operating system. Very briefly, these are:</para>
<para>Boot &linux;, and add the following lines to
<filename>/etc/lilo.conf</filename>:</para>
<programlisting>other=/dev/hda2
table=/dev/hda
label=FreeBSD</programlisting>
<para>(the above assumes that your FreeBSD slice is known to
&linux; as <devicename>/dev/hda2</devicename>; tailor to
suit your setup). Then, run <command>lilo</command> as
<username>root</username> and you should be done.</para>
<para>If FreeBSD resides on another disk, you need to add
<literal>loader=/boot/chain.b</literal> to the LILO entry.
For example:</para>
<programlisting>other=/dev/dab4
table=/dev/dab
loader=/boot/chain.b
label=FreeBSD</programlisting>
<para>In some cases you may need to specify the BIOS drive number
to the FreeBSD boot loader to successfully boot off the second
disk. For example, if your FreeBSD SCSI disk is probed by BIOS
as BIOS disk 1, at the FreeBSD boot loader prompt you need to
specify:</para>
<screen>Boot: <userinput>1:da(0,a)/kernel</userinput></screen>
<para>You can configure
&man.boot.8;
to automatically do this for you at boot time.</para>
<para>The <ulink
url="http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+FreeBSD.html">
&linux;+FreeBSD mini-HOWTO</ulink> is a good reference for
FreeBSD and &linux; interoperability issues.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="booteasy-loader">
<para>How do I boot FreeBSD and &linux; using BootEasy?</para>
</question>
<answer>
<para>Install LILO at the start of your &linux; boot partition
instead of in the Master Boot Record. You can then boot LILO
from BootEasy.</para>
<para>If you are running &windows; 95 and &linux; this is recommended
anyway, to make it simpler to get &linux; booting again if you
should need to reinstall &windows; 95 (which is a Jealous
Operating System, and will bear no other Operating Systems in
the Master Boot Record).</para>
</answer>
</qandaentry>
<qandaentry>
<question id="changing-bootprompt">
<para>How do I change the boot prompt from <literal>???</literal> to
something more meaningful?</para>
</question>
<answer>
<para>You can not do that with the standard boot manager without
rewriting it. There are a number of other boot managers
in the <filename>sysutils</filename> ports category that
provide this functionality.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="removable-drives">
<para>I have a new removable drive, how do I use it?</para>
</question>
<answer>
<para>Whether it is a removable drive like a &iomegazip; or an EZ drive
(or even a floppy, if you want to use it that way), or a new
hard disk, once it is installed and recognized by the system,
and you have your cartridge/floppy/whatever slotted in, things
are pretty much the same for all devices.</para>
<para>(this section is based on <ulink
url="http://www.vmunix.com/mark/FreeBSD/ZIP-FAQ.html">
Mark Mayo's ZIP FAQ</ulink>)</para>
<para>If it is a ZIP drive or a floppy, you have already got a DOS
filesystem on it, you can use a command like this:</para>
<screen>&prompt.root; <userinput>mount -t msdos /dev/fd0c /floppy</userinput></screen>
<para>if it is a floppy, or this:</para>
<screen>&prompt.root; <userinput>mount -t msdos /dev/da2s4 /zip</userinput></screen>
<para>for a ZIP disk with the factory configuration.</para>
<para>For other disks, see how they are laid out using
&man.fdisk.8; or
&man.sysinstall.8;.</para>
<para>The rest of the examples will be for a ZIP drive on da2,
the third SCSI disk.</para>
<para>Unless it is a floppy, or a removable you plan on sharing
with other people, it is probably a better idea to stick a BSD
filesystem on it. You will get long filename support, at least a
2X improvement in performance, and a lot more stability. First,
you need to redo the DOS-level partitions/filesystems. You can
either use &man.fdisk.8; or
<filename>sysinstall</filename>(&os; 5.2 之前版本則是 <command>/stand/sysinstall</command>), or for a small drive
that you do not want to bother with multiple operating system
support on, just blow away the whole FAT partition table
(slices) and just use the BSD partitioning:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda2 count=2</userinput>
&prompt.root; <userinput>disklabel -Brw da2 auto</userinput></screen>
<para>You can use disklabel or
<filename>sysinstall</filename> to create multiple BSD
partitions. You will certainly want to do this if you are adding
swap space on a fixed disk, but it is probably irrelevant on a
removable drive like a ZIP.</para>
<para>Finally, create a new filesystem, this one is on our ZIP
drive using the whole disk:</para>
<screen>&prompt.root; <userinput>newfs /dev/rda2c</userinput></screen>
<para>and mount it:</para>
<screen>&prompt.root; <userinput>mount /dev/da2c /zip</userinput></screen>
<para>and it is probably a good idea to add a line like this
to <filename>/etc/fstab</filename> (see &man.fstab.5;) so
you can just type <command>mount /zip</command> in the
future:</para>
<programlisting>/dev/da2c /zip ffs rw,noauto 0 0</programlisting>
</answer>
</qandaentry>
<qandaentry>
<question id="mount-cd-superblock">
<para>Why do I get <errorname>Incorrect super block</errorname> when
mounting a CDROM?</para>
</question>
<answer>
<para>You have to tell &man.mount.8; the type of the device
that you want to mount. This is described in the <ulink
url="&url.books.handbook;/creating-cds.html"> Handbook section on
optical media</ulink>, specifically the section <ulink
url="&url.books.handbook;/creating-cds.html#MOUNTING-CD">Using Data
CDs</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="cdrom-not-configured">
<para>Why do I get <errorname>Device not
configured</errorname> when mounting a CDROM?</para>
</question>
<answer>
<para>This generally means that there is no CDROM in the
CDROM drive, or the drive is not visible on the
bus. Please see the <ulink
url="&url.books.handbook;/creating-cds.html#MOUNTING-CD">Using Data
CDs</ulink> section of the Handbook for a detailed
discussion of this issue.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="cdrom-unicode-filenames">
<para>Why do all non-English characters in filenames show up as
<quote>?</quote> on my CDs when mounted in FreeBSD?</para>
</question>
<answer>
<para>Your CDROM probably uses the <quote>Joliet</quote>
extension for storing information about files and
directories. This is discussed in the Handbook chapter on
<ulink url="&url.books.handbook;/creating-cds.html">creating and
using CDROMs</ulink>, specifically the section on <ulink
url="&url.books.handbook;/creating-cds.html#MOUNTING-CD">Using Data
CDROMs</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="burncd-isofs">
<para>I burned a CD under FreeBSD and now I can not read it
under any other operating system. Why?</para>
</question>
<answer>
<para>You most likely burned a raw file to your CD, rather
than creating an ISO 9660 filesystem. Take a look at the
<ulink url="&url.books.handbook;/creating-cds.html">Handbook
chapter on creating CDROMs</ulink>, particularly the
section on <ulink
url="&url.books.handbook;/creating-cds.html#RAWDATA-CD">burning raw
data CDs</ulink>.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="copy-cd">
<para>How can I create an image of a data CD?</para>
</question>
<answer>
<para>This is discussed in the Handbook section on <ulink
url="&url.books.handbook;/creating-cds.html#IMAGING-CD">duplicating
data CDs</ulink>. For more on working with CDROMs, see the
<ulink url="&url.books.handbook;/creating-cds.html">Creating CDs
Section</ulink> in the Storage chapter in the
Handbook.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="mount-audio-CD">
<para>Why can I not <command>mount</command> an audio
CD?</para>
</question>
<answer>
<para>If you try to mount an audio CD, you will get an error
like <errorname>cd9660: /dev/acd0c: Invalid
argument</errorname>. This is because
<command>mount</command> only works on filesystems. Audio
CDs do not have filesystems; they just have data. You
need a program that reads audio CDs, such as the
<filename role="package">audio/xmcd</filename> port.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="multi-session-CD">
<para>How do I <command>mount</command> a multi-session CD?</para>
</question>
<answer>
<para>By default, &man.mount.8; will attempt to mount the
last data track (session) of a CD. If you would like to
load an earlier session, you must use the
<option>-s</option> command line argument. Please see
&man.mount.cd9660.8; for specific examples.</para>
</answer>
</qandaentry>
<qandaentry>
<question id="user-floppymount">
<para>How do I let ordinary users mount floppies, CDROMs and
other removable media?</para>
</question>
<answer>
<para>Ordinary users can be permitted to mount devices. Here is
how:</para>
<procedure>
<step>
<para>As <username>root</username> set the sysctl variable
<varname>vfs.usermount
|