Last modified: Wed Jun 22 20:41:33 EDT 2011
(Updated for Slackware 13.37)
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 *.txz 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 *.txz 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 43980 blocks bash-3.1# cd usr/lib/setup bash-3.1# ls FDhelp INSdir SeTfdHELP SeTnet migrate.sh unmigrate.sh INCISO INShd SeTfull SeTnopart nopartHELP INSCD PROMPThelp SeTkernel SeTpartitions pkgtool INSNFS SeTDOS SeTkeymap SeTpasswd removepkg INSSMB SeTPKG SeTmaketag SeTswap setup INSURL SeTconfig SeTmedia installpkg slackinstall
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-firmware-2.6.29.6-noarch-2.txt kernel-firmware-2.6.29.6-noarch-2.txz kernel-firmware-2.6.29.6-noarch-2.txz.asc kernel-generic-2.6.29.6-i486-2.txt kernel-generic-2.6.29.6-i486-2.txz kernel-generic-2.6.29.6-i486-2.txz.asc kernel-generic-smp-2.6.29.6_smp-i686-2.txt kernel-generic-smp-2.6.29.6_smp-i686-2.txz kernel-generic-smp-2.6.29.6_smp-i686-2.txz.asc kernel-huge-2.6.29.6-i486-2.txt kernel-huge-2.6.29.6-i486-2.txz kernel-huge-2.6.29.6-i486-2.txz.asc kernel-huge-smp-2.6.29.6_smp-i686-2.txt kernel-huge-smp-2.6.29.6_smp-i686-2.txz kernel-huge-smp-2.6.29.6_smp-i686-2.txz.asc kernel-modules-2.6.29.6-i486-2.txt kernel-modules-2.6.29.6-i486-2.txz kernel-modules-2.6.29.6-i486-2.txz.asc kernel-modules-smp-2.6.29.6_smp-i686-2.txt kernel-modules-smp-2.6.29.6_smp-i686-2.txz kernel-modules-smp-2.6.29.6_smp-i686-2.txz.asc
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:
export ARCH=x86_64 or export ARCH=i386 before
attempting the next step.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 xJf /tmp/slack/slackware/a/lilo-*.txz cp sbin/liloconfig temp sed s/#compact/compact/ temp > sbin/liloconfig rm temp tar cJf /tmp/slack/slackware/a/lilo-*.txz * 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 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
cd /tmp/slack/isolinux/cpiowork/etc/lvm cp lvm.conf /tmp/temp sed s/sysfs_scan\ =\ 1/sysfs_scan\ =\ 0/ /tmp/temp > lvm.conf rm /tmp/temp
First official release with a 64-bit spin.
Prior to Slackware 13, all packages were gzipped tar files with the extension .tgz. Now they are xz-compressed tar files with the extension .txz.
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