Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

slackinst - automated slackware installation script
 
http://pbraun.nethence.com/doc/sysutils_linux/slackware.html
http://pbraun.nethence.com/doc/sysutils_linux/slackware_pkgsrc.html
http://pbraun.nethence.com/doc/sysutils_linux/slackware_slackinst.html
(FR) http://pbraun.nethence.com/doc/sysutils_linux/slackware_dedibox.html
 
 
Introduction
The purpose of this guide is to automate the installation of Slackware Linux (instead of using 'setup'). If you want to get a fully unattended Slackware installation, you may combine this with a PXE configuration.
 
 
Prerequesties
Boot with some Live CD or USB stick and make sure you've got those available,
which wget
which pdksh
which lftp
which xz
Note. pdksh or KSH93 (KSH88 untested)
Note. XZ Utils -- either search for package 'xz-utils' or download it from http://tukaani.org/xz/
Note. and preferably with sshd running, make it comfortable...
 
 
Preparation
Prepare the filesystems,
#swapon -s | grep sda
#mount | grep sda
mkfs.ext4 /dev/sda1
mkswap /dev/sda2
mount /dev/sda1 /mnt
 
Get the slackinst script into destination's root dir,
cd /mnt/
wget http://pbraun.nethence.com/code/sysutils/slack/slackinst.ksh
wget http://pbraun.nethence.com/code/sysutils/slack/fstab
wget http://pbraun.nethence.com/code/sysutils/slack/lilo.conf
#wget http://pbraun.nethence.com/code/sysutils/slack/lilo.conf.773
chmod +x slackinst.ksh
adpat those to your needs,
vi lilo.conf
vi fstab
 
 
Configuration
Configure the script,
cd /mnt/
vi slackinst.ksh
change,
repo=
keymap=
timezone=
clearrootpasswd=
fqdn=
ip=
mask=
gw=
dns=
dns2=
 
 
Stage 1 -- prepare the chroot
Prepare a very minimalistic system,
cd /mnt/
./slackinst.ksh prep
Note. if something went wrong, you can clean-up everything and rerun stage 1,
#./slackinst.ksh clean
#./slackinst.ksh prep
 
 
Stage 2 -- continue into the chroot
Enter chroot,
  cd /mnt/
chroot .
and make it a decent system,
./slackinst.ksh chroot
 
Note. eventually mount /proc/ (optional),
#mkdir -p proc/
#mount -t proc none proc/
 
Note. eventually mount /dev/ for devs (optional),
#mkdir -p dev/
#mount -o bind /dev dev/
 
When finished, exit chroot, umount everything and reboot,,
exit
cd /
sync
umount /mnt/
shutdown -r now
Note. if using some LiveCD or some rescue system, don't forget to switch it off for a proper reboot.
 
You now have a running Slackware Linux distribution. Connect to it through SSH.
 
 
Stage 3
Fix the temporary root password we used for installation,
passwd root
 
The system is very decent but still minimalistic. You'll probably want to install additional packages and/or sets. Here are some scripts for that,
alias ll='ls -alkF'
mkdir -p ~/bin/
cd ~/bin/
wget http://pbraun.nethence.com/code/sysutils/slack/searchpkg.ksh
wget http://pbraun.nethence.com/code/sysutils/slack/installpkg.ksh
wget http://pbraun.nethence.com/code/sysutils/slack/installset.ksh
chmod +x searchpkg.ksh installpkg.ksh installset.ksh
 
To use them you need a copy of slackware sets dir into /z_pkgs (a, ap, n are already downloaded by the script),
cd /z_pkgs/
lftp ftp://ftp.slackware.at/slackware64-13.1/slackware64
#lftp ftp://ftp.slackware.at/slackware-13.1/slackware64
mirror d
mirror l
mirror t
mirror x
exit
 
Mandatory (ADD tags) packages are already installed from the A, AP and N sets from the slackinst installation script. Add the required ones (REC tags). Same for D, L and T sets (ADD + REC tags).
cd ~/
PATH=$PATH:$HOME/bin
installset.ksh a ap n
installset.ksh d l t
 
Look for glibc packages and make sure l/glibc is installed,
ls /var/log/packages/ | grep glibc
 
 
References
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:pxe
http://www.mutagenix.org/pxe_kickstart/index.php
http://wiki.slicehost.com/doku.php?id=install_slackware_on_your_slice
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6
 

(obsolete, see the new doc)