Presentation is loading. Please wait.

Presentation is loading. Please wait.

NETW-240 Linux Installation Last Update 2012.08.24 1.3.0 Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 1.

Similar presentations


Presentation on theme: "NETW-240 Linux Installation Last Update 2012.08.24 1.3.0 Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 1."— Presentation transcript:

1 NETW-240 Linux Installation Last Update 2012.08.24 1.3.0 Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 1

2 Objectives of This Section Learn –How to install Linux Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 2

3 Check the System First Although I rarely see any problem, you should check to be sure the hardware to be used is supported by the distribution to be installed from Be sure there is enough space on the hard drive Again these days that should not be an issue Linux requires from 350 Mb to 4 GB Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 3

4 Installation Source The Linux operating system just like any other OS can be loaded from several sources –ISO –CD –Over the network using –A partition on the hard drive –Floppy Disk Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 4

5 Boot Floppy If a floppy disk is required to boot the computer, in other words it will not boot from the CD or you need to access the network, then a bootable floppy disk with Linux on it is required The disk is created from the image file An image file contains an exact copy or image of a diskette's contents Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 5

6 Boot Floppy This process is much easier to do from a computer with a operating system already installed But if you only have one computer, the following will work The process depends on the distribution For example for Red Hat Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 6

7 Boot Floppy If using MS-DOS, boot the computer to DOS –The CD drivers must be loaded using the config.sys and autoexec.bat files –The exact commands to use depend on the interface the CD drive is using Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 7

8 Boot Floppy –For a standard IDE drive, for example In config.sys –DEVICE = C:\BTCCDROM.SYS /D:MSCD001 »Substitute the CD driver name for BTCCDROM.SYS autoexec.bat –C:\COMMAND\MSCDEX.EXE /D:MSCD001 Place the distribution CD in the CD drive Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 8

9 Boot Floppy Then using the rawrite utility on the distribution CD issue the following commands –Assuming your CD drive is d: A:\> d: D:\> cd \dosutils D:\dosutils> rawrite Enter disk image source file name Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 9

10 Boot Floppy Such as –\images\boot.img –For installing from the CD –or –\images\bootnet.img –For installation over the network Tell it where the floppy disk is, such as –A Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 10

11 Boot Floppy If using Linux, boot the computer to the Linux command line prompt Then using the dd Command After mounting the CD, change directory to the directory containing the desired image file Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 11

12 Boot Floppy Use the following command # dd if=boot.img of=/dev/fd0 bs=1440k The boot images are located in /mnt/cdrom/images Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 12

13 Install from ISO Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 13

14 Install from CD To boot from a CD this must be enabled in the BIOS for the machine With such a thing –Enter Setup Change the boot order to boot from the CD drive first –Put the CD in the drive –Reboot the computer Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 14

15 Install Over the Network This method loads the files from a server on the network The procedure is detailed later Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 15

16 Install from a Partition As Linux does not exist before it is installed to install it from a directory on the hard drive will require an OS already be installed on the same computer which is accessible by Linux This is usually a DOS based partition Recall that a partition is the way OSs are kept separate Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 16

17 Install from a Partition In general this partition must contain one of the following file systems –Ext2 –Ext3 –FAT Hard drive installations require the use of the ISO or CD-ROM images rather than copying the entire installation tree Select the hard drive install method Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 17

18 Install from a Partition Then tell the install program to look in that directory For example Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 18

19 Install from a Partition Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 19

20 Run from Floppy Disk This has become less and less useful over the years Even though Linux itself is still reasonably small, the distributions have become quite large In general this method is no longer used Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 20

21 Installation Program Most distribution these days use a text based or GUI installation program to select and load the components Such a thing can be done outside of these programs, but is rarely a useful expenditure of time Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 21

22 Installation Program When the distribution’s installation program starts just follow the screens as it progresses through the installation process The particular distribution will have the details on this process Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 22

23 Installation Program For example Red Hat as of this writing offers a graphical mode, a text based mode, and an expert mode, and several others for special cases In general just take the default mode, which in Red Hat is a GUI look Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 23

24 Installation Program Most of the hardware is probed and identified by the installation process The specific steps in the Red Hat 7.2 distribution using the GUI are –Select the language –Select the keyboard type –Select the mouse type Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 24

25 Installation Program –Select the type of computer that this will be used as Workstation Server Laptop Custom –Partition the drive Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 25

26 Partitioning This is how a disk drive is divided into sections Each section can then be used to hold a separate operating system or in the case of Linux a distinct part or function of the operating system This use of partitions like this by Linux is different from DOS or Windows based systems Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 26

27 Partitioning In that they put the entire OS on one partition Sometimes these OSs use another partition to hold data Or some server versions of Windows will use a separate partition as Linux does for a pagefile or swap space Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 27

28 Partitioning This is a topic of constant discussion in the Linux community as to how to divide up the disk The use of a partition is in general identified by a number that is written to the disk For Linux these numbers are –Native - 83 –Swap - 82 –Extended - 85 Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 28

