[ Site Index] [ Linux Index] [ Feedback ]
Special distros: Zipslack
So, what is it?
In an era when Linux is touted as an alternative to Windows 2000, and a full install of SuSE Linux can fill 4.5 Gb of disk space and take 32Mb of RAM to install, Zipslack is a breath of fresh air: a no-fat Linux distribution that can run on a 386 with 4Mb of RAM (8Mb recommended) and a zip drive (or 100Mb hard drive). Zipslack is deliberately minimalist, which is why we're including it on this month's cover disk; it's small enough that you don't have to be a guru to understand it.
Slackware was the first Linux distribution to obtain major coverage, back around 1994; it's still going strong, and you can find its home on the web at www.slackware.com. Slackware, like other modern Linux distributions, is large enough that a full installation takes at least 1Gb of disk space, and it needs to be installed on a Linux partition.
Zipslack in contrast is a minimal working subset of Slackware. You can install Zipslack on a Zip disk, LS120, or any hard disk with at least 100Mb of free space. It runs from a DOS filesystem; you don't need to mess around repartitioning and reformatting your drives. You can boot it up from under Windows, or have it run as a standalone operating system using the LILO boot loader, and if you decide you need more you can install additional Slackware packages until you've upgraded it all the way to a full Slackware 7.1 system. Because it leaves out the kitchen sink, it's the ideal way of learning the basics of Linux. It's also suitable for customizing -- for example, you can take an old 486 with Zipslack installed on it and turn it into a firewall or router.
Get it here!
Zipslack installs the following software packages:
Zipslack packages Package Description aaa_base Basic Linux filesystem package. Sets up the empty directory tree for Linux. Do not uninstall! bash Bourne-Again Shell -- standard command interpreter bin Core binary utilities for /bin and /usr/bin bin86 Complete 8086 assembler/loader, required to compile the kernel binutils Required tocompile C, C++, Objective-C, Fortran programs byacc Berkeley Yacc -- parser generator bzip2 Data compression tool cpio CPIO archiver descrypt DES encryption library devs Device files for /dev diff Compute difference between two files dip Dialup-IP handler (handles incoming/outgoing modem network connections) e2fsprog Needed to create and maintain ext2 filesystems egcs Egcs C/C++ optimizing compiler elflibs Shared libraries for running Linux code in ELF binary format elvis A clone of the vi text editor etc Configuration files for /etc fileutls GNU file management utilities (common UNIX commands) find GNU findutils -- find, locate, and xargs fsmods Modules to permit access to foreign filesystems gdbm GNU gdm -- database library glibc Libc library -- required by most Linux programs glibcso Libc runtime support gmake Make utility for compilation support gpm General purpose mouse server daemon grep Search for regular expressions in text groff GNU roff -- non-WYSIWYG typesetting tool gzip GZIP compression tools hdsetup Slackware package maintenance tools infozip Free Zip/unzip utilities isapnp Programs to allow ISA plug-n-play devices to be configured under Linux kbd Load/save keyboard mappings ldso Dynamic linker/loader -- essential for almost all applications less Pager similar to more, with with extra features lilo Generic boot loader for Linux lpr Standard UNIX line printer suite -- controls printer queues lynx Text-only web browser m4 Macro processor mailx (Rather basic) text-only mail client man manual viewer utilities manpages manual pages for common programs minicom Communications package (for modem connections) modules Kernel modules to support peripherals (device drivers) modutils Utilities to load/unload kernel modules on the fly netmods networking support modules pciutils Utilities to get/set PCI bus device settings pcmcia PCMCIA card services (for laptops) perl Perl programming language pmake Version of make required for porting some BSD software ppp PPP protocol for dialup internet access procmail Local email delivery filter procps Display processes and memory information scsimods Kernel modules for dealing with SCSI devices, RAID arrays sendmail Mail delivery daemon sh_utils Small shell programming utilities shadow Shadow password suite (security) sndmods Kernel sound card driver modules sox Translate between sound file formats strace sysklogd System logging and kernel logging daemons sysvinit Init scripts to control startup/shutdown tar tar archiver utility tcpip1 Core TCP/IP utilities tcpip2 Extra TCP/IP utilities (e.g. dhcp, ipchains, ncftp) termcap Library of text-only terminal display capabilities tin USENET newsreader txtutils GNU text file utilities umsprogs Utilities needed for the UMSDOS filesystem util A huge collection of essential utilities wget Remotely fetch files via HTTP from a web server workbone audio player zlib Data compression library zoneinfo Time zone database
What it needs to run on
To set up Zipslack, your minimum hardware requirement is a PC that's less than a decade old. The PC must have a 386 or better processor (old 286's need not apply), 100Mb or more of free disk space (hard disk or a Zip disk will do), and 16Mb of RAM. You can get Zipslack to run on a machine with as little as 4Mb of RAM, but it isn't a pretty sight.
Zipslack differs from most Linux distributions in that it runs on a FAT filesystem -- the standard filesystem type used by Windows 95 or MS-DOS. You don't need to repartition your Windows system to install Zipslack, as long as you've got more than 100Mb of free disk space.
Note that Zipslack is a command-line Linux environment; it doesn't come with the X11 windowing system or the KDE or GNOME desktops. If you have extra space, you can install X11 (included on the Shopper CD, instructions below).
Find a DOS (or Windows) filesystem -- it needs to be an uncompressed FAT filesystem. Make sure it has at least 100Mb free (more if you plan to install X11). From the Zipslack directory on the Shopper CD, unzip the Zip file called ZIPSLACK.ZIP. This contains a subdirectory called \LINUX\, and you should unpack this in the top level directory of whatever drive you're installing it on. (\LINUX\ is going to be the root of the Linux filesystem used by Zipslack; it contains various subdirectories such as usr, home, and tmp -- don't mess around with these names.)
To unpack the zip archive, you need a tool such as WinZip or the PKZIP Suite.
(Note that you'll need a newish unzip utility; the ZIPSLACK archive contains long filenames, and the old DOS version of PKUNZIP will truncate these. Without the long filenames, Zipslack will not work.)
If you're running a machine with only 4Mb of memory, unzip the file FOURMEG.ZIP in the same place you unzipped ZIPSLACK.ZIP.
If you have a Linux system already, but still want to play with Zipslack, the GNU unzip utility can cope with the long filenames. Unpack Zipslack into a filesystem of type VFAT with at least 100Mb of free space.
Once you've unpacked everything into \LINUX, if you have a lot of spare disk space left over you may want to add the files needed in order to install the X11 Windowing system. These are not a routine part of Zipslack, but can be found in the directory slackware\x1 on the Shopper CD. Copy the directory x1, and its contents, into the subdirectory \LINUX\tmp (so that you end up with \LINUX\tmp\x1 containing lots of files with the suffix .tgz).
Before you run Linux for the first time, it's worth taking a few precautions. For example, you may want to get at files on your Windows hard disk partitions while Linux is running; or if your machine has a network card, you might want to use its network address from Linux. For this reason, it is a very good idea to keep a pen and paper to hand and note down the following:
- The TCP/IP address of your machine on the LAN (its IP address, netmask, whether it's using a DHCP or WINS server, what subnet it's on, and so on) -- if appropriate
- The make and model of ethernet card you're using
- The make and model of modem you're using (if you have one)
- Run fdisk (from a DOS shell) and note the hard disk partitions you have on each IDE drive, and what Windows drives you've got installed on them. (If you've got a SCSI chain, note down which devices you've got at which SCSI IDs.)
- If you have more than 64Mb of RAM, note down how much physical memory your machine has.
Note that not all hardware that works with Windows will work with Linux. In particular, WinModems and WinPrinters (modems and printers that rely on Windows drivers for some functionality) may not work at all, and support for USB and FireWire/IEEE1346 devices is limited at present. (USB support will be much better in a couple of months, when kernel 2.4 is out.)
The next stage is to boot Zipslack. Remember, Zipslack is an operating system (like MSDOS or Windows NT); it takes over your PC completely while it's running. There are two ways to boot Zipslack; either by running Windows first (in "safe" mode) and launching Zipslack using a utility called LOADLIN.EXE, or by installing a boot loader (called LILO) that gives you a choice of running Linux or Windows when you reboot your machine. The LILO method can only be set up from inside Linux, so we'll ignore it for the time being.
Booting Zipslack from DOS with LOADLIN.EXE
Inside the \LINUX directory you'll find a copy of LOADLIN.EXE, the Linux kernel loader. (The kernel itself, vmlinuz, isn't a runnable Windows program.) There's also a supplied batch file, LINUX.BAT, which is supposed to make running LOADLIN easier.
Using Notepad (or similar), edit LINUX.BAT. There is a line in it that says:\linux\loadlin \linux\vmlinuz root=/dev/sda4 rw
This line runs loadlin, with three parameters:
The pathname to the Linux kernel to load
- The device file where the root of the Linux filesystem is mounted
- "rw" (meaning the root filesystem is to be mounted read-write)
You will almost certainly want to edit the "root=/dev/sda4" clause.
To understand how, you need to know that in UNIX terminology a device file is a virtual file that gives access to a hardware driver linked into the Linux kernel. All device files live in the directory /dev (located under \LINUX when you're still running Windows).(Note that on Linux, the directory separator character is a forward slash, "/", instead of the backward-slash "\" used on DOS and Windows.)
/dev/sda4 is a SCSI device -- it refers to the fourth partition on SCSI Disk "A", the first SCSI disk on the system. The "root=/dev/sda4" parameter is therefore telling vmlinuz to use the fourth partition on the first SCSI disk as its root filesystem. This makes sense if you're using a Zip drive because Zip disks -- even parallel-port ones -- show up to Linux as SCSI disks (via a virtual-SCSI interface for parallel port drives).
Let's suppose that you don't have any SCSI disks; instead you've unpacked \LINUX on your C: drive, which is the first partition of the first IDE hard disk on your system. Your IDE disks are called /dev/hda and /dev/hdb by Linux (with /dev/hdb commonly being your CDROM drive if you have one hard disk and one ATAPI CDROM drive). Each of these, in turn, has a number of partitions. If the C: volume is in the first partition on your first drive, it will be /dev/hda1; if it's in the third partition on your second drive it will be in /dev/hdb3; and so on.
So if you've unpacked Zipslack on C:, and C: is the first partition on the first IDE device on your system, you need to edit LINUX.BAT so that it looks like:
\linux\loadlin \linux\vmlinuz root=/dev/hda1 rw
There are other things you can do here. For example, if you have more than 64Mb of RAM, you need to add a parameter that tells vmlinuz how much memory you've got. For example, if you have 128Mb:
\linux\loadlin \linux\vmlinuz mem=128M root=/dev/hda1 rw
If you have a peculiar ethernet adapter or other strange hardware, you can tell the Linux kernel where to probe for it by specifying more of these "boot strings" in the LINUX.BAT file. You can find more documentation about boot strings, once Linux is running, by typing "man bootparam" ("man" is the command used to view manual pages; "bootparam" is the on boot strings).
Once you've got LINUX.BAT sorted out, try running it by restarting Windows in MSDOS mode, then running LINUX.BAT.
(Note that you may need both HIMEM.SYS and EMM386.EXE running under DOS if you're trying to load a large kernel -- LOADLIN.EXE can use an extended memory manager.)
If you're successful, you should see the screen clear, then huge quantities of incomprehensible messages scroll up across it until you get to a message like this:
Welcome to Linux 2.2.16. darkstar login:
Type the word "root" (without quotes), press return, and you will see your first Linux command prompt. (There's no password on the root account when you first log into Zipslack.)
If instead you see a message containing the word "panic" (typically followed by an explanation like "unable to mount root on block device") then the kernel was unable to find the Linux system -- probably because LINUX.BAT is pointing to the wrong device file.
Zipslack is a command-line Linux system. When it first loads, it has a single login account set up; root, the superuser account. When you see the login: prompt, type "root"; you will not be prompted for a password. Unless you plan to run Zipslack only on a zip disk on a non-networked machine, you must immediately assign a password to this account -- otherwise the system is wide open to any intruder. Type:passwd rootAnd then enter your choice of password twice (once, hit return, then once again for confirmation). Note that the root password is the key that unlocks this system; if it's easy to guess your system is just as vulnerable as if there's no password at all, and if you lose it, you won't be able to log in again!
If you're logged in as root, you can add a user account for yourself (which doesn't have the same amount of control over the system -- for example, the root user is authorised to trash everything without Linux querying this action). For example, to add a user called "charlie" type:useradd -d /home/charlie -p first_password -s /bin/bash charlieThis adds a user called charlie (last parameter), with home directory in /home/charlie (that's the -d option), initial password set to "first_password", and login shell (the Linux equivalent of COMMAND.COM) set to /bin/bash (the Bourne-Again Shell). If you do this, you can now log in using the username "charlie" and the password "first_password".
If you're not used to using a UNIX or Linux command-line environment, take heart; it works along similar lines to MSDOS or the Windows command line environment. Differences include the fact that the up and down arrow keys should give you DOSKEY like functionality from the start, and instead of the very limited COMMAND.COM (with its minimal batch file execution capability) you're using a UNIX shell -- an interpreter for a pattern-matching language. The standard commands to change directory (cd, mkdir, rmdir) are the same as in DOS, but there are a few differences. Here's a brief translation table to get you started:
UNIX commands in brief Command Purpose Example What it does General commands ls list files in directory (-l for long listing) ls -l *.txt long listing of files ending in .txt cd change directory cd .. move up a directory level mkdir create a directory mkdir fred create subdirectory called "fred" rmdir remove (delete) a directory rmdir fred remove subdirectory "fred" cp copy files cp foo.txt bar.txt copy file foo.txt to bar.txt mv move (rename) files mv bar.txt wibble rename or move bar.txt to "wibble" rmdir remove (delete) a file rm wibble deletes file "wibble" less view contents of a text file less foo.txt pages through foo.txt, a screen at a time vi text editor for text files vi foo.txt edit foo.txt (warning: vi is complex!) man read manual pages man vi read manual for vi (text editor) date print date and time date what it says ... touch update modification time of a file touch foo.txt update last-modified time on foo.txt at execute commands at future time at 7pm ... introduce list of commands to execute at 7pm gzip compress a file gzip foo.txt compresses foo.txt and rename to foo.txt.gz lpr send file to line printer lpr foo.txt print foo.txt via default print queue tar create/list/extract tar archives tar tvf stuff.tar verbosely list contents of archive file stuff.tar Administrative commands init change system runlevel init 6 reboots the system (must be root to do this) route get/set TCP/IP routes in routing table route -n prints routes (no IP->name resolution) ifconfig get/set network interface configuration ifconfig eth0 up bring up the eth0 (first ethernet) interface fsck check filesystem for errors fsck /dev/hda2 fix errors on second FS of first hard drive insmod install kernel module (driver) insmod aha1542 install support for Adaptec-1542 SCSI controller kill kill a running process kill -15 5471 send signal 15 (die) to process 5471 ps list running processes ps -auxw verbosely list running processes and ID numbers cardctl control a PCMCIA card cardctl eject 0 power down and eject card in PCMCIA slot 0
For further help, it would be a very good idea to read a book like "Running Linux" by Matt Welsh and Lar Kaufman (see O'Reilly and Associates for details, and for a whole load of nice introductory tutorials). The main obstacle you're likely to experience is that when editing files, the standard UNIX text editor vi (pronounced "vi", not "vee-aye" or "six") is rather beginner-hostile.
Strong recommendation: if you don't like vi, you can download a more friendlier editor from slackware. Two obvious choices are Jed (a nice text editor which can emulate Emacs, WordStar, or EDT), or MC, the Midnight Commander; MC is a clone of Norton Commander, and comes with a nice built-in editor (mcedit).
Tailoring your system
Zipslack keeps most of its configuration files in the directory /etc (like any other UNIX or Linux system). If you have a network card, and want your Zipslack system to be able to identify the local network, you will need to edit certain configuration files here. Because Zipslack is short on space, it doesn't come with full documentation -- but you can find a series of slackware tutorials. These cover configuring PPP, the X11 Window system, setting up a network device, and how to add or remove software packages.
In general, all UNIX and Linux systems (except MacOS X) run a series of shell scripts (like batch files only more powerful) from the directory /etc/rc.d when they start up and shut down. This replaces the single AUTOEXEC.BAT file that Windows users will be familiar with. Rather than having a "safe" mode, UNIX-type systems have a series of "run levels" denoted by numbers; these are listed (and transitions between them controlled) in the file /etc/inittab:
Run level Meaning 0 halt 1 single user mode 2 unused (but configured the same as runlevel 3) 3 multiuser mode (default Slackware runlevel) 4 X11 with KDM/GDM/XDM (session managers) 5 unused (but configured the same as runlevel 3) 6 reboot
You can switch run level using the command "init"; type "/sbin/init 1" while logged in as root to switch to run level 1, "/sbin/init 6" to reboot, and so on.
The rc scripts on Linux follow the relatively-simple traditional BSD UNIX layout. When you switch to a given run level, the following scripts are executed:
Run level Script to execute Comments startup /etc/rc.d/rc.S sets up hardware -- executed on bootup 1 /etc/rc.d/rc.K kills multi-user processes and servers 2-5 /etc/rc.d/rc.M starts up multi-user processes 6 /etc/rc.d/rc.6 reboots the system 0 /etc/rc.d/rc.0 halts the system
A lot of the tasks that rc.S, rc.M, and rc.6 carry out contain common elements; so in turn, other scripts in /etc/rc.d are invoked to deal with startup and shutdown of system services. For example, /etc/rc.d/pcmcia controls PCMCIA card services on laptops, and /etc/rc.d/rc.keymap sets up the keyboard mapping.
You will want to edit some of these scripts. For example, rc.keymap is set up by default to expect a US keyboard; so change the line that runs "/usr/bin/loadkeys us.map" to execute with "uk.map" instead.
If you have a fixed ethernet card (not a PCMCIA card!), you need to set up networking by editing /etc/rc.d/init.d/rc.inet1 (which installs basic TCP/IP routing) and then /etc/rc.d/init.d/rc.inet2 (which sets up internet daemons that run over TCP/IP).
If you have a fixed ethernet connection, you need to add your IP address, netmask, and so forth in /etc/rc.d/rc.inet1 where the comments tell you to; you can also set up Zipslack to work with DHCP (a dynamically allocated address) by following the instructions in the rc.inet1 file.
If you use a PCMCIA ethernet card, edit /etc/pcmcia/network.opts; again, this has a place to specify your IP Address, netmask, and so forth.
If you want to use a PPP dialup connection to talk to an internet service provider, Zipslack uses a tool called pppsetup to help you configure the PPP dialup system. You need to run this as root; there's a tutorial available on PPP Setup. pppsetup creates two programs, called ppp-go and ppp-off; these are shell scripts that bring up the PPP connection and shut it down, and if you want you can add commands to these to fetch your mail or run other programs. (Note that it helps to have a modem before you try to run pppsetup, and to know which serial port it's connected to (or shows up as, if it's an internal one).
What to do if Zipslack can't talk to some of your hardware
The Linux kernel has device drivers for a lot of peripherals, but doesn't work with everything; in particular, Winmodems and Winprinters are a no-go zone. If you have a piece of hardware that doesn't depend on a Windows driver but that Linux isn't recognizing, chances are that you can load a kernel module (device driver) that, with a bit of prompting, will let you talk to that weird Xircom ethernet card or Iomega Clik! drive.
As with other Linuxes, Zipslack keeps its kernel modules in a directory tree under /lib/modules/
-- in our case, /lib/modules/2.2.16. The script /etc/rc.d/rc.modules is run at startup, and explicitly forces the kernel to load some necessary modules using the tool "modprobe", which adds drivers to the kernel. It's useful to poke around this file because among other things there are examples of adding sound support; the standard sound modules require some configuration (for example, if you have Sound Blaster Pro/16 you need to be able to tell modprobe what I/O address and interrupt to use with it).
Booting Zipslack using LILO
If you want to play with Zipslack on a system that's already running Linux, you can configure LILO to give you an option of running Zipslack instead of your main distribution. For example, I installed Zipslack on a VFAT filesystem on a machine that is primarily used to run Redhat 7.
To get this to work, you need to run Redhat 7 and edit the /etc/lilo.conf file in your main distribution. Add an entry like this:
image=/zipslack/linux/vmlinuz label=zipslack read-only root=/dev/hda4
Where /zipslack/linux/vmlinuz is the path to the Linux kernel in your Zipslack distribution as it shows up when mounted under Redhat, and "root=/dev/hda4" points to the partition you've installed Zipslack into (the same place you'd point LOADLIN.EXE at in LINUX.BAT, as described above).
Run /sbin/lilo and you will have installed a new boot loader that knows where to find Zipslack. Next time you reboot, just type "zipslack" at the prompt instead of "linux" or "redhat", and LILO will load zipslack for you.
(Warning: before messing around with your boot sector in this way it is a very good idea to check that your lilo.conf file is valid and to know what you're doing.)
Zipslack uses Slackware's package management system. Packages are collections of precompiled software and associated files, delivered in a file called a "tarball" (suffix: tgz). If logged on as root, you can use the program pkgtool to install packages.
If you've downloaded a bunch of packages you want into /tmp, to install them you should change directory into /tmp, then run pkgtool as root. This will give you options to install packages, remove packages, or view the contents of a package.
In the event that you want to install a Redhat package (suffix: rpm) on your system, Zipslack includes a tool called rpm2tgz. Run rpm2tgz on the file, and it will create a tgz file that you can install using pkgtool.
If you've got the X11 files that came with the Shopper cover CD, copy them into /tmp then run pkgtool on them if you want to install the X11 windowing system. Then you can have the fun of configuring X11 ...
The X11 system requires a central piece of software called an X server. The x1 package set includes several X servers; you can install all of them, or -- if you know what your graphics card is -- just the one that you need. In general, most common graphics cards use the SVGA X server (package xsvga), but some common cards use the S3 chipset; these need the xs3 or xs3v packages. If you're uncertain, consult http://www.slackware.com/config/x.php for details -- if very uncertain, there's copious documentation on X11 at XFree86's website.
Once you've installed an X server, you need to configure it. The easiest way to do this is to run /usr/X11R6/bin/XF86Setup as root. This is a graphical setup program for X. If it doesn't work, you can try the older /usr/X11R6/bin/xf86config. This setup program expects you to tell it which server to use, what resolutions your video card supports, and a lot of information about colour depth and monitor settings; it's not recommended unless you know what you're doing.
If you enjoy using Zipslack but find it a bit limited, you're not alone: Zipslack makes no claim to be a comprehensive Linux distribution. You can download extra packages from www.slackware.com; these include text editors, spreadsheets, X11 applications like Netscape and the KDE or GNOME desktop environments, and a host of other utilities. Zipslack is the skeleton of a highly customizable Linux system, a starting place rather than a finished desktop environment. The best analogy is Lego; Linux, and in particular a system like Slackware that makes minimal claims at integration, is a box full of brightly-coloured Lego parts that a hobbyist or programmer can slot together to suit themselves.
Zipslack spends a lot of space on providing a full compiler environment; it includes an up to date copy of the Perl 5.6 programming language, and the egcs C/C++ optimizing compiler. In general, you can download and compile most non-graphical UNIX or Linux software with the tools provided by Zipslack. If you grab and install the Bigslack packages (which will bloat your Zipslack system up to 900Mb) you'll have a comprehensive, powerful Linux distribution that can do most anything you expect of Linux.
You may want to turn your copy of Zipslack into a portable (Zip or LS-120 based) environment that can do email, usenet, and web browsing via mutt, slrn, and lynx (all available from the Slackware site -- these are the best command-line Linux tools for email, news, and web surfing).
Or you might want to turn it into the heart of a simple firewall system; gut the /etc/rc.d/rc.inet2 script and replace it with a set of ipchain configuration rules that filter incoming packets and send them on to other machines on your network.
In any event, Zipslack is a robust, small, and above all simple Linux system which you can learn a lot from. Although it doesn't have the sophisticated package management systems of Redhat or Debian, or administrative tools like Linuxconf or YaST, it is actually easier to understand than these larger distributions.
[ Site Index] [ Linux Index] [ Feedback ]