File: redhat.html

package info (click to toggle)
lg-issue18 5-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,928 kB
  • ctags: 148
  • sloc: makefile: 36; sh: 4
file content (1615 lines) | stat: -rw-r--r-- 82,578 bytes parent folder | download | duplicates (4)
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
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Red Hat Linux Issue 18</title>
</HEAD>
<BODY BGCOLOR="#EEE1CC" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000">
<!--endcut ============================================================-->

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<P>SSC is expanding Matt Welsh's <I>Linux Installation & Getting
Started</I> by adding chapters about each of the major distributions. Each
chapter is being written by a different author in the Linux community.
Here's a sneak preview--the Red Hat chapter by Henry Pierce.--editor 
<P><HR><P>
<center>
<H2>Red Hat Linux</H2>
<H4>By Henry Pierce,
<a href="mailto:hmp@boris.infomagic.com">hmp@boris.infomagic.com</a></H4>
</center>
<P><HR><P>
<H3>Contents:</H3>
<ul>
<li><a href="./redhat.html#start">Getting Started With Red Hat</a>
<li><a href="./redhat.html#obtain">Obtaining Red Hat Linux</a>
<li><a href="./redhat.html#planning">Planning Your Installation</a>
<li><a href="./redhat.html#upgrade">A Note About Upgrading Red Hat
Linux</a>
<li><a href="./redhat.html#choose">Choosing Your Installation Method</a>
<li><a href="./redhat.html#floppy">Creating the Installation Floppy Kit</a>
<li><a href="./redhat.html#setting">Setting Up Yourr Installation Media</a>
<li><a href="./redhat.html#recommend">Recommendations</a>
<li><a href="./redhat.html#fips">Using FIPS</a>
<li><a href="./redhat.html#install">Installing Red Hat Linux</a>
<li><a href="./redhat.html#rest">Walking Through the rest of the
Installation</a>
<li><a href="./redhat.html#lilo">Understanding the LILO Prompt</a>
<li><a href="./redhat.html#logging">Logging in the First Time</a>
<li><a href="./redhat.html#shut">Shutting Down Linux</a>
</ul>
<P><HR><P> 


<p>The Red Hat distribution is an ever-growing and popular commercial
distribution from Red Hat Software, Inc. Even though
it is a "Commercial" distribution under the <I>Official Red Hat Linux</I>
label purchased directly from Red Hat Software Inc., it may be downloaded from
the Internet or purchased from third party CD-ROM vendors (see Appendix B)
as well. 

<p>Much of Red Hat's growing popularity is due to its Red Hat Package Management
Technology (RPM) which not only simplifies installation, but software
management as well. This in fact, is one of the goals of the Red Hat
distribution: to reduce the system administration burdens of obtaining, fixing
and installing new packages so that Linux may be used to get some real work
done. RPM provides software as discrete and logical packages. For example, the
Emacs editor binary executable file is bundled together in a single package
with the supporting files required for configuration of the editor and the
extension of basic functionality. 
 
<p>The version of Red Hat described here is version 4.0/4.1, released October
1996/December 1996. Installation of earlier installations of Red Hat do differ
in their installation procedures than the version described here. Installation
of later versions of Red Hat should be very similar to the information given
here. This document focuses on Intel based installation of Red Hat Linux.
However, many aspects of installing the Alpha and Sparc versions of Red Hat
are similar to Intel Systems which are out lined here.

<a name="start"></a>
<p><h3>Getting Started With Red Hat</h3>
 
<p>The process of installing or upgrading Red Hat Linux requires backing up the
existing operating system, obtaining the Red Hat distribution, planning your
installation, preparing the hard disk, making the appropriate installation
diskettes, going through the installation program and, finally, rebooting your
system with the newly installed operating system. For those who currently have
Red Hat Linux 2.0 or higher installed, you may upgrade by following the same
process outlined here except you should choose "UPGRADE" instead of
"INSTALL" when prompted by the installation program. 

<a name="obtain"></a>
<p><h3>Obtaining Red Hat Linux</h3>

<p>There are only two ways of obtaining the Red Hat Linux Distribution:
on CD-ROM from Red Hat Software, Inc.\ or other 3rd party CD-ROM
distributor or via FTP from:

<a href="ftp://ftp.redhat.com/pub/redhat">ftp://ftp.redhat.com/pub/redhat</a>

or anyone of the frequently less busy Red Hat mirror sites. No matter
how Red Hat Linux is obtained, you should read the Red Hat Errata
which contains a list of known problems for the release you
install. You can obtain the current errata via:

<a href="http://www.redhat.com/errata">http://www.redhat.com/errata</a>

or by send email to <a href="mailto:errata@redhat.com">errata@redhat.com</a>.  If you obtained Red Hat Linux
from a 3rd party CD-ROM distributor (such as InfoMagic, Inc.) they
often delay releasing their CD-ROM kit for 2 weeks to a month+ after a
major new release of Linux so they can include the inevitable bug
fixes and updates that follow on the CD-ROM an saving the trouble of
downloading them.

<a name="planning">Planning Your Installation</a>
<p><h3>Planning Your Installation</h3>

<p>Planning an installation of Linux cannot be understated. The success or
failure of installing or upgrading Linux is directly related to how well you
know your hardware and understand how Linux should be installed on the target
computer. This section outlines basic installation planning and considers
common mistakes and oversights that prevent the successful installation of
Linux. This is also true for people upgrading Red Hat Linux version 2.0 or
higher to version 4.X. In either case, it cannot be understated that you
should <B>back up</B> you existing system before going further. In the rare
cases that something should go wrong when you have not <B>backed up</B> your
system that results in the loss of an existing operating system, your data is lost. So if it is worth saving, <B>back up</B>
your system before continuing. I now get off my soap box.

<p><h4>What Is RPM Anyway?</h4>

<p>Before we begin, it is worth taking a moment to discuss Red Hat Package
Management (RPM) Technology as it is the core of installing and maintaining
Red Hat Linux and helps you simplify the planning of installing and provides
Red Hat Linux's ability to upgrade from an older version of Red Hat Linux to a
current one. 

<p>Traditionally, software under Linux and Unix system has been
distributed as a series of <pre><I>package</I>.tar <I>package</I>.tgz
<I>package</I>.tar.gz</pre> or <pre><I>package</I>.tar.Z</pre> files. They often
required the system administrator who installs the packages to
configure the package for the target system, install the auxiliary and
documentation files separately, and setup any configuration files by
hand. And if the package requires another supporting package that
isn't installed, you won't know a package is missing until you try to
use the new package. And the more add-on packages installed, the
harder it is to keep track of them. Then if you want to remove or
upgrade such a package, you have to remember where all the files for
the package are, and remove then. And if you are upgrading a package,
and forgot a pesky configuration file, then the upgraded package may
not work correctly.  In summary, the traditional method of
distributing software does provide centralized management system of
installing nor upgrading software packages which is crucial to easing
the administrative burdens of managing the system.
 
<p>RPM, in contrast, is designed to manage software packages by defining
how a package is built and collecting information about the package
and its installation process the during package's build process. This
allows RPM to create an organized packet of data in the header of a
<pre><I>package</I>.rpm</pre> that can be added to an organized database that
describes where the package belongs, what supporting packages are
required, are the required packages installed and a means to determine
package dependency information. These are, in fact, describe the
design goals of RPM: the ability to upgrade an individual component or
the entire system without re-installing while preserving the
configuration files for the system/package; be able querying the RPM
database to find the location of files, packages or other relevant
package information; to perform package verification to make sure
packages are installed properly or can be installed at all; to keep
source packages "pristine" (provide the package author's
original source with second party patches separate) so that porting
issues can be tracked. Because RPM does this management for you, you
can install, upgrade, or remove a package with a single command line
in text mode or a few clicks of the mouse in the X Window Package
Management Tool. Simple examples of using RPM from the command line
are:

<pre>rpm --install <I>package</I>.rpm</pre>--this will install package 
<pre>rpm --upgrade <I>package</I>.rpm</pre>--this will upgrade package 
<pre>rpm --erase <I>package</I></pre>--this will remove/erase package 
 
<p>There are many more complicated things RPM can do such as querying a
package to find out if it is installed, what version the package is,
or query an uninstalled package for information. In essence, it does
almost everything a package management tool should do. And Red Hat has
GPL'd this innovative system.


<p><B>Anatomy of An RPM Package</B>

<p>Essentially, RPM works by maintaining a central database of installed
packages, the packages files and its version. A properly built
<pre><I>package</I>.rpm</pre> has all of the following characteristics: its
name will identify the package, the version of the package, the build
revision of the package, the architecture the package is intended for,
and of course the extension "rpm" to identify it as an rpm
based package.  

Take, for example, <pre>bash-1.14.7-1.rpm</pre>. The name,
itself, contains a lot of useful information: the package is "bash",
the Bourne Again Shell, it is version 1.14.7 and it is build 1 of the
current version for Red Hat, it was built for an Intel or compatible
386 or higher CPU, and of course, it is in "rpm" format. So, if you
see a package called bash-1.14.7-2.i386.rpm, you know it is a second
build of bash v1.14.7 and probably contains fixes for problems with
build 1 and obviously more current. And while the internal
organization of an *.rpm is beyond the scope of this discussion, a
properly built package contains an executable file, the configuration
files (if any), the documentation (at least man pages for the
package), any miscellaneous files directory related to the package,
and record of where the packages files should be installed and a
record of any required packages. Upon successful installation of a
\&lt;package\&gt;.rpm, information about the package is registered in
the RPM database. A more thorough discussion of RPM may be found in the
RPM-HOWTO available from:

