… I am going to show you how to create a Slackware USB installer when all you have is a Windows computer.

As a Linux user, this would not cause you any problems since there is a shell script that does the work for you – all you need is the Slackware DVD and a re-usable USB stick of sufficient size.

If you run Windows, it is still possible to create a bootable USB stick that can start Slackware’s installer. If the stick is big enough (2 GB in size) you can even add Slackware’s packages to it and avoid the use of a Slackware DVD as the package source entirely.

The requirements:

What tools will you need for the job at hand?

  • A version of dd for Windows. This is needed to copy a USB image file to the USB stick. You can obtain it here at chrysocome.net., the same site that also hosts RAWRITE.EXE which ships with Slackware in the isolinux/sbootmgr directory.
  • The syslinux tool from syslinux.zytor.com. This will be used to make your stick bootable. Download it directly from kernel.org – the .zip file contains a Windows executable.
  • A program like Winimage (a shareware program, free 30-day trial), or IZarc (might be a good free alternative to Winimage) that is able to open the usbboot.img disk image file and extract its content to your hard drive.
  • Of course you need a Slackware DVD. Either buy it at the Slackware Store (which helps keeing the distro alive) or download a DVD ISO image from any Slackware mirror. It is also possible to use a local copy of a Slackware package tree (either downloaded from a Slackware mirror or copied off a DVD). In the examples below I am using “slackware-13.0” which is the 32-bit Slackware version 13.0. The instructions are not limited to this particular version of Slackware – you can do this for every recent version of Slackware, including the 64-bit release.
  • And finally, a USB stick with a (single) FAT32 partition. If it has 40 MB of  free space, you can use this stick as a bootable Slackware installer but still need the DVD or a set of CDROMs for the actual packages. If the stick has 2 GB of available free space, you will be able to copy all Slackware packages to the stick as well. The resulting bootable USB stick will be all you need in order to install Slackware. Ideal for netbooks that do not have a DVD drive!

Preparations:

First things first:

  1. Insert the Slackware DVD or make sure you have a copy of a Slackware tree somewhere on your local drive (more specifically: everything on the Slackware DVD with the exception of the source and slackbook directories will be required). In the examples below I will assume that the top of the Slackware tree is “D:\slackware-13.0\“. For other releases of Slackware or for the 64-bit version of Slackware the pathnames will be a bit different of course, but the same procedure applies.
  2. Insert the USB stick, make sure it gets assigned a drive letter. In the examples below I assume that the drive letter for the USB stick is “U:
  3. Now, you have to decide what to do with your stick. This depends on how much data it can contain (less than 2GB, or more than 2GB). See below, there is a set of instructions for both cases.

If you have (much) less than 2 GB available on the stick, we can transform the stick into a bootable Slackware setup disk.

NOTE: the following procedure will erase all existing data on the USB stick, so be careful and check what’s on it before you proceed.

  1. Install the Windows version of dd (see above) onto your Windows computer.
  2. Open a DOS box (i.e. get a command prompt) by running
    cmd.exe
  3. Run the following command at the prompt:
    dd if=d:\usb-and-pxe-installers\usbboot.img of=\\.\u:
  4. That’s it! You have created a bootable Slackware setup USB stick

If you have 2 GB or more available on the stick, we will be creating a full “USB equivalent” to a Slackware DVD:

NOTE: The following procedure is non-destructive; meaning that no files on the stick will have to be deleted.

  1. Install Winimage and the Windows version of syslinux (see above) onto your Windows computer.
  2. Create a directory “U:\boot\syslinux\” on the USB stick
  3. Use Winimage to extract the content of the image file “D:\usb-and-pxe-installers\usbboot.img” to the newly created directory “U:\boot\syslinux\” on the stick
  4. Remove the file “U:\boot\syslinux\ldlinux.sys
  5. Open a DOS box (i.e. get a command prompt) by running
    cmd.exe
    On Vista at least, you have to run cmd.exe as Administrator to avoid the “Accessing physical drive: access denied” message when running the syslinux command in the next step.
  6. Run the following command at the prompt to make the stick bootable (you will notice the directory /boot/syslinux in that command which is the directory we just populated):
    syslinux.exe -m -a -d /boot/syslinux u:
  7. Using Windows Explorer, give the U: drive the label “USBSLACKINS
  8. Copy the whole Slackware tree “D:\slackware-13.0” to the root of the USB stick, “U:\“. Exclude the slackbook, source and usb-and-pxe-installers directories while copying if you have just about 2 GB free. If you have a 4 GB stick you will find that everything will fit nicely. Using a Windows Explorer for this is probably easiest. As the end result you should have a “U:\slackware-13.0” directory on the stick with (among others) a file “PACKAGES.TXT” and a directory “slackware” below that.

Booting the USB stick and installing Slackware:

When booting this USB installer (the version containing the Slackware packages), you have to mount the USB partition before starting “setup” because you can access your packages only after mounting it. You cannot use the directory “/mnt” to mount this partition because the Slackware installer uses “/mnt” already. After the booting has finished and it delivers you to a command-prompt, you create a new directory in the installer, for instance “/usbinstall“:

mkdir /usbinstall

After you have created this mount point, you have to find out the name of your partition (you can run “fdisk -l” or “blkid” to find out) and then use the following mount command to preserve upper case filenames:

mount -t vfat -o ro,shortname=mixed $(/sbin/blkid -t LABEL=USBSLACKINS | cut -f1 -d:) /usbinstall

The “shortname” option used in that mount command is required, and Slackware installation will fail if you forget it.

If you labeled the stick’s partition “USBSLACKINS” in step 7 above, then you can use the following command instead of the previous mount command. It will find the correct partition automatically (note that what follows is a single command line !):

mount -t vfat -o ro,shortname=mixed $(/sbin/blkid -t LABEL=USBSLACKINS | cut -f1 -d:) /usbinstall

Then afterwards, when it is time to specify the package SOURCE directory, you type:

/usbinstall/slackware-13.0/slackware

The rest of the installation will proceed as usual. Give me feedback in the comment section below if you encounter any problems.

Good luck! I hope this small tutorial will be able to snatch you away from the Dark Side 😉

Eric