One of the biggest decisions you will need to make before you install Slackware is to plan how the hard drive on your computer is to be laid out. Before you even begin to plan your layout...
Planning Your Hard Drive Layout
Chances are your desktop, laptop, or notebook will already have some version of Windows, Linux (most likely Ubuntu or Mint), or Mac OS-X already installed on and configured to use your entire hard drive.
In this case, you may choose whether you want to keep your existing operating system, or you may choose to replace the current operating system with Slackware. If you are keeping your existing operating system, you will need to resize the partition so you can have enough empty space to install Slackware.
Utilities such as Partition Magic can do the resizing for you. Be sure to backup all your data before repartioning your disk or you will risk losing all of your data stored on your hard drive!!!
If your machine was equipped with Windows Vista (or later), chances are the manufacturer of your machine configured Windows with a hidden partition containing software needed to do a system restore. Also, these versions of Windows tend to spread data and program files all over the disk, obviously intended to make repartitioning as difficult as possible.
Windows 8.x and 10 machines are configured similar to Windows 7 machines, with one controversial exception, namely the so-called Universal Extended Firmware Interface and the associated "Secure Boot" function. This feature can be disabled by quickly (and I do mean quickly) pressing a function key (usually F3 or F10) at the time you power up your machine.
Windows XP and earlier versions are much easier to deal with, and you can resize partitions with these versions of Windows.
No matter which operating system you are using, be sure you have some means in which to backup all of your user data. This includes all of your documents, photographs, audio files, and anything else you store in your home directory.
The easiest way to do this is to backup your files to a external hard drive. You may use a flash drive or memory card (SD/MMC, Memory Stick, or Compact Flash). Just be sure there is enough capacity on the flash drive or memory card to store what you need to backup. You may also use blank CD-R(W), DVD-R(W), or DVD+R(W) discs to backup your data.
CD and DVD discs are cheaper storage than flash drives, hard drives, or memory cards. But then, you need to use CD/DVD mastering software to create your backups, whereas you can accomplish the same task with the latter three medium by simply copying files from your home directory to the medium.
When I purchased my laptop, the first thing I did was to create a set of system restore DVDs. This allows for reinstallation of the original operating system if you need to do so.
Even if you choose to make Slackware your only operating system, it is a good idea to have restore disks available, unless you are absolutely sure you will not want to restore the original operating system.
The next step is to determine how much hard drive space to give to each operating system to be installed on your computer. For starters, you are going to need at least 10GB of free space for a complete (and recommended) Slackware installation.
How much space you give depends on several factors, namely:
- The physical capacity of your hard drive.
- The number of operating systems you plan to install on your hard drive
- How you are going to use your computer
- How many people are going to use your computer
Obviously, the larger the hard drive, the more space you can have allocate.
When you boot the installation DVD (or CD if you are using the CD set), you will be logged into the root (administrator) account. Remember, most everything in Slackware must be configured manually. Slackware provides two utilities to allocate disk space, namely the classic
fdisk and the (far better)
cfdisk. I recommend the latter utility as it is far easier to use than the former.
I recommend a 512MB partition for the system kernel (named
/boot), a swap partition twice the physical memory in your computer, and the rest for the entire system including home directories.
/bin is where binaries intended to be used by the system administrator and by the Linux kernel are stored.
/sbin are where the system administration utilities are stored.
/usr is the directory where system applications and utilities (and their configuration files and application data) are stored. /usr/local is intended for installation of third party software local to this particular machine. These substructures are intended for use by system applications executed by the user.
/etc contains system configuration files.
/tmp is used for temporary files, which are created and deleted by applications, desktop enviromnents, and the Linux kernel itself. There is no reason for users to create anything in this directory.
/var is used for storage of databases, fonts (used by Texlive or TeTeX), mail, print jobs (used by the CUPS spooler), and other data, which should be stored on the system, but not in the user directories.
It is important to give as much partition space to these directories as possible. If you give too little space for system use, your system will crash when disk space here is depleted. I recommend no less than 50 percent of all space allocated for Slackware to be for system use.
As with any Linux distribution, Slackware requires at least two partitions be allocated, one for the installation, and the other for swap space.
In general, you want to be sure you allocate enough swap space so that Slackware can run effectively. Many Linux experts, including myself recommend twice the size of your physical memory in your computer as it is optimal for most Linux usage.
However, if you are planning to implement a home entertainment system, or perform something that requires intensive system resources such as video editing or high quality audio recording, I recommend at least three times the amount of physical memory for the swap space.
If you are implementing a server for heavy usage, I recommend at least four times the physical memory for the swap space. This is due to the memory accesses required to support multiple users at the same time on the server.
For those of you who are coming to Slackware from Windows (or OS/2), you are used to having one partition for both the operating system and user data. Ubuntu implements the default layout as one partition for swap space, and one partition for everything else. This is, of course, to make it easy for those of us who are migrating from a non-UNIX environment.
However, creating partitions to separate data from the program and system files is a very good idea from a system administration perspective.
First, it makes changing and/or upgrading Linux distributions much easier. No reinstallation of user data is required, though it is a good practice to always backup the data in that partition.
Speaking of backups, data backups are easier when all the user data is in a single partition.
Placing /tmp in a separate partition does for temporary files what swap space does for memory.
If you have installed a hard drive that is bigger than what your system can support (i.e. exceeds the limit imposed by the BIOS on your system), you may create the first available partition of your hard drive and assign it to the /boot directory. The /boot directory stores the kernel, the bootloader configuration files, and everything else needed to boot Slackware. Usually, you would want to assign about 120MB to this partition as that is all the space needed for the kernel and the bootloader files.
For home and small business use, I recommend a layout consisting of one partition for the Slackware installation, allocated to 50 percent of the total available disk space, one swap partition allocated to twice the amount of physical memory, and a third partition for the user data files.
If you are implementing a server, install as large of a hard drive as what you can afford. Then, I recommend a layout consisting of one partition for the Slackware installation, allocated to 25 percent of the total available disk space, one swap partition allocated to four times the amount of physical memory, one partition for the /var where spoolers, databases, mail, and other application created data are stored, and a fourth partition for the user data files, which should be the remainder of the hard drive as you will need as much space as possible for your users. Here, disk space for users is the main priority over the space needed for system files.
If your server can accommodate more than one hard drive, I recommending installing a second hard drive for user files, and the first hard drive for the Slackware installation as previously described.