![]()
Linux for Newbies: Part 3 - "... Install"
by Gene Wilburn
(The Computer Paper, October 1999. Copyright © Wilburn Communications Ltd. All rights reserved)
Last month we went through a pre-flight checklist to get information about our hardware, and to check its compatibility with Linux. We examined three options for creating enough empty space on our hard disk to install Linux. We learned how to create an installation boot floppy from the Linux CD-ROM.
Assuming that your system meets all the hardware requirements and that you have created partition space for Linux, let's do the installation. You'll need a single formatted blank DOS diskette during the installation.
(Note: The example Linux distribution we're using for this series is the Cheapbytes Red Hat Linux 6.0 i386/Intel CD (also called i386/CPU), available for $1.99 plus shipping from www.cheapbytes.com)
In addition to the following instructions, I encourage you to also read through some of the Red Hat support material at www.redhat.com/support/. In particular, browse through the "Installation Guides, Manuals & FAQs" section. You'll find valuable information, tips and hints there, not to mention the official manual for Red Hat 6.0 Linux.
Because I cannot capture the actual installation screens as screen shots, I'll emulate them by using italic type for the prompts you'll see.
The example machine I'm using is my own 486-66 with 16Mb RAM, external Sony SCSI 4X CD-ROM, an ancient GoldStar VGA monitor, and a 2Gb IDE HD. My HD has a 1Gb Windows partition and I'll be adding Linux to the rest.
One last check: if you're installing Linux alongside another operating system be sure you have backed up all your important files. If you make a mistake or something goes wrong, there's a possibility of destroying your existing setup. When working with any operating system installation, always be prepared for the worst.
Booting Up
Place the Linux CD in your CD-ROM player and insert the Linux boot diskette you created into your A: drive. Start your system. You'll get a "Welcome to Red Hat Linux" screen. Press Enter and you'll see Linux loading. It starts out something like this:
Loading initrd.img...................... Loading vmlinuz........ Uncompressing Linux.....Once the initial loading is complete, you'll get a "Welcome to Red Hat Linux" installation screen. From this point on use the Tab key to select between options, Spacebar to toggle check boxes, and the Enter key to proceed. If you overshoot an option, Alt-Tab takes you back to the previous option. Press Enter.
Here's a condensed version of what you'll see:
Choose a Language: English
What type of keyboard do you have?: us
What type of media contains the package to be installed: Local CDROM
Insert your Red Hat CD into your CD drive now: OK
At this point the installation program will autoprobe, looking for an IDE CD-ROM. If it doesn't find one, it asks:
What type of CDROM do you have?
The choices are SCSI and Other CD-ROM. "Other" includes older CD-ROMs such as Creative Labs Sound Blaster CD-ROM. If you select SCSI, the program will autoprobe for a SCSI card. If it is not found, you may need to manually feed the parameters under "Specify options". I have to manually enter aha152x=0x340,11 for my Adaptec 1510 card. (Parameter options are listed in the online Red Hat 6.0 Installation Guide.)
Installation Path: Install
Installation Class: Custom
Be very careful here. A "Workstation" or "Server" installation assumes that you're devoting your entire HD to Linux. It will destroy any Windows partitions you have. Choose Custom.
Disk Setup: fdisk, Edit
Linux fdisk is very spare--just a blank command-line prompt, but it's straightforward to use and very reliable.
Creating Linux Partitions
A quick note about Linux device names: if your HD is an IDE drive, Linux will call this /dev/hda if it's your first drive, or /dev/hdb if it's a second drive. SCSI drives are designated as /dev/sda or /dev/sdb. Each partition on the drive gets a number, so the first partition on the first drive would be /dev/hda1 or /dev/sda1. You can have up to 4 primary partitions on hard disk, and a large number of extended partitions.
In the following example, I'll fdisk my 486 that already has a single Windows C: drive. I'll create a swap partition and a native Linux partition as primary partitions. The cylinder numbers apply to my machine, not yours. You'll be prompted with different sets of numbers. If you feel uneasy at any time during the fdisk session, enter q to quit, without making any changes. Changes are not permanently written to the partition table until you enter w.
Here's a transcript of the session that creates 2 new partitions, makes partition 2 a Linux swap file of 32M, and devotes the rest of the drive (partition 3) to Linux. The rule of thumb is that the swap partition should be approximately twice the amount of physical RAM, though most people do not need a swap file larger than 127M on any system:
Command (m for help): n e extended p primary p Partition number (1-4): 2 First cylinder (522-973): 522 Last cylinder ... ([522]-973): +32M Command (m for help): n e extended p primary p Partition number (1-4): 3 First cylinder (539-973): 539 Last cylinder ... ([539]-973): 973 Command (m for help): t Partition number (1-4): 2 Hex Code (type L to list codes): 82 Command (m for help): p Disk /tmp/hda: 64 heads, 63 sectors, 973 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Start End Blocks ID System /tmp/hda1 * 1 521 1050304+ 6 DOS 16-bit>=32M /tmp/hda2 522 538 34272 82 Linux swap /tmp/hda3 539 973 876960 83 Linux native Command (m for help): wAfter fdisk writes this to your partition table, there's one more step. Select Done from the return screen and you'll be moved on to a large "Setup filesystems" screen. Arrow down to your main Linux partition (/dev/hda3 in my example) press Enter.
Mount point: /
That's a single forward slash. We're telling the setup program to mount the Linux root file system on /dev/hda3. Press Enter, then OK to finish.
The hardest part is now done. Take a break and wipe the sweat from your brow. The rest is much easier.
You'll next get a screen called "Active Swap Space". Make sure the checkbox is marked with an asterisk (hit Spacebar if it isn't) and it's a good idea to also select "Check for bad blocks during format".
After "Scanning Packages ..." the next screen is "Partitions To Format". Use the spacebar to select your Linux partition(s) and also select "Check for bad blocks."
After the installation finishes formatting the swap partition, you are presented with an extensive list of installation options. If you're new to Linux, most of the options will not yet be familiar to you so I'm going to supply you with a few simple recipes for a first time installation. As you become more sophisticated with Linux, you'll want to do this differently, but the list below will get you up and running.
Selecting Packages
For a very basic system, with X Window, that installs 248Mb worth of software packages, select the following options, and deselect everything else:
[*] Printer Support [*] X Window System [*] Mail/WWW/News Tools [*] File Managers [*] Dialup WorkstationIf you have around 400Mb total HD space, then add the following to make a very nice development workstation:
[*] C Development [*] Development Libraries [*] C++ Development [*] X DevelopmentIf you have around 600Mb or more of HD space, toss in the following for a really first-rate workstation:
[*] Gnome [*] KDE [*] DOS/Windows Connectivity [*] Web Server [*] Postgres [SQL] Server [*] Tex Document Formatting [*] Emacs [*] Emacs with X Window [*] Extra DocumentationTab to OK and hit Enter. Do not check "Select individual packages". The packages will now install, displaying an update status during the procedure. Package installation will take anywhere from under ten minutes to over an hour, depending on the speed of your processor. Then come the remainder of the installation questions.
Finishing Up
Configure Mouse: Just follow the prompts. Leave "Emulate 3 Buttons?" unchecked.
Configure LAN: Select No. You can readjust this later.
Configure Timezones: Leave "Hardware clock set to GMT" unchecked and select your timezone (Canada/Eastern in my case).
Configure Services: Uncheck apmd and nfs. Leave the rest as is.
Configure Printer: If you have a printer attached, select Local, take all the defaults, and then select your actual printer or one very similar. We'll do more on printers in a later column.
Root Password: This is your master admin password for Linux. Make it a good one but one you won't forget.
Authentication Configuration: Select "Use Shadow Passwords". Deselect everything else.
Bootdisk: "Would you like to create a bootdisk for your system?" Absolutely. Insert your blank formatted DOS diskette when prompted.
LILO Installation: The choices for LILO (Linux Loader) are "Master Boot Record" and "First Section of Boot Partition". Most users prefer MBR, but Boot Partition is always a safe choice. Remember, you can always boot up Linux with the bootdisk you just created so if you're nervous about this, choose Boot Partition. It can be changed later.
If you have one of those new, very large IDE hard drives, select the "Use linear mode ..." option of the LILO configuration.
XConfigurator: We'll delve into this in more detail in a future column. For now select "Generic VGA Compatible" as your video card and "Generic Monitor" as your monitor. Skip all offers to "Probe" your video card.
Would you like X to start when you reboot?. No
Okay, you've done it! Red Hat will now ask you to remove your floppy and CD-ROM and reboot. If Linux is not in your Master Boot Record (MBR), insert your newly created boot floppy when your system restarts. Otherwise reboot normally.
If all goes well, Linux will boot and give you a Login: prompt. Login as root.
Login: root Password: yoursecretpasswordTo reboot from Linux, press CTRL-ALT-DEL or type
# shutdown -r now
To shut down your system from Linux, type the following at the '#' prompt:
# shutdown -h now
And wait for the screen to say "System Halted". Then hit the off switch.
If you have LILO loaded in your MBR, hit TAB when LILO first appears and type dos in order to boot into your Windows partition.
Next time: Creating user accounts and getting around on the system
Gene Wilburn (gene@wilburn.ca) is a Toronto-based IT manager, musician and writer who operates a small farm of Linux servers.
-30-