• No results found

Booting from floppies and installing Debian GNU/Linux

In document Linux (Page 73-81)

2.3 Debian GNU/Linux

2.3.4 Booting from floppies and installing Debian GNU/Linux

The Rescue floppy. Place the Rescue floppy in the boot drive and reboot. In a minute or two, you should see a screen introduce the Rescue floppy and thebootprompt.

It’s called the Rescue floppy because you can use it to boot your system and perform 3

repairs if there is a problem that makes your hard disk unbootable. Save this floppy after you install the system.

You can do two things at theboot: prompt: press the function keys F1 through F10 to view a few pages of helpful information, or boot the system. If you have any hardware devices that Linux doesn’t access correctly at boot time, you may find a parameter to add to the boot command line in the screens you see by pressing F3 , F4, and F5 .

If you add parameters to the boot command line, be sure to type the word “linux” and 3

a space before the first parameter. If you simply press Enter, that’s the same as typing “linux” without any special parameters.

If this is the first time you’re booting the system, press Enter and see if it works correctly. It probably will. If not, you can reboot later and look for any special parameters that inform the system about your hardware.

Once you press Enter, you should see the messages Loading...

Debian GNU/Linux 57

then there is a page or so of cryptic information about the hardware in the system. There may be many messages in the form of, “can’t find something,” “something not present,” “can’t initializesomething,” or even “this driver release depends onsomething,” Most of these are harmless. The installation boot disk is built

to run on computers with many different peripheral devices. Obviously, no computer will have every possible peripheral device, and the operating system may emit a few complaints while it looks for peripherals you don’t own. You may also see the system pause for a while. This happens if it is waiting for a device to respond that is not present on your sys- tem. If you find that the time it takes to boot the system unacceptably long, you can create a custom kernel after you install the system which doesn’t have the drivers for non-existent devices.

Low memory systems. If your system has 4MB of RAM, you may see a paragraph about low memory and a text menu with three choices. If your system has enough RAM, you won’t see this at all, and you’ll go directly to the color or monochrome dialog box. If you get the low-memory menu, you should go through its selections in order. Partition your disk, activate the swap partition, and start the graphical installation system. The program that is used to partition your disk is calledcfdisk, and you should see the manual page forcfdiskand the instructions on page 51 for assistance.

cfdiskis used to create a Linux Swap partition (type 82) on the hard drive. You need the swap partition for virtual memory during installation, because the procedure likely uses more memory than you have physical RAM for. Select the amount of virtual memory that you intend to use once your system is installed. It is exactly equal to the amount of disk space required. Sixteen megabytes is probably the smallest practical amount, but use 32 megabytes if you can spare the disk space, and 64 megabytes if the disk is large enough and you won’t miss the space.

The color or monochrome dialog box. Once the system finishes booting, you should see the color or monochrome dialog box. If your monitor displays black and white (monochrome), press Enter and continue with the installation. Otherwise, use the ar- row key to move the cursor to theColormenu item and then press Enter. The display should change from black and white to color. Press Enter again to continue with the installation.

58 Obtaining and Installing Linux

The installation program is determining the current state of your system.

On some systems, this message flashes by too quickly to read. It is displayed between steps in the installation process. The installation program checks the state of the system after each step. This allows you to restart the installation without losing the work that you have already done, if you halt the system in the middle of the installation. If you need to restart an installation, you will be prompted to select color or monochrome again, configure the keyboard, reactivate the swap partition, and remount any disks that have been initialized. Any other installation on the system will be saved.

During the entire process, you are presented with the main menu. The choices at the top of the menu change to indicate your progress in installing the system. Phil Hughes wrote in Linux Journal that you could teach a chicken to install Debian. He meant that the installation process was mostly just pecking at the Enter key. The first choice on the installation menu is the next action you should perform according to what the system detects you have already done. It should sayNext, and, at this point, the next item should be

Configure the Keyboard

Configuring the keyboard. Make sure that the highlight is on the Nextitem, and press Enter for the keyboard configuration menu. Select a keyboard that conforms to the layout used for your national language, or select something close to it if the keyboard layout you want isn’t shown. After installation you can select a keyboard layout from a wider range of choices. Move the highlight to the keyboard selection and press Enter . Use the arrow keys to move the highlight—they are in the same place on all national language keyboard layouts and are independent of the keyboard configuration.

The shell. If you are an experienced UNIX or Linux user, press LeftAlt and F2 in unison for the second virtual console. That’s the Alt key on the left-hand side of the

