Slackstart - Automated Slackware Installation

Introduction

We’re here installing tag ADD from A AP sets, a few packages from N and additional packages to make slackpkg work. We end-up with a system of 651MB on disk and using only around 47MB of RAM when ilding.

Prepare the RAMDISK

unpack the official installer

mkdir -p /tftpboot/slackstart/lala/
cd /tftpboot/slackstart/lala/
gzip -dc /tftpboot/slackware142/isolinux/initrd.img | cpio -id -H newc --no-absolute-filenames
ls -lF
wget http://pub.nethence.com/bin/slack/slackstart.bash.txt
wget http://pub.nethence.com/bin/slack/slackstrap.bash.txt
mv -i slackstart.bash.txt slackstart.bash
mv -i slackstrap.bash.txt slackstrap.bash
chmod +x slackstart.bash slackstrap.bash

define a local mirror and SSH public keys (variables are multi-line capable)

vi slackstart.conf

mirror=...
pubkeys="..."

warn about that script that will erase all the data from the drive

vi /tftpboot/slackstart/lala/etc/rc.d/rc.S

#echo -n "slackware login: "
#read BOGUS_LOGIN
#cat /etc/motd
echo | network
sleep 1
dhcpcd
sleep 2
ping -W1 -c1 opendns.com >/dev/null && echo network SUCCESS || echo network FAILURE
cat <<-EOF

now if you really wanna destroy /dev/sda

    ./slackstart.bash HOSTNAME [boot|full]

EOF

Package it up

package it back

cd /tftpboot/slackstart/lala/
find . -print | cpio -o -H newc | gzip -9 > ../slackstart.img

and eventually add a PXE entry for it

vi /tftpboot/pxelinux.cfg/default 

label slackware142 slackstart
    kernel ../slackware142/kernels/huge.s/bzImage
    append initrd=../slackstart/slackstart.img mitigations=off vga=791

Ready to go

once the system is installed you should be able to boot the box with either EFI or legacy and see your minimal system booting up (642M with A AP /ADD and custom N).

can login as root w/o a password and get an IP through DHCP or use netconfig (SSH public keys are already in place if defined above), though we’ve installed dhclient instead of dhcpcd (which netconfig may need).

Resources

Slackware automated or unattended installation https://www.linuxquestions.org/questions/slackware-14/slackware-automated-or-unattended-installation-4175547736/

Slackware install optimization https://flaterco.com/kb/slackware.html

Slackware initrd mini HOWTO https://ftp.riken.jp/Linux/slackware/slackware-current/README.initrd

the competition

Linux Slack-Kickstart Project http://www.slack-kickstart.org/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun