User Tools

Site Tools


tech:linux:slackware:start

Technical Information: Slackware Topics

Zenteknix Standard Installation

  • Plan out host name and IP address, configure DHCP server if relevant
  • Install from DVD, choosing generic kernel (omitting “huge” kernel) - here is what packages I prefer to de-select (not install)
  • Create initrd, using command generated by:
    chroot /mnt /usr/share/mkinitrd/mkinitrd_command_generator.sh

    … a fairly commonly-generated command:

    chroot /mnt mkinitrd -c -k 3.10.17 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
  • Edit /mnt/etc/lilo.conf to add initrd line, with a KVM-based VM using virtio, add:
    disk = /dev/vda
    bios = 0x80
    max-partitions = 7
  • Install lilo:
    chroot /mnt lilo
  • Make sure there's an /sbin/initscript for new system:
    cp /mnt/sbin/initscript.sample /mnt/sbin/initscript
  • Populate a ulimit setting for file descriptors:
    ulimit -Hn 32768
  • Make sure there's a link in /etc:
    ln -s /sbin/initscript /mnt/etc/initscript

… at this point, system can be booted, or some pre-emptive changes can be made:

  • Add $HOME/bin to PATH in /etc/profile
  • Change root shell to ksh: vi /mnt/etc/passwd
  • Make sure the wheel group is set up for sudo access: vi /mnt/etc/sudoers

… Now, log in as root and:

  • Correct and populate /etc/hosts
  • Change root shell to ksh (if desired and not already done) with: chsh -s /bin/ksh root
  • Edit /etc/group to make sure user(s) are in groups as desired (especially the wheel group)
  • Add user(s)
  • Edit /etc/sudoers to make sure the wheel group is set up for access
  • Change PermitRootLogin to no in /etc/ssh/sshd_config, then restart sshd with /etc/rc.d/rc.sshd restart
  • Populate the newterm script and accompanying symbolic links into /usr/local/bin
  • Remove undesired packages
    • ConsoleKit
  • Add routing (if applicable) to /etc/rc.d/rc.inet2 for other subnets:
    # Add routing for WAN network on physical host
    route add -host 24.159.210.154 eth0
    route add -net 24.159.210.152 netmask 255.255.255.248 gw 24.159.210.154 eth0
  • Configure NTP in /etc/ntp.conf and enable at startup with chmod 744 /etc/rc.d/rc.ntpd
    • server <ntpserveripaddr> iburst
    • restrict default ignore
    • restrict <ntpserveripaddr> mask 255.255.255.255 nomodify notrap noquery

Trivia

Allow your login to reboot/shutdown from XFCE

Put your login in the wheel group, and in /etc/polkit-1/rules.d/50-default.rules:

polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

Python ''setuptools'' installation

See official documentation ...

  • Retrieve the get-pip.py script from the official documentation site
  • Run python get-pip.py, which will install pip as well as pysetuptools




Zenteknix "FreeSlack Live" Modifications

After installing slackware, and sanitizing it to FreeSlack, these steps can be used to convert the installation to an operationally “live” variant, which minimizes changes to disk during routine operation.

Migrate the ''/var'' footprint to a "live"-capable arrangement

  • Create directory to house the memory-resident “live” portion of the /var footprint
    mkdir /var/live
  • Initialize the “live” area:
    mount -t tmpfs tmpfs /var/live -o nodev,uid=0,gid=0,size=100m
  • Migrate these /var subdirectories to under the live portion, one at a time, with:
    cd /var ; mv subdirname live ; ln -s live/subdirname
    Including: cache, lib, lock, log, run, spool, state, tmp
  • Initialize the storage “layers” from the current “live” footprint
    • The static layer: rsync -ai /var/live /var/static
    • The peristent layer: rsync -ai /var/live/ /opt/sys/var
  • Prune the respective storage layers to accommodate desired layering (Note: see next section)

Design and Prune the Storage Layers

  • The /usr/share/mime directory is re-built at every boot, so migrating that into the “live” footprint makes sense:
    mkdir -p /var/static/usr /var/live/usr/share
    chmod 755 /var/static/usr /var/live/usr /var/live/usr/share
    cd /usr/share
    mv mime /var/live/usr/share
    ln -s /var/live/usr/share/mime
    rsync -ai /var/live/usr/ /var/static/usr/
  • The rationale behind the various things residing under the /var footprint can be a bit diverse, and there are some of these things that benefit from some persistence across a reboot. To accommodate this (as well as minimize in-memory space occupied by the “live” footprint), one can migrate selected subdirectories from the directory tree under /var/live, in a rather “surgical” fashion, to a location designated as the “persistent storage layer” (I chose /opt/sys/var), and populate the /var/live tree with the symbolic links to the respective locations. In doing this with a stock slackware installation, I start out with these links:
    /var/live/log/setup               -> /opt/sys/var/log/setup
    /var/live/log/scripts             -> /opt/sys/var/log/scripts
    /var/live/log/removed_scripts     -> /opt/sys/var/log/removed_scripts
    /var/live/log/removed_packages    -> /opt/sys/var/log/removed_packages
    /var/live/log/packages            -> /opt/sys/var/log/packages
    /var/live/lib/virtuoso            -> /opt/sys/var/lib/virtuoso
    /var/live/lib/rpm                 -> /opt/sys/var/lib/rpm
    /var/live/cache/ldconfig          -> /opt/sys/var/cache/ldconfig
    /var/live/cache/fontconfig        -> /opt/sys/var/cache/fontconfig
  • After migrating subdirectories and populating the respective links under /var/live, synchronizing to /var/static should be performed. This can either be done manually by repeating the process under /var/static, or it can be scripted, or (if no other undesired changes have occurred under /var/live):
    rsync -ai /var/live/ /var/static/

Adapt the startup scripts to engage the "live" footprint

  • Add to /etc/rc.d/rc.S before loading loop device kernel module:
    # Mount the live filesystem
    if [ -d /var/live/log ]; then
    	/sbin/mount -v -n -t tmpfs tmpfs /var/live -o nodev,uid=0,gid=0,size=100m
    	/sbin/mount -v -n -t tmpfs tmpfs /tmp -o nodev,uid=0,gid=0,size=256m
    fi
  • Add to /etc/rc.d/rc.S before Configure ISA Plug-n-Play devices:
    # Add /var/live to /etc/mtab, and sync from static:
    /sbin/mount -f tmpfs /tmp -t tmpfs
    /sbin/mount -f tmpfs /var/live -t tmpfs
    /usr/bin/rsync -ai /var/static/ /var/live/

Packages needed for guitarix on slackware/FreeSlack

  • celt-0.11.3-x86_64-1_SBo.tgz
  • libwebp-0.4.3-x86_64-2_SBo.tgz
  • pysetuptools-18.2-x86_64-1_SBo.tgz
  • spice-protocol-0.12.11-noarch-1_SBo.tgz
  • celt051-0.5.1.3-x86_64-1_SBo.tgz
  • lilv-0.22.0-x86_64-1_SBo.tgz
  • serd-0.22.0-x86_64-1_SBo.tgz
  • sratom-0.4.6-x86_64-1_SBo.tgz
  • guitarix-0.34.0-x86_64-1_SBo.tgz
  • lv2-1.12.0-x86_64-1_SBo.tgz
  • set_rlimits-1.3.0-x86_64-1_SBo.tgz
  • tunctl-1.5-x86_64-2_SBo.tgz
  • jack2-1.9.10-x86_64-1_SBo.tgz
  • numpy-1.9.1-x86_64-1_SBo.tgz
  • six-1.10.0-x86_64-1_SBo.tgz
  • usbredir-0.7-x86_64-1_SBo.tgz
  • ladspa_sdk-1.13-x86_64-4_SBo.tgz
  • opus-1.1.2-x86_64-1_SBo.tgz
  • sord-0.14.0-x86_64-1_SBo.tgz
  • webkitgtk-2.4.11-x86_64-1_SBo.tgz
  • liblrdf-0.5.0-x86_64-1_SBo.tgz
  • pyparsing-2.0.3-x86_64-1_SBo.tgz
  • spice-0.12.7-x86_64-1_SBo.tgz


Links: Linux InfoTech Info

tech/linux/slackware/start.txt · Last modified: 2018/01/11 13:01 by rk4n3