30190c14.qxd:Layout 1 12/18/07 12:39 AM Page 409

Running 14

If you become interested in building and submitting packages for Slackware, there are some good descriptions of how to do so at the Linux Packages site (www.linuxpackages.net). Look for links to building and submitting packages on the site’s home page in the Information box.

Installing Slackware Slackware is freely available from several different sources. It installs and runs well on low-end computers. Some Linux or UNIX expertise would be useful, especially if something goes wrong.

Getting Slackware Slackware 12.0 comes on a single DVD (about 3.7GB) or six CDs: three installation CDs and three source code CDs. The first Slackware CD can be used for a good, basic install. That CD is included on the DVD that comes with this book. I recommend installing from that CD for a computer that has limited disk space and an older processor.

The full Slackware distribution set is also available from a few dozen mirror sites on the Web (see www.slackware.com/getslack). Because of disk space issues and to maximize bandwidth, the Slackware project recommends you get the DVD or CD images (ISOs) using BitTorrent. For a list of available torrents, see www.slackware.com/getslack/torrents.php.

For many years, Slackware was available on one install CD, but adding KDE to the distri- NOTE bution made additional CDs necessary. To help support the project, you can purchase the boxed set of Slackware from http://store .slackware.com. At the store, you also can get a subscription to Slackware so that the Slackware Store sends you a new version each time one is released (every six to eight months). The store will just ship it when it’s available and charge your credit card. People who like Slackware often pay the subscription fee just to show their support.

New Features in Slackware 12.0 With Slackware 12.0, the distribution consists of three installation CDs (plus three source code CDs) and/or a DVD version that holds everything. While still offering a stable foundation (the 2.6.21.5 kernel is used by default), Slackware includes bleeding-edge components for the desktop (KDE 3.5.7 or XFCE 4.4.1) and applications (the latest Firefox browser and Thunderbird e-mail client).

Here are a couple of applications that were added to Slackware recently that might interest you:

 X11 7.2.0 — The X.Org Foundation’s modular X Window System. This offers improve- ments with performance and hardware support.  SeaMonkey 1.1.2 — Contains a combination Web browser, e-mail client, IRC chat client, newsgroup client, and HTML client. In Slackware, SeaMonkey replaces the Mozilla suite as the all-in-one Internet suite.

409 30190c14.qxd:Layout 1 12/18/07 12:39 AM Page 410

Part III Choosing and Installing a

Along with these applications, Slackware has added recent popular updates to many of its existing applications and facilities (Firefox, Thunderbird, XFCE, and many others). To work with software packages in Slackware 12.0, the distribution now includes the Slackware Package Browser. This Web application enables you to search a Slackware packages database, making it much easier than it was in the past to find the Slackware software you want.

Hardware Requirements While some older versions of Slackware will run on a 386, the Slackware site recommends 486 as a minimum processor. Without a graphical interface (X Window System), the minimum amount of RAM required is 16MB. With the GUI, at least 128MB of RAM is recommended. If you intend to use the KDE desktop environments, you can't have too much RAM (KDE in Slackware runs effec- tively with 256MB RAM or more, depending on your applications).

The ZipSlack distribution is a small Slackware distribution that you can install from a Zip drive or floppy disks. ZipSlack can install on a hard disk with as little as 100MB space. You can find ZipSlack on any Slackware mirror site.

If you are installing Slackware 12.0, 500MB is the minimum amount of disk space you should have available on your Linux partition. The recommended amount of hard disk space is at least 3.5GB for a full desktop install.

Slackware supports all IDE and SCSI controllers supported by the Linux kernel itself.

Starting Installation Although the Slackware installer has evolved over the years, its basic look-and-feel hasn’t changed much. There are some things you still need to do manually, such as setting up RAID or doing partitioning.

The following steps describe how to install Slackware from the first installation CD. For the purposes of this book, this procedure demonstrates a minimal installation from the first Slackware CD. If you want to install Linux on low-end hardware (slow CPU and minimal RAM), this procedure is a great way to end up with a workable, minimal desktop system.

If you want to do a more complete installation of Slackware, you should obtain the Slackware 12.0 DVD or three-CD installation set. For more detailed information (or if something goes wrong dur- ing the installation that isn’t covered here), refer to the Slackware-HOWTO, which is on the first Slackware CD.

1. Obtain a Slackware installation disc. (As mentioned earlier, you can boot the CD image from the DVD that comes with this book as described in Appendix A, or download it from a Slackware mirror site and burn it to CD.) 2. Insert the DVD that comes with this book into the drive and reboot your computer.

410 30190c14.qxd:Layout 1 12/18/07 12:39 AM Page 411

Running Slackware Linux 14

3. From the boot prompt, type slack and press Enter to start the default boot process. If you are using a Slackware CD instead of this book's DVD, simply press Enter. If the Slackware installation boots properly, you are prompted to enter a keyboard map.

If your Slackware medium won’t boot, refer to the BOOTING.TXT file on the Slackware NOTE CD for information on things you can try to get around the problem. (If you can’t access the CD at all, you can get this file from any Slackware mirror site.)

