slackstart - automated slackware installation

guest-slackware-console | slackstart

descrdescr

we’ve already got a full-blown set of deployment scripts for installing slackware from rescue/install systems. here comes the modification of our favorite installer ramdisk, namely slackware’s, in view to get something similar to redhat’s kickstart for installing slackware.

requirementsrequirements

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

cd /tftpboot/bin/
vi slackstart.conf

mirror=http://192.168.122.1/slackware150/

pubkeys="PUBKEY HERE"

prepare the ramdiskprepare 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
xzcat /tftpboot/slackware150/isolinux/initrd.img | cpio -id -H newc --no-absolute-filenames
ls -alkF

add that deploy wrapper onto it

vi root/DEPLOY-SYSTEM

#!/bin/bash
set -e

echo | network
dhcpcd
sleep 3
ping -W1 -c1 192.168.122.1 >/dev/null && echo network OK || echo network FAIL
#ping -W1 -c1 opendns.com >/dev/null && echo network OK || echo network FAIL

wget http://192.168.122.1/bin/slackdisk.bash
wget http://192.168.122.1/bin/slackstrap.bash
wget http://192.168.122.1/bin/slackstart.conf
wget http://192.168.122.1/bin/slackprep.bash
wget http://192.168.122.1/bin/slacknet.bash
chmod +x slack*bash

./slackdisk.bash vda

./slackstrap.bash lala

cd lala/
ln -s ../slackstart.conf
../slackstrap.bash . kernel
rm -f slackstart.conf
cd ../

./slackprep.bash lala

./slacknet.bash lala

enable

chmod +x DEPLOY-SYSTEM

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

vi etc/rc.d/rc.S

#echo -n "slackware login: "
#read BOGUS_LOGIN
#cat /etc/motd

echo THIS IS DANGEROUS - WILL ERASE DISK - PRESS ENTER
read -r
cd /root/
./DEPLOY-SYSTEM

pack it back uppack it back up

# todo - with xz also
time find . -print | cpio -o -H newc | gzip -9 > ../slackstart.img

and eventually add a PXE entry for it

vi /tftpboot/pxelinux.cfg/default 

label slackware150 slackstart serial
    kernel slackware150/kernels/huge.s/bzImage
    append initrd=slackstart/slackstart.img mitigations=off console=ttyS0
    #vga=791

ready to goready 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).

clean-upclean-up

cd /tftpboot/slackstart/

this one eventually remains

ls -lkF slackstart.img

this one is finished

rm -rf lala/

resourcesresources

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
Licensed under MIT