<a href="http://www.redhat.com/support/docs/rpm/RPM-HOWTO/RPM-HOWTO.html">http://www.redhat.com/support/docs/rpm/RPM-HOWTO/RPM-HOWTO.html</a>

<a name="upgrade"></a>
<p><h3>A Note About Upgrading Red Hat Linux</h3>

<p>From the discussion above, you should have the sense that RPM is a powerful
tool, so powerful in fact, that Red Hat Linux is one of the few Linux and Unix
distributions that can truly claim to upgrade from an old release to a current
release. If you are planning to upgrade, you should know that only upgrades
from version 2.0 of Red Hat Linux and onward are supported due to major
changes in Linux's binary format. Otherwise, upgrades can be performed from
the same methods of installation: CD-ROM, NFS, FTP and a Hard Drive. As of
Red Hat Linux v4.0, the upgrade option is incorporated into the Boot Diskette
instead of being a program. For example, if you upgraded in the past from v2.1
to v3.0.3 and now want to upgrade to version 4.0, you will need to create the
Boot Diskette (instead of looking for an upgrade script) just like those
installing Red Hat 4.X from scratch. However, it will not reformat you
partitions nor delete your configuration files.


<h4>Know Your Hardware</h4>

<p>Given the scope and variety of hardware, it is not surprising many people
become confused. However, taking a little time to collect the following
information will save much frustration and the time frustration costs when
things don't install or work correctly: 

<ul>
<li>Any existing operating systems on the target system and the hard
drives on which they are installed.

<li>Hard drive: interface type; the hard drive settings; the number of
cylinders, heads, and sectors. The main consideration is whether your hard
drive uses a SCSI or an IDE interface. If it is SCSI, you should know the SCSI
ID of the drive for its settings. If it is an IDE drive, you should know if
the drive(s) are on the primary or secondary IDE controller and which drives
are set to "master" or "slave". The settings are crucial
in determining whether LILO (LInux LOader) should be used to manage the
booting of your operating system(s). 

<li>SCSI adaptor: You should know the make and model. This is useful in
troubleshooting if you have a supported card that is not detected.		 
<li>Memory: amount of installed RAM. Used to consider the amount of swap
space. 

<li>Network Card: You should know the make and model. 

<li>CD-ROM: If you are installing from CD-ROM, you must know its
make and model and settings as you would for a hard drive.

<li>Mouse: You need to know if you have a PS/2, serial or bus
mouse. You also need to know what protocol it uses. This is necessary
for both the character based mouse server and for configuration of the
X Window System (if you choose to install it).

<li>Video Card: If you want to run the X Window System, you must
know the brand and model of your card to configure the system to run
X.

<li>Monitor: If your want to run the X Window System, you must know
the allowable vertical and horizontal synchronization frequencies for
X to work.
</ul>

<p>Again, taking the time to list the above information before going further will
save you time and frustration and make the installation both easier and
smoother. If your system didn't come with literature detailing the above
parameters for your hardware, you should consult with your system vendor or
the manufacturer of the equipment. Other useful information to have if you are
going to be on a network are the TCP/IP networking settings for your system
(check with your system administrator for these if you don't already know
them). 

<a name="choose"></a>
<h3>Choosing Your Installation Method</h3>

<p>Red Hat Linux may be installed or upgraded via CD-ROM, FTP, NFS or from an
existing Hard Drive partition. Installation nor Upgrading is not supported
from floppy diskettes containing Red Hat packages. Which supported method
chosen depends on your needs, available equipment, availability of Red Hat
Linux and time. For example, if you are a network administrator that needs to
update or install 16 Linux boxes over the weekend, an NFS install is generally
the most prudent way. If you have a Red Hat CD-ROM for your personal machine,
then a CD-ROM install is order or Hard Drive install if your CD-ROM drive
isn't supported. If you don't have the CD-ROM and simply want to try Red Hat
out and have a couple of hours to spare, then an FTP/Hard Drive install is a
reasonable choice with a 28.8 speed modem or faster connection to the
Internet. No matter which method you choose, the installation of Red Hat is
similar in all cases. To begin, everyone needs to have the following files
available and then create the Installation Floppy Kit described below to
install Red Hat.

<a name="floppy"></a>
<h3>Creating the Installation Floppy Kit</h3>

<p>To create the Installation Floppy Kit, you need to obtain the following: 

<ol>
<li>The Red Hat Boot diskette, boot.img which is available via:
<a href="ftp://ftp.redhat.com/pub/redhat/current/i386/images/boot.img">ftp://ftp.redhat.com/pub/redhat/current/i386/images/boot.img</a>
or in the
<pre>$\backslash$images</pre> directory on a properly laid out Red Hat
CD-ROM. Obviously, this is required for all installation
methodologies.

<li>The Red Hat Supplemental Diskette, supp.img, which is available
via:
<a href="ftp://ftp.redhat.com/pub/redhat/current/i386/images/supp.img">ftp://ftp.redhat.com/pub/redhat/current/i386/images/supp.img</a>
or in
the <pre>$\backslash$images</pre> directory on a properly laid out Red Hat
CD-ROM. This diskette is required if you are method of install is not
CD-ROM based or you need PCMCIA support for any devices such as a
CD-ROM on the laptop to install properly. This diskette can also be
used with the Boot Diskette for an emergency start disk for an
installed system.

<li>The program RAWRITE.EXE which is available via:
<a href="ftp://ftp.redhat.com/pub/redhat/current/i386/dosutils/rawrite.exe">ftp://ftp.redhat.com/pub/redhat/current/i386/dosutils/rawrite.ext</a>
or
in the <pre>$\backslash$DOS</pre> directory on a properly laid out Red Hat
CD-ROM. This program is run from and existing DOS or Windows 95 system
to create usable diskettes from the boot.img and supp.img described
above If you have an existing Linux/Unix system, the <pre>dd</pre> command can
be used instead. This is described later in the document.

<li>DOS and Windows 95 users installing Red Hat Linux for the first
time on a machine that will have Linux installed as a second operating
system should also obtain:
<a href="ftp://ftp.redhat.com/pub/redhat/dos/fdips11.zip">ftp://ftp.redhat.com/pub/redhat/dos/fdips11.zip</a>
and unzip into
<pre>C:$\backslash$FIPS</pre> if you need to free space on your hard drive. This
utility can non-destructively shrink and existing DOS 16-bit FAT
(Please see Using FIPS for compatibility notes). This will achieve
will unpack into the program files FIPS.EXE and RESTORB.EXE which are
to be placed on the emergency boot disk made below. Your should also
read FIPS.DOC (part of the package fips11.zip) for information on
using FIPS not covered in this document.

<li>Create an Emergency Boot Diskette for an existing operating
system on the target machine that Linux will be installed on as a
second operating system must be created. This diskette should contain
basic tools for trouble shooting. For example, a DOS or Windows 95
emergency boot diskette should include a copy of FDISK.EXE,
SCANDISK.EXE (or CHKDSK.EXE), DEFRAG.EXE and RESTORB.EXE as a
minimum. This diskette is also used to back up an existing partition
table for those that will use FIPS.EXE to non-destructively shrink
existing partitions. By backing up the partition table, you can
restore it with RESTRORB.EXE if the need arises.
</ol>

<p><h4>Creating the Boot and Supplemental Diskettes</h4>

<p>A note about creating the Boot and Supplemental Diskettes: If you are
re-formating existing diskettes, DO NOT use <pre>format /s A:</pre> to
format the diskettes, just use <pre>format A:</pre>. The diskette images
need the entire capacity of the diskette and <pre>/s</pre> switch seems
to prevent the diskette images from being properly copied to the
floppies. For the emergency diskette below, you will of course want to
use the /s switch.
 
<p>One blank DOS formatted floppy is needed to create the Boot Diskette
and one blank DOS formatted diskette is needed for the Supplemental
Diskette. This diskette set is used for both installing or upgrading
Red Hat Linux. Starting with Red Hat 4.0, a "one boot diskette fits
all" strategy is employed to install or upgrade Red Hat Linux from
the CD-ROM, FTP, NFS or Hard Drive medium. Other distributions (and
older RHS distributions require you to match a boot image to your
hardware, RHS v4.0 and higher do not). The Boot Diskette is made from
the file "boot.img" and is located in the <pre>\images</pre>
directory on the Red Hat CD-ROM or can be downloaded from:
<a href="ftp://ftp.redhat.com/pub/redhat/current/i386/images/boot.img">ftp://ftp.redhat.com/pub/redhat/current/i386/images/boot.img</a>
 or one of Red Hat's mirror sites. If you are installing to a laptop
with PCMCIA hardware, or from a Hard Drive, NFS or FTP you will need
to create the Supplemental Diskette made from the file "supp.img"
which is located in the <pre>\images</pre> directory on the Red Hat CD-ROM
or can be downloaded from:

