How To Install Slackware
If you're reading this you already want to install Slackware. If you are reading this to be convinced to install Slackware, stop here because I'm not selling anything. Just telling anyone who wants to know how they can install Slackware.
I'm assuming you can download the iso and burn it on your own. Or just purchase it from the Slackware Store: that's what I've done since version 13 or so, and I haven't regretted it once.
Despite its reputation, I think you'll the Slackware installer surprisingly simple and intuitive, without lots of GUI messages and weird questions to confuse you.
Before we even start, we should turn on the computer in question and boot into the BIOS or EFI or at least some kind of System Profiler. It really really helps to know everything about the computer BEFORE you start installing. If you built your box yourself, this will probably be really easy; otherwise, you should investigate a little. So just do that first. Write down important stuff, like what is your computer's internal clock set to (hint: probably not UTC)? How much RAM does it have? how many hard drives and how much space? video card? video memory and graphic card brand and model? what brand ethernet card? wireless card? etc.
Get ALL the information you can find. You might not need it, but you'll be glad to have it if you do.
Done that? OK, so upon first boot, you'll be presented with an option to choose what kernel you'd like to boot your installer with. Usually the default kernel is fine, so just press RETURN or ENTER. However, if you have special needs, like a kernel for an external hardware speech synthesizer or if you're running a Pentium Pro machine or whatever. If you're doing those things, you'll need to type in the name of the kernel you need.
The next screen verbosely explains to you how to go about installing in three easy steps:
- log in as root
- format your drive
- type in "setup"
That is, broadly speaking, just what we will do.
OK, so here we go:
Log in as root by typing root and pressing return. no password. easy. ok, we're a third of the way done.
Format your drive. To format your drive, I think the most user-friendly way to go would be cfdisk. But if you just go typing cfdisk, the computer will think you want to try to format the currently mounted root partition....currently the DVD you're running the computer on. That's not gonna work, now is it? So you'll need to direct the computer to the device you actually want to format.
This may vary slightly depending on how your computer was put together. For my laptop it is cfdisk /dev/sda but for others it may be something else. Easiest way to figure this out is to type
Which lists all the drives currently attached to your computer. Those are your choices. If you try cfdisk on one of them and it tells you that the drive cannot be written to or erased, then you're still trying to erase your DVD. Try the other one.
There shouldn't be a number after the sda or hda or whatever. You want to look at the whole device, with any and all partitions already existing on it.
If you're doing this on a desktop computer (that is, not a laptop), then you may have more than one drive in your tower...so be careful which drive you partition. It's fairly intuitive, though; if your primary drive is in the first drive bay in your computer, it will be called /dev/sdaor similar. If you have a spare drive you'd like to put linux onto in your second drive bay, then it will be designated as /dev/sdb. And so on.
Are you on an Apple Macintosh computer? STOP! You need to do some special Mac-only things.
If you are not on a Mac computer, you may skip this and continue on with Step Two, Continued.
I am assuming that you are replacing entirely your Mac OS image with Slackware Linux. If you are seeking to dual boot, then you are reading the wrong tutorial. I have no tutorial on dual booting right now, but if that's what you need then you should check out a tool called rEFIt, which is a kind of EFI hack that well hack around your Mac's built-in "features".
Most Mac computers will boot from an MBR partition, because Apple did enable their version of EFI to boot to Windows, which uses MBR partitions. But the drive in your Mac right now uses a GUID partition, the default for Apple's HFS series of filesystems. You need to blow away the GUID partition table, create an MBR partition, and then proceed. This is easy with an application called parted:
You are now at a parted prompt. Make the new table:
New disk label type? msdos
Destroy current table? yes
Now you are in the same state as a non-Apple user, and may continue as usual.
Step Two, Cont.
cfdisk is a menu-driven drive formatting program. It's easy to figure out. If you see partitions that you no longer need, you can Delete them. Once they're deleted, move up or down to the next partition and Delete that one...or whatever you want to do. Basically you're clearing out partitions to create what is generically called FREE SPACE which really means "unallocated space". Once you have enough FREE SPACE to install Linux onto, you can make a partition out of that space.
cfdisk (util-linux 2.21.2)
Disk Drive: /dev/sda
Size: 500277790720 bytes, 500.2 GB
Heads: 255 Sectors per Track: 63 Cylinders: 60821
|Name||Flags||Part Type||FS Type||[Label]||Size (MB)|
- [ Bootable ]
- [ Delete ]
- [ Help ]
- [ Maximize ]
- [ Print ]
- [ Quit ]
- [ Type ]
- [ Units ]
- [ Write ]
Quit program without writing partition table
To do this, you select New. It will ask you how large you want the partition to be, in Megabytes. Type that number in, choose whether you want it to be Primary or Logical (let's just go with Primary, shall we?). You'll also want to make a small-ish partition for SWAP space, sometimes known as Virtual Memory (basically harddrive space for when physical RAM starts to become scarce). This is done by, again, selecting to create a New partition, giving it a Gb or two (double your physical RAM is the rule of thumb I've heard).
Now you need to assign them a Type. So, go to the main partition that you'll be installing Slackware onto and select Type. It will list a long, long menu of different file types and you'll need to type in the corresponding numerical choice. Just type 82 for Linux and 83 for swap.You'll also want to make the big partition bootable. Just select the bootable option and hit return.
Now Write the partition to the disks.
If you're doing some fancy dual-boot or something you'll have to deal with that yourself. Or read the Slackermedia section on that subject. Anyway, if you've ever partitioned a drive before, I think you get the idea. Once you hit Write, the partition table is written to the drive and you are returned to your root shell prompt. OK now we're two thirds of the way done. Easy, right?
Type in setup. When you type in setup, a rudimentary GUI interface opens up. First selection is to read the Help. You might as well read it. Next selection basically dumps you on the track toward getting this installation really happening. When I said earlier that we were two-thirds of the way done, I was kidding. But don't worry, the rest of the stuff is a nice eye-candy-filled (ncurses style) ride through verbose installation options.
So, first you'll have to add a swap partition. You've already created one, of course, but you need to let the installer know that. So show it to the swap partition you've made, which should be easily recognizable because it'll be the size you typed in, and it will be the /dev/?da* that it was assigned during cfdisk. Be sure, obviously, that you're not assigning your 100gb partition as swap....or the partition that you have another OS on (if you're dual booting).
SWAP SPACE DETECTED
Slackware Setup has detected one or more swap partitions on your system. These partitions have been preselected to be set up as swap space. If there are any swap partitions that you do not wish to use with this installation, please unselect them with the up and down arrows and spacebar. If you wish to use all of them (this is recommended), simply hit the ENTER key.[ * ] /dev/sda2 Linux swap partition, 1988579KB
- < OK >
- < Cancel >
Next you'll show the installer the drive that you want to actually install Slackware onto. This is called the "root" mount point and it's represented by a mere /. Just select the drive you want to install Slackware onto and it'll format it for you. It'll ask you if you want to check for bad blocks but usually I say no to that. It will ask you what kind of FileSystem you want to use. Let's just go for ext4 because it's kind of a really really common Linux filesystem. In the future, you can play around with others if you want but be careful on your first time out because some of the filesystems available require special adjustments or your computer won't know what to boot.
Select Linux installation partition:
Please select a partition from the following list to use for your root (/) partition.
/dev/sda1 Linux 49827934K --- (done adding partitions, continue with setup) --- (done adding partitions, continue with setup) --- (done adding partitions, continue with setup)
- < Select >
- < Continue >
Whatever you choose will be fairly invisible to you because it's pretty low level stuff. I say go for ext4 to avoid any variables later. Save playing around with other filesystem types for later.
You'll also be asked for confirmation about the root mount point being added to /etc/fstab. This is simply giving the computer the ability to actually mount the drive. So let it do that.
Now you'll be asked from where you wish to install. The DVD is the easy and right choice. Again, if you're doing a fancy netinstall, you're reading the wrong HOWTO (although it's actually not that hard, so just try it as long as you have a functional network connection...). Slackware will offer to scan available drives for its installation media, and so far that's never failed for me. If it doesn't work you'll have to tell it where the cd/dvd drive is...usually that's /dev/sr0 but if for some reason it is not, then you need to know the device names of all your drives. Remember when you did the cfdisk -l a while ago? I guess I should have told you to commit that information to memory. Well, if you need to go get that information, you can just hit escape and Cancel until you get back to the main Setup Menu, at which point you can bail out and get dropped back to your root terminal. Gather the device names, write the down, and start up the Setup again. You can pick up where you left off or just start fresh, whichever you feel more secure about.
So...you'll be prompted to select what packages you want to install. If you're used to Linux or if you're not but you want a really good first Linux experience, I suggest installing everything it recommends. It's easier to scale back later than not install stuff you'll want later. At least, that's my theory...but I think if you're reading this, you should just go with me on it.
SELECT PROMPTING MODE
Now you must select the type of prompts you'd like to see during the installation process. If you have the drive space, the 'full' option is quick, easy, and by far the most foolproof choice. The 'newbie' mode provides the most information but is much more time-consuming (presenting the packages one by one) than the menu-based choices. Otherwise, you can pick packages from menus using 'expert' or 'menu' mode. Which type of prompting would you like to use?
full Install everything (6.5+ GB of software, RECOMMENDED!) terse Like 'full', but display one line per package during install menu Choose individual packages from interactive menus expert This is actually the same as the "menu" option newbie Use verbose prompting (the X series takes one year) custom Use custom tagfiles in the package directories tagpath Use tagfiles in the subdirectories of a custom path
- < OK >
- < Cancel >
Slackware will tempt you to try to not install everything...it will give you the option of an Expert mode as well as a Newbie mode. Don't trust it! Just do the recommended installation of 6.5+ GB of glorious apps, useless games, confusing documentation, phenomenal printer and scanner support...et cetera. It's easier now and it saves you from a lot of configuration later on. I personally wonder if one of the reasons so many people say that Slackware requires so much setup is because they tried to be clever during initial installation. After you are more familiar with what you do and do not need, you can strip it from the system or re-install or whatever you feel the obsessive compulsive urge to do. But otherwise, trust Pat.
Here, Slackware now installs all the good stuff on your drive. Wow...it's still just so easy! One thing I highly recommend is sitting in front of the computer and staring at it while it installs everything. It seems like I'm being sarcastic here but I'm serious; the more you look at this garbage, the more it starts to make sense. And you start to get familiar with packages and what they do. So if someone is raving about KDE4's kdebindings, you have some idea of what that does and why it is important. (Warning: may cause epileptic fits)
Next, Slackware is going to ask you if you want to create a USB drive boot drive. If you've got a spare thumbdrive lying around that has no data on it, go for it. It takes maybe 5 seconds, and can come in handy later on if you have to bootstrap your system, although I've never had to do that. In the rare cases that I'm rescuing a system after I screwed something up, I just use any old Linux distro I have on hand, mount and chroot. In other words, you can almost certainly safely skip this.
MAKE USB FLASH BOOT
If your computer supports booting from a USB device, it is recommended that you make a USB boot stick for your system at this time. It will boot your computer straight into the root filesystem on /dev/sda1.
Please insert a USB flash memory stick and then press ENTER to create a boot stick.
WARNING! The existing contents of the USB stick will be erased.
Create Make a USB Linux boot stick Skip Skip making a USB boot stick
- < OK >
- < Cancel >
LILO is the linux bootloader, by all accounts inferior in many ways to GRUB, yet the bootloader of choice for Slackware. I actually like LiLO because it's simple, it's simple to change, it's simple to look at...it's just easy. That said, I've heard some neat things about GRUB2 but I haven't really played around with it much.
Frame Buffer. This has something to do with drawing graphics on the screen before X (the GUI environment on Linux, also called Xorg) starts. For instance, you'll see a penguin at the top of the screen while you boot...that's drawn in the frame buffer. Things like that. I choose the highest resolution available because I know I've got a brand new computer with the latest Intel video card, etc. Do what your heart tells you to do.
You have the option of inserting default extra parameters for the boot process here. More than likely, you won't need to do this unless you had to pass extra parameters to get up to this point. Quite possibly whatever you did to get this far, you'll want to also do here. Again, typically for modern systems you're not going to have to do any fancy bootstrapping hackery. On other systems you might find you have to pass nomodeset to turn off some graphic boot up wizardry, but so far that's not something that is really an issue I've seen on Slack.
Where do you want LiLO to be placed? This can be tricky, depending on what you are trying to do.
If all you are doing is installing Slackware and nothing else, or if this is the first install of a planned dual-Linux install, you may as well put Lilo in what is called the Master Boot Record (MBR) because it either needs to be there or it will be replaced by GRUB or something when you install your other Linux OS. The time this gets really tricky is if you are dual-booting with Windows or OS X, both of which really don't want Linux to exist at all, much less to have something in their MBR or EFI table. In that event, you will need to do one of two things:
Install LiLO to the Root (/) mountpoint. This means that OS X, for instance, will boot via the default Apple bootloader, and if you press OPTION while booting, it will recognize that indeed you have two OS's on this machine. If you elect to boot into Slackware, you will THEN see the LILO options. And all will be well with the world.
Install Mac OS X or Windows FIRST. Once it's installed and all up-to-date, THEN install slackware and put LiLO on the MBR. This way, Linux has the last laugh and manages all the OS's on your system. In my experience this has been tricky with OS X because if you do a major OS X update and it decides to reclaim the MBR, you could be without any easy way of getting to your Slackware OS. So if you're going to dual boot with these proprietary systems, you may want to just put LiLO on Root.
Keep in mind that I do not have even a working knowledge of Windows or how it does anything. But my advice on OS X is fairly solid.
Next you'll need to choose what kind of Mouse you'll be using. Look at the port to which you would normally connect your mouse. What kind of port is it? I'll bet it's USB. Guess what you'll be choosing here? (Obviously use common sense; if you are doing this on a desktop and there are ps2 ports, please choose PS2, or if you'll be using a WaCom tablet, choose that. you get the idea.)
GPM is the very cool ability to use your mouse even when in a virtual console. You can install it and turn it on here and mess around with it, or not...sometimes I don't. It can always be turned off if it annoys you.
Network Configuration. We'll say yes here to set up our network. First choose a hostname. What's a hostname? Let's say it's your computer's name; it can be pretty much anything you want. In this example I'll choose "groucho"
Now we choose our domain name. This is the network upon which your computer lives. Let's choose "marx.org" and if we have other computers we want to configure so we can share files back and forth with ease, we would give THEM all the domain name of marx.org but they would each get their own unique hostnames, such as "Harpo", "Chico", and "Karl".
You'll be asked to set up an IP address. More than likely you are dealing with DHCP so you'll choose that...basically unless you have either a static IP address (if you do, then you probably don't need help with network configuration) or you are hardwired to the net with an assigned IP from your internet provider. If you have a router in your home, or a modem from your ISP that acts like a router, then you're almost certainly using DHCP.
Were you assigned a special DHCP hostname from your ISP or systems administrator? Probably not but if so, you'll enter it on the next screen. More than likely, you were not, so just hit RETURN. Again, if in doubt, check with your internet provider.
Startup services. Yikes! This is where you have to choose what little programs you want to have started when you are booting up and logging into your computer. Most "user-friendly" OS's have a fair amount of services starting up while you log in, so you don't have to worry about whether the computer will know what to do when you plug in the printer or an external hard drive or whatever. Well, having unused services running every time you turn on your computer not only wastes your CPU cycles but it's a bit of a security thing. But if you're just at home, using your computer for every day things and want certain things to work invisibly in your favor, you may want to leave lots of services on and in fact activate more. I used to turn on the CUPS printer service, but everything else I leave as is. On some servers that I maintain, other services get turned on as well, like SAMBA for file sharing, HTTPD for web serving, and so on.
Your system clock. Is your internal clock set to UTC? Usually it is not. Unless you have gone in and set it to Universal Coordinated Time, it's probably running as a local clock. So probably the answer is NO. But if you know otherwise, select YES. See how that works?
What Window Manager will You Choose? Slackware comes with about six or seven window managers you can choose as your default desktop. If you're used to Mac, think of having not just one flavour of the Finder, but lots of different ones! It goes well beyond a mere theme; the very way you interact with your graphical user interface can be totally different. You can try different ones, and you really should try them all. But you should pick one as a default; I usually choose KDE as the default and from its login screen you can choose to log into any of the different desktops that you want to try that day.
Root password. They call it a password but what they mean is a passPHRASE. Make this good. This is the key to your system's security. Numbers, letters. Something you'll remember but something that takes a while to type in. Trust me, you're not really gonna use this that often so make it inconvenient for yourself...but memorable!! Then write it down on tape and tape it to your computer (just kidding).
Now you're done. Post installation is not that impressive. It just kind of loops back to the setup menu and you can select EXIT, and then it drops you down to your root shell account again. And that's pretty much it. Wasn't that easy? Congratulations. You've installed Slackware. Best of luck getting your system up and running.
Anyway, go for the SIMPLE install. It will autodetect whatever kinds of OS's you may have on any of your devices, and create a simple LILO menu for you.
Read my post on HOWTO configure Slackware Userland for details on how to customize and configure Slackware for everyday desktop use.