29 Partitioning Partitions are also given names In DOS and Windows these are letters like C, D In Linux the naming scheme is file based, with filenames in the form Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 29

30 Partitioning –/dev/xxyn /dev/ –This is the name of the part that will hold the partition –Since partitions reside on hard disks, and hard disks are devices, the name begins with the indicator for a device which is »/dev/ Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 30

31 Partitioning xx –The first two letters of the partition name indicate the type of device on which the partition resides –This is typically either a IDE or SCSI drive »IDE – hd »SCSI - sd Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 31

32 Partitioning y –This letter indicates which physical device the partition is on –For example »/dev/hda would be the first IDE hard disk »or »/dev/sdb would be the second SCSI disk Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 32

33 Partitioning n –The final number denotes the partition on the physical disk –The first four are numbered 1 through 4 –Logical partitions within the extended partition start at 5 –So, for example »/dev/hda3 is the third primary or extended partition on the first IDE hard disk »and »/dev/sdb6 is the second logical partition on the second SCSI hard disk Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 33

34 Mount Points Linux is again different from the DOS and Windows method in how it associates partitions with the file system In DOS and Windows each partition gets a letter This letter then refers to all of the files and directories on its corresponding partition Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 34

35 Mount Points This is entirely different from how Linux deals with partitions and, for that matter, with disk storage in general In Linux a partition can be associated with only a single directory rather than having it refer to all of the directories This is done by assigning partitions to mount points in the file system’s directory structure Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 35

36 Mount Points Mounting a partition makes its storage available starting at the specified directory or mount point For example, if partition /dev/hda5 were mounted on /usr, that would mean that all files and directories under /usr would physically reside on /dev/hda5 Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 36

37 Mount Points So the file /usr/share/doc/FAQ/txt/Linux- FAQ would be stored on /dev/hda5, while the file /etc/X11/gdm/Sessions/Gnome would not as it does not start out at the /usr/ directory Continuing our example, it is also possible that one or more directories below /usr would be mount points for other partitions Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 37

38 Partitioning For instance, a partition, say /dev/hda7, could be mounted on /usr/local, meaning that /usr/local/man/whatis would then reside on /dev/hda7 rather than /dev/hda5 Finally back to the argument Linux heads are always having concerning how to partition a hard drive Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 38

39 Partitioning All agree that at least the following are needed –Swap –/boot –/ - which is the root partition And unless there is a really good reason to do otherwise, just use the above Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 39

40 Swap Partition The swap partition is used to simulate physical memory This is easy to size It should be at least twice the installed memory The minimum size is 32MB The maximum is 2048MB – 2GB Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 40

41 Boot Partition This partition holds the operating system kernel and a few other files required to boot the system Due to various poor decisions by hardware system designers over the years it is generally best to create a separate boot partition Its size should be 50MB to 100 MB Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 41

42 Boot Partition The boot partition can be part of the root partition Usually this works, but sometimes it quits working later as changes are made to the system The main problem being that on some systems all of the boot information must be on cylinder 1023 or lower Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 42

43 Boot Partition As always the easy way around this problem is to just throw money at it A nice brand new computer with all the latest stuff will not, usually that is, exhibit these limitations Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 43

44 Root Partition The root partition –/ is where the root directory resides In this partitioning layout, all files, except those stored in /boot, reside on the root partition So the bigger the better Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 44

45 Installation Program Partition the drive –In Red Hat there are three choices all though only two of these are really useful –They are Use Automatic partitioning Use Disk Druid Use fdisk Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 45

46 Installation Program Automatic –This never seems to work for me –It always says it cannot do it for me and dumps me into Disk Druid –So I usually just select Disk Druid or fdisk to start with Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 46

47 Installation Program Disk Druid –A nice GUI version of fdisk –Not much easier to use, but looks cute –The only thing to watch out for is that the swap space is not listed under the mount point, but under the filesystem type as swap space is different in concept from the boot and root partitions Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 47

48 Installation Program Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 48

49 Installation Programs Fdisk –This is the older method of partitioning –It works fine, but is not quite as easy to use as Disk Druid –Red Hat for example says to not use it, even though they include it Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 49

50 Filesystem Types ext2 –This is the older, but still very widely used filesystem ext3 – This new filesystem is basically the ext2 filesystem with journaling added –Using a journaling filesystem reduces time spent recovering a filesystem after a crash as there is no need to run fsck against the filesystem Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 50

51 Filesystem Types –Indeed an ext3 filesystem can be mounted as an ext2 filesystem –ext3 comes with kernel 2.4.16 and later Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 51

52 Filesystem Types Use whichever you wish Keep in mind that the swap space is a separate partition type from those above, ext2 and ext3 When creating the swap partition, the proper filesystem type must be selected That type being swap Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 52

53 Directories Except for certain default directories, which ones to use is something up to the user or administrator Default directories include –/ This is the root directory Any other directory not mounted as part of another partition is a subdirectory of the root directory Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 53

