Last modified: 2022-07-09 13:35
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 (Slackware 12 through 14.2) or xz (Slackware 15.0 or later) and cpio:
bash-3.1# mkdir cpiowork bash-3.1# cd cpiowork bash-3.1# gzip -dc ../initrd.img | cpio -i -d -H newc 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 | 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_install
Note that liloconfig looks for /boot/vmlinuz but not /boot/bzImage.
While dinking with initrd.img uncompressed in cpiowork as above, patch lvm.conf to fix stupid problems creating LVM volumes:
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
Other patches that are too messy to include here:
If you use the script usbimg2disk.sh to create a bootable USB stick, it overrides some of the changes described above. There is actually a second copy of the stock initrd.img under EFI/BOOT that it uses.
./usbimg2disk.sh -f -s /tmp/slack -L slack -o /dev/sdj echo "" echo "Undoing damage..." mount -t vfat -o shortname=mixed /dev/sdj1 /mnt rm /mnt/*.s cp -a /tmp/slack/isolinux/message.txt \ /tmp/slack/isolinux/setpkg \ /mnt/slack/kernels/CD/bzImage \ /tmp/slack/isolinux/initrd.img \ /mnt cat > /mnt/syslinux.cfg <<EOF default CD prompt 1 timeout 0 display message.txt label CD kernel bzImage append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw EOF umount /mnt
initrd.img is now packed with xz not gzip.
compact is now on by default in liloconfig.
Had to remove the cpio option --no-absolute-filenames
from the initrd.img unpacking commands because it now makes the initrd
unbootable.
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