Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

   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
.\"	$NetBSD: sysinst,v 1.107.6.3 2019/11/27 13:36:55 msaitoh Exp $
.\"
.\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.
.
.
.\" Define strings for partition references:
.\"	\*[part_raw]	`raw' partition (usually `c' or `d')
.\"	\*[part_free]	first "free" partition (usually part_raw+1)
.\"	\*[part_usr]	default "/usr" partition (usually part_free)
.\"	\*[part_max]	last partition (usually `h' or `p')
.
.ds part_raw c
.ds part_free d
.ds part_usr d
.ds part_max h
.if \n[arc]:\n[bebox]:\n[cobalt]:\n[hpcarm]:\n[hpcmips]:\n[i386]:\
\n[sbmips]:\n[sh3eb]:\n[sh3el]:\n[x86_64] \{\
.  ds part_raw d
.  ds part_free e
.  ds part_usr e
.\}
.if \n[sgimips] \{\
.  ds part_free e
.  ds part_usr e
.\}
.if \n[amiga]:\n[amigappc]:\n[arc]:\n[atari]:\n[cobalt]:\n[evbmips]:\
\n[evbppc]:\n[hppa]:\n[hpcmips]:\n[i386]:\n[macppc]:\n[ofppc]:\
\n[playstation2]:\n[sandpoint]:\n[sbmips]:\n[sgimips]:\n[x86_64] \{\
.  ds part_max p
.\}
.if \n[acorn32]:\n[cats]:\n[evbarm]:\n[evbppc]:\n[ews4800mips]:\
\n[sandpoint]:\n[shark] \{\
.  ds part_usr e
.\}
.if \n[macppc]:\n[news68k]:\n[newsmips]:\n[sparc]:\n[sparc64] \{\
.  ds part_usr g
.\}
.if \n[arc] \{\
.  ds part_raw d
.  ds part_usr f
.  ds part_free g
.\}
.
.
.Ss2 Running the sysinst installation program
.(enum
.To 2 Introduction
.Em Introduction
.Pp
Using
.Ic sysinst ,
installing
.Nx
is a relatively easy process.
Still, you should read this document and have it available during the
installation process.
This document tries to be a good guide to the installation, and as such,
covers many details for the sake of completeness.
Do not let this discourage you; the install program is not hard
to use.
.
.if !\n[acorn32]:\n[atari]:\n[ews4800mips]:\n[hppa]:\n[mac68k]:\n[macppc]:\n[mvme68k]:\n[news68k]:\n[newsmips]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[sparc64]:\n[x68k] \{\
.It
.To 2 "Possible hardware problems"
.Em Possible hardware problems
.Pp
Should you encounter hardware problems during installation, try
rebooting after unplugging removable devices you don't need for
installation.
Non-removable devices can be disabled with
.Ic userconf
(use
.Ic boot
.Fl c
to enter it).
.\} \" !\n[acorn32]:\n[atari]:\n[ews4800mips]:\n[hppa]:\n[mac68k]\:[macppc]:\n[mvme68k]:\n[news68k]:\n[newsmips]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[sparc64]:\n[x68k]
.if \n[mac68k] \{\
.It
.To 2 "Possible hardware-specific issues"
.Em Possible hardware-specific issues
.(bullet
.Em SCSI driver problems
.Pp
The SCSI driver used in the kernel on many older Macintosh systems is, by
default, the ncrscsi driver.
It contains a recognized but as yet unfixed bug that affects some
disk drive/controller combinations, usually Quantum disks.
Under heavy load these systems may hang or corrupt
the file system; or, you may experience frequent
.Em Segmentation fault
and
.Em Illegal instruction
errors that may or may not be consistently repeatable.
This latter condition is particularly prevalent on systems with
minimal RAM installed.
.Pp
If either of these problems occur on your system you are advised to use the
SBC variants of the Kernel and Installation Kernel.
However, be aware that this issue does not affect
e.g. Centris or Quadra systems.
.Pp
.It
.Em The 68LC040 processor
.Pp
.Nx
has known but unresolved problems running on the 68LC040 processor, the
variant of the 68040 that does not contain the floating point unit (FPU).
The kernel is thus forced to emulate the missing operations in software.
Unfortunately the 68LC040 processor has a design problem that causes
the emulation to fail intermittently.
We hope to provide a solution for this issue in a future
.Nx
release.
.Pp
Software emulation of floating point operations is
not a problem on the 68020 and 68030 processors.
.bullet)
.\} \" \n[mac68k]
.It
.To 2 General
.Em General
.Pp
The following is a walk-through of the steps you will take while
installing
.Nx
on your hard disk.
.Ic sysinst
is a menu driven program that guides you through the installation process.
Sometimes questions will be asked, and in many cases
the default answer will be displayed in brackets
.Pq Dq \&[\ ]
after the question.
If you wish to stop the installation, you may press
.Key CONTROL-C
at any time, but if you do, you'll have to begin the installation
process again from scratch by running the
.Pa /sysinst
program from the command prompt.
It is not necessary to reboot.
.It
.To 2 "Quick install"
.Em Quick install
.Pp
First, let's describe a quick install.
The other sections of this document go into the installation procedure in more
detail, but you may find that you do not need this.
If you want detailed instructions, skip to the next section.
This section describes a basic installation, using a CD / DVD
.if \n[i386]:\n[amd64] (or USB stick)
as the install media.
.Pp
.(bullet
What you need.
.(bullet
The distribution sets (in this example, they are on the CD or DVD).
.if !\n[alpha]:\n[amd64]:\n[i386]:\n[pmax]:\n[sgimips]:\n[sparc64] \{\
.It
.ie \n[ews4800mips] Two floppy disks.
.el \{\
.ie \n[hppa] \{\
The
.Pa netinstall.lif
volume on a netboot server as described above.
.\}
.el \{\
.ie \n[mac68k] The Mac OS Booter application and an Installation Kernel
.el \{\
.ie \n[arc]:\n[cats]:\n[evbppc]:\n[macppc]:\n[sparc] \{\
Some form of bootable media, described above.
.\}
.el \{\
.ie \n[atari] \{\
A floppy disk containing a suitable boot.fs and a floppy with the
sysinst.fs image.
See the "prepare" section about obtaining those.
.\}
.el One 1.44 MB 3.5" floppy.
.\}\}\}\}
.\} \" !\n[alpha]:\n[i386]:\n[pmax]:\n[sgimips]:\n[sparc64]
.if \n[mac68k] \{\
.It
A Macintosh with a 68020 and MMU, 68030 or 68RC040 processor.
An FPU is not required but will be used if present
(but see the note above regarding the 68LC040).
.\}
.ie !\n[amd64] \{\
.It
A minimum of
.if \n[alpha] 32 MB
.if \n[arc] 16 MB
.if \n[atari] 4 MB (TT030/Falcon) or 16 MB (Hades/Milan)
.if \n[cats] 8 MB
.if \n[ews4800mips] 16 MB
.if \n[hppa] 32 MB
.if \n[i386] 32 MB
.if \n[mac68k] 8 MB
.if \n[macppc] 16 MB
.if \n[mvme68k] 4 MB
.if \n[news68k] 4 MB
.if \n[newsmips] 16 MB
.if \n[pmax] 8 MB
.if \n[sparc] 4 MB
.if \n[sparc64] 32 MB
.if \n[sgimips] 16 MB
of memory installed.
\}
.It
An optical drive.
.It
A hard drive with at least
.if \n[acorn32] 500
.if \n[alpha] 700
.if \n[amd64] 700
.if \n[amiga] 500
.if \n[arc] 600
.if \n[atari] 500
.if \n[bebox] 600
.if \n[cats] 500
.if \n[emips] 600
.if \n[evbarm] 500
.if \n[evbppc] 600
.if \n[ews4800mips] 600
.if \n[hp300] 500
.if \n[hpcarm] 500
.if \n[hpcmips] 600
.if \n[hpcsh] 500
.if \n[hppa] 600
.if \n[i386] 600
.if \n[landisk] 500
.if \n[mac68k] 500
.if \n[macppc] 600
.if \n[mmeye] 500
.if \n[mvme68k] 500
.if \n[news68k] 500
.if \n[newsmips] 600
.if \n[next68k] 500
.if \n[ofppc] 600
.if \n[pmax] 600
.if \n[prep] 600
.if \n[rs6000] 600
.if \n[sandpoint] 600
.if \n[sgimips] 600
.if \n[shark] 500
.if \n[sparc] 500
.if \n[sparc64] 700
.if \n[sun3] 500
.if \n[vax] 500
.if \n[x68k] 500
MB of free space for a complete base install, not including room for swap.
If you wish to install the X Window System as well, you will need at least
225 MB more.
.bullet)
.if \n[ews4800mips]:\n[news68k]:\n[newsmips] \{\
.It
Creating the boot floppies.
You can create the floppies needed for installation
under
.Tn MS-DOS
or
.Tn Windows .
Supposing your 1.44 MB floppy
drive is drive A:, and your CD is drive E: do the
following from an
.Tn MS-DOS
command prompt:
.Pp
.Dl Ic "e:"
.Dl Ic "cd \eNetBSD-\*V\ei386\einstallation\emisc"
.Dl Ic "rawrite"
.Pp
When asked for a source filename, answer
.if \n[ews4800mips]:\n[newsmips] \{\
.Dl Pa \&..\efloppy\eboot1.fs
for the first diskette and
.Dl Pa \&..\efloppy\eboot2.fs
for the second diskette.
.\}
.if \n[news68k] .Dl Pa \eNetBSD-\*V\e\*M\einstallation\efloppy\eboot.fs
.Pp
When asked for a destination drive answer
.Sq Ic a .
.It
To create a bootfloppy under
.Nx
or other
.Ul
system, you would type something like:
.Pp
.Dl # Ic "dd if=.../boot1.fs of=/dev/rfd0a bs=18k"
.Pp
.\} \" \n[ews4800mips]:\n[news68k]:\n[newsmips]
.if \n[mac68k] \{\
.It
The NetBSD Boot Tools folder.
.(bullet
Create a Folder on your Mac OS disk for the
.Nx*M
components.
.It
Copy the Booter application into the newly created Folder.
Expand the file if necessary to create the Mac OS executable.
.It
Copy the Installation Kernels into the newly created Folder.
It is not necessary to
.Ic gunzip
compressed kernel files.
.It
Single-click on the Booter application icon then select the "Get Info"
from the File Menu list.
Increase the memory allocation for the Booter to as much as possible
for your system.
Having a large number of fonts, extensions or sounds installed on your system
can cause memory exhaustion problems for the Booter if you don't do this.
Also, the extra memory is needed by the Booter to expand compressed
kernels while booting.
.bullet)
.\}
.It
The Quick Installation
.(bullet
.ie \n[atari]:\n[cats]:\n[evbppc]:\n[hppa]:\n[macppc]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[sparc64] \{\
Boot the system as described above.
You should be at the
.Ic sysinst
main menu.
.\}
.el \{\
.ie \n[mac68k] \{\
Double-click on the Booter application icon to start executing it.
From the
.Ic Options
pull-down menu, select
.Ic Monitors ,
then select
.Ic Change Monitor Depth
and make sure B\*[Am]W is highlighted.
Close the window using the
.Ic Close
button.
.It
From the
.Ic Options
pull-down menu select
.Ic Boot Options .
This will bring
up an option panel.
Set the
.Ic Auto-set GMT Bias
checkbox in the lower left and then select the
.Ic Boot from Mac OS
option at the top of the window.
The
.Ic Set
button on the right will become active.
Use it to locate and
select the Installation Kernel file appropriate for your hardware.
This will be either
.Pa netbsd-INSTALL.gz
or
.Pa netbsd-INSTALLSBC.gz .
Close the window using the
.Ic Close
button.
.It
From the
.Ic Options
pull-down menu select the
.Ic Boot Now ,
or use the Apple-B (Command-B) key combination to start the
.Nx
boot process.
Do not move the mouse while the boot operation is in
progress as this may leave the keyboard locked to
.Nx .
.Pp
The main menu will be displayed.
.\} \" \n[mac68k]
.ie \n[alpha]:\n[amd64]:\n[i386] \{\
Insert the CD into the drive
.if \n[amd64]:\n[i386] \{\
or the USB memstick into an available USB port
.\}
and boot the computer from it.
.if \n[alpha] \{\
Type
.Pp
.Dl \&\*[Gt]\*[Gt]\*[Gt] Ic "B DQA0"
.(Note
This is only an example, and
.Dv DQA0
may not be the proper device, depending on your hardware configuration.
.Note)
.\}
.\}
.el \{\
Insert the first boot floppy you just created and boot the computer.
.if \n[ews4800mips] \{\
Change boot device to floppy on the PROM menu which is invoked by
pressing ESC key right after hardware checks, and boot the computer again.
.\}
.if \n[news68k] \{\
Type
.Pp
.Dl \&NEWS\*[Gt] Ic "bo fh"
.Pp
.\}
.if \n[newsmips] \{\
Type
.Pp
.Dl \&\*[Gt] Ic "bo fd" (in case of NWS-5000)
.Pp
or
.Pp
.Dl \&\*[Gt] Ic "bo fh" (in case of NWS-3xxx)
.Pp
.\}
After language selection, the main menu will be displayed.
.\}\}
.(disp
.if t .ne 10
. cs \n(.f 22
.\" )   - appease vi showmatch
  .***********************************************.
                                                  *\h'|0'  * NetBSD-\*V Install System
  *                                               *
  *\*[Gt]a: Install NetBSD to hard disk                *
  * b: Upgrade NetBSD on a hard disk              *
  * c: Re-install sets or install additional sets *
  * d: Reboot the computer                        *
  * e: Utility menu                               *
  * f: Config menu                                *
  * x: Exit Install System                        *
  .***********************************************.
. cs \n(.f
.\" )   - appease vi showmatch
.disp)
.It
If you wish, you can configure some network settings
immediately by choosing the
.Me Utility menu
and then
.Me Configure network .
It isn't actually required at this point, but
it may be more convenient.
Go back to the main menu.
.It
Choose
.if !\n[macppc] .Me Install .
.if \n[macppc] \{\
.Me "Utility menu" No then Me "Run /bin/sh"
for Open Firmware 3 systems.
You'll need to create the
.Nx
filesystem(s) and an
.Pa fstab .
Now exit the shell, return to the main menu, and choose
.Me "Re-install" .
.Pp
Choose
.Me Install
for Open Firmware 1.0.5, 1.1.22, 2.0.x, and 2.4 systems.
.\}
.It
You will be guided through the setup of your disk.
.It
You will be asked to choose which distribution sets to install.
.if \n[atari] \{\
WARNING: If you want your disk to retain an AHDI compatible partitioning,
make sure to use the 'existing' disk layout.
.\}
.if \n[sparc64] \{\
.Pp
WARNING: If you are installing onto a disk which you want to use with
.Tn Solaris ,
stop here.
You will need to perform a manual installation as
.Ic sysinst
overwrites the
.Tn Solaris
partition table.
See the section on
.Sx "Manual Installation of NetBSD using Solaris"
.\}
.It
When prompted, choose
.Me CD-ROM
as the install medium if booted from CD-ROM.
The default values for the path and device should be ok.
.if \n[amd64]:\n[i386] \{\
If you booted using a USB image, choose
.Me Local directory .
.\}
.It
After the installation process has completed, you will be brought back to
the main menu, where you should select
.ie \n[alpha]:\n[amd64]:\n[i386]:\n[mac68k]:\n[macppc]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[sparc64] \{\
.Me Reboot.
.\}
.el \{\
.Me Reboot ,
after you have removed the bootfloppy from the drive.
.\}
.if \n[macppc]:\n[sparc64] \{\
.It
Once the system reaches the Open Firmware prompt, you will need to type
the correct command to boot from your hard drive.
.\}
.if \n[sparc] \{\
.It
Once the system reaches the PROM prompt, you will need to type the correct
command to boot from your hard drive.
.\}
.if \n[sgimips] \{\
.It
Once the system reaches the PROM prompt, you will need to modify your
PROM environment settings for SystemPartition, OSLoadPartition, OSLoader,
OSLoadFilename and OSLoadOptions and then boot the hard drive.
.\}
.It
.Nx
will now boot.
If you didn't set a password for the
.Li root
user when prompted by
.Ic sysinst ,
logging in as
.Li root
and setting a password should be your first task.
You are also advised to read
.Xr afterboot 8 .
.bullet)
.bullet)
.It
.To 2 "Booting NetBSD"
.Em Booting NetBSD
.
.ie \n[mac68k] \{\
.Pp
Prior to attempting to boot
.Nx*M
verify that all the following are done:
.(bullet
Enable 32-bit addressing in the Memory Control Panel [1].
.It
Disable all forms of virtual memory (the Memory Control Panel, RAM Doubler,
or other software-based memory enhancement products).
.It
Place the system in B\*[Am]W Mode (1-bit color or grayscale) as shown in the
Monitors Control Panel or in the Monitors options dialog of the Booter.
You may choose to have the Booter do this for you automatically by selecting
the appropriate check box and radio button in the
.Ic Monitors
dialog on the
.Ic Options
menu.
.bullet)
.Pp
It is probably best to boot your machine with all extensions turned off [1].
You can do this by booting into Mac OS with the
.Key SHIFT
key held down.
You may have to restart your Macintosh for changes to take effect before
proceeding.
.(tag [1]
.It [1]
If your version of the Memory control panel does not have a 32-bit
addressing mode radio button, this means that your system is already
32-bit clean and is running in 32-bit addressing mode by default.
If the Booter complains that your are not in 32-bit mode, it may be necessary
for you to press the "Use Defaults" button in the Memory control panel to
restore 32-bit addressing.
You should probably reboot after doing so.
If you have an older II-class system (including the II, IIx, IIcx,
and SE/30), it is necessary to install Connectix's MODE32 to work around
ROM issues which prevent you from enabling 32-bit addressing.
Please see the
.Nx*M
.Lk https://www.NetBSD.org/ports/mac68k/faq/ FAQ
for more information.
.tag)
.Pp
Double-click on the
.Nx*M
Booter icon to start the application.
Select
.Ic Booting
from the
.Ic Options
menu.
Select the Kernel Location to be from Mac OS with the filename
corresponding to the name of the Installation Kernel you are using.
Typically this will be netbsd-INSTALL.gz.
.Pp
If you haven't already put your Macintosh into B\*[Am]W mode, select the
.Ic Monitor Options
from the
.Ic Options
menu and check the box for B\*[Am]W mode.
.Pp
Try booting
.Nx
by selecting
.Ic Boot Now
from the
.Ic Options
menu.
.Pp
If the system does not come up, send mail to
.Mt port-mac68k@NetBSD.org
describing your software, your hardware, and as complete a description of
the problem as you can.
As an alternative, try using the Traditional
method of installation described in the next section.
.\} \" \n[mac68k]
.el \{\
.ie \n[cats]:\n[evbppc]:\n[macppc]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[sparc64] \{\
.Pp
You may want to read the
boot messages, to notice your disk's name and capacity.
Its name will be something like
.Li sd0
.if \n[cats]:\n[evbppc]:\n[macppc]:\n[sparc64] \{\
or
.Li wd0
.\}
and the geometry will be
printed on a line that begins with its name.
As mentioned above, you may need your disk's geometry when creating
.Nx Ns 's
partitions.
You will also need to know the name, to tell
.Ic sysinst
which disk to use.
The most important thing to know is that
.if \n[cats]:\n[evbppc]:\n[macppc]:\n[sparc64] \{\
.Li wd0
is
.Nx Ns 's
name for your first IDE disk,
.Li wd1
the second, etc.
.\}
.Li sd0
is your first SCSI disk,
.Li sd1
the second, etc.
.\}
.el \{\
.
.
.Pp
.ie \n[atari] \{\
Boot the system as described in the "Booting the installer" section above.
.\}
.el \{\
Boot your machine.
The boot loader will start, which will print a countdown and begin booting.
.if !\n[alpha]:\n[amd64]:\n[i386] \{\
.Pp
If the boot loader messages do not appear in a reasonable
amount of time, you either have a bad boot floppy or a
hardware problem.
Try writing the install floppy image to
a different disk, and using that.
.Pp
It will take a while to load the kernel
.ie !\n[mac68k] \{\
from the floppy,
.\}
.el ,
probably around a minute or so, then, the kernel boot messages
will be displayed.
This may take a little while also, as
.Nx
will be probing your system to discover which hardware devices are
installed.
.\} \" !\n[alpha]:\n[i386]
.if \n[atari]:\n[i386] \{\
You may want to read the
boot messages, to notice your disk's name and geometry.
Its name will be something like
.Li sd0
or
.Li wd0
and the geometry will be
printed on a line that begins with its name.
As mentioned above, you may need your disk's geometry when creating
.Nx Ns 's
partitions.
You will also need to know the name, to tell
.Ic sysinst
on which disk
to install.
.\}
The most important thing to know is that
.Li wd0
is
.Nx Ns 's
name for your first SATA/PATA disk,
.Li wd1
the second, etc.
.Li sd0
is your first SCSI disk,
.Li sd1
the second, etc.
.Pp
.if !\n[alpha]:\n[amd64]:\n[atari]:\n[evbarm]:\n[evbppc]:\n[hpcarm]:\n[i386]:\n[mac68k] \{\
Note that once the system has finished booting, you need not
leave the floppy in the disk drive.
.\}
.\}\}
.Pp
Once
.Nx
has booted and printed all the boot messages,
you will be presented with a welcome message and a main menu.
It will also include instructions for using the menus.
.It
.To 2 "Network configuration"
.Em Network configuration
.Pp
If you do not intend to use networking during the installation,
but you do want your machine to be configured for networking once
it is installed, you should first go to the
.Me Utility menu
and select the
.Me Configure network
option.
If you only want to temporarily
use networking during the installation, you can specify these
parameters later.
If you are not using the Domain Name System (DNS),
you can give an empty response when asked to provide a server.
.if \n[mac68k] \{\
.It
.To 2 "Preparing a disk for Mac OS and NetBSD"
.Em "Preparing a disk for"
.Tn Mac OS
.Em and NetBSD
.Pp
.Ic sysinst
can manipulate the Apple Disk Partition Map allowing you to partition
your disk for use with
.Nx .
It does not support resizing existing
.Tn Mac OS
HFS disk partitions.
If there is insufficient Free space on the disk to support an installation of
.Nx
you will need to backup, repartition and restore your existing
.Tn Mac OS
partitions before proceeding.
You may choose to use a Traditional method of creating disk partitions for
.Nx
if you wish.
They can still be used by
.Ic sysinst
for a
.Nx
installation.
.\} \" \n[mac68k]
.if \n[macppc] \{\
.It
.To 2 "Preparing a disk for Open Firmware 3 systems"
.Em "Preparing a disk which will be used for Open Firmware 3 systems"
.Pp
Skip this step if you are installing
.Nx
on an Open Firmware 1 or 2 system.
.Pp
Go to the
.Me "Utility Menu" ,
and select the
.Me "Run /bin/sh"
option which will give you a shell prompt.
From this shell prompt, you will do some of the steps that the normal
install procedure runs automatically.
Unfortunately, at the moment, our install tools
aren't smart enough to deal with drives with Apple Partition Maps
and will overwrite important information describing your partitions.
.Pp
You may need to type one of the following commands to get your delete key
to work properly, depending on your keyboard:
.Dl # Ic "stty erase '^h'"
.Dl # Ic "stty erase '^?'"
.Pp
Type the following command (replacing
.Pa wd0
with the name of your destination hard drive):
.Dl # Ic "disklabel wd0"
.Pp
This will print out the partition info that was generated by
.Ic pdisk ,
Drive Setup, or Disk Utility.
Note that, as discussed above in the
.Sx Partitioning your hard drive for NetBSD
section, your
.Em "A/UX Root"
typically is the first partition
.Pq Em a
and your
.Em "A/UX Swap"
typically is the second partition
.Pq Em b .
You may also find that your
.Em "A/UX User"
partition is the seventh partition
.Pq Em g .
For example:
.(disp
.Dl # Ic "disklabel wd0"
[...]
#        size   offset     fstype   [fsize bsize cpg/sgs]
  a:   426613   837432     4.2BSD        0     0     0   # (Cyl. 1622*- 2449*)
  b:   204800   632632       swap                        # (Cyl. 1226*- 1622*)
  c:  2134305        0     unused        0     0         # (Cyl.    0 - 4136*)
  d:   426616     1216        HFS                        # (Cyl.    2*- 829*)
  e:   204800   427832        HFS                        # (Cyl.  829*- 1226*)
  f:       21  2134284    unknown                        # (Cyl. 4136*- 4136*)
  g:   870239  1264045     4.2BSD        0     0     0   # (Cyl. 2449*- 4136*)
disklabel: boot block size 0
disklabel: super block size 0
.disp)
.Pp
Now, you need to create file systems on the partitions that
.Nx
will be using.
.Pp
.Em "Do not modify any partitions labeled"
.Pa HFS ,
.Pa UFS ,
.Em or
.Pa unknown .
The partitions you will be using have their
.Pa fstype
listed as
.Pa 4.2BSD .
.Pp
Run the
.Ic newfs
command on the
.Pa 4.2BSD
partitions:
.(disp
.Dl # Ic "newfs /dev/wd0a"
newfs: /dev/wd0a: not a character-special device
Warning: 120 sector(s) in last cylinder unallocated
/dev/wd0a:      426612 sectors in 827 cylinders of 4 tracks, 129 sectors
        208.3MB in 52 cyl groups (16 c/g, 4.03MB/g, 1024 i/g)
super-block backups (for fsck -b #) at:
     32,   8432,  16832,  25232,  33056,  41456,  49856,  58256,  66080,
  74480,  82880,  91280,  99104, 107504, 115904, 124304, 132128, 140528,
 148928, 157328, 165152, 173552, 181952, 190352, 198176, 206576, 214976,
 223376, 231200, 239600, 248000, 256400, 264224, 272624, 281024, 289424,
 297248, 305648, 314048, 322448, 330272, 338672, 347072, 355472, 363296,
 371696, 380096, 388496, 396320, 404720, 413120, 421520,
newfs: ioctl (WDINFO): Invalid argument
newfs: /dev/wd0a: can't rewrite disk label
.disp)
You can ignore the
.Pa Sq "not a character-special device" ,
.Pa Sq "sector(s) in last cylinder unallocated" ,
.Pa Sq "ioctl (WDINFO): Invalid argument" ,
and
.Pa Sq "can't rewrite disk label"
warnings.
.Pp
Now you need to mount your destination root partition:
.Dl # Ic "mount /dev/wd0a /mnt"
.Pp
Make an
.Pa fstab
file for your new system (right now, you only really need to include
.Pa / ,
.Pa /usr ,
and
.Pa swap ) ,
for example:
.Dl # Ic "mkdir /mnt/etc"
.Dl # Ic "cat \*[Gt] /mnt/etc/fstab"
.Dl "/dev/wd0a / ffs rw 1 1"
.Dl "/dev/wd0b none swap sw 0 0"
.Dl "/dev/wd0g /usr ffs rw 1 2"
.Pp
If you mess up while typing, you can press
.Key CONTROL-U
to erase everything on the current line, or
.Key CONTROL-C
to cancel the file creation, so you can start over.
.Key CONTROL-D
finishes and writes the file to disk.
.Pp
Great, now create the mountpoints for the file systems you listed in the
.Pa fstab :
.Dl # Ic "mkdir /mnt/usr"
.Pp
Clean up and return to
.Ic sysinst :
.Dl # Ic "cd /"
.Dl # Ic "umount /mnt"
.Dl # Ic exit
.\} \" \n[macppc]
.It
.To 2 "Installation drive selection and parameters"
.Em Installation drive selection and parameters
.Pp
To start the
.if \n[macppc] \{\
installation onto a dedicated
.Nx
drive (Open Firmware 1 or 2),
.\}
.if !\n[macppc] installation,
select
.Me Install NetBSD to hard disk
from the main menu.
.if \n[mac68k] \{\
To start the installation, select the menu option in install
.Nx
from the main menu.
.\}
.if \n[macppc] \{\
To start the installation onto a drive with an Apple Partition Map (Open
Firmware 3), select
.Me Re-install sets or install additional sets
from the main menu.
.\}
.Pp
The first thing is to identify the disk on which you want to
install
.Nx .
.Ic sysinst
will report a list of disks it finds
and ask you for your selection.
You should see disk names like
.ie \n[pmax] \{\
.Li rz0
or
.Li rz1
.\}
.el \{\
.if \n[alpha]:\n[amd64]:\n[cats]:\n[i386]:\n[mac68k]:\n[macppc]:\n[sparc64] \{\
.Li wd0 ,
.Li wd1 ,
.\}
.Li sd0
or
.Li sd1 .
.if \n[amd64]:\n[i386] \{\
.Pp
.Ic sysinst
next tries to figure out the real and BIOS geometry
of your disk.
It will present you with the values it found,
if any, and will give you a chance to change them.
Normally, the values it presents will be correct.
.\}
.if \n[mac68k] \{\
.Pp
.Ic sysinst
next tries to figure out how the selected volume has been partitioned.
It does this by reading the Apple Disk Partition Map from the disk.
If the disk does not have a Partition Map,
.Ic sysinst
will give you the option of writing one, but doing so will not make
the disk a Mac OS bootable volume.
You will have the option of creating HFS partitions that may be
subsequently initialized and used under Mac OS though.
.\}
.Pp
.if \n[macppc] \{\
If
.Ic sysinst
reports
.Dl "I can not find any hard disk for use by NetBSD"
or the drive you wish to install onto is missing, then you should look at
the
.Lk "https://www.NetBSD.org/ports/macppc/faq.html#nodisk" "FAQ entry" .
.\}
.\}
.It
.To 2 "Selecting which sets to install"
.Em Selecting which sets to install
.Pp
The next step is to choose which distribution sets you wish to install.
Options are provided for full, minimal, and custom installations.
If you choose sets on your own,
.Sy base , Sy etc ,
and a kernel must be selected.
.It
.To 2 "Partitioning the disk"
.Em Partitioning the disk
.if \n[atari] \{\
.(bullet
Preparing a disk which will be used for
.Tn GEM
and
.Nx .
.Pp
You will be prompted if you want an AHDI compatible partitioning on your disk.
If you are installing
.Nx
on a dedicated drive, just answer 'no' and skip to the next section.
.Pp
If you answer 'yes', the
.Ic ahdilabel
program is started.
You can now change the AHDI partition IDs on your root disk.
Because NetBSD imposes a special ordering in disk partitions it uses
for / (root) and swap.
Also, because it wants to guard you against an unwanted
demolition of partitions used by other systems, you have to tell it what
partitions it is allowed to use.
You have to mark the partition you want to use as swap SWP or
(deprecated!) NBS and the other partitions as NBD.
Note that all the changes you make to the IDs are reversible as long as
you remember the original value.
ahdilabel is capable of creating or changing an
AHDI compatible partitioning on the disk, and
in the partition-ID editor, the partitions are shown in the order that AHDI
created them.
When you leave this editor and continue with
.Ic sysinst,
your changes to the IDs do have consequences to the partition order!
They will show up as follows:
.(tag 13n -offset indent
.It Li a
the first NBD partition
.It Li b
the first SWP (or NBS) partition
.It Li d (and up)
the rest of the partitions in AHDI order
.tag)
.bullet)
.\} \" \n[atari]
.if \n[macppc] \{\
.Pp
You can skip a few steps, down to
.Sq Em "Getting the distribution sets" ,
if you are installing onto a drive with an Apple Partition Map (Open
Firmware 3), i.e., you selected
.Me "Re-install sets or install additional sets"
from the main menu.
.\} \" \n[macppc]
.if \n[sgimips] \{\
.(bullet
Please note that shared installs of
.Tn IRIX
and
.Nx
on the same drive have not been tested, and as such may cause problems
or may not work.
It is
.Em strongly
recommended that all data is backed before attempting such installs.
.bullet)
.\} \" \n[sgimips]
.if !\n[atari]:\n[macppc]:\n[sgimips] \{\
.(bullet
Choosing which portion of the disk to use.
.Pp
You will be asked if you want to use the entire disk or
only part of the disk.
If you decide to use the entire disk for
.Nx ,
.Ic sysinst
will check for the presence of other operating systems and you will
be asked to confirm that you want to overwrite these.
.if \n[mac68k] \{\
.It
Definition of the NetBSD disklabel.
.Pp
The Apple Disk Partition Map is used to create an in-core map of the
disk called the disklabel.
A minimum of two NetBSD partitions will be required,
one for root and one for swap.
Up to eight partitions may be used by NetBSD.
Up to 32 partitions may exist on the disk which
can be any combination of Mac OS HFS, Free, Scratch and
.Nx
partitions, although only the first eight which meet the needs of
.Nx
will be seen and mapped to the
.Nx
disklabel.
.Pp
Some partitions in the disklabel have a fixed purpose.
Partition 'a' is always the root partition, 'b' is the swap partition
and 'c' is the entire disk.
Partitions 'd' through 'h' are available for other use.
Traditionally, 'g' is the partition mounted on the /usr directory, but
this is historical practice, not a fixed value.
.It
Editing the
.Nx
Disklabel (and the underlying Apple Disk Partition Map).
.Pp
You will be presented with the current layout of the disk as seen by
.Nx ,
and given a change to change it.
(Even though
.Nx
can only use the first eight qualified partitions, all partitions
found on the disk will be displayed.)
The partitions found on the disk will be shown in the top section of
the display.
Each will be identified with the name assigned by
.Nx ,
the current size, offset, type, use and mount point.
The partition currently being modified will be highlighted in inverse video.
The bottom part of the display will list the operations which may be
performed on the selected (highlighted) partition.
The options are:
.(bullet
Select next partition
.Pp
This highlights the next partition in the upper display list and makes it
the current one selected for manipulation.
.It
Change selected partition
.Pp
This changes the type assigned to the partition.
A partition may be assigned for use as a
.Nx
Root, SWAP, Usr, or Root&Usr; it may be assigned for use as a Mac OS HFS
partition; a Scratch (for later reassignment); or a Free partition.
Free partitions which are physically adjacent to each other will be collapsed
into a single Free partition.
.It
Set mount point for partition
.Pp
This designates the
.Nx
file system mount point for the partition, and gets transferred into
the /etc/fstab definition so
.Nx
knows where to mount the file system on subsequent boots.
The option only applies to
.Nx
Root, Usr, Root&Usr or Mac OS HFS partitions, although currently HFS access
is not supported without optional software components.
A common set of predefined mount points (/usr, /home, /var, /tmp or None)
will be presented to you to assist you in defining the most commonly used,
but you may enter you own names if you choose.
Selecting "None" will clear the mount point name and keep the partition
from being defined in the resulting
.Pa /etc/fstab
file.
.It
Split selected partition
.Pp
This option divides the selected partition into two separate partitions
if there is space available in the Disk Partition Map.
You will be prompted for the size of the first segment and the remaining
portion will be allocated to the second segment.
The first segment will be designated as a Scratch type, and the second
will be designated as a Free type.
To clear a split, or remerge two adjacent partitions into a
single one, change both to be Free types.
.Ic sysinst
will merge them and update the display.
.Pp
This is the primary option used to partition the disk since it allows
you to sub-divide the selected partition into two partitions.
Changing the types associated with the resulting two parts, or splitting the
second part further sub-divides the original partition.
.It
Page Up, Page Down
.Pp
These entries allow you to scroll the upper display if more than
eight partitions currently exist on the disk.
.It
Fix selected partition
.Pp
This option reviews the partition's size and starting address and fixes
the values if they overlap any adjacent partition.
This is primarily a debugging option and shouldn't be necessary during a
normal installation.
However, some 3rd party disk formatters have been known to create
bogus entries in the Apple Disk Partition Map, and this option can aid
is repairing these entries.
.It
Exit
.Pp
This option completes the disk partitioning and returns you to the
previous installation menu.
At that point you will be given one last opportunity to bail out before
committing the changes to the Disk Partition Map recorded on the disk.
.bullet)
.Pp
.It
Recommended approach to partitioning
.Pp
The simplest method of approaching disk partitioning with
.Ic sysinst
is to convert everything that can be used for
.Nx
into a Free type partition.
This will allow
.Ic sysinst
to collapse and merge all the available space.
Then cycle through the Select, Split, Select, Change, and Set Mount Point
options for each of the
.Nx
partitions that are desired.
Since
.Nx*M
has a very specific
mount order for partitions during system boot, it is best to create your
.Nx
partitions in the following order:  Root, SWAP, Usr where the partitions
will be mounted in order on 'a', 'b', 'g', 'd', 'e', 'f', and 'h'.
.Pp
At least one Root or Root&Usr is required, and a SWAP partition is
highly desirable.
As a general rule you will need twice as much swap
space as you have RAM, more if you plan on running X, Web applications
or doing heavy development in a multi-user environment.
The Root partition, if it is separate from your Usr, usually requires about
24 MB.
.Pp
If multiple Root partitions are defined, the second is usually
mounted on /altusr by default.
.Nx*M
automatically mounts all
Root partitions after the first as Usr type partitions.
However, it is best to be very specific about mount points and partition
type and use.
.\} \" \n[mac68k]
.bullet)
.if \n[i386] \{\
.Pp
If you want to use the entire disk for
.Nx ,
you can skip
the following section and go to
.Em "Editing the NetBSD disklabel" .
.It
.Em "Editing the Master Boot Record"
.Pp
You will be presented with the current values
stored in the MBR, and will be given the opportunity to
change, create or delete partitions.
For each partition you can set the type, the start and the size.
Setting the type to
.Ic unused
will delete a partition.
You can also mark a partition as active, meaning that this is
the one that the BIOS will start from at boot time.
.Pp
Be sure to mark the partition you want to boot from as active!
.Pp
After you are done editing the MBR, a sanity check
will be done, checking for partitions that overlap.
Depending on the BIOS capabilities of your machine and the
parameters of the
.Nx
partition you have specified, you
may also be asked if you want to install newer bootcode in your MBR.
If you have multiple operating systems on the
disk that you are installing on, you will also be given
the option to install a bootselector, which will allow you
to pick the operating system to start up when your computer
is (re-)started.
.Pp
If everything is ok, you can go on to the next step,
editing the
.Nx
disklabel.
.Pp
.\} \" \n[i386]
.\} \" !\n[atari]:\n[macppc]:\n[sgimips]
.
.if !\n[mac68k] \{\
.It
.Em Editing the NetBSD disklabel
.Pp
The partition table of the
.Nx
part of a disk is called a
.Em disklabel .
.if \n[macppc] \{\
In actuality,
.Nx*M
uses an Apple Partition Map.
The installer creates something like a real
Apple Partition Map, but it is not compatible with
.Tn Mac OS
or Open Firmware,
which is one of the reasons why you cannot use this installer to partition
a disk that can be used with
.Tn Mac OS
or Open Firmware 3 systems.
.Pp
.\}
.if \n[sparc] \{\
.Nx
disklabels on \*M are compatible with the boot ROMs, and with
.Tn SunOS
and
.Tn Solaris .
.\}
If your disk already has a disklabel written to it, you can choose
.Ic Use existing partition sizes .
Otherwise, select
.Ic Set sizes of NetBSD partitions .
.Pp
.if \n[atari] \{\
If you want to use
.Nx
on an AHDI partitioned disk, you will have to use:
.Ic Use Existing .
.Pp
.\}
After you have chosen your partitions and their sizes
.Pq or if you opted to use the existing partitions ,
you will be presented with the layout of the
.Nx
disklabel and given one more chance to change it.
For each partition, you can set the type, offset and size,
block and fragment size, and the mount point.
The type that
.Nx
uses for normal file storage is called
.Sy 4.2BSD .
A swap partition has a special type called
.Sy swap .
.
Some partitions in the disklabel have a fixed purpose.
.(tag 6n -offset indent
.It Li a
Root partition
.Pq Pa /
.It Li b
Swap partition.
.if !'c'\*[part_raw]' \{\
.It Li c
The
.Nx
portion of the disk.
.\}
.It Li \*[part_raw]
The entire disk.
.if \n[sgimips] \{\
.It Li d
The SGI volume header (boot partition)
.\}
.It Li \*[part_free]-\*[part_max]
Available for other use.
Traditionally,
.Li \*[part_usr]
is the partition mounted on
.Pa /usr ,
but this is historical practice and not a fixed value.
.tag)
.\} \" !\n[mac68k]
.
.Pp
You will then be asked to name your disk's disklabel.
The default response will be ok for most purposes.
If you choose to name it something different, make sure the name
is a single word and contains no special characters.
You don't need to remember this name.
.\}
.Pp
.It
.To 2 "Preparing your hard disk"
.Em Preparing your hard disk
.Pp
.Em "You are now at the point of no return".
.ie \n[atari] \{\
Apart from the changes you made with
.Ic ahdilabel
nothing has been modified on your disk yet.
If you confirm that you want to install
.Nx ,
the partitions now assigned to
.Nx
will be actually written to.
.\}
.el \{\
Nothing has been
written to your disk yet, but if you confirm that you want to
install
.Nx ,
your hard drive will be modified.
.\}
If you are sure you want to proceed, select
.Sy yes .
.Pp
The install program will now label your disk and create the file
systems you specified.
The file systems will be initialized to contain
.Nx
bootstrapping binaries and configuration files.
You will see messages on your screen from the various
.Nx
disk preparation tools that are running.
There should be no errors in this section of the installation.
If there are, restart from the beginning of the installation process.
Otherwise, you can continue the installation program
after pressing the return key.
.if \n[macppc] \{\
.Pp
.(Note
The bootstrapping code installed in this step will
.Em not
boot a machine with Open Firmware 3.
You will still need to have
.Pa ofwboot.xcf
on an HFS or HFS+ partition.
.Note)
.\}
.It
.To 2 "Getting the distribution sets"
.Em Getting the distribution sets
.Pp
The
.Nx
distribution consists of a number of
.Em sets
that come in the form of gzipped tar files.
At this point, you will be presented with a menu
which enables you to choose from one of the following methods
of installing the sets.
Some of these methods will first transfer the sets to your hard disk,
others will extract the sets directly.
.Pp
For all these methods, the first step is to make the sets
available for extraction.
The sets can be made available in a few different ways.
The following sections describe each of the methods.
After reading about the method you will be using, you
can continue to the section labeled
.Sq Extracting the distribution sets .
.It
.To 2 "Installation from CD-ROM"
.Em Installation from CD-ROM
.Pp
When installing from a CD-ROM, you will be asked to specify
the device name for your CD-ROM drive
.Pq usually Li cd0
and the directory name on the CD-ROM where the distribution files are.
.Pp
.Ic sysinst
will then check that the files are actually present in the
specified location and proceed to the extraction of the sets.
.It
.To 2 "Installation using FTP"
.Em Installation using FTP
.Pp
To install using ftp, you first need to configure
your network setup if you haven't already done so.
.Ic sysinst
will help you with this, asking if you want to use DHCP.
If you do not use DHCP, you can enter network configuration
details yourself.
If you do not have DNS set up for the machine that you
are installing on, you can just press
.Key RETURN
in answer to this question, and DNS will not be used.
.Pp
You will also be asked to specify the host that you want
to transfer the sets from, the directory on that host,
the account name and password used to log into that
host using ftp, and optionally a proxy server to use.
If you did not set up DNS, you will need to
specify an IP address instead of a hostname for the ftp
server.
.Pp
.Ic sysinst
will then transfer the set files from the remote site to your hard disk.
.It
.To 2 "Installation using NFS"
.Em Installation using NFS
.Pp
To install using NFS, you first need to configure
your network setup if you haven't already done so.
.Ic sysinst
will do this for you, asking you
if you want to use DHCP.
If you do not use DHCP, you can enter network configuration
details yourself.
If you do not have DNS set up for the machine that you
are installing on, you can just press
.Key RETURN
in answer to this question, and DNS will not be used.
.Pp
You will also be asked to specify the host that you want
to transfer the sets from and the directory on that host
that the files are in.
This directory should be mountable by the machine you are installing on,
i.e., correctly exported to your machine.
.Pp
If you did not set up DNS, you will need to
specify an IP address instead of a hostname for the NFS server.
.if \n[i386] \{\
.It
.To 2 "Installation from a floppy set"
.Em Installation from a floppy set
.Pp
Because the installation sets are too big to fit on one floppy,
the floppies are expected to be filled with the split set
files.
The floppies are expected to be in
.Tn MS-DOS
format.
You will be asked for a directory where the sets should be reassembled.
Then you will be prompted to insert the floppies containing the split sets.
This process will continue until all the sets have been loaded from floppy.
.\}
.if \n[mac68k] \{\
.It
.To 2 "Installation from Mac OS file systems"
.Em Installation from Mac OS file systems
.Pp
.Nx*M
does not currently have in-kernel support for
.Tn Mac OS
HFS/HFS+ or AppleShare filesystems.
.Ic sysinst
therefore can not access the file sets if they are on these filesystems.
.\}
.It
.To 2 "Installation from an unmounted file system"
.Em Installation from an unmounted file system
.Pp
In order to install from a local file system, you will
need to specify the device that the file system resides
on
.ie \n[pmax] .Pq for example Li rz1e ,
.el .Pq for example Li wd1e ,
the type of the file system,
and the directory on the specified file system where the sets are located.
.Ic sysinst
will then check if it
can indeed access the sets at that location.
.if \n[sgimips] \{\
.Pp
If this is a CD-ROM installation, the device used will be the name for your
CD-ROM player with partition letter 'a'
.Pq usually cd0a .
.\}
.if \n[macppc] \{\
Remember,
.Nx*M
doesn't grok HFS or HFS+ partitions
.\}
.It
.To 2 "Installation from a local directory"
.Em Installation from a local directory
.Pp
This option assumes that you have already done some preparation
yourself.
The sets should be located in a directory on a
file system that is already accessible.
.Ic sysinst
will ask you
for the name of this directory.
.It
.To 2 "Extracting the distribution sets"
.Em Extracting the distribution sets
.Pp
A progress bar will be displayed while the distribution sets are
being extracted.
.Pp
After all the files have been extracted,
the device node files will be created.
If you have already configured networking, you will be asked if you want to
use this configuration for normal operation.
If so, these values will be installed in the network configuration files.
.It
.To 2 "Configure additional items"
.Em Configure additional items
.Pp
The next menu will allow you to select a number of additional items
to configure, including the time zone that you're in,
to make sure your clock has the right offset from UTC,
the root user's shell, and the initial root password.
.Pp
You can also enable installation of binary packages, which installs the
.Xr pkgin 1
tool for managing binary packages for third-party software.
This will
feel familiar to users of package tools such as
.Ic apt-get
or
.Ic yum .
If you prefer to install third-party software from source, you can install
the
.Xr pkgsrc 7
tree.
.Pp
Finally, you can enable some daemons such as
.Xr sshd 8 ,
.Xr ntpd 8 ,
or
.Xr mdnsd 8 .
.if \n[sparc64] \{\
.It
.To 2 "Ensure you have the correct kernel installed"
.Em "Ensure you have the correct kernel installed"
.Pp
If you are installing from the 32-bit sparc distribution set, make sure
that you installed the correct kernel.
The \*M installation tools do not by default copy the correct 32-bit kernel.
Unless you prepared ahead of time by renaming the
.Pa kern-GENERIC_SUN4U.tgz
to
.Pa kern-GENERIC.\*[setsuffix]
then you will need to follow the next few instructions.
.Pp
Go to the main installation menu, and select
.Me "Utility menu"
and then select the
.Me "Run /bin/sh"
option, which will give you a shell prompt.
You may need to type one of the following commands to get your delete key
to work properly, depending on your keyboard:
.Dl # Ic "stty erase '^h'"
.Dl # Ic "stty erase '^?'"
.Pp
Type the following command (replacing
.Pa wd0a
with the partition name of your destination root partition):
.Dl # Ic "mount /dev/wd0a /mnt"
.Dl # Ic "cd /mnt"
Now you need to mount the location of your distribution sets:
.Dl # Ic "mount /dev/cd0a /mnt2"
.Dl # Ic "tar xpzvf /mnt2/sparc/binary/kernel/kern-GENERIC_SUN4U.tgz
.Dl # Ic "umount /mnt"
.Dl # Ic "umount /mnt2"
.Dl # Ic "exit"
.\}
.It
.To 2 "Finalizing your installation"
.Em Finalizing your installation
.Pp
Congratulations, you have successfully installed
.Nx
\*V.
.if \n[cats] \{\
.Pp
To finalize the installation of
.Nx*M
certain parameters on the Cyclone firmware need to changed.
The reason is that the Cyclone firmware is unable to boot anything other
than an a.out format kernels.
.Pp
Kernels created on a
.Nx*M
\*V system are natively ELF and converted to a.out.
This conversion process loses the symbol information used for,
amongst other things, kernel memory grovelers such as vmstat.
The workaround to the problem is to provide both the native ELF kernel
(with all the symbol information) and the a.out kernel.
These are available as /netbsd and /netbsd.aout respectively.
As the a.out format kernel is not named in such a way that the
Cyclone firmware will automatically find it the following command
should be issued as the firmware prompt.
.Pp
.Dl boot\*[Gt] Ic "set boot wd0:/netbsd.aout"
.Pp
.\}
.if !\n[macppc] \{\
You can now reboot the machine and boot
.Nx
from hard disk.
.\} \" !\n[macppc]
.enum)