<a href="ftp://ftp.redhat.com/pub/redhat/current/i386/images/boot.img">htp://ftp.redhat.com/pub/redhat/current/i386/images/boot.img</a><br>

or one of Red Hat's mirror sites.

<p>The Boot Diskette image contains the bootable kernel and the module support
for most combinations of hardware and the Supplemental Diskette contains
additional tools for non CD-ROM installs. You should make the Supplemental
Diskette even if you are installing from CD-ROM because the Boot and
Supplemental Diskette can be used as an emergency boot system if something
should go wrong with the install or with your system after it is installed and
allow to examine the system. 
 
<p>NOTE: some will notice the size of the boot.img and supp.img being 1.47MB
which is larger than 1.44MB. Remember that the unformatted capacity of a
1.44MB is really 1.47MB and that boot.img and supp.img are exact byte for byte
images of a floppy diskette. They will fit using one of the tools below:

<h4>Using RAWRITE to Create the Boot and Supplemental Diskettes</h4>

<p>The utility <pre>RAWRITE.EXE</pre> may be used from DOS, Windows 95 or OS/2
to create the Boot and Supplemental Diskettes. <pre>RAWRITE</pre> can be
found in the <pre>\DOSUTILS</pre> directory on the Red Hat CD-ROM
or it can be downloaded from:

<a href="ftp://ftp.redhat.com/pub/redhat/current/i386/dosutils/rawrite.exe">ftp://ftp.redhat.com/pub/redhat/current/i386/dosutils/rawrite.ext</a>

or one of Red Hat's mirror sites. Once you have obtained it, copy <pre>
RAWRITE.EXE</pre> to <pre>C:\DOS</pre> or <pre>C:\WINDOWS</pre>
directory (or other system directory in the command path) which will
place the <pre>RAWRITE</pre> utility in your command path. From the CD-ROM
(presuming it is the D: drive or which ever drive and directory you
downloaded RAWRITE.EXE to on the system) to use <pre>RAWRITE</pre>, copy it
to one of your system directories:

