I found myself in a bit of a predicament the other day when I wanted to install the Slackware 9 beta on one of my Windows 2000 boxes at a friends house. As there is no iso of the beta, and none of the pc’s there had Linux on it, I needed to somehow create my own iso. I know I could have used a boot disk, but I wanted a bootable iso I could use later as well. After a little research, I soon figured out that making a bootable iso image of Slackware 9 Beta using Windows 2000 is fairly easy. So I thought I would pass this information along in case anyone else found themselves in a similar situation.
To do this you will need the mkisofs for Win32 utility and a cd burning application capable of burning iso’s to cd (Nero worked fine for me). Mkisofs is part of a suite of command line Linux CDR utilities, and it allows you to create iso images that you can then burn to CD. This utility has been ported to the Win32 platform and will allow you to create your own Slackware iso with little change to the instructions listed in the readme.txt file in the isolinux directory under slackware-current. The instructions below should work for any Win32 platform, but I have only tried it under Windows 2000.
Instructions:
- Download the latest slackware-current directory1. Mirrors available at http://www.slackware.com/getslack/
- Download the mkisofs for Win32 utility. (It’s in the cdrtools zip linked below) Available at ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha/win32/cdrtools-1.11a12-win32-bin.zip
- Extract the contents of the cdrtools zip2 to your windows directory (i.e., C:\Winnt) This will put the mkisofs utility and needed cygwin1.dll in the search path so the utility can be run from any directory.
- Next we will need to exclude some of the directories from the slackware-current directory so the iso image we create will fit on a cd. There are suggestions in the readme.txt file in the isolinux directory as to what you may want to exclude.
- You can exclude directories and files two ways:
- use the -x parameter with mkisofs3
- Move the directories/files you want to exclude to another location not under the slackware-current directory or its subdirectories.
I chose to move all directories but the slackware, kernels, and isolinux directories. Then I further moved all the kernels in the kernels directory except for “bare.i”, as I did not need scsi or any other special support. Finally, I moved the kdei directory as I did not need the internationalization support for kde.
- If you don’t already have one, make a temporary directory outside of slackware-current to create your iso image in. I used “C:\temp”.
- Using a text editor such as notepad, create a one line “.cmd” file4 to run the mkisofs utility with all its parameters. I called mine “iso.cmd”.If you are using “C:\temp” for your iso image directory and you are moving out the directories you wish to exclude, as I did, you can just cut and paste the code below for your batch file. mkisofs -o /temp/slackware.iso -R -J -V “Slackware Install” -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 32 -boot-info-table -sort isolinux/iso.sort -b isolinux/isolinux.bin -c isolinux/isolinux.boot -A “Slackware Install CD” . Copy or type all of this code into your editor on one line, without any returns. Otherwise windows will treat separate lines as separate commands and all of the parameters will not be passed to mkisofs. If you are using a directory other than \temp or \temp is on a different drive than slackware-current, you will need to edit the “/temp/slackware.iso” part of the code to match your drive or directory.
If you are not moving out the directories you wish to exclude, you will need to use the -x parameter5 in your batch file to exclude these directories from the iso image. Important! Please note the trailing “.” at the end of the code listed above. This is the source path for mkisofs to copy files/directories from.
- Save your batch file in the slackware-current directory using .cmd as the file extension. If you save and execute your batch file from a directory other than slackware-current, you will need to change the “.” at the end of the mkisofs code listed above to the path to your slackware-current directory.
- Drop to a command prompt (click start > click run > type command > press enter) and change to your slackware-current directory. Run your batch file (for example, type iso.cmd then press enter). You should now see the mkisofs progress status as it creates your iso image.
- Burn the image file (i.e., slackware.iso) to cd using your favorite cd burning app. I used Nero 5.5.
- Enjoy your new Slackware 9 Beta bootable iso!
Notes:
- For the sake of a bootable iso only, it is not necessary to download the entire slackware-current directoy. You can get by with the file contents of slackware-current and the directories named slackware, isolinux and kernels.
- I don’t think it’s necessary to extract all the files in the zip. You may be able to get by with just the mkisofs.exe and cygwin1.dll
- Examples of the -x parameter are listed in the readme.txt in the isolinux directory. I would recommend reading through the readme.txt anyway to get a better understanding of using mkisofs.
- A “.cmd” file is the equivalent of a Win2000 batch file. The reason for the batch file is because the number of parameters we need to pass is too long to execute from the command line directly. (There may be a way to increase the size of the command line buffer, but I am not currently aware of it.) Creating a “.cmd” file gets around this problem neatly with the added benefit of allowing you to change your parameters later without alot of unnecessary typing.
- The man page for mkisofs can be found at: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/man/mkisofs-1.13.html
- The homepage for mkisofs is available at: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html