Human Readable   

 

     
   
     

A Slackware Desktop Enhancement Guide

Installing Slackware Without a CD Drive

© Copyright Darrell Anderson.

Slackware is a minimalist distro, not known for hand-holding. This minimalism provides for much flexibility, but for many people, until becoming more experienced, is filled with much frustration and hair-pulling. Although the stock Slackware to versions 11.0 supported installing with boot floppy disks, this soon will no longer be the case because a 2.6 kernel image will not fit on a floppy disk. Yet many people want to install Slackware without a CD drive. Many people have access to a broadband internet connection but without a CD drive to burn the downloaded ISO images, are left without the means to install Slackware. Installing through a network is one option but beyond the means of people who possess only one computer. Additionally, installing Slackware from a hard drive is faster and more dependable. This mini how-to is the result of a flaky CD drive that stops functioning reliably after about 10 minutes of usage.

This mini how-to introduces one alternate strategy. An underlying presumption for this strategy is the end-user possesses sufficient hard drive storage space to store the ISO image and the extracted RAM and kernel boot images. Another presumption is that the existing internal hard drive already contains a boot loader that can read ‘nix hard drive partitions. For many people that will mean an already existing GNU/Linux distro is already installed.

For people who have only Windows installed, some additional effort is required. First, if using only the existing installed hard drive, users must resize the Windows partition(s) and create additional partitions that will support GNU/Linux operating systems. Second, because this mini how-to presumes no CD drive is available, a previous-generation floppy disk distro might be needed to initially perform those tasks (for example, Tom’s Root Boot Disk). Another option is to download the ISO image to Windows, use a Windows utility to mount the ISO image to extract the RAM disk and kernel images, and then use the loadlin utility to boot the extracted RAM disk and kernel images. Those tasks are beyond the scope of this mini how-to. The focus here is to boot the Slackware boot RAM disk and kernel images without using a CD drive.

After booting and running the setup utility, Slackware supports installing from an alternate directory, which implies from a directory source tree other than a CD (although the CD location is the default selection). Some derivative distros such as Zenwalk continue this support. The location for those files is flexible, including the ISO image. For people with smaller hard drives, one option is to use an external storage device, such as a USB stick, USB connected hard drives, or hard drives connected through removable hard drive bays. That is the easy part.

The stumbling block is first getting the setup image running in order to be able to access that external location. Any external storage device must be available after booting, but the initial boot files must be available immediately. Therefore, the initial RAM disk and kernel images must be available on the existing internal hard drive. After being able to boot to the setup utility, end-users then can use any accessible installation directory tree or even install from the ISO image.

After extracting the boot RAM disk and kernel images from the ISO image, all that is needed is a boot loader menu option to boot from those extracted files. The extracted files must be located on a partition that the boot loader can access and read (some boot loaders support reading from FAT32 partitions but do not support reading from NTFS.) The native Windows boot loader can be used in conjunction with loadlin.

Knowing which files to extract is important. The files are located in two locations. The RAM disk image is located in the /isolinux directory and will be named initrd.img. The kernel image is located in the /kernels directory. The kernel image will be named bzImage and will be located in a subdirectory of the /kernels directory.

The following is an example for a boot loader option with GRUB:

title Slackware Current Installation
kernel (hd0,0)/vmlinuz-generic-2.6.18.8 ro vga=3 nousb nohotplug noapm acpi=off nopcmcia nofirewire
initrd (hd0,0)/initrd-generic-2.6.18.8.img

In this example, the RAM disk and kernel image are located on the first partition of the hard drive. For this example, the partition is a dedicated partition that is mapped to the mount point /boot when booting the installed Slackware. However, the location can be anywhere on the local internal hard drive. As seen in this example, the files also can be renamed to something more identifiable. Just be sure to use the correct and full path name. Some additional kernel boot parameter options are added to show that the system from which this boot loader example was derived does not use those device types.

Notice at this point in the boot process, the boot loader is not involved in booting the Slackware operating system, but only booting the RAM disk and kernel images. Once the RAM disk and kernel images run, users later will be able to instruct the setup utility to find the files to install Slackware.

If users have fully extracted the ISO image to a directory tree, then when the setup utility asks for a location to install, users can provide the full path to that location. The installation will proceed quickly because a hard drive is faster than a CD drive.

Users also can install from the original ISO image. This option does not require extracting the full directory tree from the ISO image, but does require some additional steps not directly supported by the stock Slackware setup utility (but should be—hint, hint).

The stock Slackware setup utility boots with full support for alternate consoles. To install from an ISO image requires toggling to an alternate console (Alt-F2, Alt-F3, etc.), creating a mount point, and then mounting the ISO image. Of course, the ISO image must be accessible, either from the existing internal hard drive or an external storage device discovered and supported when the RAM disk and kernel images boot.

The location of the ISO image can be the existing internal hard drive or an external storage device. To install from the ISO image requires creating two mount points. For this operation do not worry about the standard directory tree hierarchy file structure. During installation the file tree exists only in RAM and is temporary. Simply create the mount points in the root of the current file tree:

mkdir /hd

mkdir /iso

The mount point /hd will be used to mount the device storing the ISO image. This might be the internal hard drive (/dev/hda), an external hard drive (/dev/hdb), or possibly a USB stick (/dev/sda).

First mount the device storing the ISO image:

mount -t ext3 –o ro /dev/hda1 /hd

Or possibly, if the ISO is on a USB stick using the FAT32 file system:

mount -t vfat –o ro /dev/sda1 /hd

Next mount the ISO image:

mount -t iso9660 –o loop,ro /hd/location/of/iso/image /iso

Notice the location path of the ISO image includes the mount point of the physical storage device (/hd). When finished mounting the ISO image, perform a simple ls -la /iso command to ensure the ISO image mounted properly. Then return to the original console screen to continue the installation. When the setup utility asks for the location of the installation files, provide the location of /iso/slackware.

Finis.

Table of Contents