<pre>D:\DOSUTILS> copy RAWRITE.EXE C:\WINDOWS
</pre> 
<p>Once rawrite has been copied to a system directory (such as
<pre>C:\DOS</pre> or <pre>C:\WINDOWS</pre>, change to the images
directory on the CD-ROM or to the directory you copied boot.img and
supp.img to and do the following to create the Boot Diskette:

<pre>C:\> D: 
D:\> cd \images 
D:\images> rawrite 
Enter disk image source file name: boot.img
Enter target diskette drive: a: 
Please insert a formatted disk into drive A: and press -Enter-: 
</pre>
<p>Once rawrite is done creating the Boot Diskette, remove the diskette from the
floppy drive and label it "Red Hat Boot Diskette". Remember, Red Hat
Linux 4.X uses a "one boot disk fits all" strategy so you don't have
to worry about matching a boot image to your hardware as earlier distributions
of Red Hat required. 
 
<p>To create the Supplemental Diskette, follow the instructions above but
substitute "supp.img" for "boot.img". Remember to label
this diskette "Red Hat Supplemental Diskette".

<h4>Using dd Under Linux or Unix</h4>

<p>If you are creating the Boot and Supplemental Diskettes from and
existing Linux or Unix box, make sure it has a 1.44-3.5" floppy
available and you know how your system refers to the floppy device. If
you don't know how the system accesses the floppy device, ask you
system administrator. For Linux, Floppy Drive A: is called /dev/fd0
and Floppy Drive B: is called /dev/fd1. To create the diskettes under
Linux, `cd` to the system directory containing the boot.img and
supp.img image files, insert a blank formatted diskette and type the
following enter <pre>dd if=boot.img of=/dev/fd0</pre> to make the Boot
Diskette. Once dd is done, remove the diskette from the floppy drive,
label it "Red Hat Boot Diskette" and set it aside.  Then insert a
second formatted diskette and type <pre>dd if=supp.img
of=/dev/fd0</pre>. Once dd is done, remove the diskette from the floppy
drive, label it "Red Hat Supplemental Diskette" and set it aside.

<h4>Creating an Emergency Boot Diskette</h4>

<p>If you are installing Linux to a machine that has an existing operating
system, make sure you create an emergency start diskette with useful
diagnostic and recovery tools. Exactly how you want to create such a diskette
various from operating system to operating system. However, MS-DOS 6.X and
Windows 95 will be covered here and should give you some ideas for other
operating systems. 
 
<p>Windows 95 users should press <I>"Start---Settings---Control---Panel---
Add/Remove Software"</I> and select the <I>"Startup Disk"</I>
tab. Insert a blank, DOS formatted disk and press <I>"Create
Disk"</I>.  When Windows 95 is done, you will have a boot diskette for
Windows 95 containing use tools such as FDISK.EXE, SCANDISK.EXE and
DEFRAG.EXE. Once the diskette is created, you need to copy
<pre>C:FIPS\RESTORB.EXE</pre> (obtained and unpacked
above) to the Windows 95 Boot Diskette you made. When you are done,
remove the diskette and label it "Windows 95 Emergency Boot Diskette
and Partition Table Back Up".

<p>MS-DOS 6.X users need to place a blank MS-DOS formatted diskette into floppy
drive A: and do the following to create their emergency boot diskette: 

<pre>C:\> format A:\
C:\> copy C:\DOS\FDISK.EXE A:\
C:\> copy C:\DOS\SCANDISK.EXE A:\
C:\> copy C:\DOS\DEFRAG.EXE A:\
C:\> copy C:\DOS\SYS.COM A:\
C:\> copy C:\FIPS\RESTORB.EXE A:\
</pre>
<p>Once you are done creating the diskette, remove it from the floppy drive and
label it "MS-DOS Emergency Boot disk and Partition Table Back Up". 

<p>You are ready to continue!

<a name="setting"></a>
<h3>Setting Up Your Installation Media</h3>

<p>Once you have created the Installation Floppy Kit, you should ensure
your installation method is properly setup for using the Red Hat
installation diskettes. For CD-ROM, NFS, FTP and Hard Drive
installation methods, the medium must have the directory
<pre>\RedHat</pre> on the "top level" with the directories
<pre>\base</pre> and <pre>\RPMS</pre> underneath:
<pre>RedHat 
   |----> \RPMS (contains binary the .rpm s to be installed) 
   |----> \base (contains a base system and files to setting up the hard drive)
</pre>
<p>CD-ROMs will, of course have additional directories but the key
directories needed for the installation are <pre>\RedHat</pre> on
the top level of the CD-ROM with <pre>\base</pre> and
<pre>\RPMS</pre> underneath on third party CD-ROMs. Obviously,
Red Hat Software will ensure their <I>Official Red Hat Linux</I> CD-ROM
will have the proper directory structure. So, if you are installing
from CD-ROM, you may go to Preparing Your System for Installation. For
the other types of installs, read the section appropriate section for
your installation medium:

<h4>Setting Up for an NFS Installation</h4>

<p>For NFS installs, you will either need a Red Hat CD-ROM on a machine
(such as an existing Linux box) that can support and export an <B>
ISO-9660 file system with Rockridge Extensions</B> or you need to mirror
one of the Red Hat distribution with the directory tree organized as
indicated above. And of course the proper files in each directory. The
directory <pre>\RedHat</pre> then needs to be exported to the
appropriate machines on the network that are to have Red Hat Linux
installed or upgraded.  This machine must be on a Ethernet, you can
not do an NFS install via dialup link.

<h4>Setting Up For a Hard Drive Installation</h4>

<p>Hard Drive installs need to have the <pre>\RedHat</pre> directory
created relative to the root directory of the partition (it doesn't
matter which partition) that will contain the Red Hat distribution
obtained either from CD-ROM or an FTP site.  For example, on the
primary DOS partition the path to <pre>\RedHat</pre> should be
<pre>C:\RedHat</pre>. On a DOS 16-bit FAT file system, it does not
matter that the <pre><I>package</I>.rpm</pre> names get truncated. All you need
to do is make sure <pre>\RedHat\base</pre> contains the
base files from a CD-ROM or FTP site and
<pre>\RedHat\RPMS</pre> contain all the
<pre><I>package</I>.rpm</pre> files from the CD-ROM or FTP site. The you can
install or upgrade from that partition. If you have an existing Linux
partition not needed for an installation or upgrade, you can set it up
as outlined here as well and use it.
 
<p>TIP: NFS and Hard Drive installs can provide more flexibility in the packages
available to install. NFS and Hard Drive installs/upgrades implied that you
can be selective about which packages are placed in the RPMS directory. For
example, if you only want a text based system, then the X-based packages may
be excluded. Also, if there are updates for the Red Hat system you wish to
install, they may be placed in the RPMS directory in place of the
distributions original packages. The only caveat for customizing the available
packages for installing or upgrading Red Hat Linux is that package
dependencies are meet. That is, if package A needs package B to be installed,
both packages must be present to meet the interdependencies. This may,
however, take a little experimenting to ensure all package dependencies are
met. For more information, please see "Customizing
Your NFS or Hard Drive Installation" below.

<h4>FTP Installations</h4>

<p>For FTP installs over the Internet, all you need is the IP address of your
nearest FTP server and the root directory path for the Red Hat Linux system
you wish to install. If you don't know the nearest FTP site, consult with your
system administrator or your ISP. If you are intending to do an FTP install
over a low band width connection (defined as anything slow than a 128K ISDN
link), it is highly recommend that you FTP the file files to a hard drive with
an existing DOS partition and then do the hard
drive install install described in this chapter. The total size of the
binary packages available in the <pre>/RedHat/RPMS</pre> directory is currently around
170MB which will take many hours to install. If anything goes wrong with the
installation such as the link goes down, you will have to start over again. If
you ftp the files first, setup your hard drive for installing Linux, it is
then less work and less flustering to recover from a failed install. You don't
even have to download all the files in <pre>/RedHat/RPMS</pre> to successfully install a
minimal system that can grow with your needs. Please see Customizing
Your NFS or Hard Drive Installation for details.


<h4>Customizing Your NFS or Hard Drive Installation</h4>

<p>One of the interesting things you can do with Red Hat Linux is customize the
install process. However, this is not for the faint of heart. Only those
already familiar with Red Linux or Linux in general should attempt customizing
the install. As of Red Hat v4.X, the <pre>/RedHat/RPMS</pre> directory contains
approximately 170MB of rpm files. RPM does compress these packages and can
assume the package will need and average 2-3MB of hard drive space for every
1MB of <pre>package .rpm</pre> available for installation. For example, if the
<pre>package .rpm</pre> is 6MB in size, you will need between 12 to 18MB of free
space to install the package.  If you know what software you want and don't
want,  much of the software provided will not have value for the installation,
and for for low band width connects, it is not feasible to download the entire
tree. With this in mind, an installation can be customized to remove unwanted
software. 
 
<p>Customizing the packages to install is an advantage and possible for the
following types of installs: FTP, NFS and Hard Drive methods. CD-ROM cannot
be written to (but you can copy the files to the hard drive and do a hard
drive install with the customized package list). FTP and NFS installs can only
be designed if you have administrator access to the server(s) on your network
or your system administrator is willing to work with you. The following
installation situations make customizing the installation desirable: Obtaining
Red Hat Linux via FTP over a low band width connection or designing a suite of
software to be used by all installation of a network of Red Hat Linux boxes. 
 
<p>To customize the installation, you must obtain the <pre>/base/comps</pre> file which will
provide you with the list of packages the a full install would normally have.
Then then packages you actually want to install from <pre>/base/comps</pre> need be
download. Then, the <pre>/base/comps</pre> needs to be edited to reflect the packages you
obtained and are going to install. (NOTE: if you have local
package.rpms you can add them to the comps file as well).

<h4>Understanding the COMPS file</h4>

<p>The Red Hat installation program uses the file <pre>/RedHat/base/comps</pre>
(the file here is an example from RHS v4.0) to determine what packages are
available in the <pre>/RedHat/RPMS</pre> directory for each category to be installed. The
file is organized by category and each category contains a list of packages
Red Hat believes are the minimum required for that section. NOTE: only the
<pre>package</pre> part of a packages name
<pre>package-version-build.rpm</pre> is listed in the file.
This means the comps file is generally usable from one version of Red Hat to
the next. A section in this file has the structure: 

<pre>number <I>category</I> 
<I>package</I> 
... 
end 
</pre> 
<p>That is a tag to identify the category number, the category, a list of the
package names in the category and the tag "end" to mark the end of
the category. 
 
<p>Without exception, everyone needs the all of the software packages listed in
the <B>Base</B> section of the file. The other sections, though, generally can
be customized or eliminated to suit a particular need. For example, there are
three types of <B>Networked Stations</B>: "plain", Management, and
Dialup. An examination of these sections shows that many of the software
packages are listed in all three categories, but some software packages are
specific to the category. If you are creating a <B>Dialup Networked Station</B>,
then you can safely eliminate the "Plain" and "Management"
sections and any software unique to those categories. Conversely, if you only
need basic networking capability for a networked work stations, the other
sections can be eliminated from the file as well as the unique software to
each of those sections. All you need do is make sure you have the all the
software packages listed in that category. If you have some local custom
packages (those not provided by Red Hat Software), you should add them to an
existing category that is appropriate rather than creating a new category. 
 
<p>Because the list of packages in each category only contains the name
of the package, i.e., not the entire
<pre>package-name-version-build.rpm</pre>, you can
substitute any updates Red Hat has made available in the <pre>updates</pre>
directory on:

<a href="ftp://ftp.redhat.com/pub/redhat/current/updates">ftp://ftp.redhat.com/pub/redhat/current/updates</a><br>

or one of Red Hat's mirror sites for the original package found in the
distribution's original <pre>/RedHat/RPMS</pre> directory.  The means
installation program is relatively version insensitive. The only
caveats here are that package dependencies are met . When an rpm'd
package is built, RPM itself tries to determine what packages
must be installed for another package to work (the rpm developer also
has direct control of this as well---he can add dependencies that rpm
might not ordinarily detect). This is where a little experimentation,
or research may be needed. For example, one way to determine package
dependencies (if you have user access to your NFS server on an
existing Red Hat Linux Box) is to telnet or login into it or if you
have the CD-ROM, mount it and cd to the <pre>RedHat/RPMS</pre> directory and
query the packages for its dependencies:

<pre>[root@happy RPMS] rpm -q -p -R bash-1.14.7-1.i386.rpm 
libc.so.5 
libtermcap.so.2 </pre>

<p>The "-q" puts RPM in query mode, the "-p" tells RPM to
query an uninstalled package and the "-R" tells RPM to list the
target package's dependencies required. In this example, we see libc.so.5 and
libtermcap.so.2 are required. Since libc and termcap are part of the base of
required software (as is bash really), you must insure the libc and libtermcap
packages (the dependency packages) are present to be able to install bash (the
target). Overall, as long as you get the entire <B>base</B> packages
installed, you will be able to boot the system when the Installation Program
completes. This means you can add additional packages to Red Hat as required
even if the Installation Program reports a package failed to install because
dependencies were not met. 
 
The following table describes the categories of software are found in
<pre>/base/compsin</pre> of Red Hat v4.0:
<p>
<table cellpadding=10>
<tr>
<td valign=top><B>RPM Category</B></td> <td><B>Required?</B></td> <td><B>Comments</B><br></td>
</tr>
<tr>
<td>BASE</td> <td>Yes</td> <td>Should not be customized.<br></td> 
</tr>
<tr>
<td>C Development</td> <td>Highly Recommend</td> <td>Need the minimal system 
              to compile a kernel<br></td>
</tr>
<tr> 
<td>Development Libs</td> <td>Highly Recommend</td><td>Need the minimal system
                 to compile a kernel<br></td>
</tr>
<tr>
<td>C++ Development</td> <td>Optional</td> <td>C++ Development<br></td>
</tr>
<tr> 
<td>Networked Workstation</td> <td>Recommend; Required & Whether you are on an Ethernet or
for other network software</td> 
                       <td>going to dialup networking, you 
                       need to install this package suite 
                       You shouldn't customize this.<br></td> 
</tr>
<tr>
<td>Anonymous FTP/Gopher Server</td> <td>Optional</td> <td>If your Linux box is going to 
serve files via FTP or Gopher<br></td> 
</tr>
<tr>
<td>Web Server</td> <td>Optional</td> <td>Useful for Web Developers for local 
development, required if you serve 
web pages.<br></td>
</tr>
<tr> 
<td>Network Management Workstation</td> <td>Optional</td> <td>Has additional tools useful for 
dialup as well as Ethernet network<br></td>
</tr>
<tr> 
<td>Dialup Workstation</td> <td>Recommended</td> <td>Required if you are going to dialup<br></td>
</tr>
<tr> 
<td>Game Machine</td> <td>Optional</td> <td>Need I say more? Fortunes are 
required for humor :-)<br></td>
</tr>
<tr>
<td>Multimedia Machine</td> <td>Optional</td> <td>If you have supported hardware<br></td>
</tr>
<tr>
<td>X Window System</td> <td>Optional</td> <td>If you want to run X<br></td>
</tr>
<tr> 
<td>X Multimedia Support</td> <td>Optional</td> <td>If you have supported hardware<br></td>
</tr>
<tr>
<td>TeX Document Formatting</td> <td>Optional</td> <td>Customize as needed<br></td>
</tr>
<tr> 
<td>Emacs</td> <td>Recommend</td> <td>The One True Editing Environment<br></td>
</tr>
<tr>
<td>Emacs with X</td> <td>Recommend</td> <td>Requires X<br></td>
</tr>
<tr> 
<td>DOS/Windows Connectivity</td> <td>Optional</td> <td>Huh?<br></td>
</tr>
<tr> 
<td>Extra Documentation</td> <td>Required</td> <td>Man pages and should ALWAYS 
be installed. Other packages optional.<br></td>
</tr>
</table>

<a name="recommend"></a>
<h3>Recommendations</h3>

<p>It is difficult to determine exactly what any one installation will
require.  However, someone installing via FTP should get the <B>
Base</B> system and the <B>Dialup Networked Station</B> and install
these. Then additional software can be obtained and added as the need
arises. Of course if you want to do C programming, you should get the
relevant packages and edit the comps file appropriate.

