Part I Installing SuSE Linux 11 Chapter 2 Your first SuSE Linux installation 2.1 The Fast Track to Success Since SuSE Linux 6.3 a first-time or new installation of the system has been simplified. With YaST2, the new YaST, an intelligent tool is available, run- ning in a graphical user interface. YaST2 allows you to install SuSE Linux quickly on modern computers ­ and if you want, or if it is necessary, it can also be installed in text mode (to do this, see Section 2.1.2 on the next page). You are guided through the installation with the help of explicit screen di- alogs. Input or selection decisions are only necessary if no precise data can be found. YaST2 is the right choice if you want to get things done quickly with- out ­ in the initial phase ­ being bothered by unimportant details. Next to this, the tried-and-tested method of installation for the practised SuSE Linux user is also available: the traditional YaST Yet another Setup-Tool continues to serve loyally ­ see the step-by-step description in Section 2.2 page 24. 2.1.1 Getting Ready Here is a summary of which methods are best suited for you: 1. The installation with YaST2­ directly from CD 1 (the "installation CD") ­ is best carried out when your computer meets the following requirements: * Your computer ­ ought to have a bootable CD-ROM drive; ­ it is preferable to have graphic system in accordance with the VESA 2.0 standard (you can assume this the case with compara- tively new computers) as well as ­ if possible, 64 MB RAM (memory) and ­ a Pentium processor (or compatible, e.g. AMD K6). With unfavourable configurations, it is possible that you may have to accept a few limitations: ­ Change to booting with the "boot disk". ­ Software from the subsequent CD-ROM's can only be installed after an "intermediate booting", if there is insufficient memory available 13 2. Your first SuSE Linux installation ­ the installation takes place in text mode, should the graphics card not be recognized. * Your hard drive has sufficient space available for the installation: 150 MB is required for the minimum system, approx. 500 MB for the standard one, plus additional space for further components. The following possibilities can be considered for this: ­ A new computer, without an operating system, for a first-time in- stallation. ­ A hard-drive on which an operating system is also installed, but which still has enough free space at the end of the drive. ­ You want to devote a second hard drive to SuSE Linux. ­ Existing, already used partitions can be deleted. If you do this, you must consider carefully which data needs to be backed up before installating! If your needs meet these requirements, then you can start straight away ­ please proceed to Section 2.1.2. 2. You should fall back on the tried-and-tested installation, using the "old" YaST, under the following circumstances: * You want to perform a "professional installation", and make various special settings on the system. * You are updating SuSE Linux: for this, please read the update chapter first, Chapter 15 page 359 pp. and use CD 2 or the supplied "boot disk" to start the update environment. Furthermore, it is useful to read the README file on CD 1 or CD 2, or in DOS/Windows the file README.DOS; there we include notes of additional changes which have occurred after the handbook has gone to print! Please note: the installation of "old" YaST is started if you use the CD 2 or the supplied floppy disk to boot up. A detailed guide to this installation procedure is given in Section 2.2 page 24 2.1.2 Now We Can Begin: the Welcome Screen Switch the computer on and insert CD 1 into the drive. If the computer does not boot from the CD, you need to change the booting sequence in the BIOS of the computer to CDROM,C,A; hints on changing these settings can be found in the accompanying documentation for your computer. After a few seconds the welcome screen is displayed, and the boot prompt "boot:" appears at the bottom of the screen. You now have 3 seconds to interrupt the procedure, and thus use two special features of YaST2: 1. Perform the installation in text mode. ­ This can be useful under certain circumstances. In text mode, for example, the input windows are better recognized by the visually impaired. For this, press Ctrl . A message in the lower right hand corner of the screen tells you that you are starting in text mode. 14 2.1. The Fast Track to Success 2. Install the "YaST Extension Disk". ­ Current extensions, updates, etc. for YaST2 can be loaded before you start the actual installation. In this case, press Alt .A message appears in the lower right hand corner of the screen, "Have your extension disk ready", you'll be asked later for this. At the bottom of the screen messages such as "initrd..." and "Load- ing linux..." will appear; after a few seconds the Kernel will boot ­ recognizable by the many "kernel messages" which rush across the screen. YaST2 starts and it takes a few seconds for the graphic interface to appear. Possible Problems * In case nothing happens after the welcome screen, i.e., the computer has problems booting, you have the chance to intervene at the boot prompt. If you press any key within 3 seconds of "boot:" appearing, the screen will come to a halt and you can add entries. It will only continue when you press . For problems when booting the system you should compare Section 2.7.5 page 53 and Section 14.3.2 page 327 pp. In these sections, possible causes are described in detail, together with how to solve them by adding "kernel parameters". Often it is also useful to have a look at the hardware checklist in Sec- tion 2.7.13 page 56. * A few BIOS variations are not able to cope with the large "boot image" (2,88 MB) which is on CD 1. In this case you should use CD 2 or the "boot disk". 2.1.3 YaST2 is Here! In the left section of YaST2 help information is shown for the current instal- lation procedure, as with most other windows. All entry fields, selection lists and buttons, can be selected with a mouse click. YaST2 looks at the hardware and integrates the componenets it recognizes into the system. Its progress is shown graphically . When it is finished, it will move automatically to the next item. 2.1.4 Selecting a Language Now you will have to make your first decisions in the installation process, using either the mouse or the keyboard. All entry fields, selection lists and buttons ("switches") can be selected by clicking with the mouse. Using the keyboard instead is also quite straightforward: * Tab moves the focus to a field, an entry/selection field or a button; Shift + Tab allows you to choose other selection groups. With and you can ­ depending on which area is activated ­ make a selection or cycle through a list. 15 2. Your first SuSE Linux installation * With the highlighted setting is selected. * With Space entries can be marked. * In addition, most actions can be started with the key combination of Alt + the underlined letter. Don't panic: Here and in the following dialogs, YaST2 is just collecting information. Later YaST2 will display the information it has collected; in section 2.1.13 page 21 you still have the chance, by means of the `Back' button, to return to the previous dialogs, to correct details. YaST2 would now like to know what language you prefer. When you have chosen a language, select `Apply' to switch all texts to your own language. Possible Problems * If you have unusual hardware, it might be the case that the mouse is not automatically recognized. In such a case use the keyboard, as described at the beginning of this section. YaST2 gives you the chance in the following dialog to integrate the mouse manually into the system (Section 2.1.5). 2.1.5 Selecting the Mouse This dialog only appears if YaST2 was not able to detect the mouse automat- ically. A dialog window with a long list of mouse types appears,and you are asked to select the appropriate mouse type. You can page through the list with the arrow keys; when you have found the right type, move with Tab to the `Test' button and press .Now move the mouse. If the mouse cursor moves normally, all is well and you can click with the mouse on `Continue' :-) If you did not hit on the right mouse type with your first attempt, you can move with Tab back to the selection list and make a new choice. Possible Problems * No mouse type works or you don't even want to use a mouse. In this case you should activate the `No mouse' entry. Then you can carry out the rest of the installation just with the keyboard. 2.1.6 Defining Your Location: Keyboard and Timezone Which keyboard layout are you using and in what part of the earth, i.e. in which time zone are you located? You should enter your location. * Here you have the chance to test your keyboard. By clicking with the mouse or using Tab you should activate the entry line and you can type in letters there. You should especially test `y'/`z' and special characters. * The second item is a list of countries in a tree structure (conti- nent/country/region). Select your country or region from these; YaST2 will find the appropriate time zone. The `Continue' button takes you to the next dialog window. 16 2.1. The Fast Track to Success 2.1.7 New Installation or Update? With YaST2 you can install SuSE Linux on your computer from scratch, or you can update from a previous version, thus keeping the adjustments you have already made so far. `New installation' ­ Choose this item; this section is about in- stalling SuSE Linux from scratch. `Update' ­ This item is not described here. The description of the next steps assume that you have chosen `New in- stallation', by pressing `Continue'. 2.1.8 Preparing the Hard Drive In the following steps you will select the hard drive or drives and prepare them for the SuSE Linux installation. ­ Depending on your computer's hardware, there there may be slight differences from the dialogs which appear here. Step 1 * If more than one hard drive exists, you must first decide which one you want to use for the installation. Those drives which are found will be listed. ­ Or * select the last option(`Advanced Settings') to carry out "partition- ing" by hand, if special circumstances demand this. In this way, you can also leave this till later, if it turns out that you still need to create more space . . . Normally you will click on one hard drive, and then on `Continue'. Step 2 One of the following situations could occur: * If the hard drive is not empty, YaST2 shows all existing partitions on the hard drive, as well as the item `Use whole hard disk' Free, non- partitioned storage space at the "end" of the hard drive is also displayed and is automatically pre-selected. YaST2 can use further space for SuSE Linux, but only if it is contiguous, that is, partitions reside on the same part of the disk, next to one another, for example, partitions 1 and 2 remain, and you specify partition 3 to be used. If you want to make the entire hard drive available for SuSE Linux, select `Entire Hard Disk'. * For an empty hard drive, the entire hard drive will be used for SuSE Linux. If you have other requirements, press `Back' to return to the previous dialog ­ as mentioned on on the current page ­ , to carry out partitioning there manually with the help of `Extended Settings'. 17 2. Your first SuSE Linux installation All data will be lost on the partitions you have selected for SuSE Linux, because the partitions have to be re-formatted! Warning: If you choose `Entire Hard Disk', all data on the hard drive will be erased, which could include other operating systems (see Section 2.10.1 page 64). If you press `Next', a number of checks are made, including whether there is sufficient space for a minimum installation, if 3 further partitions can be set up, and if the hard drive is bootable. ­ If something is not right, this will be pointed out to you, and you can change your selection accordingly. Once the installation starts and all requirements have been fulfilled, YaST2 will partition and format the necessary hard drive space on its own. The entire hard drive, or the partitions available, are then split up for SuSE Linux into the 3 standard partitions (that is, a small partition for /boot (about 16 MB), as close as possible to the beginning of the hard drive, a partition for swap (128 MB) and all the rest for /) (root partition). You can find more general information on partitioning in Section 2.8 page 58 Possible Problems * A certain partition cannot be selected. YaST2 does not allow you, during the standard method, to define partitions "from the middle" of the hard drive. To get round this problem, you should partition using `Advanced Settings'. 2.1.9 Selecting Software In this window you can specify the size of your SuSE Linux installation. To do this, you should select one of the options displayed, as well as any additional components you may require. Selecting Software: Choosing the Basic Software First you must decide on the basic software setup for your system: `Minimal system' ­ The `Minimal System' is a fully functional Unix operating system in text mode (core system, plus all important ser- vice programs). If hard drive space is limited, the basic functions of SuSE Linux can be tried out; or if you have a concrete application which does not require any further settings to the system (space requirements, approx. 150 MB). `Standard System' ­ The `Standard System' contains a care- fully chosen selection of basic software, that is, everything you need to get started, such as graphical interfaces, printing, games, software for Internet access and use, editors, CD players, etc. (space requirements, approx. 500 MB). `Almost everything' ­ `Almost everything' should be in- stalled if you know that the entire software range is needed, or if you want to become familiar with the entire range of SuSE Linux software. A requirement for this is that sufficient hard drive space is available (space requirements, approx. more than 6 GB). 18 2.1. The Fast Track to Success The `Standard system' is especially recommended if you are just start- ing out; if you need further software, you can always do this later. Using one of the compilations mentioned ("base installations"), the `Ad- vanced Selection' button allows you to add or remove individual com- ponents or special applications ("packages"). Extended Software Selection: Changing Details If you selected `Advanced selection' in the previous dialog, you can change the details of the compilation here. In the `Advanced selection' there are package groups available; any number of components can be added to these. For free software, you also have the choice of installing the sources at the same time; for this, select `Install available sources'. In some cases the sources take up a lot of space, and as a rule they are only of interest to programmers. You can add software any time after the installation has been finished, just by starting YaST2 or the older YaST, using the package selection software to install later on (see Chapter 3 page 71). If you want to get set up quickly, you should not too immersed now in the jungle of applications. `Commercial Software' is also available. Choose the program pack- ages you want in this dialog. Via `Select individual packages' you have individual access to each application or software package. When you select or remove packages in the compilations there, YaST2 will permanently check if all dependencies are resolved and if necessary, suggest packages which additionally need to be installed. For a proper functioning of the software it is important that there are no unresolved dependencies. Possible Problems * YaST2 will check if sufficient space is available for the compilation you have chosen. If this is not the case, you must either reduce the extent of the installation, or make further partitions available for SuSE Linux. If you want to make further partitions available, you should go `Back' to the selection dialog `Choose installation target'; refer to Section 2.1.8 page 17. * If you want to come `Back' here from the next dialog and re-select components, the individual package selection will be discarded. You should make sure that the time spent selecting software was not in vain. 2.1.10 LILO ­ Boot Manager for the System Start In order for Linux to be bootable later on, a boot mechanism must be created. It needs to be specified at which point in the system the boot manager LILO "LInux LOader" is to be installed, or if a different booting procedure is to be used (more information on this can be found in Section 2.3 page 39 and Chapter 4 page 103). 19 2. Your first SuSE Linux installation * If YaST2 does not detect any other operating system on the machine apart from SuSE Linux, and this really is the case, things are simple, and you just click on `Continue'. * If YaST2 detects an additional operating system (e. g.Windows) or if either the hard drive configuration is not bootable, (1024 cylinder- limitation) or if your PC hardware components (a mixture of SCSI- and (E)IDE hard drives) cannot be detected properly or securely, in terms of their bootability, there is still a reliable way, by having a boot disk made. If YaST2 however, still does not diagnose the situation correctly, or if you yourself have other ideas for the system start, then choose `Another con- figuration', to configure the system start manually. ­ More on this be- low. LILO: Other Start Configurations YaST2 now offers four different choices: `Install LILO in the boot disk (MBR)' ­ If SuSE Linux is to be installed as the only operating system, then LILO should definitely belong in the MBR Master Boot Record. With LILO in the MBR you can also boot a number of other operating systems. Only select this option if you are quite sure that the systems already installed can be booted by LILO (as a rule, this is the case for DOS and Windows95/98; refer to Section 4.7.1 page 117). If you have any doubts, you should choose the option `Create floppy boot disk'. `Create a Boot Floppy' ­ If your computer uses a number of oper- ating systems, there is the option of creating a boot disk for SuSE Linux. This has the advantage of leaving your boot mechanism intact. You can start SuSE Linux at any time from this boot disk. In case of doubt, you should choose this option. Note: It is possible to install LILO in the MBR at a later time using YaST (see Section 3.6.2 page 92, `Configuring LILO'). `Install LILO on partition /boot (have another boot manager)' ­ With this you can carry on using your own boot manager. Nothing is changed in the MBR (Master Boot Record); LILO is set up in the /boot partition. However, in this case you must configure the existing boot manager newly on your own. One way of doing this for Windows NT and Linux is described in Section 4.7.2 page 118. `Install LILO on another partition' ­ Select this option if you want or have to specify another partition; refer to the previous item. In the `Kernel boot parameters' field you should enter "kernel pa- rameters", if needed; from this the append line is constructed; see also page 113 and page ??, for example. The linear option is rarely needed. This option serves to store references to hard drive sectors as logical instead of physical addresses; see also page 112. 20 2.1. The Fast Track to Success 2.1.11 User Information In SuSE Linux a number of users can work simultaneously and anyone who wants to use the system must first register. This is known as "logging in". The details in this window are needed to create your "user account" (first name, last name, user name, password). You are then asked to enter your first name and last name. Also your "user name" and password is determined, with which you can log in to SuSE Linux. You also have the opportunity, with the button `Suggestions' of having a "user name" automatically created for you from a combination of your first name and last name (this suggestion may be changed) or you can enter a desired name yourself. Finally you must enter a password, and repeat this for purposes of verifica- tion. Letters are case-sensitive here. Also the password must be at least 5 characters long (with a maximum of 8 characters) and should not contain umlauts. "Special characters" are allowed (e. g.#,.;) and digits from 0 to 9. Make a careful note of your "user name" and password. You will need it every time you want to work with SuSE Linux. With `Next' you will reach another window where you can enter the `root' password. 2.1.12 Determining the `root' Password The user `root' is conferred with special privileges in Linux. He can, for instance, start and stop system processes, create and remove users, manipulate important system files, etc., in other words, perform the duties of a system administrator. To do this, you are requested to provide a password for the user `root'; the same rules apply as for the normal user password. You must remember the `root' password very carefully, as you cannot call it up later to have a look at it. You will always need this password whenever you have to perform administrative tasks on the system. If you now press `Next', the actual installation will start. 2.1.13 Confirming Settings ­ Starting the Installation In order to give you a chance of checking things, you can review all the settings made until now. In case you want to make changes, you can cycle through the windows with the Back button, all the way back to the first window. If everything is correct, and you press `Next', you are asked again for confirmation to start the installation with the settings as shown: * After confirming, with `Yes -- install', YaST2 will begin setting up the system. 21 2. Your first SuSE Linux installation * With `No', you have the option of checking data again, and changing items where necessary, by pressing `Back' to reach the relevant win- dow. If you now change your mind, however, and want to postpone installation of SuSE Linux to a later date, you have the chance of breaking off the installation completely. All settings made and details supplied will be lost. If you select `Abort installation', your computer, after asking for confirmation, will shut down, and you can switch off the computer or re-boot without any problem. Up to this point in time no changes have been made to your computer. A special feature for "experts" is offered with `Save Settings to Floppy Disk'. All details are then saved to disk, which you can then call up for later installations. You have decided on `Yes -- install' and can now watch YaST2 go to work. It will create partitions and format them. Depending on your sys- tem's capacity and size of hard drive, this could take some time. Afterwards the packages from the CD 1 are installed, and if necessary, further CD's will be requested. Depending on what you have specified in Section 2.1.10 page 19, you may now be requested to insert a floppy disk, in order to create a boot disk, or in order to back up the Master Boot Record before installing LILO. To do this, do not use any of the floppy disks included! If LILO is installed in the MBR you will receive a message about how to restore the original MBR; you should make a note of this command. SuSE Linux is now successfully installed on your computer! All that is missing is the preparation of the graphic interface; this is not needed if you just have the `Minimal System' installed, which runs in text mode. You can then try out SuSE Linux for the first time. 2.1.14 Preparing the Graphic Interface In order to be able to provide you, even at the first Login, with a graphical user interface, YaST2 will now try to find out all the information it needs for the monitor and graphics card. If this is successful, a sensible screen resolution, color resolution and monitor frequency is selected, and a test screen is displayed. Please check the settings before you give your "Ok"! If you are not sure, have a look at the documents for your graphics card and monitor. If the monitor is not detected, please select your model from the list provided. If you have an unknown model, you must enter the settings by hand or have the data read from a `driver disk', which might have been provided with your monitor; in this case you should consult the documentation for your monitor. ­ If you do not want a graphical interface, select the first item from the vendor list, `Do not configure X11'. 22 2.1. The Fast Track to Success Finally there is the question of monitor settings. The ideal monitor resolution depends on yor preferences, and on your hardware. You should select 16bpp as the color depth (`Number of colors'). Possible Problems * In rare cases it may be necessary to configure the X-Server "by hand"; for this you later need to start the program SaX. Hints on SaX can be found in Section 8.1 page 208. 2.1.15 Configuring System Components Even during the installation phase you have the option of configuring some system components ­ if they exist: printer, sound, Internet and network. If it is getting late you can postpone this to another day... 2.1.16 Logging In for the First Time Now everything is ready ­ you can now log in. The graphical login (the kdm display manager) appears and shows all regis- tered users (Figure 9.6 page 236). You only need to enter your password and KDE (the "K Desktop Environment") is started. ­ Information on KDE can be found in Section 9.2 page 234; apart from this, the help system, (kdehelp), is available. If you continue to work in text mode, enter your user name at the login: prompt. After entering your password the Linux system Prompt will ap- pear. 2.1.17 Perspectives and Working on the System For Linux beginners the chapter Chapter 19 page 427 in the handbook is a valuable starting point, and in Appendix F page 477 pp. a number of frequently asked questions are answered. Books which go deeper into the subject are listed in the bibliography (see page 501 pp.). You should also get to know the "old" YaST (Chapter 3 page 71 pp.). * Details on setting up the graphic interface, the so-called X Window Sys- tem , can be found in Chapter 8 page 207. To configure this with SaX read the guide in Section 8.1 page 208. * The sound card is the subject of Section 10.3 page 259 ­ this discusses Linux and hardware. * How to install your printer, and information on which printers are sup- ported, please refer to Chapter 12 page 293. To install printers with YaST, please review Section 3.6.1 page 90. * Information on configuring your system for Internet access can be found in Chapter 6 page 149. For information particular to modems, please see Section 6.5 page 162, and for ISDN, please see Section 6.2 page 150. * For network configuration, please read Chapter 5 page 133. 23 2. Your first SuSE Linux installation If you are connecting to the Internet via ISDN, an understanding of ad- vanced network configuration is necessary. You should consult more de- tailed literature, looking for information under the headings of "Gateway" or "Router". 2.2 Installation Using the Text-based YaST (YaST 1) There are many roads leading to a successful installation of Linux ­ some are more complicated than others. If you are a more advanced user, you may find some explanations long- winded or even unnecessary. Just think back to the days when you first had a computer, and were grateful to read any documentation available . . . 2.2.1 The Starting Point In SuSE Linux you are provided with YaST (see Chapter 3 page 71), an installation tool which guides you safely through preparing the hard drive, setting up software and configuring a graphical login. For the "normal" case of a computer on which SuSE Linux is to be installed, the following requirements must be fulfilled: * You can boot from either the CD 1 or from the boot disk that came with your system. * The entire hard drive on your system is available for installing Linux, or you have a partition (or unpartitioned space) large enough for installing Linux. * Your CD-ROM drive is supported by Linux. If you're not sure about this: don't worry, it can be found out. If your hardware does not meet one of these conditions, there are "alternative" methods by which you can successfully complete an installation. These are discussed in the section at the end of this chapter (see Section 2.4 page 41 for more details). In the Section 2.6.1 page 47 there is a discussion on how to use the DOS program fips to resize an existing partition. Get ready. . . Here Comes the First Step! 2.2.2 Now We're Starting: the Welcome Screen Turn on your computer, and place the CD 1 and/or the boot disk in the appro- priate drive. If the computer refuses to boot, you probably need to change the boot sequence in your system BIOS to either A,C or CD-ROM,C,A. After a few seconds you will be greeted with the startup screen (Figure 2.1 on the facing page). You have 3 seconds to press a key (e. g. Tab ), in order that YaST2 is not started automatically. Now enter manual at the boot prompt (boot:) and confirm with : boot: manual You will know that the loading sequence has started when the following text appears at the bottom of your screen: "Loading initdisk.gz..." 24 2.2. Installation Using the Text-based YaST (YaST 1) Figure 2.1: The SuSE Linux welcome screen followed by "Loading linux...". Then you will see all of the Kernel text messages scrolling by and finally, the program linuxrc will start. The program linuxrc is menu driven and will wait until you enter something. Possible Problems * If your CD-ROM drive (ATAPI) should hang when the system boots, take a look at Section 2.7.5 page 53. * CD 1 is not detected as a boot medium. Try using CD 2. see also Section 2.6.2 page 50. * Other boot problems can usually be remedied using kernel parameters; see Section 14.3.2 page 327 pp. 2.2.3 The Basics: linuxrc The program linuxrc serves to load any necessary drivers as kernel modules, if these are necessary. Then it will start the installation program YaST, which in turn installs the operating system software and applications. Navigating in linuxrc is self-explanatory. The and keys are used to se- lect menu items. Likewise, the and keys are used to select commands, such as `Ok' or `Back'. The key will execute the selected command. If you are interested in a more detailed description of linuxrc, it can be found in Section 16.3 page 382. The program linuxrc now starts by selecting the language. * Select a language. Make sure you highlight `English' before pressing . * Select either `Color' or `Monochrome' (Black and White), then press . 25 2. Your first SuSE Linux installation Figure 2.2: Language selection * Select the keyboard settings. Make sure, once again, that the proper setting is selected before pressing Figure 2.3: The linuxrc main menu You will now be in the linuxrc main menu, (Figure 2.3), where you have the following choices: ­ `Settings' ­ With this menu option you can modify the language, screen or keyboard settings. ­ `System-Information' ­ This menu option will show you lots of information about hardware that the kernel has already recognized, mod- ules that have been already loaded, etc. ­ `Kernel modules (Hardware drivers)' ­ You might need to enter something here to load modules your hardware might need. 26 2.2. Installation Using the Text-based YaST (YaST 1) General rule: You will not need this option if your hard drive and CD- ROM drive are attached to an (E)IDE controller, and are "ATAPI devices" ( ATAPI). (E)IDE as well as SCSI support (only for the 2940!) is built into the kernel. ­ `Start installation / System' ­ Just as it suggests, this menu option starts the installation. ­ `End / Reboot' ­ Just in case you change your mind. . . Only select the `Kernel-Module' menu option if you need support for SCSI (those not compatible with Adaptec 2940) or PCMCIA devices, (see Section 11.1.6 page 286) or if you are not using ATAPI drives on your system. For more information on loading modules, please see Section 16.3 page 382. In the following sub-menu, select the type of module that you need. The options are: ­ A SCSI-module ­ if you have a SCSI-hard drive or SCSI-CD-ROM- drive. ­ Load CD-ROM module ­ This is necessary only if your CD-ROM is not an (E)IDE device or is not a SCSI device. ­ A Network module ­ if you want to install via FTP or NFS ­ but this is not the subject of this chapter If you cannot find the appropriate module to support your hardware (pro- prietary CD-ROM drives, Parallel port CD-ROM drives, network cards, PCMCIA) in the list of standard modules, you might need to use the modules disk. To do this you should go to the end of the list and se- lect the item there, `-- Other Modules --'; the modules floppy disk is then requested by linuxrc. Starting the Installation Since the `Start installation / system' is already highlighted by default, all you have to do is press to continue with the installation. In this menu you have the following choices: ­ `Start installation' ­ What you are about to do. ­ `Boot installed system' ­ This option is useful in the event that you are having trouble booting to an already installed system. ­ `Start rescue system' ­ This item is currently not avail- able for AXP systems. ­ `Start the Live CD' ­ If you just want to browse through, without loading SuSE Linux immediately onto your hard drive; for the live CD, refer to Section 3.6.4 page 96. * For the actual installation, you just need to press for the menu option `Start installation'. In the following screen, select the source medium. By default the menu option `CD-ROM' is already selected. 27 2. Your first SuSE Linux installation Figure 2.4: Installation menu of linuxrc Figure 2.5: Selecting a source medium in linuxrc Now press and select YaST1 to begin with the actual installation. As a source medium the CD-ROM is used, unless a different source medium has been selected. But then you would be at the wrong place, as this is describing the installation from CD-ROM. The installation environment is loaded to a RAM disk and ­ when this proce- dure has been finished ­ starts the installation program, YaST. Here you can select different methods for installation. Once the source medium has been selected, press to continue the instal- lation process. The CD-ROM is used as the source medium, as long as you have not selected a different medium. The installation environment will be loaded to a RAM disk, and when this process is complete, the installation tool YaST is started. 28 2.2. Installation Using the Text-based YaST (YaST 1) Possible Problems The following problems may occur: ­ The SCSI adapter was not recognized. If this is the case, you should use a kernel that has support for your SCSI adapter built into it. Please see Section 2.6.3 page 50 for information on how to create such a boot disk. ­ The ATAPI CD-ROM drive hangs while reading information from the CD. In this case, please refer to Section 2.7.5 page 53. 2.2.4 Starting YaST The YaST welcome screen appears and the reader will see the following four menu options (see Figure 2.6): Figure 2.6: Initial YaST screen If you want to learn more about YaST or have special maintenance tasks to perform, please refer to the detailed YaST chapter (Chapter 3 page 71).­ There are hints at the beginning of this chapter on how the keyboard layout works in YaST. `Install Linux from scratch' If SuSE Linux is to be installed for the first time. This is the topic of the section below. `Update existing Linux system' Updating a SuSE Linux sys- tem is described in Section 15.1 page 359. Installation using expert mode If you select this option, you will have a great number of choices to make during the installation. It is strongly recommended that you only choose this option if you are an experienced Linux user and you are sure of the steps necessary for a successful instal- lation. The Expert mode is not described below! `Abort -- no installation' if you are having second thoughts. . . Select the menu item `Install Linux from scratch'. Please take a look, before you make partitions, at Section 2.8 page 58; there you will find useful background information. 29 2. Your first SuSE Linux installation 2.2.5 Partitioning and Formatting the Hard Drive YaST now informs you that a hard drive has been detected. If "free" hard drive space is available, YaST will confirm this and suggest that you use this area for Linux (window `Use Free Area?'). If you already have an unactivated swap partition on your system, ­ per- haps from a previous installation ­ YaST will detect it and ask you if you want to use this partition as a swap partition. Proceed as follows to set up the partitions: `Partitioning' ­ As a rule, the question about partitioning for a SuSE Linux first-time installation or a new installation needs to be answered with `Partition'. You should not select `Set up LVM' unless you know what a Logical Volume Manager is and you know that you require it. `Yes' ­ If you answer `Yes', YaST will perform the partitioning on its own and you can continue with Section 2.2.7 page 32. `No' ­ If you say `No', you can partition interactively. Figure 2.7: YaST ­ Partitioning hard drive If YaST does not find free space on your drive, it will suggest that you use `Use entire hard disk'. On this screen you can choose from one of the following possibilities. (A reminder: the Tab , or keys can be used to position the cursor, and the key can be used to execute the selection): `Partitioning' ­ This lets you partition the hard drive yourself; you will need to select this option if there is another operating system (or partition that you do not want to remove) already on your hard drive. If you select `Use entire hard disk', all data that is currently on the drive will be lost and unrecoverable. 30 2.2. Installation Using the Text-based YaST (YaST 1) `Use entire hard disk' ­ With this option YaST will ­ after pre- senting a big "red" warning screen ­ automatically partition the drive. You should only choose this option if you just want to install SuSE Linux from scratch, and you don't want to get involved with the topic of parti- tioning. Operating systems which exist on your hard drive will be deleted if you choose this option! If you choose the option `Use entire hard disk', YaST uses the following guidelines when partitioning your hard drive: * Create a /boot partition (a minimum of 2 MB, or 1 cylinder) * Create a swap partition (twice the size of the RAM on your system, but no larger than 128 MB) * Create a large root partition (`/') with the remaining space. It may be the case that there are problems when re-reading the partition table. If this is the case, YaST will display this in a red display box and ask you to re-boot. You should then re-start the computer and not attempt to make new partitions the next time . Possible Problems * Not enough space is available. In section 2.6.1 page 47 there are hints on how you can create more space on your hard drive, using fips under DOS. 2.2.6 Installation of Software Packages At this point the hard drive has been prepared for your Linux installation. Now you must decide which software packages to install. Figure 2.8: YaST ­ Package selection The next YaST menu to appear is the YaST installation menu (Figure 2.8). This may take a few moments to appear because the series and package 31 2. Your first SuSE Linux installation descriptions must be read from the installation medium and evaluated. If you do not want to choose specific packages, you can continue with the item `Start installation'; in this case you can move on to Section 2.2.8. * Select the menu option titled `Load configuration' to make your software selection (standard, network server, minimal, etc.) This is cov- ered in Section 2.2.7. First highlight your choice and the `Replace' menu option and then press the key. The current configuration will be replaced by the new selection. Additional information on this can be found in Section 2.2.7. When you have selected the system configuration and confirmed this, you will return to the installation menu. * The menu option `Change/Create configuration' can be used to change the list of currently selected packages. You will be presented with the series selection screen. Since you have chosen one of the pre- configured system configurations, it is generally not necessary to modify the list of selected packages. The reader should also be aware that it is possible (and easy) to install or remove packages after the system has been installed. A detailed description of adding packages can be found in Section 3.4.3 page 84. 2.2.7 Selection of the Base Software The YaST screen for selecting one of the default configurations (Figure 2.9 on the facing page) will appear only if you select the menu option `Load configuration', in Section 2.2.6 on the page before. We have prepared a few pre-defined package "configurations". With the arrow keys and you can reach the individual items; with Space you can select or de-select an item. An `X' in the brackets indicates that the configuration has been selected to be added or to replace a currently installed package configuration. A star (`*') next to the configuration title indicates that this configuration is currently selected for installation. It is more than likely that some pack- ages (in particular the base packages) are included in more than one of these options. What this also means is that if you select the menu option `SuSE almost everything' you will have selected packages that are included in other options as well. `Add' This menu option will add the list of packages from the selected package configuration menu option to the currently installed package con- figuration. `Replace' With this option you can replace the currently installed pack- age configuration list with the selected package configuration. You may be asked if you want to delete packages which do not belong to the con- figuration. `Abort' This menu option will bring you back to the previous screen. 2.2.8 Installing System Software and Programs After all of this preparatory work we are finally ready to fill the hard drive with great software! 32 2.2. Installation Using the Text-based YaST (YaST 1) Figure 2.9: YaST ­ Configuration selection * You can start installing the software packages with `Start Instal- lation'. On the screen, YaST will show you the status of each package as it is installed, as well as the total number of packages installed and the number of packages remaining. * You will be prompted for the other CD's as necessary. * When the packages have all been installed, return to the main menu by selecting the menu option `Main menu'. Possible Problems * If your system has just a "small amount" of RAM (<16 MB), then initially only the packages from the first CD-ROM can be installed. The packages from the other CD's will be installed later (Section 2.2.10 page 38). * If you are having trouble copying the software, this is usually caused by hardware problems. If you have a SCSI system, make sure you double-check the cables and termination. It might also be helpful if you remove all external devices, scanners etc. from the SCSI bus during the installation. You should also consider using kernel parameters: the most important ones are listed in Section 14.3.1 page 326. In case you are having problems with an ATAPI device, please refer to Section 2.7.5 page 53. Now remove all disks and CD-ROM's from their drives, as the computer will now be prepared for the initial system start. Then YaST will guide you through the system base configuration. . . 2.2.9 Selecting a Kernel for the System The base system has been successfully installed on the hard drive. Now you must install the appropriate Kernel for the system, the boot loader, LILO is set up on the hard drive, and the first software and hardware compo- nents will be configured. 33 2. Your first SuSE Linux installation Figure 2.10: YaST ­ Selecting the kernel You should now select an appropriate kernel (figure 2.10), for example: Kernel * The `standard kernel' is suitable for most systems. * The `kernel with SMP support' should be used for multi- processor systems * The `kernel with APM support' contains support for "Ad- vanced Power Management". If your processor is not 100% Pentium, please select `kernel for computers with 386 or 486 processors'. You must use this kernel for a Cyrix 686, for example. Selecting the wrong kernel could lead to a "kernel panic"; see also http://sdb.suse.de/sdb/ de/html/cyrix686.html. YaST will copy the selected kernel to /boot/vmlinuz and the kernel con- figuration file to /usr/src/linux/.config. This file exactly describes the installed kernel and the modules belonging to it. LILO The question `Would you like to configure LILO?' should only be answered with`yes' if you're positive that the installed system can be booted with LILO (see Figure 3.20 page 93; generally speaking this is the case for DOS and Windows 95/98 ­ but for Windows NT things look a little different (see Section 4.7.2 page 118)! Tips on filling out the necessary forms can be found in Section 3.6.2 page 93. 2.2.10 Base System Configuration with YaST After selecting the kernel and configuring LILO, you must finish the rest of the base configuration. The first software and hardware components are configured. * Now you are prompted to select the appropriate time zone (Figure 2.11 on the next page). You will have to search through the long list of time 34 2.2. Installation Using the Text-based YaST (YaST 1) Figure 2.11: YaST ­ Selecting a time zone zones to find the one that is appropriate for your location. You will also be prompted to select either `GMT' or `Local time'. You should select `Local time' unless your system clock (the one in your BIOS) is already set to Greenwich Mean Time. Figure 2.12: YaST ­ Host - and Domain name The computer time can be set to local time or to Greenwich Mean Time (GMT). `GMT' is set by default; select `local time' if your com- puter is set up this way. Network * The following screens that appear are for setting up your network config- configuration uration: ­ Host - and Domain name (Figure 2.12). Unless you have been given a Fully Qualified Domain Name (from either your System administra- tor or your ISP), you can choose whatever you like for a Host and Domain name. If you are planning on connecting to the Internet or an 35 2. Your first SuSE Linux installation intranet, you should make sure that you correctly specify a name. For example earth.cosmos.com. ­ where earth is the Host name and cosmos.com is the Domain name. ­ Onlyloopback, or Real Network? If your computer has no net- work card, you can select loopback and you will not be prompted for a detailed network configuration. ­ If you select Real Network, you will be prompted with additional network-related questions: DHCP client, Network type (for Ethernet cards,select eth0), IP address, Netmask, Gateway, inetd, portmap, NFS server, From address for Newsgroup postings, Name Server, IP address, selection of kernel module for network card support and Send- mail configuration (sendmail.cf). Figure 2.13: YaST ­ Selecting a mail system * Selecting the sendmail.cf for the mail system (Figure 2.13); refer also to Section 6.8 page 176. The details collected until now are saved and written to the various configura- tion files by SuSEconfig. YaST terminates and various messages on the state of the system appear on the screen. . . Root Password * After some system messages, you will see a welcome message, "Wel- come to SuSE Linux". Here your full attention is required: you are prompted for the `root' password ( System administrator). You should choose this password carefully, and not forget it. You should not use "empty spaces" or special characters (unless you know what you are doing). Please note that only the first 8 characters are evaluated. Login * YaST now suggests you create an "example" user account. You should do this, as it is not recommended that you login as `root' and use the `root' account to perform your normal daily activities. For this you should preferably create and use your own personal account for daily activities. Think of a simple name for your user account (without spaces, 36 2.2. Installation Using the Text-based YaST (YaST 1) and no longer than 8 characters), for example your initials, or newbie. When you create this account you should also be careful not to forget the password! Figure 2.14: YaST ­ Selecting interface for modem and mouse * YaST will ask you if you want to configure your modem. If you have a Modem modem, you can do this now, or you can configure the modem later on. If you choose `Yes', YaST will prompt you for the serial port to which the modem is attached. Please note that "Winmodems" are not supported in Linux (see http://sdb.suse.de/sdb/en/html/cep_winmodem. html). Figure 2.15: YaST ­ Selecting mouse driver * YaST will then ask you if you want to configure your mouse. If you want Mouse to, then select `Yes'. Choose your mouse type from the list that appears (Figure 2.15). If you are using a serial mouse, YaST will also prompt you for the appropriate serial port (Figure 2.14). Choose the correct serial port from the list. 37 2. Your first SuSE Linux installation Figure 2.16: YaST ­ Starting the gpm * You should choose to have the program gpm automatically started on system startup (Figure 2.16). If you have problems later with gpm, you can choose to not have it started on startup (see Section 17.6 page 402). If additional packages need to be installed from the CD-ROM's (see Sec- tion 2.2.8 page 32), YaST will do this now. . . * YaST will ask you to insert the other CD's, so that the remaining software can be installed; the last CD will only be needed if you have explicitly chosen to install the package source code ­ this is not normally the case!1 * YaST will exit now and prompt you to press . The installation of your SuSE Linux is now complete. 2.2.11 Logging in After Your First Installation `root' Some configuration scripts will be run in the background. At this point you can log in as `root' in the foreground, for example on Console 1 login: (for the login procedure, see Section 19.1 page 427) At the login prompt Password: "Login:", enter root and you will be prompted for the "Password:". Here you should enter the password that you gave for the `root' user (see Section 2.2.10 page 36). Do not confuse this password with the password of the "Example user"! The Linux- Prompt appears and you can now start working; this is what the prompt looks like: earth: # For example, the command ls -a can be used to view the contents of the current directory, which in this case will be the `root' user's home direc- tory. earth: # ls -a 1 The SuSE Linux DVD ROM contains all of the packages on one single CD. If you are installing from the DVD ROM, you will not be prompted for another CD-ROM. 38 2.3. How Should SuSE Linux Be Started? The program yast will start YaST, which can be used to make changes to your system configuration: earth: # yast If you start YaST (yast) you can select the menu option `System Ad- ministration' and the sub-menu `User administration' to cre- ate new user accounts. This is also a good time for you to select the `Con- figure XFree86TM' menu option and proceed with configuring your graphical user interface (see Section 8.1 page 208). Configuration scripts will be running automatically in the background (in- dexing manpages, setting up Perl, etc..). On computers with limited mem- ory and slow CPUs, this procedure can take up to an hour to complete. If you decided to "reboot" your computer before these scripts are finished, YaST will automatically continue processing the scripts from where it left off! You can view the status of these scripts on Console 9. To see this console, press the Alt + F9 keys simultaneously. Once the scripts are completed, the following message will appear: "Have a lot of fun!" After the installation is complete, additional configurations can be made; see the hints given in Section 2.1.17 page 23 about printing, Internet and hardware connection. You should never switch off a Linux computer directly. Either use the function provided by KDM or the commands presented in section 19.2 page 428 to "shut down" the computer. If the computer is not shut down properly, a filesystem check must be carried out the next time the machine boots ­ this takes some time, and in exceptional cases, the check is not sufficient to re-store all files which may have been damaged. 2.3 How Should SuSE Linux Be Started? The SuSE Linux system is now almost completely installed. The final ques- tion is how you want to boot your system normally ( Booting). The following section describes the options you have for booting your SuSE Linux system. The best boot method for you will depend on your computer experience, as well as your intended use of Linux. Boot disk: You can boot Linux from a Boot disk ("Boot floppy"). This choice will always work (as long as the boot disk does not get corrupted) and it is easy. The boot disk may have been created during the installation (in Section 2.1.10 page 20) The boot disk is a good interim solution, in the event that you are having problems configuring another boot method, or if you have not yet decided between the various boot methods. If you have OS/2 or Windows NT, you may find the boot disk a good solution. loadlin: The loadlin boot option can be configured as follows: 39 2. Your first SuSE Linux installation * The computer must be running either in DOS Real mode or have a VCPI server in virtual 8086 mode 2 In other words: this method will not function in Unix, OS/2, Windows NT or in a DOS window on a Windows 95/98 machine. It does, however, function well from MS- DOS or from Windows 95/98 in DOS mode. * Your computer must have enough DOS memory available: There must be 128 KB available below the 640 KB limit, the rest can be on ex- tended/EMS/XMS memory. Loadlin is fairly labor intensive to set up, but it can be easily integrated into the Windows 95/98 boot menus. This requires a manual editing of configuration files. One of the biggest advantages of loadlin is that nothing gets installed into the MBR (Master Boot Record) of the hard drive. Thus, to other operating systems, Linux partitions will appear as an unknown type. To install loadlin, you need to know a little about Linux and DOS. You should also be able to create configuration files with an Editor. You can find details of this in Section 4.9 page 125. If you make a mistake in the Windows95/98 boot menus, this could cause problems. In the event of an extreme error, you may loose access to your Windows hard drive. Before you start modifying your Windows boot menu, make sure that you can boot your Windows operating system with a boot floppy. LILO: The universal and technically elegant solution for booting your sys- tem is LILO. The LILO boot menu can be configured to give you a choice of operating systems to boot, before anything is booted. With YaST it is relatively easy to configure and install LILO (see Section 3.6.2 page 93). LILO must be installed in the boot sector of your hard drive, and this is not without some risk. To install it correctly you will need to know a bit more about the boot process than the average user. You should be comfortable enough with the main LILO configuration file to edit it. You are well advised to learn how to uninstall LILO in the event that you have difficulties. Details on LILO and the boot process can be found in Section 4.3 page 105. LILO is considered the best boot method, but we should warn you here that it is a bit more difficult to configure than a simple boot disk. There are BIOS variants which check the structure of the boot sector (MBR), and after a LILO installation erroneously display a virus warn- ing. This problem can be easily removed by entering the BIOS and look- ing for corresponding adjustable settings; for example, you should switch off `virus protection'. You can switch this option back on again later; this feature is unnecessary, however, if Linux is the only operating system you are using. A detailed discussion of various boot methods, especially of LILO and load- lin can be found in Chapter 4 page 103 pp. 2 A VCPI server is accessed by the program emm386.exe. 40 2.4. Installation Without a Supported CD-ROM Drive Other Boot Managers Because of the increasing importance of Linux, some creators of commer- cial boot managers have included options for booting Linux in their products. Best known among boot managers are System Commander Deluxe and Parti- tion Magic. In addition to help screens at boot time, many of these packages offer a lot of functionality. For example it is possible to extend existing FAT32 partitions or to change FAT16 partitions into FAT32. You can not find these programs on the installation CD's and we do not offer Installation support for these products! 2.4 Installation Without a Supported CD-ROM Drive What do you do if a standard installation via the CD-ROM drive is not pos- sible? Your CD-ROM drive might not be supported if it is an older, "propri- etary" model. Or it might be your second computer, (a Notebook, for exam- ple) which might not even have a CD-ROM drive, but instead has an Ethernet adapter or a PLIP cable. . . SuSE Linux provides ways of installing a system to such a machine without using a supported CD-ROM drive: * from a DOS partition (section 2.4.1) * via a network connection: NFS or FTP via ethernet, or PLIP (section 2.4.2 page 43) 2.4.1 Installation from a DOS Partition What's It All About? This involves (partially) copying Linux software to a DOS partition on the hard drive, if the standard kernel on the CD does not support your CD-ROM drive, or if Linux does not support the drive at all. Then you cannot use the CD-ROM drive in Linux, temporarily, or at all. Requirements You are using DOS, Windows or OS/2 and cannot use your CD-ROM and you know that Linux does not support your CD ROM. You have enough space on your DOS, OS/2 or Windows partition (3.11 or 95/98) and your computer has enough Memory. Step by Step. . . This is how you should copy all the required files to the hard drive (if you do not want to carry out the following steps individually, the batch file lhdsetup.bat in the directory \dosutils may be of help to you): 1. Create a directory to where the files should be copied. It doesn't matter what it is called, in our example it is named \emil. 41 2. Your first SuSE Linux installation Necessary directories suse a1 Base system (series a) images root root image scsi1 Bootkernel image setup descr Description files du Description of sizes loadlin.exe Linux loader (loadlin) xap1 xwm1 Other directorties with optional series Figure 2.17: Directory structure for the installation 2. Beneath the directory \emil you will need another directory, suse, and there, in turn, at least the directories a1, images and setup. These are necessary for the base installation of Linux. Create these directories now. Diagram 2.17, shows the complete file tree needed. 3. Copy the files from \suse\a1 of the first CD to \emil\suse\a1 on your hard drive: if you have enough space on your DOS partition then you can copy the complete tree, \suse from the CD to \emil\suse. 4. In \suse\images select a kernel which supports your hardware. More detailed information about which kernel supports which hardware can be found in \suse\images\readme.dos. Copy this kernel to \emil\suse\images. A kernel consists of four files (see above): the kernel without an extension and those files with the extensions .ikr, .inf and .map. If space on your hard drive is not an issue, you can copy all the kernels into this directory. You can then choose your kernel later on. 5. To be on the safe side, copy the files \suse\images\root and \suse\images\initdisk.gz to \emil\suse\images. 6. Copy \suse\setup\loadlin.exe to \emil\suse\setup. 7. Then you must unpack the file \suse\setup\root and copy it to \emil\suse\setup; to do this, you should use the DOS version of gzip form the directory \dosutils of the CD: C:> cd \emil\suse C:> gzip -dc < images\root > setup\inst-img This file is relatively big, but it is only needed while doing the first instal- lation. When the base system is up and running, you will be able to install additional packages from a DOS partition; then the file inst-img can be removed. 42 2.4. Installation Without a Supported CD-ROM Drive C:> cd \emil\suse C:> gzip -dc < images\root > setup\inst-img 8. Create the directory \emil\suse\setup\descr and copy all files from \suse\setup\descr to it. 9. If there is some space left on your hard drive, you can copy \suse\setup\du to \emil\suse\setup\du, which you have to create in advance. These files are not really necessary but will help you later for showing you how much space is left and how much is already occupied. If you have enough space, then this is quite useful. 10. You now have everything that is essential for installing Linux on your hard drive. But all other software is still missing. Since your CD-ROM is not supported by Linux, you have to install everything step by step, which means that you have to copy everything you want onto the hard drive, install it from there using YaST, and then delete it again from the hard drive. You don't have to do that right now, but if you already know what you're going to use, you can start now: just create the corresponding directory in \emil\suse and copy the relevant files there. You can find all packages with their contents in the online documentation of the CD or in the package descriptions. Now the installation can begin as described in section 2.2.2 page 24. When linuxrc asks for the source medium (section 2.2.3 page 25), you should enter `hard drive', and the question about the hard drive parti- tions is answered with the Device of your DOS partition. This is normally /dev/hda1 or /dev/sda1 if DOS resides on the first primary partition. If you stuck to the example above, the source medium ­ this is the next question ­ should be specified as emil. Then the installation proceeds as described in section 2.2.4 page 29 pp. Under no circumstances should you, when asked about partitioning, specify the `Use whole hard disk' ­ this would undo all your preparations. 2.4.2 Installation from a Source in the "Net" We do not offer support for this method of installation (see section H.1.2 page 493). It is only recommended for experienced computer users. What's It All About? There is no CD-ROM installed in the machine you want to install Linux on. There is no DOS partition either. You are capable of connecting to a remote machine that has an installed CD-ROM or a machine with the CD copied to a hard disk over the network (as described in section 2.4.1 page 41). In addition it is necessary to copy the files .S.u.S.E-disk* from the CD-ROM to the hard drive; in Linux this can be abbreviated in the following way: earth: # cp /cdrom/.S* /emil earth: # cp -a /cdrom/suse /emil This "other" computer must "export" the directory in a suitable manner. 43 2. Your first SuSE Linux installation Step by Step 1. Start the installation of the client as specified in section 2.2.2 page 24. 2. Continue with the installation as described in section 2.2.3 page 25, but: When you come to `Kernel modules', select `Networking cards' and load the necessary driver. This is not necessary if you are installing via PLIP. When linuxrc asks you for a `Source medium', you should enter `Network (NFS)' and go through the menu for network configura- tion. An alternative is to install via FTP. 3. Finish up the installation as given in section 2.2.4 page 29. Possible Problems * The installation aborts before it has actually started, because the installa- tion directory of the "other" machine wasn't exported with exec permis- sions. Correct this and start again. * The server does not know the computer on which SuSE Linux is to be installed. Enter the name and IP address of the computer which is to be newly installed into the file /etc/hosts of the server. 2.5 Installation Using setup and loadlin 2.5.1 Putting Windows 95/98 into DOS mode You must switch your computer to real mode in DOS to proceed with the installation. The program loadlin which is called up by the installation program setup.exe is an MS-DOS program which is only able to load the Linux kernel to mem- ory and start it for the Base-Linux into memory and start it if either the CPU runs in real mode or a VCPI server3 is active. The DOS window of Windows 95/98 runs in virtual 8086 mode but does not offer a VCPI server. This is why setup does not work here. Step by Step There are two alternatives: switching to DOS mode from Windows 95/98 or booting your computer and selecting command line input (DOS). If Windows 95/98 is already running, click on `Start', `Shut down', `Restart the computer in MS-DOS mode'. Or if you are just booting, you can press F8 at the Windows start and choose `command line input'. Possible Problems Problems may arise if you have a non-US keyboard in MS-DOS or the driver for your CD-ROM is not loaded: 3 e. g., provided by emm386.exe. 44 2.5. Installation Using setup and loadlin * In DOS mode, if German umlauts and special keys do not work, see section 2.7.2 page 53. * In DOS mode, if you cannot switch to your CD-ROM drive, see sec- tion 2.7.3 page 53. 2.5.2 Invoking setup and First Steps with setup What's It All About Setup.exe starts your Base-Linux which enables you to proceed with the ac- tual Linux installation. We use the program until we have to choose between two alternative methods of starting the base Linux. You have started MS-DOS or an MS-DOS window (not in protected mode). The first CD is in your CD-ROM drive and you can access it. With the help of the program Setup.exe you will get a base Linux system started, which later allows the actual Linux installation to take place. Start Setup.exe now and and go through the steps until you reach the point where you have to decide between one of two alternatives, namely booting with boot disks or with loadlin from CD. Step by Step Here's how to proceed: 1. Start setup.exe in the root directory of your CD. 2. Select a language; for an `English' installation just highlight, and press . 3. Enter your CD-ROM drive letter (e. g., E: on DOS). This may have changed due to a DOS partition having been added. 4. Setup.exe welcomes you; we reply to such a nice gesture by pressing . 5. The following sections will explain the booting of the base-Linux. (see section 2.5.3, below). 2.5.3 How Do I Boot the Base-Linux from setup? There are two methods of booting your base-Linux from setup: either with boot disks or directly from CD-ROM using loadlin. Now you have to decide which one to choose. Additional Information The easiest and most convenient way is to start your base-Linux directly from CD using loadlin.exe. It runs on DOS, loads a kernel image from CD into RAM and starts executing kernel code. In order for this to function, the computer has to be running in real mode or a VCPI server4 needs to be active in virtual 8086-mode. It is not possible to use the DOS box of OS/2 DOS or Windows NT. 4 Ein VCPI server is provided, for example, by emm386.exe. 45 2. Your first SuSE Linux installation Booting via disks is almost always possible but is a little more tricky and requires a bit more time. We are talking here about the disks created by setup. The easiest way of all is to use the SuSE boot disk (or to boot from CD). We will explain these options later, but for now let's stick to the option of creating floppy disks with setup, or loading the kernel directly with loadlin. Recommendation Take the "loadlin way" whenever possible as long as your CD-ROM is sup- ported and you are not working in OS/2 or Windows NT. If in doubt, just try it. If this fails, you only need to start again at section 2.5.2 on the preceding page and choose the "floppy method". 2.5.4 Installing loadlin and Loading Base-Linux In this step you will install and use loadlin. Then you will start a kernel from DOS and bring up your Base-Linux. Requirements If you have made it this far and are ready for your first Linux prompt, then you have fulfilled all requirements! Details Setup now creates the directory \loadlin in your DOS partition. The files setup.exe, loadlin.exe, Linux.bat and the selected kernel (zimage) are copied to this directory. If you want to start Linux later, just enter Linux.bat, adding the root partition as parameter. Assigning the root partition is covered in section 2.10.2 page 66. At the end of this step, the kernel is loaded and started. Step by Step Now proceed to install loadlin to start your Base-Linux. 1. Choose `loadlin' and press . 2. The box displays your RAM size. Normally, this should be correct and you should confirm by pressing . If the size doesn't match, please correct it. 3. Now you have to state whether your CD-ROM drive is supported. You have already answered this question ­ give the same answer as in sec- tion 2.6.4 page 52. * If Linux supports your CD-ROM drive, just press . * If your drive is not supported, you have already copied files to a DOS directory in section 2.4.1 page 41. Just select `Hard disk' and press . Next, enter the path where you copied suse to. In our example, in section 2.4.1 page 41, we used \emil. So we need to enter \emil. You don't need to enter the directory beneath it, suse. 4. Now you need to select a suitable kernel. 46 2.6. Partitions 5. This step deals with kernel parameters. You can specify one parameter per line, an empty line means finished. A detailed description of kernel parameters may be found in section 14.1 page 325. A complete list of kernel parameters relevant for the installation can be found in section 14.3.2 page 327. 6. Now you are asked whether to install loadlin. Just answer `Yes'. Setup now creates the directory \loadlin and copies the files there. 7. Now we can start Base-Linux with the option `Load Linux'. You should see one or two pages scrolling by. If everything went well, linuxrc will welcome you. You may scroll through the kernel messages with Shift + PgUp and Shift + PgDn . Now the installation can start, as described in detail in section 2.2.3 page 25. Possible Problems Problems here could occur at two points: either loadlin cannot load the kernel or the kernel has problems with the hardware: * there is too little memory for loadlin to load the kernel. See section 2.7.8 page 55. * loadlin cannot start the kernel. It runs in virtual 8086 mode but there is no VCPI server present. See section 2.7.10 page 56. * loadlin fails. See section 2.7.9 page 55. * The CD is damaged. See section 2.7.4 page 53. Now the installation may start as given in section 2.2.3 page 25. 2.6 Partitions 2.6.1 Creating Space for Linux (Partitioning) You need to prepare your hard drive for Linux partitions. ­ Hopefully you have some time to read through this section carefully. It is recommended that you have some disks or tapes for a backup, and a boot disk to boot your existing operating system. Details By partitioning, your hard drive can be separated into several independent parts. One reason for partitioning your hard drive might be the coexistence of several different operating systems with different filesystems on your hard drive. Hard drives are divided into cylinders. Each cylinder always contains exactly the same amount of tracks, cylinder 0 being the innermost. How do you get space for your Linux partition? * Individual partitions on the hard drive can be deleted but all data which resides on these partitions will be lost. This space is now available for new partitions (e. g., Linux). You could, though, split this partition into two or more partitions. 47 2. Your first SuSE Linux installation * Any partition can be assigned to a different filesystem. As with deleting, all data on these partitions will be lost. * In MS-DOS or Windows 95/98 you can reduce the last partition of the hard drive in size without losing files in it; you must ensure, with a de- fragmentation program, that all files are located at the beginning of the partition. If you just have one MS-DOS- or Windows partition you can make space in this way for Linux partitions very simply. After defrag- menting you can, with special programs ­ for example, the Freeware pro- gram, fips ­ reduce the cylinder upper limit, thus making the partition smaller. You can find fips on CD 1 in the directory dosutils. * If you are using MS-DOS or Windows, you can minimize the last partition without losing data. If all data resides on low-numbered cylinders, special programs (e. g., fips) can decrease the upper cylinder limit to reduce the size of the last partition leading to the possibility of creating a new partition for Linux. Using a defragmentation program ensures you that all data is moved to the beginning of the partition. * The easiest way is to buy a new hard drive. This, of course, will cost you some money. Every change of the partition tables must be done with extreme caution! Please read the documentation of the corresponding programs! Severe problems can occur while changing partition tables; you can even lose all your data. We at SuSE cannot be held responsible for this! It is strongly recommended that you have at least a boot disk and a backup of your important data. Step by Step This is how to proceed to partition your hard drive: 1. If you don't know already, you have to find out how many partitions your hard drive consists of and the size of the partitions. Use fdisk of your OS for this task. 2. Determine how many partitions you really need and which size you are going to assign to them. Information on this may be found in Section 2.8 page 58 and in Section 2.9 page 60. 3. Write down the partition data; you're going to need it later during the installation process. 4. A backup of your hard drive at this point is highly recommended! If you don't have a backup tape or streamer installed and don't want to back up everything onto floppies (which is a tedious job), at least make a backup of the most important data and files (e. g., autoexec.bat, config.sys, *.ini, etc.). Create a boot disk for your OS and make sure you can boot with it! There are several programs that might come in handy on your boot disk, such as fdisk, an editor, a formatting program and a backup program. 5. The next step depends on your system configuration. 48 2.6. Partitions DOS/Windows 95/98, One Partition on Your Hard Drive, and No Backup You have to reduce the size of your partition without deleting data. Move all data to the beginning of your partition using a tool such as defrag (MS-DOS 6 or Windows 95/98). The defragmentation program doesn't normally move hidden or system files because sometimes they are write-protected and have a defined place on the hard drive; moving them could have adverse effects. If you are sure that no such data is on your hard drive you can deactivate the attributes hidden or system for the necessary files or, depending on which de- fragmentation program you are using, you can "force" the defragmenta- tion of such files. Please keep in mind that even the Windows swap file is a hidden file. If it's in your way, you have to deselect it in Windows in "disable virtual memory". Once you have retrieved enough space, change to the directory \dosutils\fips15 on your SuSE CD. There you will find fips.exe, with which you can make partitions smaller. Study the documentation included about fips carefully, since changing partition tables can be quite tricky! The program fips.exe only runs on DOS, not on Windows; you have to exit Windows or (if using Windows 95/98) change into DOS mode (see Section 2.5.1 page 44). After running fips.exe, you will have a second partition which later will be divided into your Linux partitions. fips.exe in \dosutils\fips\fips20 is capable of shrinking fat32 partitions. Please make a backup before trying out this fips version! DOS/Windows 95/98 with Several Partitions or You Have a Complete File Backup You can delete your DOS partitions and afterwards install them again, reduced in size. You are going to lose all data on those partitions, so you have to have a complete backup available (file backup, no image backup!). Using fdisk, you delete all partitions and install the new ones. Next, you format these partitions, install your OS and copy all data from your backup back to disk (remember that you must have your backup program on your boot disk). OS/2 Here, you have the following possibilities: * Reduce your OS/2 partitions. To accomplish this, you must backup all data on your OS/2 partition, delete these partitions using OS/2's fdisk and reinstall them reduced in size. The space now available will be used later for your Linux partitions. * You plan to use Linux in future instead of OS/2. Then all you have to is change the partition type later on to Linux. Or delete all OS/2 partitions and recreate them later as Linux partitions. 49 2. Your first SuSE Linux installation * You buy a new hard drive. Formatting and partitioning it will be done later with YaST. 6. Reboot your computer. 7. Check whether your old system is still running! Linux partitions on the freshly created new space will be installed later using YaST. Possible Problems The following problems can occur: * The partition might not be adequately reduced in size because defrag cannot move some files. See Section 2.7.1 page 52. * In DOS/Windows your CD-ROM now has another hard drive identifier; in Windows 95/98 the computer hangs. See Section 2.7.12 page 56. 2.6.2 Booting with CD 2 As well as CD 1, the second CD is also bootable. Whilst on CD 1 a 2.88 MB large boot image is used, the second CD contains a traditional image of 1.44 MB in size. You should use CD 2 when you know for certain that you can boot from CD, but when things don't work with CD 1 (the "fallback" solution). Unfortu- nately not every BIOS correctly recognizes the large images. 2.6.3 Creating a Boot Disk In DOS Requirements You need a formatted 3.5" floppy disk and a bootable 3.5" floppy drive. If you are working in Windows 95/98, you must launch setup from MS-DOS mode, and not from within a DOS window. Additional Information CD 1 in the directory /disks contains a number of disk images. Such an image can be copied to a disk with the help of suitable auxiliary programs, this disk is then called a boot disk. Also on these disk images are the "loader", Syslinux and program linuxrc; Syslinux allows you to select a specific kernel for the booting process, and to add parameters for your hardware, if necessary. The program linuxrc supports the loading of kernel modules specially for your hardware and then starts the installation. Normally the SuSE-boot disk supplied can be used to boot with. Only for exotic hardware, not supported by the modularised kernel of this boot disk, or if you download a disk image from the Internet, for example from ftp://ftp.suse.com, do you need to create your own boot disk, as described here. 50 2.6. Partitions With Setup Step by Step Here's how to create a boot disk: 1. Start setup directly from CD 1. 2. Select `floppy' and press ,next select `Boot' and again . 3. Now you have to select a disk with a suitable kernel that, for example, supports your SCSI adapter, if you have one. setup shows the essential part of the kernel descriptions. If you need further information, you can look it up in \disks\readme.dos. Remember the name of your your kernel. You will need it later. Now press . 4. Now you're ready to create the boot disk. Insert the (DOS-formatted) disk into the 3.5" drive and select the disk you want to create. * Only the boot disk is needed (`Root' is not needed anymore for SuSE Linux.) Move the cursor onto `Boot' and press . * setup requests you to confirm that you have inserted a disk. Press and the disk is written. * When this is finished, press . * Now select `Done' to exit this screen and setup. With rawrite Alternatively you might want to use the (perhaps slower) DOS program rawrite.exe (CD 1, directory \dosutils\rawrite) to write the disk at the boot prompt. The standard disk images are contained on CD 1 in the directory /disks; please read the file README. The image bootdisk or scsi01 is the usual choice for the standard disk. All the actual kernels can be found in the directory /suse/images, and have the extension .ikr. If you need the the standard disk which is supplied with every SuSE Linux then you should proceed as follows; it is assumed that you are in the directory of the CD: Q:> dosutils\rawrite\rawrite disks\eide01 Things get slightly more complex if, for example, you need a kernel for special EIDE chipsets; type of SCSI kernel; in this case you should first copy the standard image (bootdisk) to the disk and then overwrite the actual kernel (linux) with the special EIDE kernel you require (for example, with eide.ikr): Q:> dosutils\rawrite\rawrite disks\bootdisk Q:> copy suse\images\eide.ikr a:\linux 2.6.4 Creating a Boot Disk with UNIX Requirements You have access to a Unix/Linux system with an accessible CD-ROM drive. You need to have a formatted disk ready. This is how you create a boot disk: 51 2. Your first SuSE Linux installation 1. If you need to format the disks first: earth: # fdformat /dev/fd0u1440 2. Mount the first CD (disk 1) (e. g., to /cdrom: earth: # mount -tiso9660 /dev/cdrom /cdrom 3. Change to the disks directory on CD: earth: # cd /cdrom/disks 4. Create the boot disk with earth: # dd if=/cdrom/disks/bootdisk of=/dev/fd0 bs=8k In the README file in the directory disks you can read about what features specific kernels have; these files can be read with more or less (on less, cf. Section 19.7.3 page 434). 5. If you need a different kernel, proceed as follows: earth: # dd if=/cdrom/disks/scsi01 of=/dev/fd0 bs=8k earth: # mount -t msdos /dev/fd0 /mnt earth: # cp /cdrom/suse/images/eide.ikr /mnt/linux earth: # umount /mnt 2.6.5 Does Linux Support My CD-ROM? Almost every CD-ROM drive is now supported by Linux. * Using ATAPI drives (those drives connected to an EIDE controller), there should be no problems at all. * Using SCSI CD-ROM drives, it is only important whether the SCSI con- troller is supported by Linux (supported SCSI controllers are listed in the Appendix). If your SCSI controller is not supported and there is a HD connected to it, you will have a problem anyway. * Lots of proprietary CD-ROM drives are supported under Linux (see Ap- pendix). Here is the most likely place for problems to occur. If your drive is not mentioned, you could try choosing a similar type. * In the meantime parallel port CD-ROM drives have become very popular. Unfortunately there is no standard, which can lead to unexpected trouble. SuSE Linux contains a large number of alpha drivers for some devices. If none of them works you have to install via DOS. Please keep in mind that you may access some of these devices only after the have been set up under DOS. So you might need a warm reboot. 2.7 Problem Description 2.7.1 Files Cannot Be Moved Files with the system or hidden attribute set can't be moved by defrag- mentation programs. If you want to find out which files might be causing a problem, just type: attrib \*.* /s > Now you can see a whole list of your hard drive in the file . Here you can identify the files that cause problems and change them using: 52 2.7. Problem Description attrib -S -H Proceed with care not to delete copy protection files, permanent swap files, or other system specific files. After defragmentation, you should undo your attribute changes. In Windows you can use the "file manager" or the "Explorer" for this purpose. If this doesn't work, then you have to take the plunge, and repartition your hard drive. This means that you have to save all your important files in order to restore them after you have finished repartitioning your drive. The alternative is to buy a new hard drive. Since prices are falling steadily, this might not be a bad idea. . . 2.7.2 No English Keymaps in DOS Mode In DOS mode enter the following line: loadhigh keyb gr,,c:\windows\command\keyboard.sys or simply add this line to autoexec.bat. If Windows is located elsewhere, then you have to adjust the path accordingly. 2.7.3 No CD-ROM Driver in a Windows 95/98 DOS Window In MS-DOS mode, only those drivers are available that have been loaded in config.sys and autoexec.bat. It makes sense not to put your CD- ROM driver into those files since Windows 95/98 has its own drivers. For using CD-ROM drivers in a DOS window, you have to create a shortcut to an MS-DOS command line. Then, using the right mouse button, open up the properties for this shortcut and under tab `Program' click the `Ad- vanced' button. Here is where you must enter your CD-ROM drivers to work in this DOS window. 2.7.4 CD is Damaged This possibility is extremely unusual, but it cannot be completely excluded. If this is the case, you should get in touch with your hardware dealer. 2.7.5 ATAPI CD-ROM Hangs While Reading If your ATAPI CD-ROM is not recognized or it hangs while reading, this is most frequently due to incorrectly installed hardware. All devices must be connected to the EIDE controller in the correct order. The first device is master on the first controller; the second device is slave on the first controller. The third device should be master on the second controller, and so forth. It often occurs that there is only a CD-ROM besides the first device. The CD-ROM drive is sometimes connected as master to the second controller (secondary IDE controller). This is wrong and can cause Linux to not know what to do with this "gap". You can try to fix this by passing the appropriate parameter to the kernel (hdc=cdrom) (see section 14.3.2 page 327). 53 2. Your first SuSE Linux installation Sometimes one of the devices is just "mis-jumpered". This means it is jumpered as slave but is connected as master, or vice versa. In case of doubt, just check your hardware settings and correct them where necessary. In addition, there is a series of faulty EIDE chipsets, most of which have now been identified; there is a special kernel to handle such cases. (cf. the README in /disks of the installation CD-ROM; the kernel parame- ters needed are described in detail in Section 14.3.2 page 327 and Chapter 13 page 317. If booting does not work straightaway, then try using the following kernel parameters. At the boot prompt (boot:), enter: boot: linux (see below) Note: Don't forget to add the name of the kernel (linux) before the actual parameters! ­ hd=cdrom - stands for a,b,c,d... and is to be interpreted as follows: * a - Master on the 1st IDE controller * b - Slave on the 1st IDE controller * c - Master on the 2nd IDE controller * . . . An example of : hdb=cdrom With this parameter you can specify the CD-ROM drive to the kernel, in case it cannot find it itself, and if you have an ATAPI CD-ROM drive. ­ ide=noautotune - stands for 0,1,2,3 and is to be inter- preted as follows: * 0 - 1. IDE controller * 1 - 2. IDE controller * . . . An example of : ide0=noautotune This parameter is often useful for (E)IDE hard drives. Further kernel parameters can be found in section 14.3.2 page 327 pp.; in case of problems with SCSI systems or with connecting network cards, you should also look here. 2.7.6 Problems with CD-ROM Drives on Parallel Port All available drivers are listed by Linuxrc at the installation. Normally there are no peculiarities. Unfortunately, lots of drives (e. g. Freecom) are not supported yet. It may be that you cannot use them although the manual claims that the type is identical. The manufacturer apparently has changed the internals without making these changes public. . . Some of the devices need to be initialized by the DOS driver for making them available under Linux: 54 2.7. Problem Description 1. Boot DOS and load the CD-ROM driver. 2. Insert a Linux boot disk. 3. warm reboot the machine If your drive is not supported you will have to install from a DOS partition, as before (see section 2.4 page 41). For current information on parallel port programming have a look at: http: //www.torque.net/linux-pp.html. 2.7.7 Problems with "Proprietary" CD-ROM Drives There are a number of different drivers available for Mitsumi drives! These special Mitsumi drivers are ones specifically responsible for the "old" drives which have their own controller (e. g. LU-005 or FX-001). For more recent drives (such as FX-400) the item `ATAPI EIDE' must be selected. The same applies for drives from Sony and Aztech. The Mitsumi MCDX driver differs from "normal" Mitsumi drivers only in the sense that it is able to read Multisession CD's. It is thus irrelevant for the installation which of the two drivers are used. We have decided, however, to include this driver explicitly, since there might possibly be cases in which one, but not the other, driver may function. 2.7.8 Thinkpad "Sleeps" While Installing While booting, the system aborts at different places :-( There is no general solution available. For some older versions an alternative might be the installation via DOS via setup.exe and to load Linux itself with loadlin (see section 2.5 page 44) Here are some hints that we collected in the past. Feedback is welcome: * Please switch off everything that enables power safe mode. Keys: "sus- pend mode", "power management", "sleep features". * If you start via DOS load the CD-ROM driver in your config.sys with the /S option. For and you have to enter your system specific values. DEVICE = :\\IBMTPCD.SYS /S * Please avoid accessing the floppy drive during the installation. 2.7.9 Loadlin Doesn't Have Enough Memory to Load the Kernel You don't have enough free memory below 640 KB. Try to remove drivers from your startup files or shift them to high memory. If you use compressed drives under Windows 95/98 and shifting the driver to high memory doesn't work, you have to decompress those drives. 55 2. Your first SuSE Linux installation 2.7.10 Loadlin Doesn't Start If you encounter any problems using loadlin, you should start loadlin using the following options: -v, -t or -d. It is best to write the debug information into a file, debug.out. C:\> loadlin -d debug.out You could send this file to the SuSE support. For you need to enter your system-specific values (see section 4.9.1 page 125) 2.7.11 DOS Runs in Protected Mode loadlin can only boot the kernel if the machine isn't running in protected mode, or if a VCPI server is running. If you're working in Windows 95/98, you have to switch to MS-DOS mode. * Either go via the `Start' button to `Shut down', then `Restart computer in MS-DOS mode' or * create a link to the MS-DOS command line and change the properties accordingly: In the `Program' menu select `Advanced' and mark with an "X" on `MS-DOS mode'. If you now restart your MS-DOS window, it will start in MS-DOS mode. 2.7.12 Label of CD-ROM Drive Has Changed If you have created an additional partition using fips, this is a DOS partition. Therefore, all other drives are shifted forward one step and your CD-ROM is no longer D: but E:. After changing partition types to Linux with YaST, this changes back; your CD-ROM drive should now be D: again. If you are not able to open the CD-ROM in Windows Explorer or My Com- puter under Windows 95/98, this means that it is still trying to access `E:' (using the above example). You then have to use the system management tool in the Control Panel to change your CD-ROM label to `D:'. 2.7.13 General Hardware Problems One or more of the following phenomena occur : * Timing problems when accessing the CD-ROM (halt,long delays, bus errors, segmentation faults) * kernel generation (or compilation of other programs) aborts with signal 11 or signal 7. * Incorrect file contents * Error accessing memory * Graphics are not displayed correctly * crc-errors when accessing the floppy disk drive * Crashes or halts during boot-up * Errors when creating a filesystem (mke2fs reports errors)) * Errors setting up the swap area * Other "strange" system behavior when accessing hardware 56 2.7. Problem Description Background Information These strange phenomena are most probably down to faulty or wrongly con- figured hardware. The reason for this is that many motherboards apparently have timing problems. These timing problems become visible through bus errors (CPU-memory-PCI-ISA). Even if the system is stable under DOS or Windows, for example, this doesn't say anything about the stability of the hardware and its configuration. The hardware manages to work with the slow segmented memory access of a CPU working in 16 bit realmode (under DOS, Windows). As soon as the memory is accessed in linear mode with 32 bit bursts, errors can occur. A further cause can be a badly cooled CPU or too slow or faulty (heat- sensitive) RAM modules (SIMMS). Faults in the 2nd-Level cache (incon- sistency, heat problems) can also create the above-mentioned effects. The cause lies quite clearly, then, with the hardware, and not with Linux. Linux requires more hardware stability than other operating systems do. On the one hand this provides increased performance. On the other hand it can lead to the above-mentioned problems on some systems. In contrast to other operating systems Linux assumes that the hardware works stable. If this is not the case Linux stops working. An operating system that still runs with faulty or potentially faulty hardware represents a severe security risk. See http://www.bitwizard.nl/sig11. What Can Be Done? There are a number of parameters and conditions that can be changed in order to isolate the faulty equipment. * Switch off the internal and/or external Cache using the BIOS setup (CMOS) * Reduce the bus clock (VLB a maximum of 40MHz! PCI bus according to the specifications, a maximum of 66 MHz for the external processor clock): use BIOS setup or jumpers on the mainboard. * Increase the number of waitstates when the CPU accesses memory or cache: use BIOS setup. * Check whether the option `15-16M Memory Hole' is activated in the BIOS setup: if this is the case, de-activate it! Linux does not expect such "holes"! * In the (Advanced) Chipset Setup, if available, set `CAS before RAS': use BIOS setup. * Test the memory modules: ­ There will always be problems where modules of different kinds are used together! ­ When using a PCI-bus with 66 MHz the DRAM modules must be specified with 60ns (or less) (no overtiming). ­ Check the fittings of the SIMMS or DIMMS, they must fit exactly and must not be loose or tilted. Remove the modules from the board and put them back in (check for corroded contacts!) 57 2. Your first SuSE Linux installation ­ Change the order of the modules in the memory banks. * Check that the CPU fan is working and whether it really fits exactly on the CPU (if necessary use heat transfer paste) * Switch off Power Management (APM). This was noticed several times as a source of errors, particularly in conjunction with the 2940: use the BIOS setup. * Some Pentium clones cause problems if the kernel or the compiler were optimized for the Pentium but a K6 or a Cyrix 6x86 is used instead. On such systems you have to optimize the kernel and the programs for a 486 at the maximum. It might even be necessary to fall back to 386 optimiza- tion. You should use the SuSE standard kernel (refer to yast.boot). * Check all general BIOS settings. If necessary, revert to the (rather con- servative) `BIOS defaults'. * If you have a buggy PC-BIOS the only solution is a BIOS update. Ask your local dealer or the manufacturer of the mainboard. * The power supply doesn't supply enough electricity or the voltage fluctu- ates: try switching off some other appliances. * Do not use the "Busmaster-DMA", also known as "UDMA" or "Ultra- DMA". Make sure the EIDE cable is short and is of good quality. 2.8 Partitioning for Novices Is Linux and its filesystem completely new to you? Then you probably ask yourself questions like: How much space should I assign to Linux? What's the minimum I need? What's best for my needs? How should I divide up the available space? Partition Types on a PC Every hard disk contains a partition table which in turn contains space for up to four entries. Each entry may be either a primary or an extended partition. Only one extended partition may be assigned. Primary partitions are a continuous section of cylinders which are assigned to one operating system. Using primary partitions, you would only be able to create four partitions. More will not fit into the partition table. An extended partition itself is also a continuous section of cylinders, but you can divide an extended partition into multiple logical partitions which, in turn, don't need a separate entry in the partition table. The extended partition is more or less a container for logical partitions. If you need more than four partitions, you have to make one an extended partition in which you may assign logical partitions. The maximum for SCSI systems is 15 partitions and 63 for (E)IDE systems. Linux doesn't care what kind of partition it is installed in. It can be primary or logical. 58 2.8. Partitioning for Novices Time to Decide Let's start with the minimum SuSE Linux install: 180 MB. This only works if you use the machine for a simple purpose, e. g., you only work on a text console (no X Window System). If you want to take a look at X and start a few applications, you will need 500 MB. Both values include swap. What is a reasonable size for an installation? 1 GB. In this world of gigabyte hard drives, this is quite a modest requirement. And there is no upper limit. What's the best for your needs? That depends on what you want to do: * Working in X and using applications such as Applixware and Netscape will require 1.2 GB. * To create your own applications in X, you also need 1.2 GB. * Both of the above items: 2 GB. * To compile your own X servers, write your own CD's together with the items mentioned above: 4 GB . * To set up an Internet/FTP server: 700 MB minimum. With the robustness of the Linux filesystem which has now been achieved, it is a very good idea, especially for novices, to follow the strategy sug- gested by YaST: a small partition at the beginning of the hard drive for /boot (at least 2 MB, for large drives, 1 cylinder), a partition for swap (64-128 MB), all the rest for /. If you want to partition something, but also as little as possible, then the following simple rules are valid: How should you divide up the hard disk? This simple question cannot be answered easily. Apply these guidelines: * up to 500 MB: swap partition and a root (/) * approx. 500 MB to 2 GB: small boot partition for the kernel and LILO at the very beginning of the hard disk (/boot, approx. 5-10 MB or 1 cylin- der), a swap partition and the rest for the root partition /. * more than 2 GB: boot (/boot, swap, root (250 MB), home (/home with approx. 100 MB per user) and the rest for applications (/usr); posssibly a further partition for /opt (see on this page) and for /var. If you plan to start Linux directly from the hard drive, you will need a Linux partition below the "1024 cylinder limit" as a boot partition (you can read more on this in page 107. This doesn't concern you if you are starting Linux from DOS/Windows with loadlin. Usually, from SuSE Linux 6.0, the boot partition (/boot) will be the same as the root partition. You should bear in mind that some programs (mostly commercial programs) install their data in/opt; if you are installing a number of these you should either create a separate partition for /opt or enlarge the dimensions of the root partition accordingly. Specifically this involves the program packages or demo programs listed in table 2.1 on the following page ­ which have been 59 2. Your first SuSE Linux installation calculated with size increases in mind (in the table mentioned there are also programs which are not included in SuSE Linux) Just in case, either provide for /opt its own partition or make the root parti- tion big enough. Some examples are shown in table 2.1. KDE 170 MB GNOME 100 MB htdig 5 MB Fortify 2 MB dochost with htdig full text search 200 MB Wabi 10 MB Netscape 35 MB Arcad 350 MB Applixware 400 MB Eagle 18 MB Staroffice 150 MB Cyberscheduler Software 30 MB Cygnus Source-Navigator 20 MB SNiFF+ 45 MB Insure++ 45 MB pep 18 MB Oracle 8 400 MB Sybase ­ Adaptive Server Enterprise 170 MB virtuoso ­ OpenLink Virtuoso Lite Edition 55 MB Table 2.1: Packages in directory /opt 2.9 Partitioning for Experts In the previous section 2.8 page 58 and in section 2.10.1 page 64 details are given of the various ways of partitioning your system. This section should provide more detailed information for tailoring a system that best suits your needs. This section is mainly of interest for those who want an optimized sys- tem as far as security and performance are concerned ­ and who are prepared to re-install the complete system, where necessary. It is absolutely essential that you have extensive knowledge of the functions of a UNIX filesystem. You should be familiar with the topics mount point, physical, extended and logical partitions. It should be mentioned here that there is no golden rule for all, but many rules for each situation. Don't worry, you will find concrete figures in this section to help you. First, you need to gather the following information: * What is the purpose of the machine (file server, compute server, stan- dalone machine)? * How many people are going to work with this machine (simultaneous logins)? 60 2.9. Partitioning for Experts * How many hard disks are installed? How big are they and which kind (EIDE, SCSI or even RAID controllers)? 2.9.1 Size of Swap Partition Quite often you will read: " Swap should be at least as large as physical RAM". This is a relic of times when 8 MB was regarded as a lot of RAM Memory. Applications that need considerable memory have shifted these values up. Generally, 64 MB of virtual swap should be sufficient. Do not be stingy. If you compile a kernel in X and want to have a look at the manual pages using Netscape and have an emacs running, you will already take up all of 64 MB. To be safe, opt for at least 96 MB of virtual memory. One thing you should never do is not assign swap space at all! Even on a machine with 256 MB RAM, there should be a swap partition. The reasons are described in sec- tion 2.9.3 page 64. Do you plan to run extensive simulations and need gigabytes of memory? In case of doubt as to whether Linux suits your needs, please read section 2.9.2 on the next page (Example: compute server). 2.9.2 Computer Used as Standalone Machine The most common use for a Linux machine is as a standalone computer. In order to make decisions as easy as possible for you, we provide you with some concrete figures which you can use at home or at your company. In table 2.2 is an overview of size requirements for different Linux systems. Installation Disk space needed minimum 180 MB up to 400 MB small 400 MB up to 800 MB medium 800 MB up to 4 GB large 4 GB up to 8 GB Table 2.2: Examples of disk space requirements for different installations Example: Standalone Machine (Small) You have a 500 MB spare hard disk to hold Linux: use 100 MB for root /, a 64 MB swap partition and the rest for /usr. Example: Standalone Machine (Average) You have 1,2 GB available for Linux. A small boot partition /boot (5- 10 MB or 1 cylinder), 180 MB for /, 64 MB for swap, 100 MB for /home and the rest for /usr; don't forget the /opt area (see section 2.8 page 59). When deciding on the size of the root partition, remember that the RPM database is created in /var (see section 15.3.2 page 373)! 61 2. Your first SuSE Linux installation There is 1.2 GB available for Linux. As above, use 100 MB for root /, 64 MB for swap, 100 MB for /home and the rest for /usr. Note that the RPM database in /var occupies several MBs (see also section 15.3.2 page 373). Example: Standalone Machine (Luxury) If you have more than 1.2 GB available, there is no standard way to partition. Please read section 2.9.3. Using as a File Server Here, hard drive performance is really crucial. You should use SCSI devices if possible. Keep in mind the performance of the disk and the controller. A file server is used to save data centrally. This data might be home directo- ries, a database or other archives. The advantage of this is that administration of the data is simple. If the file server will serve a huge net (from 20 users upwards), optimizing hard disk access is essential. Suppose you want to provide a file server for 25 users (their home directories). If the average user requires 80 MB for personal space, a 2 GB disk mounted under home will probably do. If there are 50 such users, you will need a 4 GB disk. In this case, it would be better to split home into two 2 GB disks, as now they would then share the load (and access time!). Using as a Compute Server A compute server is generally a powerful machine that carries out extensive calculations over the net. Normally, such a machine is equipped with exten- sive main memory (512 RAM or greater). The only point where fast disks are needed is for the swap space. the same rule applies here: if you have a number of hard drives you can spread swap partitions across them5. Separate the swap partitions onto separate disks. Linux can normally only handle 128 MB swap partitions, but can handle eight of these.6 2.9.3 Optimizations The disks are normally the limiting factor. To avoid this bottleneck, there are two possibilities which should be used together: * separate the load onto multiple disks * use an optimized file system (e.g. reiserfs). * equip your file server with enough memory (at least 128 MB) 5 If your system is still running with the 2.0.xx kernel, you should bear in mind that a swap partition should be no larger than 128 MB; Linux can, however, quite easily manage 8 such partitions ­ and even 64 with slight modifications. For the 2.2.xx kernel the limit of the swap partition is 2 GB 6 and even 64 with slight modifications 62 2.9. Partitioning for Experts Parallelizing Multiple Disks This needs some further discussion. The total amount of time needed for transferring data can be separated into five factors: * time elapsed until the request reaches the controller * time elapsed until this request is send to the disk * time elapsed until the hard disk manages to set its head * time elapsed until the media has turned to the right sector * time elapsed for transferring data The first factor depends on the network connection and has to be regulated elsewhere. We do not to cover this here. The second factor can be ignored; this depends on the controller. The third factor is the vital part. The time is counted in milliseconds. Relative to the access time of main memory (measured in nanoseconds), this is a factor of one million! The fourth factor depends on the disk rotation speed. The fifth factor depends on the rotation speed, the number of heads and the actual position of the data (inside or outside). For optimized performance, one should consider factor three. Here, the SCSI feature disconnect comes into play. Let's look at what happens: The controller sends the command (in this case to the hard disk) "Go to track x, sector y" to the device. Now the disk motor has to start up. If this is an intelligent disk (if it supports disconnect) and the driver itself is also able to do disconnect, the controller sends a disconnect and the disk separates itself from the SCSI bus. Now other SCSI devices can do work. After a time (depending on the strategy or load on the SCSI bus), a connection to the disk is re-established. Normally, the device has now reached the requested track. On a multitasking, multiuser system like Linux, there are lots of optimizations that can be done here. Let's look at an output of the command df (see screen output 2.9.1). Filesystem 1024-blocks Used Available Capacity Mounted on /dev/sda2 45835 27063 16152 63% / /dev/sdb1 992994 749694 192000 80% /usr /dev/sdc1 695076 530926 133412 80% /usr/lib Screen output 2.9.1: Example of a df command output So, what benefits does parallelizing bring us? Suppose we enter in /usr/src: root@earth:/usr/src/ > tar xzf package.tgz -C /usr/lib Here, package.tgz will be untarred into /usr/lib/package. To do so, the shell launches tar and gzip (located in /bin and thus on /dev/sda), then package.tgz in /usr/src is read (on /dev/sdb). At last, the extracted data is written to /usr/lib (on /dev/sdc). Using parallelizing, position- ing as well as read/write of the disks' internal buffers can be activated at the same time. This is only one example; there are many more. If this example were a frequent processing requirement, then, as a rule of thumb, if there are many 63 2. Your first SuSE Linux installation disks (with the same speed), /usr and /usr/lib should physically be placed on different disks. Here /usr/lib should have approximately 70% of the capacity of /usr. /, due to its access, should be placed on the disk containing /usr/lib. From a certain number of SCSI disks onwards (4­5), one should consider buying a RAID controller. Thus, operations on the disks are not only quasi- parallel but parallel. Fault tolerance is one of its famous by-products. Processing Speed and Size of Main Memory The size of main memory is more important in Linux than the processor itself. One reason7 is Linux' ability to dynamically create buffers of hard disk data. Here, Linux uses lots of tricks, such as "read ahead" (getting sectors in advance) and "delayed write" (saving writes until there is a bundle to write). The latter is the reason why you should not switch off your Linux machine. Both items are the reason why Linux is so fast and why the memory seems to fill rapidly. Linux works with shared libraries, that is, lots of programs and applications share the same library. A library call has only to be allocated once. This also means that your memory fills up rather quickly. So if you do not know whether to purchase another main board or some more memory, we recommend you do the latter as it increases the speed of Linux. total used free shared buffers cached Mem: 63304 62312 992 15920 38692 4200 -/+ buffers: 19420 43884 Swap: 199508 14548 184960 Screen output 2.9.2: Output of free If you want to find out what memory is being used, just enter: root@earth:/root > free This will give you an overview of used memory and buffers. The output 2.9.2 shows that some 38 MB are being saved in buffers. If you want to access data that is already buffered, this data is almost immediately available. 2.10 Configuring Your Hard Drive Manually 2.10.1 Configuring Partitions What's It All About? In section 2.2.4 page 29 you have decided to interactively partition your hard disk. Here we describe the menus you are presented with. Background information on the various partition types can be found in a document by Andries Brouwer (http://www.win.tue.nl/ aeb/ partitions/). 7 if not the main reason 64 2.10. Configuring Your Hard Drive Manually Step by Step. . . This is how to proceed when setting up your partitions: 1. YaST presents you with a screen that is divided into several parts (see figure 3.9 page 78): * At the top, you should see your hard drive's parameters. * The second part shows warnings and error messages from the program fdisk. You can take a closer look by pressing F6 . * At the bottom you can see the partitions fdisk has found. Here, you should see the partitions of your former operating system and the swap partition, if you have already assigned one. 2. If you want to remove existing partitions in order to use the space for new partitions, you should do that now. Highlight the partition you want to remove. Remember and lets you scroll through the list. Make sure the correct partition is highlighted. Then press F4 and confirm by pressing . If you remove a partition, all data on this partition will be destroyed.a a Technically speaking, this is not 100% correct; but your data will be lost anyway! If you want to remove multiple partitions, you should do that now. 3. If you want to use existing partitions of other systems for Linux, you may do so simply by altering the partition type. If you alter the partition type, other operating systems such as DOS and Windows may not be able to access data contained on them! Now highlight the partition which you want to change, using und If you are sure you have marked the "correct" partition, just press F3 . Now you are presented a dialog box where you may select the partition type. Select either normal or swap and confirm by pressing . 4. If you want to assign new partitions (this is the normal case), you should create them sequentially. Just press F5 . If this doesn't have any effect, it means that the disk is already full with partitions. Then you may have to delete partitions. (See above). . . A dialog box pops up letting you select the type of partition. (figure 2.18 on the following page) You may select between either `primary partition', `ex- tended partition' or `logical drive'. Confirm by pressing . Remember: you may assign up to a maximum of four primary partitions. If you need more, you need to assign at least one as an ex- tended partition. Within this extended partition, you may assign logical partitions. See section 2.8 page 58. When you have assigned a primary or logical partition, you must enter the device name. YaST displays a list of the available device names. Nor- 65 2. Your first SuSE Linux installation Figure 2.18: YaST ­ Assigning Partitions mally, you should just select the uppermost entry, e. g., `/dev/hda2' and press . The next step lets you set the size of the partition. YaST recommends starting at the first cylinder of the first free partition. Normally, you should confirm this default. To set up the size, you may select one of three alternatives: the number of the last cylinder (e. g., 976), the number of cylinders of the partition (e. g., +66) or the size in megabytes (e. g., +100M). Pressing should now move you to `Continue'. Here, just press . Now you should see your freshly assigned partition in the lower part of the screen. If you are not satisfied, you may remove it by pressing F4 . 5. One of your partitions needs to be a swap partition. If there isn't already a swap partition, use and to select a proper one. Information on the size of a swap partition may be found in section 2.8 page 58. Press F3 and select `Linux Swap Partition' and confirm by pressing . 6. Is everything to your satisfaction? The drive should be completely popu- lated with partitions. Did you remember the swap partition? Now move the cursor to `Continue' and then moves you to the `Assign- ing mount points' menu. Under certain circumstances, YaST checks your swap partition to make sure no errors occurred. 2.10.2 Filesystems and Mount Points What's It All About? In the previous section all partitions were written to the partition table. In this step you will now provide additional information for the Linux partitions which have just been configured, and also for any DOS/HPFS partitions, if they exist. 66 2.10. Configuring Your Hard Drive Manually You have created all necessary partitions and these partitions have been added to the partition table, but they are still not written to disk. There are some vital parameters still missing which will be added in this step. Summary This information is partially written to the file system table, /etc/fstab, which contains all the relevant information on the filesystems you want mounted. Each entry includes the device, its position in the directory tree and the type of file system.8 Furthermore, YaST needs this data to create Linux filesystems on the format- ted drives. The swap partition is not touched in this step as it has been already created in section 2.10.1 page 64. In contrast to the partition table entries (see section 2.10.1 page 64), the /etc/fstab entries are Linux-specific and have no influence on other op- erating systems. Also worthy of explanation: * In Linux, all filesystems are linked to one "directory tree" (see figure C.1 page 467). You must assign each filesystem a branch on this tree. This is called its mount point. Even DOS and HPFS filesystems can be linked into the Linux directory tree. * Hard drive space for file systems is administered in Linux by using Inode. An inode is just a small file that points to the corresponding data for a given file. The number of inodes is assigned while creating a filesystem. If you want to create lots of small files, you will need many inodes, which require some space of their own as well. For filesystems containing many large files, fewer inodes are necessary. For more detailed information on this, see section 3.3.10 page 81. Step by Step You are now in `Set target partitions / filesystems' (see figure 3.10 page 79). To determine the file systems of your new partitions, proceed as follows: 1. First some information about what is to be done: * For each of your DOS and HPFS filesystems (in DOS and HPFS par- titions), you may create a mount point. * For each of your new Linux partitions: ­ you must select a mount point ­ you may select a file system `F3=choose type' (ext2 or reiserfs). ­ you may do some fine tuning, with `F5=Expert menu' ­ you may change the suggested formatting mode `F6=Formatting' (with or without a check). * The function `reading fstab' is normally not needed. 8 As well as information for dump and fsck; see manpage for fstab (man 5 fstab). 67 2. Your first SuSE Linux installation Figure 2.19: YaST ­ mount DOS/Windows partitions 2. You can set the type of the Linux filesystem with F3 . Currently the tried and tested ext2 or the new reiserfs, with advanced options, are available. ReiserFS can not be used in conjunction with RAID 1 or RAID 5 software. For hardware RAID solutions there are no limitations. ­ reiserfs is very new in comparison to ext2; please bear this in mind if you decide on reiserfs. There is more information on ReiserFS at page 80. 3. If you want to access a DOS or HPFS partition in Linux, you have to select it and press F4 . Now a window pops up and you can enter a directory. In this directory, you will mount your DOS or HPFS filesystem. For example, enter /dosc (don't forget the slash!). Confirm this action by pressing . If you have selected a DOS partition, another window appears (fig- ure 2.19). Here, you can choose which method to use to access DOS in Linux (see section 3.3.10 page 80). Generally you will want to use your DOS filesystem independently and only occasionally want to access the DOS partition from Linux, for example, to transfer files; for this purpose, choose `DOS' or `FAT-Win95' (= vfat). UNIX file attributes and long file names, as provided by the UMSDOS filesystem, are only needed if you want to install SuSE Linux on a DOS partition ­ do this at your peril! Generally, you want to use DOS independently and just want to exchange files in Linux. For the normal Linux install, choose `DOS'. UNIX file attributes and long filenames, as offered by the UMSDOS file system, are only necessary for demo mode. 4. Next, enter the mount points for your Linux partitions. Just select your Linux partitions one after the other and press F4 . A window will pop up letting you decide where to mount this partition on your filesystem tree. Enter the complete path beginning with the "slash" (/). 68 2.10. Configuring Your Hard Drive Manually Figure 2.20: YaST ­ Mount points Which mount points you choose for your partitions depends on how you plan to organize your partitions. In any case, you definitely need a root directory /, which is the "root" for the whole filesystem. All other filesys- tems and their mount points more or less depend on your preferences. You should create a mount point for each Linux filesystem. You will not be able to access unmounted filesystems. Directories which are needed at boot time must be located directly under /. At this stage, the separate branches are not yet put together (mounted). For this reason you may not assign /bin, /dev, /lib, /etc, and /sbin to other partitions. 5. You should ignore the `Expert menu' if you are just starting out with Linux; as a rule defaults are set automatically to guarantee a secure oper- ation. Only change the suggested values if you really know what you are doing (see page 81)! 6. You must now decide whether (and how) you want to format your Linux partitions. Since you just created those partitions in section 2.10.1 page 64, they must now be formatted. If you own a fairly new hard drive, do `normal formatting'. If your storage media is not that new, it is better to choose `Formatting and checking'. Select the Linux partitions one after another and press F6 to select the appropriate formatting. At the end the menu should resemble figure 2.20 (it is possible you have not specified an NFS directory!). 7. After selecting `Continue', a dialog box pops up asking you whether you are sure. Then YaST formats your partitions. 69 2. Your first SuSE Linux installation 70