Red Hat Linux Installation HOWTO Donnie Barnes, djb@redhat.com V2.1, January 23, 1996 1. Introduction This is the second edition of the Red Hat Commercial Linux Installation HOWTO. It is maintained by support@redhat.com. All comments or suggestions regarding this document should be sent to that address. To get updates to this document, check the Red Hat FTP sites ftp://ftp.redhat.com/pub and mirrors. For a complete list of mirror sites, get the RedHat-FAQ or the MIRRORS file, available from either of the above sites. This HOWTO covers the installation of Red Hat 3.0.3. 2. Getting Red Hat Linux 2.1. Ordering a Red Hat CD-ROM The easiest way to get Red Hat is on CD-ROM. The Red Hat distribution is very large, on the order of 250MB of compressed binary packages. In addition the graphical install is most easily accomplished with a CD-ROM. The official Red Hat Linux CD-ROM is available from many Linux distributors, and many CD-ROM publishers are pressing their own CD- ROMs, so you shouldn't have any trouble finding one at your favorite Linux reseller. You can always get the latest official version directly from Red Hat Software at: phone: (203) 454-5500 (800) 454-5502 fax: (203) 454-2582 email: sales@redhat.com WWW: http://www.redhat.com 2.2. Getting Red Hat via FTP If you don't have a CD-ROM drive or just want to try Red Hat Linux, you can FTP the distribution from any of the Red Hat mirror sites. The current list of official mirror sites is kept at ftp://ftp.redhat.com/pub/MIRRORS, and includes: ftp.ibp.fr /pub/linux/distributions/redhat ftp.gwdg.de /pub/linux/install/redhat ftp.msu.ru /pub/Linux/RedHat ftp.cvut.cz /pub/linux/redhat sunsite.mff.cuni.cz /OS/Linux/Distributions/Redhat ftp.ton.tut.fi /pub/Linux/RedHat ftp.funet.fi /pub/Linux/images/RedHat gd.tuwien.ac.at /pub/opsys/linux/redhat ftp.dstc.edu.au /pub/linux-redhat gatekeeper.digital.com.au /pub/redhat ftp.lab.kdd.co.jp /OS/Linux/packages/redhat ftp.pht.com /pub/linux/redhat sunsite.doc.ic.ac.uk /packages/linux/sun.../dist.../redhat linux.ucs.indiana.edu /pub/linux/redhat ftp.uoknor.edu /linux/redhat ftp.cc.gatech.edu /pub/linux/distributions/redhat uiarchive.cso.uiuc.edu /pub/systems/linux/distributions/redhat ftp.caldera.com /pub/mirrors/redhat ftp.cms.uncwil.edu /linux/redhat ftp.wilmington.net /linux/redhat sunsite.unc.edu /pub/Linux/distributions/redhat gatekeeper.dec.com /pub/linux/redhat ftp.rge.com /pub/systems/linux/redhat In any of these directories, a symbolic link named current will point to the most recent Red Hat Linux release. 3. Installing via FTP You have two ways you can ``FTP'' install your system. If you have an Ethernet card and are connected to the Internet, you can download just the three boot images and start installing via the network. If you are not directly on the Internet, but you do have access to an account from which you can FTP the distribution, you can download everything to a DOS or ext2 partition and install from there. There are inherent problems associated with an FTP install, however. The biggest of these is that many FTP servers are very busy and timeouts can occur that the install can't deal with well. You should try and find a server that isn't loaded heavily and try to use off peak times for your install. Also try and use servers located close to your own site. Be prepared for a retry or two before everything works smoothly. 3.1. Getting the Boot Images FTP to one of the above sites and cd to the current directory. You will see several directories, but the only ones you are concerned with are RedHat and images. You may also need to get some of the files in the dos directory if you are doing this from DOS. First you will need to get a boot image. To do that, cd into the images/1213 directory and get the image.txt file. Exit FTP (or just escape back), read the image.txt file and choose a hardware configuration. Then return to your FTP session and download the corresponding boot image (bootXXXX.img). Next go to the images directory and download both ramdisk1.img and ramdisk2.img. You should now have the following: bootXXXX.img ramdisk1.img ramdisk2.img 3.2. Making Your Boot and Ramdisks To make the images under Linux, you should use dd as follows: dd of=/dev/fd0 if=ramdisk1.img [swap floppy disks and label] dd of=/dev/fd0 if=ramdisk2.img [swap floppy disks and label] dd of=/dev/fd0 if=bootXXXX.img Existing Linux users may also want to download and run the savesetup.pl Perl script after writing the boot floppy. It saves a number of TCP/IP parameters and XFree86 configuration to the boot floppy for use during the installation. To use it, mount your boot floppy disk somewhere, and run: savesetup.pl [mountpoint] Under DOS, you need to run rawrite.exe to make the disks. You can FTP this utility from the dos directory of the FTP site. Put it somewhere in your path. You can then run rawrite and tell it what file to write and which drive to write to. Do this for all three floppies labelling them as you go. 3.3. Installing Directly from the Internet If you have an Ethernet card and are on the network, you can now do the install via the network. The only things you need are the three floppy disks you just created in the previous step. Note that this method of install will NOT work via PPP or SLIP -- you must have a direct ethernet connection to the Internet. If you want to install via PPP or SLIP, you will have to first do a minimal install as described in the next section ``Installing from a spare partition''. Once up, you can use PPP or SLIP from Linux to download additional packages. Just boot the boot disk and insert the ramdisks as prompted. Hopefully your Ethernet card was detected at boot time. If not, you may have picked the wrong boot image for your hardware or you may need to specify hardware parameters at the LILO prompt. Once your machine has booted and your hardware has been detected, continue by answering the normal questions and then by saying you want to do an FTP install. At that point, pick a site close to you (or choose ``custom'' and enter a FTP site and directory from the MIRRORS file) and you should be off! Your install should run from there just like any other install. 3.4. Installing from a Spare Partition If your only access to the Internet for your target machine is via PPP or SLIP or even Zmodem or Kermit, you can download Red Hat Linux to a DOS or ext2 partition and install it from there. It isn't the fastest way, but it can be done. The basic steps are as follows: o Get the boot and ramdisk images and make floppies o Set up a directory structure on your DOS or ext2 drive o Download the series file and decide which series you need o Download all the proper RPMs o Download the contents of the base directory o Boot the floppies and install 3.4.1. Boot and Ramdisk Floppies Create the boot and ramdisk floppies as described above in the ``Getting the Boot Images'' section. 3.4.2. Make the Directory Structure At the ``root'' of your DOS or ext2 drive or partition, make a directory called RedHat. Then cd in there and make an RPMS directory and a base directory. Note that for a DOS drive, the capitalization of the RedHat is insignificant. 3.4.3. Download the Series File and RPM Packages From the FTP site, download the RedHat/base/series file and place it in your local RedHat/base directory. It will look something like: 0 1 Base MAKEDEV SysVinit adduser at bash bdflush cpio crontabs dev e2fsprogs ed etcskel file fileutils findutils gawk getty_ps gpm end This shows you most of the ``base'' series. The series file describes all the series, and which packages they contain. The first line in each series contains a number and the name of the series; you can ignore the number. The series ends with the keyword ``end''. Everything inbetween is an RPM name. For each series that you want you need to download all of the corresponding RPMs. It may not hurt to leave some RPMs out, but we highly recommend that you get all the RPMs for each series you select. At a minimum, you should get all the packages in the ``base'' series. There is a directory RedHat/sets which contains subdirectories for each series in the series file. In each subdirectory there are symbolic links to the actual packages in RedHat/RPMS. This can be used for two benefits. One, you can download an entire series by going to the proper directory and getting everything in it, and two, if you are installing from DOS the filenames will fit the DOS 8.3 convention. The installation scripts do not care what the rpm package filenames are -- so you don't have to worry about them being called package.031 and so on. With this setup, you can easily download everything you need to make a complete series. Just download everything in each subdirectory that you want into your RedHat/RPMS directory on your local hard drive. Note: When you are done, all your RPM files should be in the RedHat/RPMS directory. In addition, if you will be installing the X Window System, you will need to get an XFree86 server package corresponding to your video hardware. These packages are: XFree86-8514 XFree86-P9000 XFree86-AGX XFree86-S3 XFree86-Mach32 XFree86-SVGA XFree86-Mach64 XFree86-VGA16 XFree86-Mach8 XFree86-W32 XFree86-Mono 3.4.4. Downloading the Final Pieces Change into the RedHat/base directory that you created earlier and download RedHat/base/fsstnd.cgz and RedHat/base/skeleton.cgz to that directory. You should now be ready to install! You may now skip ahead to the ``Continuing the Install'' section. 4. Installing from a CD-ROM or over NFS 4.1. Preparing an NFS Server for Installs To prepare an NFS server that can be used for Red Hat installations, you need to mirror the following parts of redhat-3.0.3, while maintaining the directory structure, from one of the Red Hat mirrors: RedHat/RPMS RedHat/base images/ If you wish to use the X based installation you will also need: RedHat/instimage It is important that the exectuable permissions on the files in RedHat/instimage are preserved! An easy way to ensure this is to use the following in your mirror config: mode_copy=true do_deletes=true make_bad_symlinks=true which also preserves a number of important symlinks which might otherwise be improperly mirrored. After mirroring you simply need to export the toplevel redhat-2.1 directory. 4.2. Making Boot and Ramdisks Making the boot and ramdisks from a CD-ROM or over NFS is almost exactly as described in the ``Getting the Boot Images'' section for the FTP install, but it is even easier if you are already running Linux. If you are running Linux (or some form of UNIX) you can simply run the images/mkfloppies.pl Perl script (on the CD-ROM or NFS volume), which prompts you for your hardware and creates the proper boot and ramdisks for you. It also runs the savesetup.pl script which saves a number of important network parameters and XFree86 configuration files. Just make sure and don't try and create the disks on a machine other than the one you are installing on using these scripts. If you are making the floppies from DOS, you need to choose the proper bootXXX.img file and write the three floppies as described above in the FTP install section. 5. Continuing the Install (FTP, CD, or NFS) The installation process is fairly easy to follow -- just read the instructions and answer the questions. One thing to remember is that you must use the space-bar to select the partitions you want to format. Anytime you see a list of items with [ ] to the left, you are REQUIRED to use the space-bar when you want to select something. 5.1. Reboot to Start the Install Place your boot disk in drive A (yes, you must have a 3.5" High Density drive as your A drive) and reboot your machine. You will see a screen of information about boot parameters. If you know you need parameters to force the kernel to detect certain hardware devices, enter them now. Otherwise, just hit enter to auto probe. Watch the messages as the system boots and see if all your hardware is detected. For example, if you have SCSI in your system and you see a message like ``scsi: 0 hosts'', you have a problem. Make sure you picked the right boot image first, and then try entering command line parameters. For more info on those, see the RedHat-FAQ (available on any Red Hat mirror). If everything goes well, insert the ramdisks as prompted. 5.2. Mounting the Install Media One of the first things you have to do is mount your install media. For a CD-ROM install, the process is very simple. Just pick CD-ROM, and it should mount your CD-ROM. If you are doing an NFS install, select NFS. When prompted, enter the hostname and directory of the exported filesystem. For a true FTP install directly off the Internet, pick the FTP option. Nothing is mounted in this case. If your hardware was detected properly, everything should work fine. For an install from your DOS or ext2 partition, pick the Hard Drive type install. You will have to enter the name of the partition on which you placed the files you downloaded, then enter the file system type of that partition, either msdos for a DOS partition, or ext2 for a Linux ext2 partition. If you entered everything correctly, the parition will be successfully mounted. 5.3. Finishing If you are doing a CD-ROM or NFS install, you can do an X based graphical install. If you are doing an install via FTP or from partition to which you've downloaded the Red Hat packages, you must do a text based install. At this point you can continue the install by simply answering the questions and you should be set! 6. Resolving Problems If you think you've found a bug, try and replicate it. If you can, check the RedHat-FAQ and make sure it isn't mentioned there. Then and only then, email bugs@redhat.com with a report. When doing so, please use the format specified in the RedHat-FAQ to give a description of your problem. If you think your problem could be resolved with more documentation, you can order the official Red Hat 2.1 Manual from Red Hat Software at: phone: (203) 454-5500 (800) 454-5502 fax: (203) 454-2582 email: sales@redhat.com WWW: http://www.redhat.com You are also free to join the Red Hat mailing list. See http://www.redhat.com for more information. 7. Additional Documentation and Resources As stated, the official 150 page Red Hat Manual is available from Red Hat Software. There is other documentation available for free, however, from the Red Hat mirror sites and the Red Hat WWW site http://www.redhat.com. These include the RedHat-FAQ, which contains lots of answers to frequently asked questions, the RPM-HOWTO, which describes the use of the rpm packaging system used in Red Hat Linux, the redhat-list mailing list, technical notes, and mini-HOWTOs. 8. Copyright Notice This document is Copyright (C) 1996 by Red Hat Software. Redistribution of this document is permitted as long as the content remains completely intact and unchanged. In other words, you may reformat and reprint or redistribute only.