<p>One last caveat: If you encounter a file during the install that requires
another package you don't have available, or you make a mistake in the comps
file, you can generally finish the install and have a bootable working system.
You can correct the problem by manually adding the failed packages and their
dependencies later. Overall, get the entire Base system and a Networked Station
packages installed and you can add anything you need or want later. 

<h4>Preparing Your System to Install</h4>

<p>Before continuing, if you have an existing operating system, and have
not yet backed up your data, you must back it up now. While most of
the time installing Linux will not result in the loss of data, the
possibility exists, and the only way to guarantee a recovery in such a
catastrophic event is to <B>back up your data</B>.

<p>At this point with the information collected above and having decided on an
installation method above, preparing your system should offer no obstacles.
Essentially, you need to make sure you have free and unpartitioned space on
one the system's hard drives. (NOTE: there is a file system type known as
UMSDOS that some distributions use as an optional way to install Linux onto an
existing DOS file system; Red Hat Linux does not support this type of
installation.) If you are installing on a system that will only have Linux and
does not currently have an operating system installed, then you are set to
partition your hard drive and can go to the next section.
If you have an existing operating system, such as DOS/Windows 3.1, Windows 95,
OS/2 or another operating system, then things are a bit more complex. The
following should help determine what you need to do to free hard drive space: 

<ul>
<li>DOS or Windows 95 using DOS 16-bit FAT: You may use utility
FIPS.EXE that is part of the Installation Floppy Kit described above
that will allow you to non-destructively make a single DOS 16-bit file
allocation table (FAT) into two or more DOS 16-bit FATs. These new,
empty partitions can be deleted, creating free space to be used for
Linux partitions. See FIPS.EXE below. If you have a CD-ROM containing
Red Hat, there should be a directory called <pre>\dosutils</pre>
containing a copy of FIPS.EXE. Otherwise, the FIPS package can be
downloaded from:

<a href="ftp://ftp.redhat.com/pub/redhat/dos/fips11.zip">ftp://ftp.redhat.com/pub/redhat/dos/fips11.zip</a>
<br>
or one of Red Hat's mirror sites.
 
<p>NOTE: Microsoft has introduced a new 32-bit FAT system with recent
Windows 95 releases. This 32-bit FAT system cannot be shrunk by the
current version of FIPS.EXE. In Windows 95, if you check under <I>My
Computer</I> | <I>Control Panel</I> | <I>System</I> and your Windows 95
kernel version ends in a "B", Windows 95 is likely to be using a
32-bit FAT.

<li>OS/2, Windows NT, DOS 32-bit FAT and Other Users: You will need to either
back up existing partitions and delete them, or if using a single partition,
delete the partition and re-install the operating system into a smaller
partition, leaving free space to be used for Linux partitions. 
</ul>


<h4>Planning to Partitioning The Hard Drive</h4>

<p>Linux has its own version of the program <pre>fdisk</pre> used to create native
Linux and swap partitions. However, the details of its use are described later
in this guide. However, discussion of the concepts on how to partition your
hard drive are important now so reasonable decisions can be made on how much
and how to make free space available on the target system. 

<p>One way of installing Linux is to use two partitions---one for the
operating system and one for the swap file in the free space on your
hard disk. However, this is not an ideal way for Linux to be
installed. While some hardware configurations may only allow this type
of organization, the recommend method is to use a minimum four partitions
for Linux: One for <pre>/</pre> (the "root" partition), one for <pre>/var</pre>, one
for <pre>/home</pre> and one for swap.  Unlike logical DOS drives which are
assigned a drive letter, Linux partitions are "glued" together into
one virtual directory tree. This scheme takes advantage of how Linux
operates in the real world. Essentially, each file system reflects the
life time of a file: the files on the <pre>/</pre> partition have the longest
"time to live" because they are infrequently updated and often last
as long as the operating system itself does on the hardware; The <pre>/home</pre>
partition represents medium file life times that can be measured in
weeks or days, such as user documents; <pre>/var</pre> represents files with the
shortest life time (such as log files), measured in minutes or even
seconds. This type of setup also suggests a backup strategy: the root
file system only needs to be backed up when a new program is added or
configuration files are changed. The <pre>/home</pre> partition can be put on
some sensible full/incremental back up schedule while /var never needs
to be backed up, with the exception of <pre>/var/spool/mail</pre>.  A more
through discussion of this can be found in Kristian Koehntopp's
Partition mini-HOWTO and Stein Gjoen's Multiple Disks Layout
mini-HOWTO.

<p>A PC can have either have a maximum of four primary partitions or have three
primary partitions and 1 extended which can contain many "logical"
drives.  One model in which to understand this are Russian Stacking
Dolls. Basically, Russian Stacking Dolls are containers within
containers but each container is a discrete doll. A partition is a
mechanism describing a container within the master container of the
hard drive that an operating system does not leave the confines of. A
normal PC hard drive can have up to four primary containers (Primary
Partitions) or three primary containers and one extended container (Extended
Partition) that contains Logical containers (Logical
Drives/Partitions). This means you can have one primary partition for
DOS/Windows, one primary partition for the root file system, one primary
partition for a swap partition, and one Extended partition containing
logical drives for <pre>/var</pre> and one logical drive for <pre>/home</pre> (as well as
other "optionally" defined partitions). However, Linux can and it is
often prudent to have more than the partitions outlined here. Due to
some design limitations in typical PCs BIOS, there are limitations on
how partitions can be setup and still be boot partitions.

<p>Overall, IBM designers didn't think that a PC would ever have 1 GIG drives 15
years ago when the PC was originally designed. As a result, a PC BIOS is
limited to a 10-bit address for describing the initial geometry of a hard
drive. This happens to correspond to one of the values used in calculating the
location of a piece of data on a hard disk known as cylinders. A 10-bit number
is sufficient to describe the numbers 0 through 1023 in decimal notation. A
drive with 1024 cylinders, 16 heads and 63 sectors per track, is approximately
504MB. This is important for 2 primary reasons: Most boot loaders have to
depend on BIOS to get a drives initial geometry for calculating the beginning
of a partition and the average drive size on the market these days is 1.2 GIG
which contain 2,000+ cylinders. Luckily, most newer system (usually those with
a BIOS designed in 1994 or later) have a BIOS that supports Logical Block
Addressing (LBA). LBA mode is a means of supporting Large Hard Drives by 1/2
or 1/4 the number of cylinders and doubling (or quadrupling) the number of
heads. This allows for the proper calculation of drive geometry while working
within the constraints of BIOS. So a drive with 2048 cylinders, 16 heads and
63 sectors per tract will, under LBA mode, have 1024 cylinders, 32 heads, and
63 sectors per tract. Now, we can potentially use any primary partition as a
boot partition. 

<p>Now, with all this theory and practical advice, it is time to provide some
example of how this can be put together; the first example is an 850MB drive
with LBA mode enabled which might be divided:
<pre>
Partition	File System Type	Use	Size
/dev/hda1	MS-DOS	DOS/Win95	400MB 
/dev/hda2	Linux Native (ext2)	/	325MB 
/dev/hda3	Linux Swap	Swap	32MB 
/dev/hda4	Extended	N/A	93MB 
/dev/hda5	Linux Native (ext2)	/var	40MB 
/dev/hda6	Linux Native (ext2)	/home	53MB 
</pre>

<p>This table might be useful for a machine used by a single person. There a
couple of things to note here. First, the labeling of partitions by Linux. The
<pre>/dev</pre> is the Linux directory where "device files" are kept (this is
different than a device driver but it is related to device drivers) that Linux
uses to identify devices by user programs. The next part, <pre>hda</pre>,
means "hard disk <B>A</B>" used to designate "Fixed Disk
1" as it is called under DOS. But it also means that the drive is an IDE
drive. SCSI drives would use <pre>sda</pre> for "SCSI Disk <B>A</B>.
The whole line <pre>/dev/hda1</pre> means the 1st partition on hard disk <B>A</B>.
As for the sizes that are being used here, they are a little arbitrary, but
fall under the following guidelines: A virtual decision was made to use half
of the drive for DOS or Windows 95 and roughly half for Linux. So, 400MB was
allocated for DOS and it is presumed that is enough for those needs. The <pre>/</pre>
root file system is 325MB which is enough for the base Linux system (usually
about 50MB), programming tools such as C, C++, perl, python and editors such
as vi and EMACS as well as the X Window System and some additional space for
extra useful packages you might find in the future. If you do not plan to run
X, you can subtract 150MB from this total. The swap partition is determined by
multiplying 2x physical ram installed on our virtual machine (which has 16MB of
core RAM installed). If you are tight on space or have less than 16MB of ram,
you should have at least a 16MB swap partition. However, you must have a swap
partition defined.  40MB is used for <pre>/var</pre> which includes enough space for log
files and email handling for one or two people. and 53MB for <pre>/home</pre> provides
plenty of space for a user or two to work in. 


<h4>How Much Space Do You Really Need?</h4>

