Last modified: Thu Oct 2 15:53:45 EDT 2008
(Updated for Slackware 12.0)
This page is about modifying some files in the Slackware distribution in order to install Slackware with fewer keystrokes. There is Slackware documentation available in various places that purports to explain this, but I was confused anyway until I used the source.
The relevant install modes are full, newbie, menu, and expert. In full mode, every *.tgz file is installed and tagfiles are redundant. The other three modes follow a two-step process:
A Slackware package directory contains the following special files.
They are used in the different modes as follows.
| mode | maketag | maketag.ez | tagfile |
|---|---|---|---|
| newbie | Unused | Unused | This tagfile is used as-is |
| menu | Unused | This script is used to generate a tagfile | Unused |
| expert | This script is used to generate a tagfile | Unused | Unused |
The tagfile specifies one of the following four options for each package:
To avoid redundant prompting, the scripts maketag and maketag.ez produce tagfiles containing only ADD and SKP commands.
The slackinstall script works by iterating over *.tgz files and looking up the tagfile response for each one. Thus there is no harm in having taglines for packages that no longer exist. However, it is an annoyance to get prompted in menu and expert mode for responses that will have no effect. To fix this, the offending menu options must be removed from the maketag.ez and maketag scripts.
To remove an entire package series from consideration, you must edit isolinux/setpkg in a manner analogous to maketag or maketag.ez to remove the offending menu option.
The setpkg script is easy to access in the isolinux subdirectory of the Slackware distribution. However, the other scripts are buried in the initramfs. To get to them, you need to unpack the misleadingly named initrd.img file using gzip and cpio:
bash-3.1# mkdir cpiowork bash-3.1# cd cpiowork bash-3.1# gzip -dc ../initrd.img | cpio -i -d -H newc --no-absolute-filenames 23919 blocks bash-3.1# cd usr/lib/setup bash-3.1# ls FDhelp INShd SeTfdHELP SeTmedia installpkg setup INSCD PROMPThelp SeTfull SeTnopart migrate.sh slackinstall INSNFS SeTDOS SeTkernel SeTpartitions nopartHELP unmigrate.sh INSdir SeTPKG SeTkeymap SeTpasswd pkgtool INSfd SeTconfig SeTmaketag SeTswap removepkg
The scripts of interest here are setup and slackinstall.
After making any necessary modifications to your working copy, you need to reverse the gzip/cpio steps to rebuild initrd.img:
bash-3.1# cd ../../.. bash-3.1# find . -print | cpio -o -H newc | gzip -9 > ../initrd.img 23919 blocks
The "a" series has a bunch of packages like this:
kernel-generic-2.6.21.5-i486-2.tgz kernel-generic-2.6.21.5-i486-2.tgz.asc kernel-generic-2.6.21.5-i486-2.txt kernel-generic-smp-2.6.21.5_smp-i686-2.tgz kernel-generic-smp-2.6.21.5_smp-i686-2.tgz.asc kernel-generic-smp-2.6.21.5_smp-i686-2.txt kernel-huge-2.6.21.5-i486-2.tgz kernel-huge-2.6.21.5-i486-2.tgz.asc kernel-huge-2.6.21.5-i486-2.txt kernel-huge-smp-2.6.21.5_smp-i686-2.tgz kernel-huge-smp-2.6.21.5_smp-i686-2.tgz.asc kernel-huge-smp-2.6.21.5_smp-i686-2.txt kernel-modules-2.6.21.5-i486-2.tgz kernel-modules-2.6.21.5-i486-2.tgz.asc kernel-modules-2.6.21.5-i486-2.txt kernel-modules-smp-2.6.21.5_smp-i686-2.tgz kernel-modules-smp-2.6.21.5_smp-i686-2.tgz.asc kernel-modules-smp-2.6.21.5_smp-i686-2.txt
And there is a copy of the matching kernel sources in the "k" series. You can replace all those with a single package that installs your kernel, modules and kernel source together. You can follow the examples and combine the install/doinst.sh scripts, but you can also simplify it like this:
INSTALL_MOD_PATH=/tmp/slack make modules_installNote that liloconfig looks for /boot/vmlinuz but not /boot/bzImage.
The following terse examples assume that the Slackware directory tree is being built in /tmp/slack.
# This will of course break the signature. rm /tmp/slack/slackware/a/lilo-*.asc mkdir /tmp/lilo cd /tmp/lilo tar xzf /tmp/slack/slackware/a/lilo-*.tgz cp sbin/liloconfig temp sed s/#compact/compact/ temp > sbin/liloconfig rm temp tar czf /tmp/slack/slackware/a/lilo-*.tgz * cd /tmp/slack rm -rf /tmp/lilo
cd /tmp/slack/isolinux mkdir cpiowork cd cpiowork gzip -dc ../initrd.img | cpio -i -d -H newc --no-absolute-filenames cd usr/lib/setup cp SeTDOS /tmp/temp sed s/\"vfat\"\ \"defaults\"/\"vfat\"\ \"uid=1000,gid=100,shortname=winnt\"/ /tmp/temp | sed s/\"ntfs\"\ \"ro\"/\"ntfs\"\ \"ro,uid=1000,gid=100,umask=000\"/ > SeTDOS cp slackinstall /tmp/temp sed s/\ remount_disc/\ break/ /tmp/temp > slackinstall rm /tmp/temp cd /tmp/slack/isolinux/cpiowork find . -print | cpio -o -H newc | gzip -9 > ../initrd.img cd .. rm -rf cpiowork
Prior to Slackware 12, initrd.img was a gzipped ext2 image instead of a gzipped cpio archive. This was the old initrd system as opposed to the new initramfs system.
bash-3.00# gzip -dc slackware-10.2/isolinux/initrd.img > temp.img bash-3.00# mount -o ro,loop temp.img /mnt bash-3.00# cd /mnt/usr/lib/setup/ bash-3.00# ls FDhelp INShd SeTfdHELP SeTmedia installpkg setup INSCD PROMPThelp SeTfull SeTnopart migrate.sh slackinstall INSNFS SeTDOS SeTkernel SeTpartitions nopartHELP unmigrate.sh INSdir SeTPKG SeTkeymap SeTpasswd pkgtool INSfd SeTconfig SeTmaketag SeTswap removepkg