Space bar and the F2 function key. You’ll see a separate window running a Bourne shell clone calledash. At this point, the root file system is on the RAM disk, and there is a limited set of UNIX utilities available for your use. You can see what programs are available with the command

ls /bin /sbin /usr/bin /usr/sbin

The shell and commands are there only in case something goes wrong. In particular, 3

Debian GNU/Linux 59

menu software can’t detect whether you’ve done this from the shell. Press LeftAlt-F1 to get back to menus. Linux provides up to 64 virtual consoles, but the Rescue floppy only uses a few of them.

Last chance! Have you backed up your disks? Here’s your first chance to wipe out 3

all of the data on your disks, and your last chance to save your old system. If you haven’t backed up all of your disks, remove the floppy from the drive, reset the system, and create a backup.

Partition your hard disks. If you have not already partitioned your disks for Linux Native and Linux Swap file systems, the menu itemNextwill be

Partition a Hard Disk

If you have already created at least one Linux Native and one Linux Swap disk partition, theNextmenu selection will be

Initialize and Activate the Swap Disk Partition

or you may even skip that step if your system has little RAM and the installation software asked you to activate the swap partition as soon as the system started. Whatever theNext

menu selection is, you can use the down-arrow key to select Partition a Hard Disk

ThePartition a Hard Diskmenu item presents you with a list of disk drives you can partition and runs thecfdiskprogram (see page 51), which allows you to create and edit disk partitions. You must create at least one Linux (type 83) disk partition.

Your swap partition will be used to provide virtual memory for the system and should be between 16 and 128 megabytes in size, depending on how much disk space you have and how many large programs you want to run. Linux will not use more than 128 megabytes of swap, so there’s no reason to make your swap partition larger than that. A swap partition is strongly recommended, but you can do without one if you insist and system has more than 16 Mb of RAM.

Initialize and Activate the Swap Disk Partition. This is the

Nextmenu item after you create one disk partition. You have the choice of initializing and activating a new swap partition, activating a previously initialized partition, and doing without a swap partition. It’s always permissible to re-initialize a swap partition, so select

60 Obtaining and Installing Linux

that you know what you are doing. This menu choice will give you the option to scan the entire partition for unreadable disk blocks caused by defects on the surface of the hard disk platters. This is useful if you have MFM, RLL, or older IDE disks, and checking the disk never hurts. Properly working SCSI disks don’t need to be scanned. They have their own internal mechanism for mapping out bad disk blocks.

The swap partition provides virtual memory to supplement the RAM in your system, and it’s even used while the system is being installed. That’s why we initialize it first.

Initialize a Linux disk partition. At this point, theNextmenu item should be Initialize a Linux Disk Partition

If it isn’t, you haven’t completed the disk partitioning process, or you haven’t made one of the menu choices dealing with your swap partition.

You can initialize a Linux disk partition, or alternately you can mount a previously initialized partition.

The boot floppies will not upgrade an old system without removing the files—Debian 3

provides a different procedure than using the boot floppies for upgrading existing Debian systems. Thus, if you are using old disk partitions that are not empty, you should initialize them, which erases all of the files. You must initialize any partition that you created in the disk partitioning step. About the only reason to mount a partition without initializing it at this point would be to mount a partition upon which you have user files, like/home, that you don’t want deleted.

Select theNextmenu item, to initialize and mount the root (the “/” directory) disk partition. The first partition you mount or initialize, after the swap partition, if you’re using it, is the partition mounted as root. You will be offered the choice to scan the disk partition for bad blocks, as when you initialized the swap partition. It never hurts to scan for bad blocks. Keep in mind that this step can take 10 minutes or more if you have a large disk.

Install the base system. Once you’ve mounted the root partition, the Nextmenu item will be

Install the Base System

unless you already performed some of the installation steps. You can use the arrow keys to select the menu items to initialize or mount disk partitions if you have additional partitions to set up. If you have created separate partitions for/var,/usr, or other file systems, you should initialize and mount them now.

Debian GNU/Linux 61

There will be a pause while the system looks for a local copy of the base system. This search is for CD-ROM installations and will not succeed. You are then offered a menu of drives from which to read the base floppies. Select the appropriate drive. Feed in the Base 1, Base 2, Base 3, and Base 4 floppies—and Base 5 if you are using 1.2MB floppies—as requested by the program. If one of the base floppies is unreadable, you need to create a replacement floppy and feed all five floppies into the system again. After the floppies have been read, the system installs the files. This can take ten minutes or more on a slow system.

Install the operating system kernel. At this point, theNextmenu item should be Install the Operating System Kernel