<p>By now, an installation method has been chosen and a view of what partitioning
for Linux has been discussed. But how much space do I really need? The answer
is: "It depends."  To make a decision on how much space is needed,
This a the goal(s) of why you are installing Linux must be reviewed because it
has a direct bearing on the space needed to meet these goal(s). If you install
everything, you will need about 550MB for all the binary packages and
supporting files. This does not include swap space or space for your own
files. When these are factored in, a minimum of 650MB or more is needed. If
your goal is more modest such as having a text only system with the C
compiler, the kernel source tree, EMACS, basic Internet dialup support, then
125 to 150MB of hard drive space is sufficient. If your plans are more
demanding such as having a web development platform and X then 450MB or
so described in the model above should be enough. If you are planning to start
and ISP or commercial web site, then 2 or more GIGs of hard drive space may be
needed depending on the scope of services being offered. The overall rule of
thumb is having to much real estate is a good thing, not having enough is bad.
To help you decide how much space is enough, here are some basic
formulas/values for different needs: 
<p>
<table>
<tr>
<td><B>Use of Partition</B></td> <td><B>Recommend</B></td> <td><B>Size Comments</B><br></td>
</tr>
<tr>
<td>Swap</td> <td>2 x Physical RAM</td> <td>If less than 16MB of RAM installed, 
16MB is a must. If space is tight, 
and 16MB RAM installed, 1 x Physical
RAM is the minimum recommended.<br></td> 
</tr>
<tr>
<td>Root system, no X</td> <td>100 - 200MB</td> <td>Depends on tools such as compilers, 
etc. needed<br></td> 
</tr>
<tr>
<td>Root system, with X & 250-350MB</td><td>Depends on tools such as compilers, 
etc., needed<br></td> 
</tr>
<tr>
<td>/home</td> <td>5 - Infinite MB</td>	<td>Depends on being single or multiple 
users and needs<br></td> 
</tr>
<tr>
<td>/var</td> <td>5 - Infinite</td> <td>Depends on news feeds, # of users, etc.<br></td>
</tr>
<tr>
<td>/usr/local</td><td>25 - 200MB</td> <td>Used for programs not in RPM format 
or to be kept separate from the rest of Red Hat<br></td> 
</tr>
</table>
<a name="fips"></a>
<h3>Using FIPS</h3>

<p>Many people installing Linux have one hard drive with a single DOS or
Windows 95 partition already using the entire hard drive, or they may
have two drives with 1 DOS or Windows 95 partition per drive. FIPS is
a utility that can non-destructively shrink a 16-bit DOS FAT in use by
DOS 3.X or higher and many implementations of Windows 95. (NOTE: if
you are using revision "B" of the Windows 95 kernel, you may be
using FAT32 which FIPS currently cannot shrink.) If you meet the
requirements above, then you can shrink an existing primary partition
on any drive. NOTE: FIPS cannot shrink logical drives or extended
partitions.  If you have Red Hat on CD-ROM, the utility should be in
the <pre>\dosutils</pre> directory on the CD-ROM. If you have
downloaded Red Hat Linux, you should also download FIPS package
available from:

<a href="ftp://ftp.redhat.com/pub/redhat/dos/fips11.zip">ftp://ftp.redhat.com/pub/redhat/dos/fips11.zip</a>
<br>
or one of the many Red Hat's mirror sites. You should also read
FIPS.DOC included with this package for details on FIPS operation.

<p>A few caveats about using FIPS: As a reminder, you should <B>back up</B> your
existing data before using it. While it is rare for FIPS to damage a
partition, it can happen, and backing up your data is the only way to recover
from such a catastrophe. FIPS can only be used on primary DOS 16-bit FAT
partitions. It cannot be used on any other types of partitions, nor can FIPS
be used on Extended partitions or Logical drives. It can only split primary
partitions. Before running FIPS, you must run SCANDISK to make sure any
problems with your partition are fixed. Then you must run DEFRAG to place all
the used space at the beginning of the drive and all the free space at the end
of the drive. FIPS will split an existing primary partition into to two
primary DOS 16-bit FAT partitions: One containing your original installation
of DOS/Windows 95, and one empty, unformatted DOS 16-bit DAT partition that
needs to be deleted using the DOS or Windows 95 <I>fdisk</I> program. The
following steps outline how to use FIPS.EXE: 

<ol>
<li>Copy <pre>FIPS.EXE</pre> to <pre>C:\WINDOWS</pre> or <pre>C:\DOS</pre>.
This will place <pre>FIPS.EXE</pre> in your command path.

<li>Create or use the bootable DOS or Windows 95 emergency disk
described in the Installation Floppy kit above and place the program
<pre>RESTORB.EXE</pre> on the disk if you have not already done so. FIPS
gives you the ability to back up your existing partition table,
allowing you to return your system to its previous state using
<pre>RESTORB.EXE</pre>.

<li>Run <pre>scandisk</pre> and <pre>defrag</pre> (included with DOS 6.X and
higher). This makes sure there are no errors on your hard drive and
places all the free space at the end of the drive.

<li>Make sure you are in DOS mode (i.e., not running Windows 3.X or
Windows 95).

<li>Type <pre>fips</pre>. An introductory message will appear and you
will be prompted for which hard drive on which to operate (if you have
more than 1).  Most people will choose "1" for the first hard disk
to shrink.

<li>After confirming that you wish to continue, you will be asked to
make a backup copy of your existing boot and root sectors on the
bootable disk made above. This will allow you to restore the hard
drive if needed.

<li>FIPS will ask if all the free space on your existing partition
should be used to create a second partition, with an initial partition
table if you accept the defaults. If this isn't acceptable, say "no"
and then use the up and down arrow keys to adjust the amount of space
used for the second partition. Once you are happy with the division,
hit Enter to stop editing. If the sizes with the new partition table
are acceptable, choose "c" to continue. If not, choose "r" to
re-edit the table.

<li>One last chance is given to quit FIPS without making changes or
writing out the new partition table. If you are happy, write it out!

<li>Once FIPS is done, re-boot your computer to have FIPS changes
take effect.

<li>Next, use DOS's <pre>fdisk</pre> to delete the second DOS partition. This
will leave unallocated space to be used by Linux's version of f:disk
later to create Linux native and Linux swap partitions.
</ol>
<p>With the appropriate things done in this section for installing Linux,
you are now ready to Install Red Hat Linux!

<a name="install"></a>
<h3>Installing Red Hat Linux</h3>

<p>By now, you should have created an Installation Floppy Kit, Prepared
Your Hard Drive, and Have your Installation Media ready. for the
install. The details of the installation follow, however, you first
begin by booting your system and configuring the install program to
install from your selected medium. Once this is done, the installation
proceeds with the same steps for each everyone one after that. At this
point, you need to begin by booting your computer with the diskette
labeled "Boot Diskette".

<h3>Using Your Installation Media</h3>

<p>As the boot diskette starts up, the kernel will attempt to detect any
hardware which the boot diskette has drivers compiled directly in to
it. Once booting is complete, a message asking if you have a color
screen appears (if you do, select OK). Next comes the Red Hat
Introduction Screen welcoming you to Red Hat Linux. Choose OK to
continue. The next questions asks if you need PCMCIA support which you
need to say yes to if you are installing to a laptop; say yes and
insert the Supplemental Diskette when prompted. Once PCMCIA support is
enabled (if needed), you will be presented with a screen asking what
type of installation method you will be using.  Follow the
instructions for the installation method you've chosen described in the following sections.


<h4>Installing From CD-ROM</h4>

<p>If installing from CD-ROM, you should choose "Local CD-ROM" by
highlighting it from the list of installation types. Once you choose
"Local CD-ROM" and click "OK", you will be asked if you have a
SCSI, IDE/ATAPI or Proprietary CD-ROM that you wish to install
from. This is where some of the hardware research pays off: if you
have a recently made 4X or faster CD-ROM drive that was bundled with a
Sound Blaster or other sound card, you most likely have an IDE/ATAPI
type drive. This is one of the most confusing issues facing you.

<p>If you choose SCSI, you will be asked what kind of SCSI card and be presented
a list. Scroll down the list until you find your SCSI card. Once you have
choose it, you will be asked if you wish to AUTOPROBE for it or SPECIFY
OPTIONS. Most people should choose "AUTOPROBE" which will cause the
setup to scan for your SCSI card and enable the SCSI support for you card when
found 

<p>Once the Installation Program has successfully located the Red Hat CD-ROM, you
should proceed to "Walking Through the Rest of the Installation." 


<h4>Installing From The Hard Drive</h4>

<p>If you are installing from a hard drive, then highlight this option
and choose "OK". If you have not already choose PCMCIA support, you
be prompted to insert the Supplemental Diskette.


<h4>Installing via NFS</h4>

<p>If you are installing via NFS, then highlight this option and choose
"OK". You will next be asked to choose which Ethernet card you have
installed on the target machine so the Installation Program may load
the correct Ethernet driver. Highlight the appropriate card from the
list and then select "OK" allowing the Installation Program to
AUTOPROBE for you card.  However, if you machine hangs, you will need
to do <pre>Ctrl-\Alt-Delete</pre> to reboot the
system. Most of the time, when this happens, it is because the probing
"touches" a non Ethernet card. If this should happen, try again and
choose "SPECIFY OPTIONS" and give data about your card in the form
of:

<pre>ether=IRQ,IO\_PORT,eth0
</pre>This will instruct the probe to look at the location specified by the
values <pre>IRQ</pre> and <pre>IO\_PORT</pre> for an Ethernet card. For
example, if you Ethernet card is configured for IRQ 11 and IO\_PORT
0x300, you would specify:

<pre>ether=11,0x300,eth0</pre>

<p>Once your card has been successfully found, you will be prompted for
TCP/IP information about your machine and the NFS server with the
Linux installation.  First, you will be asked to provide the target
machines <I>IP Address, Netmask, Default Gateway</I>, and <I>Primary
Name Server</I>. For example: 
<pre>
IP Address:          192.113.181.21
Netmask:             255.255.255.0
Default Gateway:     192.113.181.1
Primary Nameserver:  192.113.181.2
</pre>
<p>Once you press OK, you will prompted for the target machines <I>
Domainname</I> and <I>Hostname</I>. For example, if you domain name is
infomagic.com and hostname is vador, enter:
<pre>
Domainname:               infomagic.com
Host name:                vador.infomagic.com
Secondary nameserver IP:  Enter if needed
Tertiary nameserver IP:   Enter if needed
</pre>
The last screen will prompt you for the NFS server and the exported
directory containing the Red Hat distribution. For example, if you NFS
server is redhat.infomagic.com, enter:

<pre>
NFS Server name:    redhat.infomagic.com
Red Hat Directory:  /pub/mirrors/linux/RedHat
</pre>
Again, if you do not know these values, check with you system
administrator.  Once you have entered the values, choose "OK" to
continue. If the Installation program reports and error locating the
Red Hat distribution, make sure you have the correct values filled in
above and that your network administrator has given the above target
machine information export permission.


<h4>Installing via FTP</h4>

<p>An FTP install is very similar to the NFS install outlined above.  You
will be prompted for the Ethernet card and your machines TCP/IP
information.  However, you will be asked for the <I>FTP site name</I>
and <I>Red Hat directory</I> on the Red Hat mirror site. instead of NFS
server information.  There is one caveat about performing an FTP
install: find the closest and least busy FTP site to your location.
If you don't know how to do this, check with your network
administrator.

<p>TIP: If your hardware isn't detected, you may need to provide an
override for the hardware to be enabled it properly. You may also want
to check:

<a href="http://www.redhat.com/pub/redhat/updates/images">http://www.redhat.com/pub/redhat/updates/images</a>
<br>
to see if Red Hat has updated boot diskettes for your hardware.

<a name="rest"></a>
<h3>Walking Through the rest of the Installation</h3>

<ol>

<li>Next, you will be asked if you are installing to a New System or
Upgrading RedHat 2.0 or higher. If you are upgrading, you will not be
offered the chance to partition your hard drive or configure anything
with your system except LILO.  Press either INSTALL or UPGRADE to
continue.

<li>If you are upgrading, you will be asked for the root partition
of your existing Red Hat system.  Highlight the appropriate partition
of your existing Red Hat system and Press "OK".  If you are
installing for the first time, you will need to partition your hard
disk with free space determined above.  The following discussion is an
example based on Planning to Partition the Hard Drive.  If you do not
have any free space on your hard disk to create partitions and are
using a 16-bit FAT such as that used by DOS or most Windows 95
installations, please review the Using FIPS section of this document.
To use fdisk, highlight the disk you wish to partition from the list
presented to you by the Installation Program.  You will be dropped
from the "graphic" screen and presented with a black and white
screen with the following prompt:

<pre>Command (m for help):
</pre>
<p>This rather mysterious prompt is Linux's fdisk's command prompt.  If
you press `m`, you will get a list of commands with a short definition
of what each does.  However, the most useful one to start with is
"p".  This will print your existing partition on the screen.  If you
have existing partition(s) on the drive they will be displayed.  Make
sure you can create at least one 25-50MB partition that starts before
cylinder 1024 and ends on or before cylinder 1023 as this type of
locations is required by LILO to be able to boot the root partition
which will in turn allow the kernel to take over you system which is
not restricted in the way LILO is.  Once the kernel boots your system,
it queries the hardware directory and ignore BIOS.

<p>To create a primary root partition of 50MB according to our example
above, enter "n".  First, you will be asked for a partition number
between one and four. Our example in Planning to Partition the Hard
Drive suggests two.  You will be asked if the partition is to be a
primary or extended, enter `p` primary.  Next you are asked to enter
the beginning cylinder which should be the first available cylinder
from the range given.  After you hit enter, you will be asked for the
ending cylinder.  Since we want to make this partition 50MB, you can
enter +50M and fdisk will calculate the nearest ending cylinder for a
space of about 50MB.  Once you have done this, enter the "p" command
so you can make sure the new partition ends on or before cylinder
1023.  If the new partition doesn't, use the "d" command to delete
partition two and try again except enter +40MB for the new primary
partition and check again with the "p" command.  Keep doing this until
you get a root partition below cylinder 1024.  Overall, if you cannot
create a root partition of at least +25M below cylinder 1024, then you
will either need to free more space below cylinder 1024 or not use
LILO.

<p>Next, according to our example, you will want to create a swap
partition that is 2 x physical ram installed.  Creating a swap
partition requires two steps, first using the "n" command to create a
primary partition (three in the example).  Following the instructions
above, except enter the value of +(2 x physical RAM) MB.  For the swap and
other partitions, we don't care what there beginning and ending
cylinders are because they are not crucial for LILO to work
correctly---only the root partition is.  Once you have created the
Linux native partition to be used as the swap partition, you need to
use the "t" command to change the partition ID to type "82" when
prompted.  This changes the partition ID so Linux well recognize it as
a swap partition.  When you have successfully done this, the "p"
command will report that you have a native Linux partition and a Linux
swap partition.

<p>Now, since we need two more partition, but the hard drive in a PC can
only support four primary partitions and three primary partitions have been
used, we need to create an Extended partition that occupies the rest
of the drive that will allow the creation of Logical drive with end
the extended partition.  This time, to create the Extended partition
with the "n" command, enter four for the partition number and choose
"e" when prompted to create an Extended partition.  When asked for the
beginning cylinder, use the first one available and for the last
cylinder, enter the last available cylinder.  You are now ready to
create Logical drives for <pre>/var</pre> and <pre>/home</pre> according to our example.

<p>To create a logical drive of 40MB to be used as <pre>/var</pre>, enter "n" to
create a partition.  Because there is no longer a choice of Primary or
Extended, you are not prompted for this information but instead asked
if this is to be partition five.

<p>Once you have completed this, you will be asked for the starting
cylinder which should be the first available cylinder.  For the ending
cylinder, enter +40M for the size as the size was entered above.  For
the <pre>/home</pre> partition, you may have a choice.  If your drive is larger
than the 850MB suggested in the example, you can enter +53Mb as
indicated above and use the extra space for partition such as
<pre>/var/spool/mail</pre> and <pre>/usr/local</pre>.  Otherwise, just use the last
available cylinder to define <pre>/home</pre>.  Once you are done creating
partitions, you can use the "p" command to print the partition one
last time to review it.  However, you won't modify any thing until you
use the "w" command to write the partition out to the hard disk.  If
you decided not to modify the partition table at this time, choose "e"
to exit without modifying the partition table.  NOTE: When creating
Logical partitions, you must reboot the system in order for Logical
Partitions to be usable.  Simply go through the options as you did up
to being asked to partition you drive.  However, say no the second
time around and proceed to the next step.

<li>Once you have created the necessary Linux Native and Linux Swap
partitions. You are required to have one swap partition. After the
swap partition is initialized, you will then be asked which
partition(s) you intended to install Linux to (if upgrading, simply
indicate your existing root partition): You must configure and choose
one partition for the root partition. Highlight the root partition.
Then (unless you are upgrading) you will be presented with a table of
other available partitions.  Choose the appropriate partitions and
"EDIT" to indicated which partitions will be used for which
directories.  If you have more than one partition for the Linux
installation, now is the time to designate them as well.

<li>Next is the Software Package Selection. First, a list of
software categories to install is presented, followed by a chance to
customize which software packages from each category is to be
installed. If you have not installed Red Hat or other distribution of
Linux before, simply choose the category of software you wish to
install and let the setup program install the defaults for each
categories. If you find you need a package that wasn't installed
originally, you can always install it easily later.  While the
software is installing, you will see a progress indicator and should
get a cup or two of coffee. Installation can take anywhere from
thirty minutes to an hour or so, depending on software choices and hardware
configuration.

<li>After the software installation is done, you will be asked to
configure you mouse. Again, choose what is appropriate for your
hardware.

<li>Next is the X Window System configuration. We recommend you wait 
until after you boot your system for the first time to configure X. 
If something goes wrong with the X configuration, you may need to start 
the installation procedure from the beginnings the Installation Program 
isn't able to recover.

<li>If you do not have an Ethernet Card, DO NOT configure your
network at this time. If you do have a network card and didn't
configure it earlier, you should configure it now.  Configuring for a
dialup network should be done after the installation is complete.

<li>Next, you need to configure the system clock. UTC is a good
choice if you are on a network and want daylight savings time handled
properly. Local Time is good if the computer is a stand-alone machine.

<li>If you do not have a US Keyboard, you will need to configure for
the country keyboard you have at this time.

<li>You will now be prompted for the system password for the root
account.  Write it down and don't forget it as it is a non-trivial
matter to recover the password and you will need it to access the
system when you first reboot.