54 Directories Common directories are –/boot Includes the commands and files required to boot the system –/bin Contains basic command line utilities Must be part of / –/dev Lists available device drivers Must be part of / Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 54

55 Directories –/etc Basic configuration files –/home Under this are the home directories of all users except the root user –/lib Contains program libraries Must be in / Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 55

56 Directories –/mnt The mount point for removable media Not always used by all distributions –/opt Common location for applications –/proc A pseudo directory that contains pseudo directories and files that representing all running processes Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 56

57 Directories –/root The home directory for the root user –/sbin Contains many system administration commands Must be part of / –/tmp For temporary files Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 57

58 Directories –/usr For small programs and data used by all users Usually has many subdirectories –/var Holds variable data, such as log filers and print spool files Often on its own partition Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 58

59 Boot Loader The next step is to select the boot loader Choices include –LILO –GRUB –None at all Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 59

60 Boot Loader Details on boot loaders is in another presentation, but in general LILO –The standard, long time boot loader GRUB –Its main claim to fame seems to be that it is cute, in other words it has a GUI screen Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 60

61 Boot Loader Where to put the boot loader –The place to install the boot loader is in the MBR – Master Boot Record The MBR is a special area on the hard drive that is automatically loaded by the computer's BIOS, and is the earliest point at which the boot loader can take control of the boot process –Another place is the first sector of the root partition Unless there is a special reason to use this location, just put it in the MBR Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 61

62 Boot Loader The installation process will ask if there are any options that need to be passed to Linux as it loads In general say no It will also ask if the boot loader should be used to load other operating systems Say no, as in this example Linux is the only OS in use Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 62

63 Network Configuration The choices here are use DHCP or static address assignment Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 63

64 Select Language Support Next the languages to support are selected It is up to you Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 64

65 Time Zone Tell the OS what time zone the computer is in Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 65

66 Root Password Enter a root password Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 66

67 Create Users If desired create another user for use rather than the root user Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 67

68 Enable Security Features These are things like using the shadow password file Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 68

69 Select the Software Packages What is selected depends on the use to be made of the computer It also depends on whether the computer will be managed from the command line or the GUI Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 69

70 Select the Video Configuration Confirm or select the type of video card Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 70

71 Install All This Stuff Finally the installation program will start to copy everything to disk This make take a few minutes or quite a while depending on the packages selected and the speed of the computer’s components Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 71

72 Create Boot Disk Next decide whether or not to make a boot disk This will enable the computer to be booted from a floppy disk rather than the hard drive It is a safety measure Do it if you wish Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 72

73 GUI Configuration If X Windows was loaded the system will ask questions about the configuration of the system related to the display of graphics The main selection here is the selection of the monitor Linux is very picky about monitor selection This aspect of the setup is a major pain Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 73

74 GUI Configuration Be sure to correctly identify the monitor The installation program will next ask about the resolution to display and the default GUI to use Select what you wish It may ask whether to use the GUI or the text mode boot loader, depending on whether GRUB or LILO was selected Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 74

75 See If It Works That’s it Reboot and see it all works If it does not, that’s another topic Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 75

76 Text Mode Installation To use the text mode installation procedure, on the opening screen of the installation process enter test and press enter If this is not done the installation program will load the GUI program Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 76

77 Installation Over The Network This is the same as any other installation, just done over a network The source at the other end can be any device that can serve as a server Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 77

78 Installation Over The Network The protocol used to make this connection can be –NFS –SMB –FTP –HTTP FTP will be used as an example of the network installation procedure Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 78

79 Installation Over The Network To use a source outside of the computer to which Linux is to be installed the computer must be able to boot off of a floppy disk This floppy disk must have –Boot files –NIC configuration This procedure is detailed above Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 79

80 Installation Over The Network The next step is to setup the Linux installation source files on the server This of course depends on the server operating system being used With the boot disk in the floppy drive, reboot Linux will boot The installation program will start Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 80

81 Installation Over The Network Proceed through as above until the source for the Linux files selection screen is displayed Pick whatever method is being used The installation program will ask what NIC driver to try It only presents a limited set Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 81

82 Installation Over The Network So be sure to have the NIC’s driver disk available, just in case Once the NIC is detected, the installation program will ask for the IP configuration for the computer onto which Linux will be installed Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 82

83 Installation Over The Network Such as –IP address –Subnet mask –Default gateway –DNS server Then it will ask for the location of the server and the files on the server Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 83

84 Installation Over The Network As in –IP address of the server –Directory where the files are Next the installation program logs into the server and starts the installation Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 84

85 Installation Problems To see what might have gone wrong with an installation the first place to look is the dmesg command When it is run from the command line it scrolls what was displayed on the screen during installation To see all of it, pipe it As in –dmesg | less Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 85


Download ppt "NETW-240 Linux Installation Last Update 2012.08.24 1.3.0 Copyright 2000-2012 Kenneth M. Chipps Ph.D. www.chipps.com 1."

Similar presentations


Ads by Google