Henry's NotesHomeHomeSlackwareCamerasGadgets Installation Laptops Links Palm Printing Sound System Administration X Window System ContactEmail MeSearchAdvanced search |
Installing Slackware 9.0[Henry's Notes] -> [Slackware] -> [Installing] This describes how I install Slackware on a new computer. I try and describe the decisions I make and why I make them. I describe the entire process, from installing Slackware, rebuilding the kernel, configuring X, setting up users, and installing extra applications. This is how I do it. It's not the only way. It's not the best way. It's how I do it. I'm comfortable with this, and it works for me. If it helps you get started with Linux, then I'm glad. I read in the Slackware newsgroup recently that the first Linux distribution that you choose is the one that you stick with. I started with Slackware, tried RedHat and Mandrake, then returned to Slackware. Maybe it's true.
What's a distribution?An installation of Linux is a large and complex thing. At the very core of it all is the Linux kernel. On top of this is a body of GNU software, plus other applications. All this material has to be organised, and there has to be some sort of installation method that will setup and format your hard disk, setup the directory structure, recognise your hardware, and install all the software. A distribution is a collection of software, and a method of installing it. There are quite a number of different distributions of Linux. For example: Slackware, RedHat, Mandrake, Debian, Caldera, Storm, SuSE, TurboLinux. Each of these different distributions uses different methods to arrive at the same end result - a working Linux system. The different methods reflect the different philosophies behind the different distributions. RedHat and Mandrake want to let users quickly set up a Linux system and be productive almost immediately. So they have a very graphical and automated installation method. This is very nice and gets you working quickly, and if that's what you want, then that's what you would use. Slackware takes a different route. It's not graphical, and it doesn't automatically recognise everything you've got in your computer, and you have to do a lot of work yourself. It takes longer, and it's harder, but you learn a lot about Linux in the process. The other distributions have their own philosophies and aims, and you choose the distribution that best suits your needs. The Slackware distribution is put together by a small team of people led by Patrick Volkerding. He's been doing it since at least 1994 when I first found Slackware. He's also written a few books about Slackware installation and configuration. Why Slackware?I have tried 3 different distributions over the years. RedHat has served me well over the last two years, and so has Mandrake. But I started with Slackware, and now I'm back with Slackware. RedHat and Mandrake both became very slick and, in my opinion, started to adopt the Microsoft approach of trying to do much for the user by hiding stuff from the user. I don't like that. I want to see what's going on, and I want to know why things happen. I also like a simple installation with the config files in just a few places, and RedHat and Mandrake started to use a complicated network network of installation scripts and config files to control the bootup process. When it got too much for me, I went back to Slackware. If you want to just install Linux and start doing stuff immediately, then Slackware is not for you. If you want to fiddle with Linux and learn how and why things happen, and get productive a little bit later, then Slackware is what you should consider. What version?The current version of Slackware is 9.0. It was released on 19th March 2003, so it's fairly recent. New Slackware releases happen when they happen. Don't hold your breath waiting for new Slackware releases. The Slackware guys take their time preparing a new distribution, they test the software well, check security issues, and they release a new distribution when it's ready, not when the advertising calls for it. In the Slackware newsgroup, the question is often asked "When will the new release be out?" and the answer is always "When it's ready". If you want the latest and greatest version of Linux, with the latest kernel and latest X and latest Gnome or KDE, then you might want to try RedHat or Mandrake, who keep up to date with many frequent releases. Slackware is a slower release cycle, but the software is stable. Getting SlackwareThere are a number of ways you can get the Slackware distribution.
Up until Slackware 8.0, if you bought an official copy of Slackware, you used to get a little installation booklet with it, tucked into the case. This little booklet was invaluable. It was tiny and hard for tired old eyes to read, but it was a priceless summary of the installation process. Alas, it is gone with Slackware 8.1. However, the CDROM has a file called Slackware-HOWTO in the root directory, that contains all the information you need. You should read this file in conjunction with this document. I've just had a quick read of that file again, and it is pretty much what this document is, only it's official. If there's a conflict between what the HOWTO contains and what I write, then believe the file and don't believe me. Checking your hardwareGet your computer ready. Make sure you have enough hard disk space for Linux. You can shoehorn Linux into a couple of hundred meg, but you won't be able to do much with it. You should allow at least 1 gig, for a small install. But have about 4 gig for a great install. Do you have Windows on your system already and want to keep it? Easiest way is to buy another hard disk and add it to the system. That saves you having to repartition the existing hard disk and do a Windows re-installation. I've recently used Partition Magic to break a Windows partition in half and install Linux. That worked fine. It can be done. But it's still a lot easier to just add another hard disk for Linux. Make sure you have a cdrom drive that works. Preferably one that you can boot from. Slackware uses a newish cdrom boot process, and ti won't work with old BIOSes. If you can't boot from the cdrom, then make sure you have a floppy drive and two blank floppies. Make sure you have one spare floppy to make your emergency boot disk. You should also work out what hardware you have. If you have old ISA cards in your machine, give up now. This is just too much hard work. I used to struggle with that stuff and I gave up. I have only PCI cards now and my life is so much easier.
Get your Slackware CDROMs ready. Preparing to installGet into your computer BIOS. See if you can set it so that it boots from cdrom first. If this option is not available, try and boot from cdrom anyway. You might be in luck. If you can set it, do so. Check and see if you can boot from your cdrom drive. Stick the CDROM in and reboot. If it starts a Slackware installation, then you're ready to go. If it doesn't, you will need to create the boot and root floppies from the cdrom. The cdroms contain two directories, one for bootdisks and one for root disks. Read the instructions in those directories. Choose an appropriate root disk. I usually use bare.i. Choose an appropriate root disk. I usually use color.tgz. Use rawrite.exe (Windows) or dd (Linux) to create the boot and root floppy disks from the boot and root files you found. Label the floppies as you do them. Booting from installation mediaIf you are booting from floppy disks, do this:
If you are booting from cdrom, put the cdrom in and restart the computer. You'll be asked about a keymap. Ignore it and go with the default. Eventually, you will get a screen that describes the next few steps, and you will be asked to login as root. This means you type "root" and press Enter. You won't be asked for a password. Partitioning your hard diskThe first step is to setup your hard disk. You have to partition it yourself. Adding a file system will be done later automatically by the installation process. To partition the hard disk, we use a program called fdisk. This is similar to the DOS utility of the same name, except this one does a little bit more work. First of all, we need to know which hard disk you are going to be using. If you only have one IDE hard disk, then it will be called /dev/hda. If you have two, and the first one is for Windows and the second one is for Linux, then the one you want to use will be called /dev/hdb. You might have a SCSI disk that you are going to dedicate to Linux. The first SCSI disk on the chain would be called /dev/sda. The second SCSI disk would be called /dev/sdb. You should be getting the naming pattern by now. So you type:
Fdisk will run. You might get warnings about cylinders and stuff. Ignore it. You will get a simple cryptic line. Command (m for help): So type 'm' for a list of the commands. You'll get something like: Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) So type 'p' to list the current partitions. You might get something like: Disk /dev/hda: 255 heads, 63 sectors, 2491 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 1200 9638968+ c Win95 FAT32 (LBA) /dev/hda2 1202 2491 10361925 f Win95 Ext'd (LBA) /dev/hda5 1202 2492 10369926 b Win95 FAT32 Take note of the second line that lists the units. You'll need those two numbers. First thing you need to do is delete all existing partitions. This is destructive. If you have data on that disk, then you better have backed it up because you're about to lose it. Use 'd' to delete the partitions. It will ask for the partition number. Look at the example above. The column down the left shows /dev/hda1, /dev/hda2, /dev/hda5. The last digit is the partition number. Start with the last one, and delete them backwards. Keep going until you can type 'p' and have no partitions showing. Now we can create our Linux partitions. We have to make some decisions first. How many partitions? You need at least 2. One for root, one for swap. The swap partition is used to swap memory in and out. Once upon a time, I used to set up a whole mess of partitions, one for root, one for /usr, one for /usr/local. Nowadays, I'm lazy. I set up only one for root and one for swap. For your first install, I recommend the same thing. If you want to get fancy, you can learn about it yourself and set it up later when you're more familiar with your Linux needs. First step is to calculate how many blocks are needed for the swap space. First of all, how much swap space do you need? The rule of thumb is to take how much RAM you have and double it, and use that for your swap space. However, I wouldn't have swap space less than 128 meg. Example: I have 512 meg of RAM, so I use 1 gig of swap space. Example: I am really impoverished and stingy and only have 32 meg RAM, so I use 128 meg swap space. Remember those two numbers I mentioned earlier? You need them now. When you type 'p', it tells you "Units = cylinders of x * y bytes". Multiply those two numbers together and divide them into your desired swap space. Here's an example for a 128 meg swap space, assuming that you only have 64 meg of RAM. 128,000,000 ----------- x * y With the data above, we have: 128,000,000 ----------- ~ 16 16065 * 512 So now you know you need 16 blocks to create a 128 meg swap partition on the hard disk in this example. Now we can start to create the two partitions. Type 'n' for a new partition. A primary partition. Partition 1. Starting block number will be 1. Ending block number will be the maximum allowed (they show you this number) less the number of blocks required for the swap partition. Then add the next partition. Another primary partition. Partition number 2. Starting block will be the default. Ending block will be the default. If you now type 'p', you'll see the two partitions you just created. They will look like this (different example, but you get the idea). Device Boot Start End Blocks Id System /dev/hda1 1 960 1935328+ 83 Linux native /dev/hda2 961 1023 127008 83 Linux native To be on the safe side, we make our main partition bootable. Press 'a' to set a partition bootable flag. Enter the partition number, in this case 1. It will be set to bootable. This can be seen by the asterisk in the Boot column for that partition. I've recently read that this isn't important any more. But I always do it just in case. Device Boot Start End Blocks Id System /dev/hda1 * 1 960 1935328+ 83 Linux native /dev/hda2 961 1023 127008 83 Linux native Now there's one last step. We have to change the partition type of the second partition so it's a Linux swap partition. Type 't', choose partition 2, and enter type 82. Want to see the different partition types you can use? Type 'l' and look at that mind-boggling list of partition types. Now type 'p' again and you should see something like: Device Boot Start End Blocks Id System /dev/hda1 * 1 960 1935328+ 83 Linux native /dev/hda2 961 1023 127008 82 Linux swap Now you're done. Save your work by typing 'w'. If you don't want to save it, but want to throw away all your changes, just type 'q'. If in doubt, type 'm' to see the options. Installing SlackwareNow you can run the setup program. This program will install Slackware onto your hard disk and configure your system for you. You can also use it after installation to install packages that you may have forgotten. Type "setup". No command line parameters are required. A menu will be displayed. The first few items can be safely ignored. ADDSWAPYou want to start with the option ADDSWAP. Remember the swap partition you created a few steps above? We have to activate that swap partition now so that it's useful. If you set the swap partition up correctly, the setup program will display the details of that partition (/dev/hda2) and all you have to do is just press Enter to accept it. If it says you haven't got one, you made a mistake and will have to go back and modify your partitions. After you press Enter, it will format the swap partition, and activate it. When the swap partition is ready for use, it will tell you this. Press Enter to continue. Then press Enter to accept the suggestion that you move on to set up the TARGET drive. TARGETThis is where you will be installing Slackware Linux. This should just be the large partition you set up with disk, /dev/hda1. It will display the details of this partition. Press Enter to accept it. Then you get to choose how to format it. Choose the slow format option that checks for bad sectors. If your hard disk has bad sectors you want to know about it now, before you start using it. Then you get to choose what type of filesystem you want to use. You get three choices. There's ext2 (Extended File System 2), which has been around a long time and is very stable. There's ReiserFS, a new journalling file system. Last version of Slackware, the default was ext3. Now it's ReiserFS. You choose which one you want to use. When there was only ext2, I used to use ext2. It's stable. Now, I use ext3. I've had good experiences with it. I like it. You could just trust me and go with ext3, or you could choose Google and do some searches on ext3 and ReiserFS and weigh up the pros and cons. As Patrick has set the default to ReiserFS, and most people seem tobe using ReiserFS, maybe you should try ReiserFS. I'll stick to ext3 unless I find some reason not to. Then you get to choose the granularity of format. I usually use the default and just choose 4096 byte inodes. Finally it will format the partition, and install your chosen filesystem on it. This can take a long time for big hard disks. When it's finished the partition, it will tell you that it's adding that partition to fstab. Just press Enter to accept this. IF you happen to have any DOS or Windows partitions in the system, it will find them and ask if you want to mount them at boot time. I think it's a good idea to have access to your Windows drives when you're in Linux. It helps you transfer your data to Linux; it helps you share Netscape/Mozilla bookmarks; it will even help you transfer data back to Windows. So say yes. Then it asks where you want them. This information gets stored in a file called /etc/fstab. File System Table. At boot time, Linux will read the file /etc/fstab and mount the drives that are specified in there as auto. There's a little fine tuning that needs to be done to /etc/fstab, but I cover that later. Press Enter to accept the suggestion that you move on to the SOURCE section. SOURCEMake sure the Slackware disc 1 CDROM is in the cdrom drive. You have to get it to recognise the CDROM in the drive. I have had mixed experiences with this. On some machines, I can tell it to find the CDROM automatically, and it will do it every time. But on some machines, it won't find it automatically, but if I tell it to search /dev/hdc (a fairly common location for an ATAPI CDROM), it will find it quite easily. I would recommend that you start by trying to find the CDROM automatically:
SELECTThen it will want you to choose what to install. It shows a list of things to install. There are 3 columns. The first column is checkboxes. The second column is the code for the set of stuff to install, and the third column is the description of the set. Look down the second column and turn them on and off by moving the cursor down the lines and the space bar to toggle whether you want them installed. I am assuming that you have plenty of hard disk space. If you are restricted, then you need to trim your installation down to fit your hard disk space. In which case, you need to be fairly experienced at what you need. Your best bet is to install everything and try it for a few years and then you'll know next time what you use and what you don't use. This is the hard part. What do you want to install? Some things must be installed:
Other things are optional. If you plan on using the computer only as a server, then you don't need a GUI running on it. If you plan to use it as a desktop system, then most probably you want a GUI. So install these things. Even if you have religious objections either KDE or Gnome, best to install them both. Then you can share the goodies.
Now come the really optional bits. Only install these if you think you need them.
When these have all been set, press Enter for Okay. INSTALLPress Enter again to install them. Choose "full". I normally choose "menu" and do fine-tuning of what I want selected, but if you have enough hard disk space, you should just install the lot. After a few more installs, you can decide to be adventurous and start selecting and rejecting individual packages. The setup program will now install Linux. This will take some time. Wait. Configuring SlackwareWhen the installation is finished, your hard disk is almost ready for use. It needs just a few more things set up, and it needs to be configured. I usually do a rough configure job at this point and get the essentials done, and then I fine-tune the configuration later. KernelThe first step is to install a kernel. The kernel is the innermost core of a Unix operating system. This is the part that Linus originally wrote. This is the essential bit, the core, the kernel. You have a choice of initial kernels. If I booted from CDROM, I choose the one on the cdrom. If I booted from floppy, I choose the one on the floppy. Follow the instructions, and it will copy the kernel from those locations, copy it to /boot on your hard disk. After installation, I usually configure and fine-tune the kernel and then recompile it and install a small clean version of the kernel. But before you get to that step, you need a starting kernel installed and then used by LILO. Make BootdiskBefore getting on and using LILO, you need to create a boot floppy in case it all screws up. You've got this far in the installation and if LILO screws up, you don't want to have to go through it all over again. So we create a floppy disk that will boot the system and run your new Linux system. It asks if you want to create a boot floppy. Remove any existing floppy disk, and insert a new floppy disk. Select Yes, and choose OK. It will format it first of all, and then make it into a boot disk. Label the disk. I sometimes forget to label them and when I need it, I don't know which of the 12 disks splayed in front of me is the one I need. label it. Modem ConfigurationAs LILO can do some interesting stuff at bootup time, the configuration program will ask some questions that seem to be completely unrelated to what we are supposed to be doing. It asks where your modem is. Answer it. I use broadband cable, so I don't use a modem. I say no, you choose whatever you have. Screen Font ConfigurationIt asks if you want to try custom screen fonts. I tried this stuff years ago, and it was cute and interesting, but nowadays I can't be bothered and I just say NO to custom fonts. That's also the default now. Install LILONow we get to LILO. Before you can make use of the kernel you just copied, you have to use the LILO program. LILO is a multiple boot configuration tool. It is dangerous. But if you choose the simple approach, you will not feel any pain. If you want to learn LILO in detail, read the manpage for lilo and lilo.conf. If you want to understand the whole bootup mess, try this book:
You get three options.
I have used the floppy disk approach before, and not used lilo. It can be quite convenient. You need that floppy disk you just created. If you have a dual boot system, you boot quite normally all the time and there's no indication of any other operating system. Quite handy for obscuring your Linux installation from snoops and bosses and spouses and children. But when you put the floppy in, you boot to Linux. But that's not something I normally do. I usually choose 'simple', and let it set up LILO for me, and then I come back later and fiddle with the LILO configuration. I have used the expert several times, and if you know what you're doing, you can set up LILO to do some special things. Probably best to choose 'simple' here. Configure frame buffer consoleThen you get some more strange options. This is for very simple X installations. I don't use this. I choose 'standard - standard Linux console (safe choice)', because I like safe choices. Optional LILO CommandsThis is in case you had to enter strange LILO commands during the boot process to make it recognise weird CDROM drives or SCSI drives, or do strange stuff with memory. I choose fairly standard hardware, so I never use this, and I leave it blank. Select LILO DestinationNow we get to the tricky bits. You get three choices.
Look at that "possibly unsafe". Makes you want to choose one of the others, doesn't it? I don't. I use the MBR all the time. Unless I have hardware problems, and then I try the root option. And if that fails, I will use the floppy approach that I described above. (You can use either the boot floppy you created above, or you can use a LILO floppy. Either one will work okay.) I choose MBR, and in almost every case, that has worked. In the past, I had one machine that MBR wouldn't work, but root did. It will go ahead and install LILO. Mouse ConfigurationThen we get on with other simple installation matters. Like choosing what mouse you have. I have PS/2 mouses, and I stick with that. I've just done one installation on a machin with a USB mouse and keyboard and they worked fine. I didn't know it at the time, and said I had a PS/2 mouse, but the USB ones still work fine. If you want to change this later, log on as root and type 'mouseconfig' and it will repeat this section. GPM ConfigurationThis is the mouse driver. Yes, load it at boot time. Configure Network?You get the option of configuring the network now. I like to get this started now, and fine-tune it later. Say so Yes. If you don't want to, you can do it again later, by logging in as root and typing 'netconfig'. Network ConfigurationIt tells you that you can do this later, or re-do it, by using netconfig. Just press Enter. The problem with the networking section is that the instruction booklet sys you can get the information you need from your network manager. But it doesn't give much help if you're the network manager and don't have a clue. I've been in this position. Some people say I still am. So I offer a few hints here. Enter hostnameEnter the hostname. This is the name that this box will be known by. No dots, no domain, just the name. Like 'emily' or 'astoria'. If you have a small network, it's best to find a theme for your box names. I use names of characters from Dave Sim's extended tale of Cerebus The Aardvark. Others use planets, or minerals, or elements, or Star Trek or Babylon 5 characters. Try and keep your names consistent. It makes it easier for the future. Don't label them by their function. I use the hosts file to set up my host names, and I provide aliases by function. Example, my CD ripper box is called jaka, but it has an alias of ripper. I can refer to it by either name, but I usually refer to it as ripper. If there comes a time that jaka dies, I will build a new box and call it julius, and give it the alias ripper. Every other box or application or script that you write to automate functions doesn't need to be changed. They still access it as ripper, even though the name and box has changed. So name boxes with names and use aliases for their functions, and you can easily switch the boxes in and out and move things around and you have less things to worry about. Enter DomainNow we enter the domain. The domain part is the name of your network. You could call it something like hgriggs.com, but that probably exists in the real Internet (it does) and you don't want to be naming your home network boxes by some name that is really out there. Confusion can reign if your network escapes. I use "internal" for my domain, so I know what boxes are on my internal network. Example, astoria.internal and julius.internal. Setup IPYou have three ways of setting up your IP address.
If you have no network at all, choose loopback. If you have a DHCP server out there, like a cable router/firewall box, or a real DHCP server at work, then choose DHCP. But only if you really want to. I don't like DHCP. I prefer static IP addresses. I like to ssh between my boxes and set up scripts to do stuff with them, and I think it's easier with static IP addresses. So I always choose static IP address here. Enter IP AddressType the static IP address you want for this box. You have to use a IP address in the range of private IP addresses. These private ranges are:
I have a small and simple home network, so I only need a C Class scheme. I use 192.168.50.* for my home network. Choose a simple one that suits yourself, and stick to it. You can't use 0 or 255 as they have specific purposes. So I use a pattern of my own. Gateways are 1. A gateway is the box that links your home network to the outside world. Like a Linksys cable router/firewall, or an old 486 that you built to act the same way. Example: 192.168.50.1. Then I start with 5 and increment by 5 for all other boxes. I don't know why, but it seemed like a good idea at the time and it hasn't given me any grief. I could just as easily have started at 2 and incremented by 1. Same effect. But I like numbers ending in 0 and 5. Be careful when typing here. Use the Backspace key to erase the default. Enter NetmaskThe default that is given will generally work. I use a C Class addressing scheme, so 255.255.255.0 works for me and also happens to be the default. Enter Gateway AddressMy gateway is the Linksys router and it's got the IP address of 192.168.50.1. So I put that. I use 1 for my gateway addresses, just as a simple convention. If you don't have a gateway, then put the same IP address that you gave to the box you are building. Use A NameserverWhat to put here? Do you have a permanent connection to the Internet? If yes, then your broadband supplier will have given you the IP addresses of the DNS servers they supply. So choose Yes. Or if they expect you to connect via DHCP to their DHCP server, then you can get the DHCP address from looking at the lease details of that DHCP connection. Get those IP addresses, and say Yes. Are you connecting to a work network? Get the IP addresses of the DNS servers from your network administrator and say Yes. If you have your own DNS server on your network, then say Yes because you should know what you are doing. If you don't have any connection to the outside world, then say no. If you don't have a connection, and you say yes and put soemthing in, it will cause timeout delays whenever you have to do stuff with the network. Select NameserverEnter the IP address of the first DNS server. If you said Yes above, then you should have the IP addresses. You only get to put one in here, but you can go back later and edit /etc/resolv.conf and put the other ones in there. Network cardYou get two choices:
If you probe, hopefully it will find your card. Make a note of the driver it decides to use, because it will help you later when you recompile your kernel and simplify the bootup process. Network SummaryYou get one last chance. If you screwed it up, you can choose No to go back and reconfigure the network. Otherwise, you continue with configuration. Sendmail ConfigurationYou get to choose what sort of sendmail configuration you want. Sendmail is the Mail Transport Agent (MTA) used by Slackware. You can replace it later if you don't like it, with something like qmail. But I use it, because it's simpler for me to use it. I have a few standard .mc files that I have setup for the different kind of boxes that I use. I use m4 to convert these to sendmail.cf configuration files. This works very well. My process is described in the finishing a Slackware installation page. The choices are:
I choose SMTP. This creates a default sendmail configuration file - /etc/mail/sendmail.cf. I go and edit it later. Hardware ClockIf you want to change this time configuration later, say you move continents, then log in as root and type 'timeconfig' and you can configure the time section all over again. You get two choices for the hardware clock:
This lets you choose what your hardware clock is set to. There are two clocks in your system. There is the hardware clock, and there is the system clock which is ticking in software. The two do not need to be the same. I have the hardware clock set to UTC (also known as Greenwich Mean Time) and have /etc/localtime as a symbolic link to the local time database of /usr/share/zoneinfo/US/Eastern. So under Linux, I see local time, and it automatically adjusts for daylight savings. If I move again, like from the USA back to Australia, I just have to change the symbolic link to /usr/share/zoneinfo/Australia/Sydney and I am in the right time again. Because my hardware clock is set to UTC. There is a drawback to this. I have a dual boot system with Windows 98. Windows handles time in a really sucky way. It wants the hardware clock and the system clock to always be the same. Not very smart, but what can you do. On my Linux only systems, I always set the hardware clock to UTC and handle time the elegant way. On dual boot systems, it depends on how much time I spend in Windows and how important time is to you in Windows. Usually I spend bugger-all time in Windows and it isn't important to me, so I set the hardware clock to UTC and Windows always thinks it's about 14 hours behind. I don't mind. I like the metaphor that Windows is always behind. If Windows was important to me, then I would set the hardware clock to local time. It isn't, so I don't. Time Zone ConfigurationNow you get to choose where you are. This is necessary if you set the hardware clock to UTC. This selection sets how the system can convert from UTC to your local time. Be correct. It's a nice long list of choices, so scroll through the lot and don't be hasty. Select Default Window ManagerHere you get to choose your default window manager. If you are unsure of what you want to choose, refer to my X explanation. I choose FVWM2. You might want to choose KDE or Gnome. If you later plan on using one of the graphical logins (kdm, gdm, xdm) this isn't as important, because you choose your window manager on the fly. But if you login on the command line and then start X with 'startx', this section determines which window manager will start. No Root Password DetectedChoose Yes so you can set a root password. Then enter a new password, enter it again and accept the results. The first and basic logon account is root. You can do a lot of damage as root. You should only logon as root when you have to configure the system. You should have another logon for your normal work. You should never give access to root to anyone you don't trust. So set a good password, numbers and letters and mixed case and nothing out of the dictionary or your life. Keep it safe. Remember it. Don't write it on a post-it note and stick it on the monitor. Setup CompleteFinally. Setup is finally over. Press OK. Then choose Exit and Enter. You'll be back at the root command line prompt. You can't make changes to the system yet. You have to reboot. Rebooting for the first timeNow it's the moment of truth. Reboot. Use Ctrl-Alt-Delete or 'shutdown -r now'. While it's rebooting, remove cdroms and floppies. And hope that it will reboot. If your motherboard and BIOS and hard disks are standard, then you shouldn't have any problems. If you run into problems and it won't boot, then there is still a lot you can do to fix it. But they depend a lot on having the boot floppies that you created as part of the installation. You need those floppies in case things go wrong. If all goes well, you will get the default Lilo prompt. It's a red scroll box and it shows a list of the possible boots. You want the Linux option, so select it and press Enter. Then you should see the standard Linux boot information scrolling rapidly past. You can retrieve most of this later with 'dmesg'. You'll need the info for simplifying the bootup when you reboot the kernel. Lots of things get displayed. It should detect any PCMCIA cards here. And it will generate RSA/DSA key pairs for encryption purposes. First Reboot SuccessI'll assume that your system rebooted, and Linux started, and you're looking at the logon prompt. If you didn't get this, read down below for some things you can try to get to this stage. Logon as root. Look. You've got mail. Patrick Volkerding has sent two emails to you as part of the installation process. Read them. You can read them with mail, mailx, mutt, or pine or whatever Mail User Agent (MUA) you chose during installation. I use 'mutt'. These emails will give you hints about what to do next. However, I know what to do next, after so many of these installations. I generally do these things:
Install the kernel sourcesThe kernel sources didn't fit on the first cdrom. They are now on the second cdrom. So install them.
Reconfigure LILOI don't like the default LILO. I start by stripping out a lot of stuff, mostly comments about framebuffers that I never use, and then setting defaults that I prefer.
If you want to be fancy, you can go and edit /boot/boot_message.txt to personalise it. Finetune The NetworkThere are three files that require fine-tuning. They are:
host.confThis file works in conjunction with the other two. I usually set it to be this: order hosts, bind multi on This means that when your system wants to convert a domain name to an IP address, it checks /etc/hosts first, and then it checks using the DNS servers specified in resolv.conf. Want more information? Type 'man host.conf'. hostsAfter installation, this will contain only one hostname. localhost set to 127.0.0.1. I still use the hosts file to keep all the names of my local network boxes, their IP addresses and their aliases. At this stage, with only 9 boxes on the network, I can keep the hosts file up to date fairly easily. Any more, and I will start my own DNS server for the internal network. So I add all my boxes in here. Like this: 127.0.0.1 localhost 192.168.50.1 bran.internal gateway linksys firewall 192.168.50.5 cerebus.internal cerebus henry prime 192.168.50.10 netprinter.internal netprinter 192.168.50.15 boobar.internal boobar laptop 192.168.50.20 jaka.internal jaka ripper 192.168.50.25 julius.internal julius training 192.168.50.30 sofia.internal sofia server cvshost intranet 192.168.50.35 astoria.internal astoria anne 192.168.50.40 bear.internal bear mp3 Here you can see my IP address patterns. The gateway gets 1. All others start at 5 and increment by 5. That's just my habit. And my naming conventions. Each machine gets a name from Dave Sim's Cerebus the Aardvark. So there's the full name (jaka.internal), and a simple alias (jaka) and then aliases for function (ripper). Look at sofia. This is my main server. It has a number of aliases for the various functions. If one day I wanted to move the CVS hosting to another box, I would just change the hosts file and move the alias to the appropriate box. resolv.confresolv.conf is where you store the IP addresses of your DNS servers, and how to do searches. During installation, you got the chance to enter one DNS IP address. If you have more, then you should add the other ones now. I usually add two other lines. My private network domain name is 'internal'. So I add these two lines to resolv.conf, changing if necessary. These go at the start of the file. search internal domain internal Then I add the nameserver IP addresses. Here is what whole file looks like. IP addresses have been changed to protect the innocent. search internal domain internal nameserver 60.12.1.100 nameserver 60.18.1.200 Finetune a few other small thingsThere's a few other things I like to fiddle with to make me happy. /etc/fstabThe file /etc/fstab is a list of disk devices to mount at boot time. It also has removable devices that get mounted on demand. I like to fiddle with the settings of the removable devices. The default for these will look something like this: /dev/hdc /mnt/cdrom iso9660 noauto,owner,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner 0 0 As root owns the devices, the default is for floppies and cdroms to be only mountable by root. I don't want that. I want anyone to be able to mount them and unmount them. I could change them to this: /dev/hdc /mnt/cdrom iso9660 noauto,user,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,user 0 0 and then anyone can mount them. But only the same user (or root) can umount them. So for the most flexible approach, I set them to this: /dev/hdc /mnt/cdrom iso9660 noauto,users,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,users 0 0 and now anyone can mount them and anyone can unmount them. And that's the least irritating way for me to use them. /etc/rc.d/rc.localI often have special things I want loaded at boot time. For example, starting squid, or mounting my mp3 server's disk drives via NFS, or starting SNMP logging software. So I modify rc.local. First, I create a new module like this one - rc.squid. #!/bin/sh # Start squid /usr/local/squid/bin/squid and then add these lines to rc.local: # Start Squid if [ -x /etc/rc.d/rc.squid ]; then . /etc/rc.d/rc.squid fi If I ever wanted to stop squid booting, then I just remove execute permissions from rc.squid and at next bootup, it won't boot. And if I want to turn it back on again, I just add the execute permissions again. If I want to get really fancy, I let rc.squid take a parameter, and then I can use it with 'squid start', 'squid stop', 'squid restart', 'squid tickle', etc. Sometimes bother to do this and sometimes I don't. Compiling the KernelWhy compile the kernel? I get asked this a lot. After all, why should you compile the kernel? It boots up okay, and all the hardware runs. Sure, you can leave it like that. But it's not efficient. You may as well be using Windows if you're just going to be installing the default kernel and not changing it. Besides, the default installation will give you a kernel that is designed for the base model. A 386. You've probably got a Pentium, but you lose a lot of the grunt because the kernel has been compiled with only 386 code, and all the fancy special CPU code that defines a Pentium has been left out. I always recompile my kernel so that it uses the CPU code appropriate to my machine. I get more speed. And I cut out a lot of crap. The kernel doesn't check if all this wild and crazy hardware exists in the machine at bootup time. I tell the kernel exactly what I've got, so at bootup time it only checks and loads those things. It makes bootup time faster, and it uses less memory. And I get a chance to see what's new in the kernel. And if I'm going to be burning cds, well then I have to configure my system and recompile the kernel to turn off ATAPI cdrom handling and turn on SCSI emulation. See my page on burning and copying CDs. And anyway, you just have to recompile your kernel if you have any self-respect. So here's brief instructions on how to do it.
Now you have compiled your kernel. You now have to move it and set it up so it will be used at next bootup.
And now you have to reboot again and check that the new kernel functions properly. RebootingYou need to reboot and check that your kernel works and check that all the hardware has been recognised. Type "shutdown -r now" to reboot. Linux should reboot. If it failed to reboot, reboot again and this time choose the older backup kernel at the LILO menu. Boot with that, and then go and revisit all your work and find out what went wrong. Correct the problems, then try it again. Correcting the problems means doing these things:
When you get a successful boot, check it and make sure everything worked and all hardware was recognised. As root, use these tools to check that it all worked.
If anything failed, reconfigure it, check the modules, check the kernel settings. Rebuild, install, run lilo, try again. Persevere. This is where you learn a lot. This is also where you sometimes decide to go back to Windows. Configuring XNow you should configure X. I cover this in another page. Refer to: Adding UsersSo far you have one user - root. You should not use root for your day to day activities. Root is too dangerous. You can accidentally erase your entire system as root. You should use root only when you are modifying the system, or doing maintenance. For everything else, you need a proper logon. You could be a wanker and give yourself a user logon like "sexgod" or "lordofearth". Or you could be sensible and use your first name, or use your first initial and last name. I take the initial and last name approach usually. hgriggs, jsmith, abardoletti. And you need to think of a password. Try and use something tricky. I go with mixed random passwords, that contain numbers and upper and lower case letters and a few strange characters. I create this using a small Palm program called GenPW. You can obtain this at the GenPW website. It doesn't take too many repetitions for a password to be burned into my mind. I have started using initial letters of phrases as something easier to remember. Example: a fool and his money are soon parted = afahmasp. Whichever way I do it, I end up with a huge number of passwords to remember. My Palm is very useful for that. I use HandBase to store all my passwords in a database. It needs a password to get into the database, and it's kept in encrypted form. I use Handbase for a lot of stuff, so I am happy to pay the money for a legal version. Okay, you have a desired logon and you've got a password to use. You need to logon as root, and then you can add a new user in two different ways.
useradd is the Unix command line utility. You need to put all the details on the command line. Like 'useradd -u 1000 -g users -s /bin/bash -d /home/hgriggs -m hgriggs'. This is how it's done on other Unixes, so it's handy to know how it works. 'useradd' with no parameters will refresh your memory, and 'man useradd' will explain. With Slackware, I use adduser more than useradd. adduser is a script supplied with Slackware. It's in /usr/sbin, so have a look at the script and learn. It's quite interesting. It's also very easy to use. Here's how I usually use it.
That user is now created and can logon on. From now on, use the new logon and don't use root unless you really, really have to. Checking printingI like to make sure that printing is working the way I want it. The Slackware default is to use a local printer and use apsfilter. I don't like this. For a start, I have networked printers, and I don't like apsfilter. I use a half-arsed cobbled together system right now. It works, mostly. But I plan on learning CUPS. In the meantime, the details for my printing is on this page: Printing with a Linux System Adding additional softwareI install extra software under /usr/local. When I compile the applications, I use './configure --prefix=/usr/local/app-1.0.0'. I create a directory off /usr/local that is has the application name and the version number. Underneath this directory are other directories like bin, lib, include, man, etc. Under these directories are the application specific files. Just stored like this, they aren't of any use. But I use a Perl script called makelinks. This is based on a Perl script written by a co-worker. He did a great job on his Perl script. I love it. I use it at work all the time, on all my hosts. But to be able to use it at home, I rewrote it. I looked at wgat it did, but didn't look at the code, and I reproduced its behaviour. The version I wrote is probably inferior to his version, but it suits me very well. makelinks will make symbolic links in /usr/local/bin, /usr/local/lib, usr/local/share, etc, from the original application directory. I can maintain multiple versions of apps. I can switch between them easily. I can delete old versions and be sure of getting rid of all the files without hurting nay other app. This keesp my apps organised and easily maintained. I have notes on how I do this with finalising a Slackware installation. My usual /usr/local looks like this: Acrobat5/ gplaycd@ mozilla@ sbin/ OpenOffice-1.0.2/ gplaycd-0.1.0/ mozilla-1.3/ share/ RDB@ gqview@ netpbm@ src/ RDB-2.6d/ gqview-1.2.2/ netpbm-10.14/ tkcvs@ RealPlayer8/ include/ plucker@ tkcvs-7.1.2/ antiword@ info/ plucker-1.1.14/ vim@ antiword-0.33/ j2sdk@ plugger@ vim-6.1/ astyle@ j2sdk1.4.1/ plugger-4.0/ wmbiff@ astyle-1.15.3/ jpilot@ print_filter@ wmbiff-0.4.6/ bin/ jpilot-0.99.5/ print_filter-0.5.3/ xterm@ dia@ lib/ remind@ xterm-166/ dia-0.91/ makelinks@ remind-3.0.22/ etc/ makelinks-2.0/ runas@ games/ man/ runas-5.2/ |