Select it, and you will be prompted to select a floppy drive and insert the Rescue floppy. This copies the kernel onto the hard disk. This kernel is used later to create a custom boot floppy for your system and make the hard disk bootable without a floppy.

Install the device drivers. Select the menu item to install the device drivers. You will be prompted to insert the Device Drivers floppy, and the drivers will be copied onto your hard disk. Select the

Configure Device Drivers

menu item and look for devices which are on your system. Configure those device drivers, so they will be loaded whenever your system boots.

There is a menu selection for PCMCIA device drivers, but you do not need to use it. After installation you can install thepcmcia-cspackage. This detects PCMCIA cards automatically and configures those it finds. It also recognizes cards that are hot swapped when the system is running—they will all be configured as they are plugged in, and de- configured when unplugged.

Configure the base system. At this point the system read in all of the files that make up a minimal Debian system, but you must perform some configuration before the system will run. Select

Configure the Base System

This asks you to select your time zone. Look for your time zone or region of the world in the menu, and type it at the prompt. This may lead to another menu where you can select more specific information.

62 Obtaining and Installing Linux

Next, you are asked if your system clock should be set to Greenwich Mean Time (GMT) or local time. Select GMT if are running only Linux or another UNIX on your system. Select local time if you use another operating system like MS-DOS or Microsoft Windows. UNIX systems keep GMT time on the system clock and use software which converts it to the local time. This allows them to keep track of daylight savings time and leap years, and even allows users who are logged in from other time zones to individually set the time zone on their terminal. If you run the system clock on GMT and your locality uses daylight savings time, the system adjusts for daylight savings time properly on the days it starts and ends.

Configure the network. You must configure the network even if you don’t have one, but you only have to answer the first two questions:

What is the name of your computer? Is your system connected to a network?

If you are connected to a network, check with your system administrator or ISP vendor if you don’t know the following information:

 your computer’s host name;

 your computer’s or ISP’s domain name;  your computer’s IP address;

 the netmask to use with your network;  the IP address of your network;

 the broadcast address to use on your network;

 if your network has a gateway, the IP address of the default gateway system to which you should route packets;

 the system on your network to use for Domain Name Service (DNS); and  whether you connect to the network using Ethernet.

The program will guess that the network IP address is the bitwise AND of your sys- tem’s IP address and netmask. It will guess that the broadcast address is the bitwise OR of your system’s IP address with the bitwise negation of the netmask. It will guess that

Debian GNU/Linux 63

your gateway system is also your DNS server. If you can’t find any of these answers, use the system’s guesses—if necessary, you can alter them after installation by editing the

/etc/init.d/networkfile.

Make the hard disk bootable. If you choose to make the hard disk boot directly to Linux, you are asked to install a master boot record. If you aren’t using a boot manager (this is probably the case if you don’t know what a boot manager is), answer “yes” to this question. The next question is whether you want to boot Linux automatically from the hard disk when you turn on the system. This sets Linux to be the bootable partition—the one that will be loaded from the hard disk. If you answer “no” to this question, you can set the bootable partition later using the MS-DOSFDISK.EXEprogram, or the Linuxfdiskor

activateprograms.

Make a boot floppy. You should make a boot floppy even if you intend to boot the system from the hard disk. The reason for this is that it’s possible for the hard disk bootstrap to be installed incorrectly. A boot floppy will almost always work. Select

Make a Boot Floppy

from the menu and feed the system a blank floppy as directed. Make sure that the floppy isn’t write protected. The software attempts to format and write it. Mark this diskette the “Custom Boot” floppy and write-protect it once it has been written.

The moment of truth. This is what electrical engineers call the “smoke test”—what happens when you power up a new system for the first time. Remove the floppy disk from the floppy drive and select

Reboot the System

from the menu. If the Linux system doesn’t start up, insert the Custom Boot floppy you created in the previous step and reset the system. Linux should boot. You should see the same messages as when you first booted the installation boot floppy, followed by some new messages.

Add a user account and password. After you’ve added logins, (Chapter 4 discusses this in some detail), you are dropped intodselect, the Debian package management program.

You should read the tutorial before attempting to install packages withdselect. 3

64 Obtaining and Installing Linux

dselectallows you to select the packages that you want installed on your system. The Debian package management software is described in detail starting on page 64. If you have a CD-ROM or hard disk with the additional Debian packages or are connected to the Internet, you may want to read that section now. Otherwise, exitdselect. You can use the package management software after you have transferred the Debian package files to your system.

You must be the superuser (root) to usedselect. 3

If you install the X Window System and do not use a US keyboard, read the X11 3

Release note for non-US keyboards.

In document Linux (Page 73-81)