<li>Finally, you will be asked to configure LILO.  If you have not
installed a root partition that begins and ends between cylinder
0-1023, DO NOT INSTALL LILO!  If, when you reboot the system for the
first time LILO does not allow you to boot your system correctly, use
the Emergency DOS/WINDOWS 95 boot diskette and type the following at
the <pre>A:\> fdisk /mbr</pre>.  This will allow your system to
boot into an existing DOS or Windows 95 system as it did before LILO
was installed.  You can then use the Red Hat Boot Diskette from v4.1
with the following parameters at the boot: prompt to you system on the
hard drive:

<pre>boot: rescue root=/dev/???? ro load\_ramdisk=0
</pre><br>
Where <pre>????</pre> is the root partition such hda2 in the 
example used in this document.

</ol>
<p>Once the installation procedure is completed, you are ready to reboot your
system and use Linux! 

<h3>After Installing Red Hat</h3>

<p>Now that you have installed Linux and are booting your system for the
first time, there are some useful things to know about using your
system such Understanding the LILO prompt, Logging In for the First
Time and Using RPM.

<a name="lilo"></a>
<h3>Understanding the LILO prompt</h3>
 
<p>If you have installed LILO to manage one or more operating systems,
the following useful things should be known:

<p>When you power-on or reboot the system you get the "LILO" prompt
which you have hopefully configured for a 30 second or so delay before
it boots the system. When LILO appears on the screen, if you do
nothing, the default operating system will boot at the prescribed time
out period. However, from LILO, you can control several aspects of how
Linux boots, or tell LILO to boot an alternative operating system. If
you wish to override the default behavior of LILO, pressing the
<pre>Shift</pre> key at the appearance of LILO will cause a "boot:"
prompt to appear. Pressing <pre>Tab</pre> at this prompt will produce a
list of available operating systems:

<pre>LILO boot: 
dos linux 
boot:
</pre> 
<p>This tells use that "dos" is the default operating system that will
boot if nothing is typed, or to boot Linux, type "linux" (without
the quotes). However LILO lets you pass overrides to the Linux kernel
which will override the kernels default behavior. For example, you may
have been experimenting with the start-up configuration files and done
something that prevents the system from coming up properly, so you
want to boot the system up to the point (but not after which) it reads
the configuration files. The override for this is "single":

<pre>boot: linux single</pre>
<br>
will boot the system into single user mode so you can take corrective
action.  This is also useful if your system won't come all the way up
to the login: prompt some other reason.

<a name="logging"></a>
<h3>Logging In the First Time</h3>

<p>Now that you are faced with the "login:"  prompt for the first time
you may be wondering how to get into the system. At this point on a
newly installed system, there is only one account to login to which is
the administrative account "root". This account is used to manage
your system and doing such things as configuring your system, adding
and removing users, add/removing software, etc. To login into the
account, type "root" (without the quotes) at the login: prompt and
hit enter. You will then be prompted for the password you entered
during setup. Enter that password at the password: prompt. The system
prompt <pre>[root@locahost] #</pre> will appear once you have successfully
negotiated the login. The system prompt tells you two things: you are
logged in as "root" and in this case your machine is called
"localhost". If you named your machine during the installation
process, then your machine name will appear instead of
"localhost". Now that you are logged in, you can use such commands
as <pre>ls</pre> to list files, <pre>cd</pre> to change directory, and <pre>more</pre> to look at
the contents of ASCII test files. The root account also has its own
home directory, <pre>/root</pre>. A home directory is where a valid system
accounts places you in the file system hierarchy once you have
successfully logged in. Some Unix systems use <pre>/</pre> instead, so don't
be fooled if you don't see any files if you type "ls"; there aren't
any in the root home directory.

<h4>Creating A User Account</h4>

<p>One of the first things you should do on a newly installed system is
to create a regular user account for yourself and plan on using the
root account only for administrative functions. Why is this important?
Because if you make a critical error in manipulating files you are
working on, you can damage the system. Another reason is that programs
run from the root account have unlimited access to the system
resources. If a poorly written program is run from the root account, it
may do unexpected things to the system (because a program run as root
has root access, a program run as a user has restricted resource
access) which will also damage it. To create a user account, you will
want to use the <pre>adduser</pre> and <pre>passwd</pre> commands:

<pre>[root@bacchus]# adduser hmp
Looking for first available UID...501 
Looking for first available GID...501 
Adding login: hmp...done. 
Creating home directory: /home/hmp...done 
Creating mailbox: /var/spool/mail/hmp...done 
Don't forget to set the password. 
$[$root@bacchus$]$\# passwd hmp 
New password: \textsl{new\_passwd} 
New password (again): \textsl{new\_passwd} 
Password Changed. 
passwd: all authentication tokens updated successfully
</pre> 
<p>The new account is now be created and is ready to use. Other things
that may need to be done as root are configuring X Window System,
configuring dialup services, and configuring printer services. These
topics are covered elsewhere.

<h4>Accessing the CD-ROM and Floppy</h4>

<p>One concept under Linux for accessing devices that confuses new users
is that things like CD-ROM disks and floppy diskettes are not
automatically made available when inserted in the drive. Linux
abstracts a device to be file (although in the case a special type of
file), And much like a word processor, you have to tell the system
that you want to open a file or close a file. The command used to open
(make a device available) a device is <pre>mount</pre> and the command to close
(tell the system you are no longer using a device) is <pre>umount</pre>. When
you open a device under Linux, you make it part of the directory tree
and navigate with the <pre>cd</pre>, <pre>ls</pre> and <pre>cp</pre> (copy) command normally. Red
Hat Linux suggests making removable or temporary devices available
under the directory <pre>/mnt</pre>. They create the directory <pre>/mnt/floppy </pre>by
default, but not <pre>/mnt/cdrom</pre>. So, the first time you want to access the
CD-ROM, you will need to create the directory <pre>/mnt/cdrom</pre> by typing:

<pre>[root@bacchus]\# mkdir /mnt/cdrom
</pre>
<p>Once you have created the directory, you can access the CD-ROM by typing: 

<pre>[root@bacchus]\# mount -t iso9660 -r /dev/\textsl{cdrom\_device} /mnt/cdrom
</pre>
<p>The break down of the command line above is this: the "-t" switch
tells the mount command the next argument is a file system type, in
this case "iso9660" is the format on most computer CD-ROM
diskettes. The "-r" is a read-only flag since the CD-ROM is
read-only. The next argument, <pre>/dev/{\sl cdrom\_device}</pre>, is the
device file you wish to open. If you performed a CD-ROM install, you
want to replace \textsl{cdrom\_device} with the designation of your
CD-ROM such as:
<p>
<table>
<tr>
<td><B>Device File</B></td> <td><B>CD-ROM type</B><br></td>
</tr>
<tr>
<td>hd[a,b,c,d]</td>    <td>for IDE/ATAPI CD-ROMs<br></td>
</tr>
<tr> 
<td>scd[0,1,2,...]</td> <td>for SCSI cdrom drives<br></td>
</tr>
<tr> 
<td>sbpcd</td>       <td>for Sound Blaster 2X speed drives<br></td>
</tr>
<tr> 
<td>mcd or mcdx</td>   <td>for Mitsumi 2X drives<br></td>
</tr>
</table>
<p>There are other drive types as well, but these are the most
common. Some literature refers to <pre>/dev/cdrom</pre> which is a symbolic
link. For example, if you have a Secondary IDE/ATAPI drive set as the
master drive, the command:

<pre>ln -sf /dev/hdc /dev/cdrom</pre><br>

will create a symbolic link so that the CD-ROM drive can be referred to as
<pre>/dev/cdrom</pre> as well as <pre>/dev/hdc</pre>. 
 
<p>Floppy drives are assessed in a similar manner: 

<pre>mount -t msdos /dev/fd0 /mnt/floppy</pre>
 
<p>Will make a floppy formatted under DOS in drive "a" available under
the directory /mnt/floppy. If you want to access the floppy diskette in the b
drive, substitute /dev/fd1 for /dev/fd0. 
 
<p>When you are finished with a device such as a CD-ROM or floppy diskette, it is
extremely important that you "close" the file before removing it
from the system. This needs to be done for a variety of reasons, but if you
don't and try to remove it you can make the system unstable and floppies may
get erased. To release a device from the file system, type: 

<pre>umount /dev/fd0 (to un-mount a floppy) 
umount /dev/cdrom (to un-mount a cdrom drive)
</pre>
<p>For more information on either of these commands, please see the man pages
(e.g., by entering <pre>man mount</pre>).
<a name="shut"></a>
<h3>Shutting Down Linux</h3>

<p>It is extremely important that the power is not simply shut off while Linux is
running. You can damage or even make the system un-bootable by doing so. The
proper way to shutdown Linux is to log in as root  and type: 

<pre>[root@bacchus]\# shutdown -h now
</pre><br> 
which will cause Linux to write out any files it still has in memory and close
down active programs cleanly. When you get the message <pre>The system
has halted</pre>, it is safe to turn the power off. If you want to reboot
the computer with out shutting of the power, use: 

<pre>[root@bacchus]\# shutdown -r now
</pre><br> 
which performs all the insectary shutdown work but directs
the computer to restart instead.


<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Henry Pierce<BR> 
Published in Issue 18 of the Linux Gazette, May 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc18.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./xlock.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./sybase.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->