Henry Griggs Rambling
Recent TopicsVisit to Australia 2002
Sydney house 2002
Circular Quay 2004
Circular Quay 2002
Centrepoint Tower 2004
Oz Birds 2004
Oz Birds 2002
Bridge Climb 2002
Popular TopicsGallbladder removal
Photo of the day
Geek Alaska 2003
UK in 2003
Geek Caribbean 2002
Photo Of The Day
15th July 2001
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.
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.
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.
The current version of Slackware is 8.1. It was released on 18th June 2002, 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.
There 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.
Get 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. 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.
Make sure you have a cdrom drive that works. Preferably one that you can boot from. If you can't boot from the cdrom, then make sure you have a floppy drive and six blank floppies.
Make sure you have a spare floppy or two 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 CDROM ready.
Get 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.
Go to some computer that is running an operating system. Browse to ftp://ftp.slackware.com/pub/slackware/slackware-8.1/ and go in to the bootdisk directory. Read README.TXT. Then download bare.i (or something more appropriate if you are using exotic hardware). Go back up, then go down into rootdsks. Read README.TXT. Then download install.1, install.2 all the way to install.5. If you are going to be using Windows, you need to download RAWRITE.EXE as well.
Use rawrite.exe (Windows) or dd (Linux) to create six floppy disks from the bare.i and install.n files you downloaded. Label the floppies as you do them.
If you are booting from floppy disks, do this:
If you are booting from cdrom, put the cdrom in and restart the computer.
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.
The 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. This helps when you set up LILO later.
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.
Now 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.
You 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.
This 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. The default is ext3 (Extended Filesystem 3), a new journalling filesystem. This will be marked as experimental. 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.
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. At boot time, Linux will read the file /etc/fstab and mount
Press Enter to accept the suggestion that you move on to the SOURCE section.
Make 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:
Then choose "Normal installation to hard drive". Press Enter to accept these decisions.
Then 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.
Press 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.
When 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.
The 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.
Before 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.
As 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 Configuration
It 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.
Now 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 console
Then 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 Commands
This 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 Destination
Now 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. And I have one server right now that thanks to a crappy motherboard and me wanting to boot from a SCSI drive and not from the IDE drives, I can't use MBR or root, so I use the floppy approach. If I had any enthusiasm, I would work out the optional LILO commands I need, and I would make that system work properly. Maybe I'll get enthusiastic one year, but in the meantime, it works fine.
It will go ahead and install LILO.
Then 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 heard of problems with USB mice, but have no direct experience with it. I stick to hardware that I can control easily.
If you want to change this later, log on as root and type 'mouseconfig' and it will repeat this section.
This is the mouse driver. Yes, load it at boot time.
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'.
It 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 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.
Now 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.
You 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 telnet 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 Address
Type 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.
The 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 Address
My 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 Nameserver
What 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.
I don't know when you would say No. Probably if you have a dial up connection and the DNS details are supplied as part of the PPP connection.
Enter 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.
You 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.
You 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.
You 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 it configured, after help from a friend, and I don't understand all the options, but I have a configuration that works, and I copy it from installation to installation. One day I will learn a better way to do it, but right now there are other things to learn.
The choices are:
I choose SMTP. This creates a default sendmail configuration file - /etc/mail/sendmail.cf. I go and edit it later.
If 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 Configuration
Now 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 Manager
Here 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 Detected
Choose 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.
Finally. 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 time
Now 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 Success
I'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:
I 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.
There are three files that require fine-tuning. They are:
This 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'.
After 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.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 126.96.36.199 nameserver 188.8.131.52
There's a few other things I like to fiddle with to make me happy.
The 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.
I 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.
Why 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.
You 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.
Now you should configure X. I cover this in another page. Refer to:
So 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.
I 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 a networked printer, 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