4. If you are using a U.S. keyboard map, press Enter; to use a keyboard map for a different language/country, type 1, press Enter, and then select the language/country you want. The Slackware login prompt appears. 5. Type root and press Enter. A shell prompt appears. 6. Partition your hard disk. Chapter 7 explains how to partition your hard disk. Slackware doesn’t have a graphical partitioning tool, such as Disk Druid, so you have to use the fdisk or cfdisk command to partition your hard disk (again, refer to Chapter 7 or see the Slackware-HOWTO for details). To install Slackware, you should have at least one swap partition (up to twice the size of your RAM, with a maximum of about 500MB) and one Linux partition (such as ext3). You should have at least 500MB of hard disk space, with a recommended 3GB of disk space available for a full install of Slackware 12.0.

7. Enter setup mode. Type the following command to enter setup mode:

# setup

The Slackware Linux Setup screen appears, with the following options:

HELP Read the Slackware Setup Help file KEYMAP Remap your keyboard if you’re not using a US one ADDSWAP Set up your swap partition(s) TARGET Set up your target partitions SOURCE Select source media SELECT Select categories of software to install INSTALL Install selected software CONFIGURE Reconfigure your Linux system EXIT Exit Slackware Linux Setup

Type the first letter in the option name (or use the arrow keys) to highlight the option you want, and then press Enter. The following steps describe options you need to configure Slackware.

8. Select ADDSWAP. The Swap Space Detected menu appears, listing the swap partitions you have available. Select the one you want (there will usually be just one) and select Yes to install it as your swap partition. (If you don’t have a swap partition, exit the setup screen and run fdisk to create one.)

411 30190c14.qxd:Layout 1 12/18/07 12:39 AM Page 412

Part III Choosing and Installing a Linux Distribution

The swap partition will be checked for bad blocks, formatted, and activated. Select OK to continue. The Select Linux Installation Partition menu appears.

9. Select a root partition. From the Linux partition that is displayed, highlight the one that you want to use as your root (/) partition and choose Select. The / partition is where Linux and all your data will go by default. (Other partitions can be added later.) Choose to do a quick format (Format) or a slow format that includes bad block checking (Check). Or you can select No to not format the partition.

Typically you would overwrite your / partition, although you might keep data from NOTE another partition. I often maintain a separate data partition that I will attach to the file system in a location such as /mnt/data. With that technique, I can keep my data and still install a whole new operating system.

Choose the file system type for the root file system. These days, most people select either the ext3 or reiserfs file system as their Linux root partition. Both of those file system types do journaling, so they can recover quickly if the system is shut down improperly (such as when someone kicks out the power cord).

Choose the Inode Density. Select 4096 (the default, which is fine in most cases), 2048, or 1024 bytes. (A smaller number allows more inodes on the file system, which is useful only if you have many small files, as you might on a news server.)

10. Select other partitions. If you created other Linux partitions, you can assign file system types and format them as well. Identify where in the file system the other partitions are connected. (Again, check Chapter 7 for information on where you might want to attach a partition to you Linux file system.) 11. Choose your source media. Select 1, in most circumstances, so that Slackware is installed from the CD. You can also install Slackware from a partition on your hard drive, from an NFS shared file system, or from a premounted directory. You can have Setup scan for your Slackware CD or tell it a particular device to use (if you have multiple drives and you want to tell it which to use).

12. Select the different package series that you want to install and press OK. General package series include:  Base Linux system (the core of the operating system and basic utilities)  Various applications that do not need X (non-graphical commands)  Program Development (C, C++, Lisp, Perl, and so on)  GNU Emacs (a text editor)  FAQ lists, HOWTO documentation  Linux kernel source  Qt and the K Desktop Environment for X  International support for KDE

412 30190c14.qxd:Layout 1 12/18/07 12:39 AM Page 413

Running Slackware Linux 14

 System libraries (needed by X, KDE, and others)  Networking (TCP/IP, UUCP, mail, news, and so on)  TeX typesetting  Tcl/Tk scripting languages  X Window System  X Applications  Games If you are installing from the single CD image, deselect KDE and KDEI because they come on the second CD. Later in the installation process, you have an opportunity to select a simple window manager such as XFCE, Blackbox, , or fvwm2.

While it’s safest just to install everything with the three install CDs so that you’re NOTE sure to have everything you want and won’t miss a dependent package, Slackware CD I had no dependency problems simply deselecting the KDE package group.

13. Choose how you are prompted to select packages. After you have selected the package series you want to install, you can choose to further refine the installation of those pack- ages or simply go with the defaults by selecting one of the following:  Full — Installs everything without prompting or interaction. You can use this option if you have only the first CD or the DVD.  Expert — Enables you to choose individual packages interactively.  Menu — Enables you to choose groups of packages interactively.  Newbie — Shows you a lot about what is being installed on your Slackware system and lets you choose whether to install optional packages. You just have to sit there for a long time and keep pressing Enter. When prompted, either choose to continue (if you have another Slackware CD you want to install) or Quit (to just install from the first CD). You are asked to install a kernel.

