My thoughts on Slackware, life and everything

Welcome Windows user!

… 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

44 Comments

  1. Mich

    Hi Eric,

    I was looking for blogs on beginner’s slackware installation and landed on your blog.

    I’ve problem concentrating and reading long articles/books, appreciate if you can point me to a source (or your even your blogpost)

    Thanks in advance.

  2. alienbob

    If you have problems with reading & understanding, perhaps watching a video of a Slackware installation will give you some degree of confidence.
    For instance, look at this Slackware 12.0 installation video on Youtube: http://www.youtube.com/watch?v=vlOoU3SZLcE

    Also, the Slackware Book is written so that it is easy to follow: http://slackbook.org/html/installation.html

    Cheers, Eric

  3. Mich

    Just watched the video and believe it will install KDE (maybe the complete KDE?).

    Preferred to install a light/basic system and then slowly add apps as and when required.

    Thanks anyway.

  4. alienbob

    I assume you will opt for the “full installation” which is the easiest because it will not ask you what to install on individual packages. As part of this “full” installation, there is a “select package sets” dialog which allows you to make a decision on what you do not want to install. If you uncheck “KDE” there, then none of KDE will be installed.

    You can always decide later (after you have installed Slackware and decide that you want to try KDE) to install KDE. The program “slackpkg” will help you with that.

    Cheers, Eric

  5. Dmitry

    Hello Eric,

    first of all I’d like to apologize for my poor English and to thank you for such a good guide!
    Unfortunately I have a little problem with installation: I cannot mount my USB partition. The message I become sounds “mount point /usbinstall does not exist”. Could you please describe this last step more detailed: where exactly and when should I create this folder and then mount? Just after logging in as a root after booting?

    Thanks.

  6. alienbob

    I thought I had written it clear enough that you have to create a directory after booting from the installer and before startign “setup”. Obviously you would have to create that directory before attempting the “mount” command which wants to use that new directory!

    I will add the “mkdir /usbinstall” command to the article if that helps.

    Eric

  7. Dmitry

    Sorry for my stupidity, your hint helped!
    If you add there this “mkdir /usbinstall” command it could help such newbies as I, but it’s of course your choice.

    Thank you.

  8. ebo

    Great tutorial, works perfectly ! Thanks dude.

  9. doriska

    Hello,
    How to install this slackware for an amd K with up to 350 Mhz -old pc?

  10. Luca

    GREAT Tutorial! It worked like a charm at first try! This is the only well-written simple and straight forward how-to available on the www!
    Congratulations and thank you very much!
    Luca from Italy

  11. Brian Lawrence

    IZarc might be a good free alternative to Winimage.
    http://www.izarc.org/

  12. alienbob

    @Brian,
    Nice! That would make this tutorial use only completely free tools.

    Cheers, Eric

  13. Emrik

    Hi there Eric,
    just wanted to thank you for this excellent guide! I am (like most others) a newbie to linux, but because of all the good and usable features in slackware OS i’ll give it a serious try 🙂 I’m tired of microsoft at this point.. regards,
    E.

  14. Alvin Chey

    I have successfully extracted the files from usbboot.img using 7zip archiver (www.7-zip.org).

    I failed to extract the file using IZArc.

  15. Matthew

    Thanks for this great little tutorial 🙂

    I noticed your examples for mounting /usbinstall are both the same (“mount -t vfat -o ro,shortname=mixed $(/sbin/blkid -t LABEL=USBSLACKINS | cut -f1 -d:) /usbinstall”). I assume the first one was meant to specify the device literally – just confused me for a second, so thought I should point it out 🙂

    Thanks again

  16. Chandy

    Hello alienbob,i have 1 problem at end:
    /usbinstall/slackware-13.0/slackware: permission denied 🙁
    Help me please,thanks 🙂

  17. Mark

    AlienBob,

    I have read and did exactly what it says in your tutorial but it won’t boot into the thumb drive. Can you please help. After I set the USBSLACKINS label on the drive i restarted and it won’t boot into setup. I ran the command “syslinux -m -a -d /boot/syslinux d: (d: is my thumb drive) and i got the prompt so I assumed it went through, reboot and it won’t work. Thanks in advance.

    Mark

  18. Mark

    AlienBob,

    I have tried to installed Slackware using this tutorial and I have not yet succeeded….the point where i get stuck is the following I have plenty of space in my thumb drive and I have gone through the steps in Option 2 several times. I get stuck in step #6 where i run the following command “syslinux.exe -m -a -d /boot/syslinux d: (d: being my thumb drive) I get the following error—> “an application has attempted to directly access the harddisk, which is not supported. This may cause the application to function incorrectly. Choose close to terminate the application.

    Note: When I choose to “Ignore” —->i get this syslinux: sector read error

  19. alienbob

    @Mark

    It looks like syslinux.exe was not able to make your USB stick bootable. Did you follow the advice in the tutorial to run the command with administrator rights by running it in a command window (cmd.exe) which has been started as Admiistrator (right-click on the Command Prompt and select “Run as Administrator”)?

    Without administrative rights, you will get the errors like “an application has attempted to directly access the harddisk”.

    Eric

  20. Mark

    AlienBob,

    THanks for your reply…I am running cmd.exe as the admin and it’s still giving me the same error message.

    an application has attempted to directly access the harddisk, which is not supported. This may cause the application to function incorrectly. Choose close to terminate the application.

    Note: When I choose to “Ignore” —->i get this syslinux: sector read error

    Is there an alternate program out there besides syslinux? or i have to change some settings around? Thanks…

    Marco

  21. Mark

    AlienBob,

    I was able to boot from my thumb drive!!! I’m working on setting up my hard drive partitions…I encountered problems using syslinux to make the thumb drive bootable and so I didn’t give up and searched for other means to make this work. I came across this software: UNetbootin and you can find it here

    unetbootin.sourceforge.net/

    for those that perhaps are having problems in making a thumb drive bootable use this alternative and see if it works; it worked for me so hopefully it would be of help. Cheers!

    Mark

  22. Mark

    i installed Slack 13.37 onto my eeePC 1005HAB. the installation went well 🙂 but when i reached the point where I had to install LILO into the MBR thats when i encountered problems. first the system reported that my video card didnt support VESA and that my partition table had a problem. This is what one of the logs says: *warning: LBA32 addressing assumed reading boot sector from /dev/sda1
    *warning: unable to determine video adapter in use in the present system.
    *using BITMAP secondary loader calling map-insert-data
    mapping bitmap file /boot/salix.bmp

    FATAL:open /boot/salix.bmp:NO such file or directory

    All the packages installed flawlessly but hitting a brick wall when I reach the LILO installation…well actually im not going nowhere when i boot

  23. alienbob

    Hi Mark

    Please take any Salix related issues to the Salix forum. I work on Slackware, not on Salix.

    Eric

  24. Mark

    Eric,

    I mentioned in my post that I installed SLACKWARE 13.37 on my system. I am NOT runnning SALIX and I am not planning to use it…I installed Slackware and cannot access because of a LILO issue/bug? thanks for your time

  25. alienbob

    Wee Mark, “FATAL:open /boot/salix.bmp:NO such file or directory” certainly is not an error message from Slackware.

    Eric

  26. Mark

    Wee Eric, the DVD iso i downloaded had a bug! I had to erase the system I had install and downloaded individual Slackware CD iso’s…i installed Slackware using VMware workstation on another laptop I have…I had to make sure because this previous installation gave me a headache…anyway, the installation within VMware was a smooth ride…the only problem was a faulty iso…thanks anyway

    Mark

    Mark

  27. alienbob

    Hi Mark

    Can you tell me where you downloaded that ISO? It looks like you downloaded a Salix ISO or a custom ISO to which someone added Salix components. In any case, you did not use an official Slackware ISO.

    Eric

  28. Mark

    Eric,

    I downloaded the “buggy” DVD iso from distrowatch.com You were right, that iso had Salix components, I had to clean up my whole harddrive, partion it and reinstall Slackware….it works ok now. I still have to play around with the display settings cause X won’t work fine in my eeePC 1005Hab netbook. Anyway, I have installed Arch and Slackware on it. I stoked cause I really want to learn Linux and finally found two good distros! Oh, i almost forgot to mention, i downloaded the ‘official’ dvd iso from the slackware site so, I would suggest to those who want to slack not to download iso images from distrowatch just in case they might encounter a problem similar to mine. Go to the slackware.com/getslack/

  29. Navigateur

    Hi Eric, thanks for this blog post.

    However when I type “setup” it says “There don’t seem to be any partitions on this machine of type Linux” – then when I go back and do “cfdisk”, it only allows me to see the USB drive, no hard drive.

    How do I get it to look at and install to my hard drive, instead of just on the USB stick? Is what I described unexpected behaviour?

  30. alienbob

    Hi Navigateur

    Does “fdisk -l” (run it instead of “setup”) show any disk or partition that is not the USB stick?

    Eric

  31. Navigateur

    Dear Eric,

    Thanks for your reply.

    Yes!!! /dev/cciss/c0d0p1. Then I simply did
    cfdisk /dev/cciss/c0d0p1 instead of just “cfdisk” then the installation went well.

    However, now I have a different problem. It’s not booting even though I flagged “bootable” to yes on the linux partition, size 90GB, which I set to target, ext4. (I also created another partition of type “Linux swap”, size 2GB, not bootable, which I chose as the swap space). It’s stuck at “Attempting to Boot from Hard Drive (C:)”. There are no other disks in any of the drives. The installation seemed to go perfectly. I cleared and repeated the partitions and installed again from scratch and got the same problem.

    What must I have failed to do properly?

  32. alienbob

    Hi Navigateur

    Linux does not care about the “bootable” flag of a partition. LILO will figure it out. However¸ “Attempting to Boot from Hard Drive (C:)” is not a message I recognize from any Linux bootloader. How did you install Slackware? Using another (perhaps Windows) bootloader? That is not going to work magically – You can get an idea of what is involved in threads like this one: http://www.linuxquestions.org/questions/slackware-14/dual-booting-win7-starter-slackware-13-1-a-845373/

    Eric

  33. Navigateur

    Hi Eric, thanks again..
    There’s no dual-booting here, just a plain old server computer.
    I’m following your instructions exactly. My hard disk is a CCISS (HP Smart Array Raid controller) and it appears Slackware vs CCISS is a known issue – however I’m following these instructions http://www.xunilarium.com/2009/10/solve-boot-problem-on-slackware-with.html . Could you please help me as there is no lilo! (it says “lilo: not found” when I try to type the lilo line). The installer (slackware64-13.37) doesn’t take me to any “lilo” page to install lilo, and typing “liloconfig” also says “liliconfig: not found”. Should it automatically install lilo? How do I reach a stage where I can carry out the instructions on that page?

  34. Navigateur

    …(continued)… Just to be clear, I’m installing to a blank server with nothing on it…

  35. alienbob

    Navigateur,

    Your issues are with the installation of Slackware, not with the creation of a bootable installer…
    If lilo and liloconfig can not be found after installation then either you did not do a full installation of Slackware (and skipped the lilo package) or you are using a corrupted installation source which is missing at least the lilo package.
    The installer itself does not contain lilo. It installs lilo from the package source you point it to. The liloconfig script is part of the lilo package. If that package has not been installed, then the liloconfig steps will not appear.

    Eric

  36. Navigateur

    Hi Eric,
    Thanks for your observations.
    It wasn’t just lilo but the entire slackware that I wasn’t installing. Even though it said “Installation is completed”, I had chosen a folder which didn’t contain any packages at all.
    After doing the install I followed the last bit of the instructions here http://www.megalinux.net/installing-slackware-10-on-a-dl380/ , changing c0d0p2 to c0d0p1 (the main partition in my case) and it seems to be booting fine now.
    What are the best forums for Slackware help in case I run into more problems?
    Thanks again, N.

  37. Sam

    “Obviously you would have to create that directory before attempting the “mount” command which wants to use that new directory!

    I will add the “mkdir /usbinstall” command to the article if that helps.”

    Yes, listing every necessary command in a sequential tutorial is pretty much required. Indeed, listing every step in this way is what distinguishes a tutorial from a discussion. What seems obvious to you as an expert is not necessarily obvious to everyone else.

    Don’t get me wrong–I do appreciate your efforts with Slackware, but I have read a lot of what you have written and have found this sort of ambiguity to be a bit of a trend. And frankly, this vagueness surrounding key information makes your guides a great resource for people who already know what they are doing, but next to useless for people who do not and are trying to learn.

    No offense. I just wish you could be a bit more aware that not everyone already understands Linux. That’s why some of us are reading about it.

  38. Jewstin

    I’ve used Slackware for a good long time, but this was most.helpful since I’ve never installed from a USB stick.

    I did have a small hiccup. For some reason the packages wouldn’t install from the flash drive. I added a small partition to my disk drive and copied the slackware file tree to that partition. From there everything installed just fine

  39. I1

    somehow process not working with slack 14

  40. alienbob

    Perhaps if you explain more about your issues (error messages?) I could think of a reply. Just “not working” is not something I can comment on.

    Eric

  41. Robert Corkum

    worked perfectly as usually anything by this author. installed slackware 14 64 bit.

  42. K

    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

    I can’t do this, because there is not enough space on my pendrive. stick is 8GB and windows claims, that partition has only 36MB.

  43. BoogerOnTheBrain

    Just go with netbootin or rufus, run, select your iso, point to USB device, blamO. Sometiems simply is best.

  44. kern1.09

    Works on a Lenovo X131e when others didn’t (they all lost the CD during startup?!). Slack is still the same after all these years, when I saw the Menus it was big silly grin and memory time.

    FIXES: in the syslinux paragraph add a note that you find the windows version of syslinux in BIOS/WIN32 – hard to find on Win7, easy on a nearby linux machine.

    Be sure what your booting supports UEFI for the stick, oh and a 4G stick cannot hold all of an 13.1 .iso, win7 reports ~333M short. Under linux, I found that everything can go on except the source dirs for KDE*

    It seems that once syslinux booting has occurred and you need to mount something to continue, anything else plugged into the USB port would work, so probably don’t need to cram everything onto the stick.

Leave a Reply to Navigateur Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