14. Choose a Linux kernel. In most cases where you have an IDE controller, you can use the kernel from the installation boot disk or choose the Slackware CD as the location for get- ting the kernel your installed Slackware system will ultimately use. Remove Slackware CD 2 and reinsert the Slackware CD 1 and press Enter. In most cases, you should choose the default bare.i kernel. If you have a SCSI controller, choose one of the kernels with a .s at the end. If your computer has very little RAM, try the lowmem.i kernel. 15. Make a boot disk. If you have a floppy drive, make a boot disk. It will enable you to reboot your computer if your hard disk ever becomes unbootable. If you don’t have a floppy drive, you can use the Slackware install CD as a boot disk in an emergency. 16. Configure a modem. Select No Modem if you don’t plan to use a modem with your computer. If you have an external, serial modem, choose the COM port it is connected to (represented by /dev/tty?, with COM1 associated with ttyS0). For PCI modems (slots directly in the motherboard), device names usually begin at /dev/ttyS4.

413 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 496

Part III Choosing and Installing a Linux Distribution

screamingCobra), and the computer’s ports (), as well as scan for viruses (clamAV). You can also check if someone has used a rootkit to replace critical system files (chkrootkit), or you can use a scanner dispatch (warscan) to test any exploit you like across lots of machines.  Running forensics on Windows machines — If you believe a Windows system has been compromised, there are many tools you can use to find problems and correct them. Boot a security CD, such as -STD, and you can recover Internet Explorer cookies (galleta), convert Outlook Express dbx files to mbox format (readdbx and readoe), check system integrity (ftimes), and check the Windows recycle bin (rifiuti).  Recovering data — If a Windows or other operating system won’t boot or is otherwise impaired, you can get data off that computer. You can copy files over the network (using rsync, scp, or others) or back up to local CD or tape (cpio, tar, or others). You can selec- tively recover file types from disk images (foremost) or check and recover lost partitions (testdisk).  Dealing with intruders — Tools such as Snort (www.snort.org) enable you to analyze network traffic in real time, as well as log and analyze data as attacks are happening. Honeypots let you watch intruders’ moves as the honeypots lead intruders to believe they’ve compromised your system. Honeypots in security-related Linux CDs include hon- eyd (http://honeyd.org), thp, and thpot (www.alpinista.org/thp). Kill zombies from DDoS attacks with zz.  Using and analyzing encryption techniques — Many tools enable you to use encryption techniques to protect your data and find when others have tried to compromise it. GNP privacy guard (gpg) is used for verifying the authenticity of computers and people. For setting up virtual private networks, there are stunnel and super-freeSWAN VPNs. You can find images (giffshuffle, stegbreak, and stegdetect) and music (mp3stego) that contain hidden messages created by a technique called steganography.  Managing a firewall — Bring a firewall up quickly or assess what’s happening on a run- ning firewall. The blockall script can block all inbound TCP traffic, flushall flushes your firewall rules, and fwlogwatch can monitor firewall logs. The firestarter and floppyfw util- ities offer quick ways to start up a firewall. Tools for managing iptables firewalls include gtk-iptables and shorewall.

Popular Linux rescue CDs that illustrate very well how many tools you can get on a single CD include System Rescue CD, BackTrack, Knoppix-STD, and the Inside Security Rescue Toolkit (INSERT) rescue CDs.

When you use a rescue CD to change a master boot record, fix partition tables, or clean CAUTION viruses from a system, you risk doing irreparable damage to your computer system. Remember that GPL software comes with no warranty, so you use that software at your own risk.

BackTrack Network Security Suite A wide-range of powerful, well-organized security tools are on the Backtrack Network Security Suite (http://remote-exploit.org/index.php/BackTrack) live CD. BackTrack is based on two live Linux distributions used to test if your computer system has been compromised: Whax and Auditor.

496 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 497

Running Bootable Linux Distributions 19

BackTrack offers a good combination of GUI and command-line security tools. The BackTrack menus (shown in Figure 19-1) organize all of those tools together. This enables you to look in one place for all similar tools. When you select a command from a menu, the command runs with the help (-h) option so you can see how it works. It’s up to you to then type the command and add the options you want.

FIGURE 19-1 BackTrack organizes graphical and command-line security tools.

The BackTrack CD is included on the DVD that comes with this book. Refer to Appendix thethe ON DVD-ROMDVD-ROM A for information on running BackTrack.

SystemRescueCd The SystemRescueCd (www.sysresccd.org) is aimed squarely at recovering crashed systems. Tools included on this distribution include those specifically for repairing and saving your data, such as:

 Disk partitioning tools — You can check, add, remove, move, and resize disk partitions with tools such as parted and qtparted.  Logical Volume Management tools — For file systems created with LVM, there are lvm and evms tools. (Logical volume management lets you add space to areas of a file system without changing the physical partitions.)

497