| Size: 22144 Comment:  | Size: 30007 Comment:  | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 1: | Line 1: | 
| <<TableOfContents(2)>> | |
| Line 16: | Line 18: | 
| * cd /tmp * mkdir gitVagrant * cd gitVagrant * git clone https://github.com/mitchellh/vagrant.git * cd vagrant * git pull origin master #get latest version * #git reset a40522f5fabccb9ddabad03d836e120ff5d14093 --hard # reset to v1.3.5 * git reset 7ec0ee1d00a916f80b109a298bab08e391945243 --hard #reset to v1.2.7 * gem install bundle #it may not be installed * bundle install * rake install * gem list * gem uninstall vagrant #uninstall other old gems * vagrant -v #check vagrant version | {{{#!highlight sh cd /tmp mkdir gitVagrant cd gitVagrant git clone https://github.com/mitchellh/vagrant.git cd vagrant git pull origin master #get latest version #git reset a40522f5fabccb9ddabad03d836e120ff5d14093 --hard # reset to v1.3.5 git reset 7ec0ee1d00a916f80b109a298bab08e391945243 --hard #reset to v1.2.7 gem install bundle #it may not be installed bundle install rake install gem list gem uninstall vagrant #uninstall other old gems vagrant -v #check vagrant version }}} | 
| Line 37: | Line 41: | 
| * cd <place where the downloaded virtualbox installer is> * chmod 755 VirtualBox-4.2.8-83876-Linux_x86.run * ./VirtualBox-4.2.8-83876-Linux_x86.run * usermod -a -G vboxusers <username> * id <username> #check user groups | {{{#!highlight sh cd <place where the downloaded virtualbox installer is> chmod 755 VirtualBox-4.2.8-83876-Linux_x86.run ./VirtualBox-4.2.8-83876-Linux_x86.run usermod -a -G vboxusers <username> id <username> #check user groups }}} | 
| Line 44: | Line 50: | 
| * virtualbox --help # check the version and parameters * virtualbox #start virtualbox | {{{#!highlight sh virtualbox --help # check the version and parameters virtualbox #start virtualbox }}} | 
| Line 51: | Line 59: | 
| * mkdir -p /tmp/vgbox * cd /tmp/vgbox * wget http://files.vagrantup.com/lucid32.box #Ubuntu 10.04 LTS * vagrant box add UbuntuLucid32 lucid32.box * vagrant init UbuntuLucid32 * vagrant up * vagrant ssh #access the VM through SSH * ping www.sapo.pt #inside VM ... does not reply * exit * vagrant suspend | {{{#!highlight sh mkdir -p /tmp/vgbox cd /tmp/vgbox wget http://files.vagrantup.com/lucid32.box #Ubuntu 10.04 LTS (big file with the whole VM) vagrant box add UbuntuLucid32 lucid32.box # associate the VM file with an alias vagrant init UbuntuLucid32 vagrant up vagrant ssh #access the VM through SSH ping www.sapo.pt #inside VM ... does not reply exit vagrant suspend }}} | 
| Line 63: | Line 73: | 
| * VBoxManage list vms * VBoxManage modifyvm "vgbox_1372194938" --natdnsproxy1 on * VBoxManage modifyvm "vgbox_1372194938" --natdnshostresolver1 on * vagrant resume * vagrant ssh * ping www.sapo.pt # OK ! it gets ping replies * dpkg -l | more # show all installed packages | {{{#!highlight sh VBoxManage list vms VBoxManage modifyvm "vgbox_1372194938" --natdnsproxy1 on VBoxManage modifyvm "vgbox_1372194938" --natdnshostresolver1 on vagrant resume vagrant ssh ping www.sapo.pt # OK ! it gets ping replies dpkg -l | more # show all installed packages }}} | 
| Line 87: | Line 99: | 
| * mkdir -p ~/Downloads/vagrantBoxes/ * cd ~/Downloads/vagrantBoxes/ * wget http://files.vagrantup.com/precise32.box #Ubuntu 12.04 LTS * mkdir -p /tmp/precise32 * cd /tmp/precise32 * vagrant box add UbuntuPrecise32 ~/Downloads/vagrantBoxes/precise32.box * vagrant init UbuntuPrecise32 * vagrant up * vagrant ssh #access the VM through SSH * ping www.sapo.pt * exit * vagrant suspend | {{{#!highlight sh mkdir -p ~/Downloads/vagrantBoxes/ cd ~/Downloads/vagrantBoxes/ wget http://files.vagrantup.com/precise32.box #Ubuntu 12.04 LTS mkdir -p /tmp/precise32 cd /tmp/precise32 vagrant box add UbuntuPrecise32 ~/Downloads/vagrantBoxes/precise32.box vagrant init UbuntuPrecise32 vagrant up vagrant ssh #access the VM through SSH ping www.sapo.pt exit vagrant suspend }}} | 
| Line 110: | Line 123: | 
| * /dev/ttyUSB0 * 460800 * connect 'chat -v -f /etc/ppp/chat/tmnpub' * defaultroute * usepeerdns | {{{#!highlight sh /dev/ttyUSB0 460800 connect 'chat -v -f /etc/ppp/chat/tmnpub' defaultroute usepeerdns }}} | 
| Line 117: | Line 132: | 
| * ABORT 'BUSY' * ABORT 'NO CARRIER' * ABORT 'ERROR' * ABORT 'SIM PIN' * ABORT 'SIM PUK' * '' AT * OK AT+CGDCONT=1,"IP","internet" * OK AT+CPIN? * READY ATDT*99# * CONNECT | {{{#!highlight sh ABORT 'BUSY' ABORT 'NO CARRIER' ABORT 'ERROR' ABORT 'SIM PIN' ABORT 'SIM PUK' '' AT OK AT+CGDCONT=1,"IP","internet" OK AT+CPIN? READY ATDT*99# CONNECT }}} | 
| Line 139: | Line 156: | 
| {{{#!highlight sh | |
| Line 140: | Line 158: | 
| }}} | |
| Line 144: | Line 163: | 
| * echo 1 > /proc/sys/net/ipv4/ip_forward | {{{#!highlight sh echo 1 > /proc/sys/net/ipv4/ip_forward }}} | 
| Line 147: | Line 168: | 
| * iptables -F * iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE | {{{#!highlight sh iptables -F iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE }}} | 
| Line 151: | Line 174: | 
| * iptables -L -t nat -v * iptables -L -t filter -v {{{#!highligth bash | {{{#!highlight sh iptables -L -t nat -v iptables -L -t filter -v }}} {{{#!highligth sh | 
| Line 167: | Line 192: | 
| * route -n | {{{#!highlight sh route -n }}} | 
| Line 171: | Line 198: | 
| * route del -net 0.0.0.0 gw 192.168.1.1 | {{{#!highlight sh route del -net 0.0.0.0 gw 192.168.1.1 }}} | 
| Line 176: | Line 205: | 
| * route add default gw 192.168.1.123 * route -n | {{{#!highlight sh route add default gw 192.168.1.123 route -n }}} | 
| Line 180: | Line 211: | 
| * Gateway: 192.168.1.123 * Netmask: 0.0.0.0 * Destination: 0.0.0.0 * Iface: eth0 | {{{#!highlight sh Gateway: 192.168.1.123 Netmask: 0.0.0.0 Destination: 0.0.0.0 Iface: eth0 }}} | 
| Line 189: | Line 222: | 
| * route print * route delete 0.0.0.0 * route add 0.0.0.0 192.168.1.123 | {{{#!highlight sh route print route delete 0.0.0.0 route add 0.0.0.0 192.168.1.123 }}} | 
| Line 196: | Line 231: | 
| {{{ | {{{#!highlight sh | 
| Line 218: | Line 253: | 
| $VBoxManage convertfromraw -format VDI usbboot.img usbboot.vdi | {{{#!highlight sh VBoxManage convertfromraw -format VDI usbboot.img usbboot.vdi }}} | 
| Line 221: | Line 258: | 
| * /usr/share/mkinitrd/mkinitrd_command_generator.sh * mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sda5 -m usbhid:ehci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz | {{{#!highlight sh /usr/share/mkinitrd/mkinitrd_command_generator.sh mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sda5 -m usbhid:ehci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz }}} | 
| Line 225: | Line 264: | 
| {{{ | {{{#!highlight sh | 
| Line 232: | Line 271: | 
| * lilo -v | {{{#!highlight sh lilo -v }}} | 
| Line 238: | Line 280: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 265: | Line 307: | 
| * chmod 755 /etc/init.d/blah | {{{#!highlight sh chmod 755 /etc/init.d/blah }}} | 
| Line 268: | Line 312: | 
| * ln -s /etc/init.d/blah /etc/rc2.d/S99blah * ln -s /etc/init.d/blah /etc/rc2.d/K10blah * ln -s /etc/init.d/blah /etc/rc3.d/S99blah * ln -s /etc/init.d/blah /etc/rc3.d/K10blah * ln -s /etc/init.d/blah /etc/rc4.d/S99blah * ln -s /etc/init.d/blah /etc/rc4.d/K10blah * ln -s /etc/init.d/blah /etc/rc5.d/S99blah * ln -s /etc/init.d/blah /etc/rc5.d/K10blah | {{{#!highlight sh ln -s /etc/init.d/blah /etc/rc2.d/S99blah ln -s /etc/init.d/blah /etc/rc2.d/K10blah ln -s /etc/init.d/blah /etc/rc3.d/S99blah ln -s /etc/init.d/blah /etc/rc3.d/K10blah ln -s /etc/init.d/blah /etc/rc4.d/S99blah ln -s /etc/init.d/blah /etc/rc4.d/K10blah ln -s /etc/init.d/blah /etc/rc5.d/S99blah ln -s /etc/init.d/blah /etc/rc5.d/K10blah }}} | 
| Line 278: | Line 324: | 
| * ls /etc/rc*.d | {{{#!highlight sh ls /etc/rc*.d }}} | 
| Line 283: | Line 331: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 320: | Line 368: | 
| * chmod 755 /etc/init.d/blah | {{{#!highlight sh chmod 755 /etc/init.d/blah }}} | 
| Line 323: | Line 373: | 
| * ln -s /etc/init.d/blah /etc/rc2.d/S99blah * ln -s /etc/init.d/blah /etc/rc2.d/K10blah * ln -s /etc/init.d/blah /etc/rc3.d/S99blah * ln -s /etc/init.d/blah /etc/rc3.d/K10blah * ln -s /etc/init.d/blah /etc/rc4.d/S99blah * ln -s /etc/init.d/blah /etc/rc4.d/K10blah * ln -s /etc/init.d/blah /etc/rc5.d/S99blah * ln -s /etc/init.d/blah /etc/rc5.d/K10blah | {{{#!highlight sh ln -s /etc/init.d/blah /etc/rc2.d/S99blah ln -s /etc/init.d/blah /etc/rc2.d/K10blah ln -s /etc/init.d/blah /etc/rc3.d/S99blah ln -s /etc/init.d/blah /etc/rc3.d/K10blah ln -s /etc/init.d/blah /etc/rc4.d/S99blah ln -s /etc/init.d/blah /etc/rc4.d/K10blah ln -s /etc/init.d/blah /etc/rc5.d/S99blah ln -s /etc/init.d/blah /etc/rc5.d/K10blah }}} | 
| Line 333: | Line 385: | 
| * ls /etc/rc*.d | {{{#!highlight sh ls /etc/rc*.d }}} | 
| Line 368: | Line 422: | 
| * cd ~/Downloads/slack14i386patches * wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/PACKAGES.TXT * cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/packages/{}.txz | {{{#!highlight sh cd ~/Downloads/slack14i386patches wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/PACKAGES.TXT cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/packages/{}.txz }}} | 
| Line 374: | Line 429: | 
| {{{#!highlight sh | |
| Line 375: | Line 431: | 
| }}} | |
| Line 426: | Line 483: | 
| * wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.0/patches/packages/bash-4.2.048-x86_64-2_slack14.0.txz * upgradepkg bash-4.2.048-x86_64-2_slack14.0.txz | {{{#!highlight sh wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.0/patches/packages/bash-4.2.048-x86_64-2_slack14.0.txz upgradepkg bash-4.2.048-x86_64-2_slack14.0.txz }}} | 
| Line 430: | Line 489: | 
| * ctrl+alt+f1 * mount /dev/cdrom /mnt/cdrom * cd /mnt/cdrom * cp slackware /root/ -r * cd /root * telninit 1 * login as root * cd /root/slackware * upgradepkg a/glibc-solibs-*.t?z * upgradepkg a/pkgtools-*.tgz * upgradepkg a/tar-*.tgz * upgradepkg a/xz-*.tgz * upgradepkg a/findutils-*.txz * upgradepkg --install-new /root/slackware/*/*.t?z * removepkg Terminal aumix kdegames kdemultimedia ksecrets mysql printer-applet quanta rexima scim-bridge xxgdb * Check file /etc/lilo.conf to see which old kernel is used #/boot/vmlinuz-generic-smp-3.2.45-smp * /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.10.17-smp | bash * In /etc/lilo.conf use image=/boot/vmlinuz-generic-smp-3.10.17-smp * lilo -v * telinit 3 * reboot * After the reboot shows the kernel version 3.10.17 * In /etc/rc.d/rc.local add modprobe snd_mixer_oss | {{{#!highlight sh # ctrl+alt+f1 mount /dev/cdrom /mnt/cdrom cd /mnt/cdrom cp slackware /root/ -r cd /root telninit 1 # login as root cd /root/slackware upgradepkg a/glibc-solibs-*.t?z upgradepkg a/pkgtools-*.tgz upgradepkg a/tar-*.tgz upgradepkg a/xz-*.tgz upgradepkg a/findutils-*.txz upgradepkg --install-new /root/slackware/*/*.t?z removepkg Terminal aumix kdegames kdemultimedia ksecrets mysql printer-applet quanta rexima scim-bridge xxgdb # Check file /etc/lilo.conf to see which old kernel is used #/boot/vmlinuz-generic-smp-3.2.45-smp /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.10.17-smp | bash # In /etc/lilo.conf use image=/boot/vmlinuz-generic-smp-3.10.17-smp lilo -v telinit 3 reboot # After the reboot shows the kernel version 3.10.17 # In /etc/rc.d/rc.local add modprobe snd_mixer_oss }}} | 
| Line 459: | Line 520: | 
| * mkdir -p ~/Downloads/slack14_1i386patches * cd ~/Downloads/slack14_1i386patches * wget ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/PACKAGES.TXT | {{{#!highlight sh mkdir -p ~/Downloads/slack14_1i386patches cd ~/Downloads/slack14_1i386patches wget ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/PACKAGES.TXT | 
| Line 463: | Line 525: | 
| * cd /tmp/packages * mv * ~/Downloads/slack14_1i386patches | cd /tmp/packages mv * ~/Downloads/slack14_1i386patches }}} | 
| Line 469: | Line 531: | 
| * wget http://ftp.slackware.com/pub/slackware-iso/slackware-14.2-iso/slackware-14.2-install-dvd.iso * modprobe sg # fpr cdrecord * cdrecord -scanbus #identify the device DVDRAM LG GP08NU6B * cdrecord -dev=6,0,0 -pad -data slackware-14.2-install-dvd.iso * # eject the DVD after burning * cd / * mount /dev/sr0 /mnt/cdrom #check DVD * cd /mnt/cdrom * ls * cd / * umount /mnt/cdrom | {{{#!highlight sh wget http://ftp.slackware.com/pub/slackware-iso/slackware-14.2-iso/slackware-14.2-install-dvd.iso modprobe sg # fpr cdrecord cdrecord -scanbus #identify the device DVDRAM LG GP08NU6B cdrecord -dev=6,0,0 -pad -data slackware-14.2-install-dvd.iso # eject the DVD after burning cd / mount /dev/sr0 /mnt/cdrom #check DVD cd /mnt/cdrom ls cd / umount /mnt/cdrom }}} | 
| Line 481: | Line 546: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 545: | Line 610: | 
| * cd /tmp * wget https://slackbuilds.org/slackbuilds/14.2/development/ninja.tar.gz * tar xvzf ninja.tar.gz * cd ninja * wget https://github.com/ninja-build/ninja/archive/v1.7.1.tar.gz * ./ninja.SlackBuild * installpkg /tmp/ninja-1.7.1-i486-1_SBo.tgz * cd .. * wget https://slackbuilds.org/slackbuilds/14.2/network/chromium.tar.gz * tar xvzf chromium.tar.gz * cd chromium * wget https://commondatastorage.googleapis.com/chromium-browser-official/chromium-48.0.2564.97.tar.xz #about 413MB * ./chromium.SlackBuild | {{{#!highlight sh cd /tmp wget https://slackbuilds.org/slackbuilds/14.2/development/ninja.tar.gz tar xvzf ninja.tar.gz cd ninja wget https://github.com/ninja-build/ninja/archive/v1.7.1.tar.gz ./ninja.SlackBuild installpkg /tmp/ninja-1.7.1-i486-1_SBo.tgz cd .. wget https://slackbuilds.org/slackbuilds/14.2/network/chromium.tar.gz tar xvzf chromium.tar.gz cd chromium wget https://commondatastorage.googleapis.com/chromium-browser-official/chromium-48.0.2564.97.tar.xz #about 413MB ./chromium.SlackBuild }}} | 
| Line 560: | Line 627: | 
| * wget http://download.virtualbox.org/virtualbox/5.1.4/VirtualBox-5.1.4-110228-Linux_x86.run | {{{#!highlight sh wget http://download.virtualbox.org/virtualbox/5.1.4/VirtualBox-5.1.4-110228-Linux_x86.run }}} | 
| Line 562: | Line 632: | 
| * cd <place where the downloaded virtualbox installer is> * chmod 755 VirtualBox-5.1.4-110228-Linux_x86.run * ./VirtualBox-5.1.4-110228-Linux_x86.run * usermod -a -G vboxusers <username> * id <username> #check user groups | {{{#!highlight sh cd <place where the downloaded virtualbox installer is> chmod 755 VirtualBox-5.1.4-110228-Linux_x86.run ./VirtualBox-5.1.4-110228-Linux_x86.run usermod -a -G vboxusers <username> id <username> #check user groups }}} | 
| Line 569: | Line 641: | 
| * virtualbox --help # check the version and parameters * virtualbox #start virtualbox | {{{#!highlight sh virtualbox --help # check the version and parameters virtualbox #start virtualbox }}} | 
| Line 574: | Line 648: | 
| /etc/rc.d/rc.beat #chmod 755 rc.beat | === /etc/rc.d/rc.beat === #chmod 755 rc.beat | 
| Line 609: | Line 684: | 
| /tmp/beat.py | === /tmp/beat.py === | 
| Line 640: | Line 715: | 
| * cd /tmp * wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-sipe.tar.gz * tar xvzf pidgin-sipe.tar.gz * cd pidgin-sipe * wget http://downloads.sourceforge.net/sipe/pidgin-sipe-1.21.1.tar.xz * ./pidgin-sipe.SlackBuild * installpkg /tmp/pidgin-sipe-1.21.1-i586-1_SBo.tgz | {{{#!highlight sh cd /tmp wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-sipe.tar.gz tar xvzf pidgin-sipe.tar.gz cd pidgin-sipe wget http://downloads.sourceforge.net/sipe/pidgin-sipe-1.21.1.tar.xz ./pidgin-sipe.SlackBuild installpkg /tmp/pidgin-sipe-1.21.1-i586-1_SBo.tgz }}} | 
| Line 651: | Line 728: | 
| * cd /tmp * wget https://slackbuilds.org/slackbuilds/14.2/libraries/json-glib.tar.gz * tar xvzf json-glib.tar.gz * cd json-glib * wget http://ftp.acc.umu.se/pub/GNOME/sources/json-glib/1.0/json-glib-1.0.4.tar.xz * ./json-glib.SlackBuild * installpkg /tmp/json-glib-1.0.4-i486-1_SBo.tgz * cd /tmp * wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-skypeweb.tar.gz * tar xvzf pidgin-skypeweb.tar.gz * cd pidgin-skypeweb * wget https://github.com/EionRobb/skype4pidgin/archive/1.1.tar.gz * ./pidgin-skypeweb.SlackBuild * installpkg /tmp/pidgin-skypeweb-1.1-i486-1_SBo.tgz | {{{#!highlight sh cd /tmp wget https://slackbuilds.org/slackbuilds/14.2/libraries/json-glib.tar.gz tar xvzf json-glib.tar.gz cd json-glib wget http://ftp.acc.umu.se/pub/GNOME/sources/json-glib/1.0/json-glib-1.0.4.tar.xz ./json-glib.SlackBuild installpkg /tmp/json-glib-1.0.4-i486-1_SBo.tgz cd /tmp wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-skypeweb.tar.gz tar xvzf pidgin-skypeweb.tar.gz cd pidgin-skypeweb wget https://github.com/EionRobb/skype4pidgin/archive/1.1.tar.gz ./pidgin-skypeweb.SlackBuild installpkg /tmp/pidgin-skypeweb-1.1-i486-1_SBo.tgz }}} | 
| Line 675: | Line 754: | 
| * URL_PATCHES=ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches * mkdir -p ~/Downloads/slack14_2i386patches * cd ~/Downloads/slack14_2i386patches * wget $URL_PATCHES/PACKAGES.TXT * head PACKAGES.TXT * cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/outpatches.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/outpatches.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | sed "s/'//g" | xargs -i wget $URL_PATCHES/packages/{}.txz * cd /tmp/packages * mv * ~/Downloads/slack14_2i386patches * ls *.txz | xargs -i upgradepkg {} | {{{#!highlight sh URL_PATCHES=ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches mkdir -p ~/Downloads/slack14_2i386patches cd ~/Downloads/slack14_2i386patches rm PACKAGES.TXT wget $URL_PATCHES/PACKAGES.TXT head PACKAGES.TXT rm /tmp/packages/* cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/outpatches.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/outpatches.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | sed "s/'//g" | xargs -i wget $URL_PATCHES/packages/{}.txz cd /tmp/packages su # run as root the upgradepkg # ls *.txz | xargs -i upgradepkg {} find /tmp/packages/*txz | xargs -i upgradepkg {} exit # return to normal user mv * ~/Downloads/slack14_2i386patches }}} == Update kernel (4.4.14 to 4.4.172) == {{{#!highlight sh function get_packages { cd /tmp/packages wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-firmware-20190118_a8b75ca-noarch-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-generic-4.4.172-i586-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-generic-smp-4.4.172_smp-i686-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-headers-4.4.172_smp-x86-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-huge-4.4.172-i586-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-huge-smp-4.4.172_smp-i686-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-modules-4.4.172-i586-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-modules-smp-4.4.172_smp-i686-1.txz wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-source-4.4.172_smp-noarch-1.txz } function update { cp /etc/lilo.conf /etc/lilo.conf.old20190222 ls /boot cd /tmp/packages upgradepkg kernel-*.txz # uname -a says that it has a SMP kernel /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.172-smp | bash ls /boot cat /etc/lilo.conf | grep image echo "Check content, image should have kernel 4.4.172" read echo "Going to execute lilo" lilo mv *.txz /home/user/Downloads/slack14_2i386patches } #get_packages update }}} == /etc/dhclient.conf == {{{#!highlight sh # dhclient.conf # # Configuration file for ISC dhclient (see 'man dhclient.conf') # send host-name = "hostx" }}} == Toshiba NB200 and Samsung Monitor == Set nb200 monitor (LVDS1) on the left and Samsung on the right (VGA1) {{{#!highlight sh /usr/bin/xrandr --output LVDS1 --left-of VGA1 }}} == Slackware 15.0 == * http://www.slackware.com/announce/15.0.php (2022-02-02) * http://ftp.slackware.com/pub/slackware/slackware64-15.0/UPGRADE.TXT * http://ftp.slackware.com/pub/slackware/slackware-15.0/UPGRADE.TXT The links above are for the Slackware file tree. If you already have Slackware 14.2 installed, you can use these files and follow the instructions in the UPGRADE.TXT document to upgrade your system to Slackware 15.0. == Update kernel to 4.4.301 == * update_kernel_4_4_301.sh {{{#!highlight bash BASE_URL=http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.301/ function get_packages { cd /tmp/packages wget $BASE_URL/kernel-generic-4.4.301-i586-1.txz wget $BASE_URL/kernel-generic-smp-4.4.301_smp-i686-1.txz wget $BASE_URL/kernel-headers-4.4.301_smp-x86-1.txz wget $BASE_URL/kernel-huge-4.4.301-i586-1.txz wget $BASE_URL/kernel-huge-smp-4.4.301_smp-i686-1.txz wget $BASE_URL/kernel-modules-4.4.301-i586-1.txz wget $BASE_URL/kernel-modules-smp-4.4.301_smp-i686-1.txz wget $BASE_URL/kernel-source-4.4.301_smp-noarch-1.txz } function update { cp /etc/lilo.conf /etc/lilo.conf.old20220213 ls /boot cd /tmp/packages upgradepkg kernel-*.txz # uname -a says that it has a SMP kernel /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.301-smp | bash ls /boot cat /etc/lilo.conf | grep image echo "Check content, image should have kernel 4.4.301" read echo "Going to execute lilo" lilo mv *.txz /home/vitor/Downloads/slack14_2i386patches } # get_packages # update }}} == Slackware docker image == * https://hub.docker.com/r/liveslak/slackware * https://slackonly.com/readme.html * http://slakfinder.org/slackpkg+.html {{{#!highlight sh docker run --rm -d -it --name slack15 liveslak/slackware cat docker exec -it slack15 bash # https://slackpkg.org/documentation.html slackpkg update slackpkg search python slackpkg install python3 nano python-pip # python3-3.9.16-x86_64-1_slack15.0.txz python3 -V cd /tmp/ wget https://slackbuilds.org/slackbuilds/15.0/development/amazon-corretto.tar.gz tar xvzf amazon-corretto.tar.gz cd amazon-corretto wget https://corretto.aws/downloads/resources/17.0.4.8.1/amazon-corretto-17.0.4.8.1-linux-x64.tar.gz sh amazon-corretto.SlackBuild installpkg /tmp/amazon-corretto-17.0.4.8.1-x86_64-1_SBo.tgz /usr/lib64/java/bin/java /usr/lib64/java/bin/javac PATH=$PATH:/usr/lib64/java/bin/ echo $PATH export PATH docker stop slack15 }}} === With slackpkg+ and slackonly (builds from slackbuilds) === {{{#!highlight sh docker run --rm -d -it --name slack15 liveslak/slackware cat docker exec -it slack15 bash wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.8.0-noarch-7mt.txz/download mv download download.txz installpkg download.txz slackpkg update gpg slackpkg update #vi /etc/slackpkg/slackpkgplus.conf #REPOPLUS=( slackpkgplus slackonly ) #MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/ sed -i 's/slackpkgplus /slackpkgplus slackonly /g' /etc/slackpkg/slackpkgplus.conf echo "MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/" >> /etc/slackpkg/slackpkgplus.conf slackpkg update gpg slackpkg update slackpkg search deb2tgz # [unin] slackonly : deb2tgz-0.2-noarch-1_slonl slackpkg search jdk17 # [unin] slackonly : zulu-openjdk17-17.0.2-x86_64-1_slonly slackpkg install zulu-openjdk17-17.0.2-x86_64-1_slonly find . -name "java" ./etc/file/magic/java ./usr/lib64/zulu-openjdk17/bin/java ./usr/lib64/zulu-openjdk17/bin/java -version # openjdk version "17.0.2" 2022-01-18 LTS ./usr/lib64/zulu-openjdk17/bin/javac -version # javac 17.0.2 }}} == Slackware docker java environment == === Dockerfile === {{{ FROM liveslak/slackware RUN wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.8.0-noarch-7mt.txz/download RUN mv download download.txz RUN installpkg download.txz RUN slackpkg update gpg RUN slackpkg update RUN sed -i 's/slackpkgplus /slackpkgplus slackonly /g' /etc/slackpkg/slackpkgplus.conf RUN echo "MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/" >> /etc/slackpkg/slackpkgplus.conf RUN slackpkg update gpg RUN slackpkg update RUN slackpkg install zulu-openjdk17-17.0.2-x86_64-1_slonly RUN slackpkg install apache-maven git-2.35 htop ENV PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/lib64/zulu-openjdk17/bin/ RUN mkdir /app WORKDIR /app COPY . . CMD ["/bin/bash"] }}} === Steps === {{{#!highlight sh docker build -t slack-openjdk-image . docker run --rm -d -it --name slack15 slack-openjdk-image docker exec -it slack15 bash # inside the container git clone https://github.com/vborrego/springboot-test.git cd springboot-test/ mvn clean install nohup java -jar target/test-spring-boot-0.1.0.jar & curl localhost:8080/dummy curl http://localhost:8080/login exit # exit the container docker stop slack15 }}} == Mount pen R/W all users == {{{#!highlight sh dmesg mount /dev/sdc1 /mnt/memory/ -o umask=000 }}} | 
Contents
- 
Slackware- Vagrant on Slackware 14 32 bit
- Slackware NAT router with Pen 3G
- Generic kernel
- USB boot in VirtualBox
- Generic on Slackware64 14.0
- System V (Sys V) init
- Sys V init for Python script
- Packages updates
- Update bash on Slackware64 14
- Upgrade from Slackware 14.0 to 14.1
- Get patches for Slackware 14.1
- Upgrade from 14.1 to 14.2
- BSD init script
- Pidgin-sipe build for Slackware 14.2
- pidgin-skype slackbuild
- Get patches for Slackware 14.2
- Update kernel (4.4.14 to 4.4.172)
- /etc/dhclient.conf
- Toshiba NB200 and Samsung Monitor
- Slackware 15.0
- Update kernel to 4.4.301
- Slackware docker image
- Slackware docker java environment
- Mount pen R/W all users
 
Slackware
The original Linux distribution, geared towards power and stability.
Vagrant on Slackware 14 32 bit
Ruby version: ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
VirtualBox version, Oracle VM VirtualBox Manager 4.2.8
Install Vagrant from source
Based on https://github.com/mitchellh/vagrant/wiki/Installing-Vagrant-from-source
As root run the following:
   1 cd /tmp
   2 mkdir gitVagrant
   3 cd gitVagrant
   4 git clone https://github.com/mitchellh/vagrant.git
   5 cd vagrant
   6 git pull origin master #get latest version
   7 #git reset a40522f5fabccb9ddabad03d836e120ff5d14093 --hard # reset to v1.3.5 
   8 git reset 7ec0ee1d00a916f80b109a298bab08e391945243 --hard #reset to v1.2.7
   9 gem install bundle #it may not be installed
  10 bundle install
  11 rake install
  12 gem list
  13 gem uninstall vagrant #uninstall other old gems
  14 vagrant -v #check vagrant version
  15 
Install VirtualBox on Slackware 14 32 bit
Get VirtualBox 4.2.8 for Linux, i386, all distributions http://download.virtualbox.org/virtualbox/4.2.8/VirtualBox-4.2.8-83876-Linux_x86.run.
For 4.2.18 http://download.virtualbox.org/virtualbox/4.2.18/VirtualBox-4.2.18-88781-Linux_x86.run
As root run the following commands:
As a normal user run the following:
Get and run a base box - Ubuntu Lucid32
In http://www.vagrantbox.es/ there is a list of available vagrant boxes.
As normal user run the following
   1 mkdir -p /tmp/vgbox
   2 cd /tmp/vgbox
   3 wget http://files.vagrantup.com/lucid32.box #Ubuntu 10.04 LTS (big file with the whole VM)
   4 vagrant box add UbuntuLucid32 lucid32.box # associate the VM file with an alias
   5 vagrant init UbuntuLucid32 
   6 vagrant up
   7 vagrant ssh #access the VM through SSH
   8 ping www.sapo.pt #inside VM ... does not reply
   9 exit
  10 vagrant suspend
Run the following as stated in http://serverfault.com/questions/453185/vagrant-virtualbox-dns-10-0-2-3-not-working:
Running cat /etc/debian_version show its based on squeeze/sid.
Running cat /etc/issue.net show it's Ubuntu 10.04.4 LTS http://releases.ubuntu.com/lucid/.
Current user and pass for the lucid32 box is vagrant vagrant. To get superuser access run sudo bash.
Inspecting the file /etc/shadow we can see that only the user vagrant has a password defined.
In /etc/sudoers it is said that all users belonging to group can gain root privileges with supplying a password.
In /etc/group it is stated that vagrant belongs to the admin group.
Ubuntu Precise32
In http://www.vagrantbox.es/ there is a list of available vagrant boxes.
As normal user run the following
   1 mkdir -p ~/Downloads/vagrantBoxes/
   2 cd ~/Downloads/vagrantBoxes/
   3 wget http://files.vagrantup.com/precise32.box #Ubuntu 12.04 LTS
   4 mkdir -p /tmp/precise32
   5 cd /tmp/precise32
   6 vagrant box add UbuntuPrecise32 ~/Downloads/vagrantBoxes/precise32.box
   7 vagrant init UbuntuPrecise32 
   8 vagrant up
   9 vagrant ssh #access the VM through SSH
  10 ping www.sapo.pt 
  11 exit
  12 vagrant suspend
Slackware NAT router with Pen 3G
Configure Slackware PC to share a 3G internet connection (TMN portuguese ISP).
Internet connection
The used APN is internet.
There is no PIN defined in the used SIM card.
Edit /etc/ppp/peers/tmnpub
Edit /etc/ppp/chat/tmnpub
To connect to the internet we must use the command:
- pppd call tmnpub
Using the command ifconfig we should see the device ppp0 in the output.
Issuing a command ping www.google.com we should get a reply with the IP address from Google.
Configure NAT (Network Address Translation) router
Translate internal network addresses (source address) to a public/usable IP address given to the 3G modem.
View the routing table:
   1  * route -n
It should appear the devices ppp0 and eth0, and based on the Destination and Netmask the destination interface.
Enable IP forwarding:
   1 echo 1 > /proc/sys/net/ipv4/ip_forward
Configure iptables to translate the address after they are forwarded to the correct interface, from eth0 to ppp0:
To view the iptables configuration run the commands:
#script #Enable IP forwarding: echo 1 > /proc/sys/net/ipv4/ip_forward #Configure iptables to translate the address after they are forwarded to the correct interface, from eth0 to ppp0: iptables -F iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Configure client computer
The routing table must be configure to use the NAT on Slackware, that will act as a router.
Check the current default gateway:
   1 route -n
The line with destination equal to 0.0.0.0 and gateway 0.0.0.0, is the default router/gateway and must be deleted. We must run a command to do that, adapted to the current situation:
   1 route del -net 0.0.0.0 gw 192.168.1.1
The previous command is to delete a route with destination 0.0.0.0 and gateway 192.168.1.1.
If the NAT router have the IP 192.168.1.123 then the following command must be sent:
After that running route -n should return a line with:
Running a ping www.google.com from the client computer should return the IP address from Google.
Running a traceroute www.google.com should show the IP address from the NAT router.
Windows
Generic kernel
The “generic” kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand.
   1 #/usr/share/mkinitrd/mkinitrd_command_generator.sh
   2 #
   3 # mkinitrd_command_generator.sh revision 1.45
   4 #
   5 # This script will now make a recommendation about the command to use
   6 # in case you require an initrd image to boot a kernel that does not
   7 # have support for your storage or root filesystem built in
   8 # (such as the Slackware 'generic' kernels').
   9 # A suitable 'mkinitrd' command will be:
  10 
  11 mkinitrd -c -k 3.2.45-smp -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:usbhid:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
  12 # Add to /etc/lilo.conf
  13 image = /boot/vmlinuz-generic-smp-3.2.45-smp
  14   initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
  15   root = /dev/sda1
  16   label = SlackwareGeneric
  17   read-only
  18 # run lilo -v
  19 
USB boot in VirtualBox
   1 VBoxManage convertfromraw -format VDI usbboot.img usbboot.vdi
Generic on Slackware64 14.0
Add to /etc/lilo.conf
   1 lilo -v
System V (Sys V) init
Slackware since 7.0 also allows Sys V inits.
Sample service /etc/init.d/blah:
   1 #! /bin/sh
   2 # /etc/init.d/blah
   3 #
   4 
   5 # Some things that run always
   6 touch /var/lock/blah
   7 
   8 # Carry out specific functions when asked to by the system
   9 case "$1" in
  10   start)
  11     echo "Starting script blah "
  12     echo "Could do more here"
  13     ;;
  14   stop)
  15     echo "Stopping script blah"
  16     echo "Could do more here"
  17     ;;
  18   *)
  19     echo "Usage: /etc/init.d/blah {start|stop}"
  20     exit 1
  21     ;;
  22 esac
  23 
  24 exit 0
Mark script as executable:
   1 chmod 755 /etc/init.d/blah
Default runlevels (2 3 4 5):
   1 ln -s /etc/init.d/blah /etc/rc2.d/S99blah
   2 ln -s /etc/init.d/blah /etc/rc2.d/K10blah
   3 ln -s /etc/init.d/blah /etc/rc3.d/S99blah
   4 ln -s /etc/init.d/blah /etc/rc3.d/K10blah
   5 ln -s /etc/init.d/blah /etc/rc4.d/S99blah
   6 ln -s /etc/init.d/blah /etc/rc4.d/K10blah
   7 ln -s /etc/init.d/blah /etc/rc5.d/S99blah
   8 ln -s /etc/init.d/blah /etc/rc5.d/K10blah
Check symbolic links:
   1 ls /etc/rc*.d
Sys V init for Python script
Sample service /etc/init.d/blah:
   1 #! /bin/sh
   2 # /etc/init.d/blah
   3 #
   4 
   5 # Some things that run always
   6 touch /var/lock/blah
   7 
   8 # Carry out specific functions when asked to by the system
   9 case "$1" in
  10   start)
  11     logger "Starting beat.py"     
  12     echo   "Starting beat.py"
  13     /usr/bin/python /tmp/beat.py &
  14     ;;
  15   status)
  16     PID=`cat /var/run/beat.pid`
  17     logger "Process running with PID $PID"
  18     echo   "Process running with PID $PID"
  19     ;;    
  20   stop)
  21     PID=`cat /var/run/beat.pid`
  22     logger "Killing process with PID $PID"
  23     echo   "Killing process with PID $PID"
  24     kill -9 $PID
  25     rm /var/run/beat.pid
  26     ;;
  27   *)
  28     echo "Usage: /etc/init.d/blah {start|status|stop}"
  29     exit 1
  30     ;;
  31 esac
  32 
  33 exit 0
Mark script as executable:
   1 chmod 755 /etc/init.d/blah
Default runlevels (2 3 4 5):
   1 ln -s /etc/init.d/blah /etc/rc2.d/S99blah
   2 ln -s /etc/init.d/blah /etc/rc2.d/K10blah
   3 ln -s /etc/init.d/blah /etc/rc3.d/S99blah
   4 ln -s /etc/init.d/blah /etc/rc3.d/K10blah
   5 ln -s /etc/init.d/blah /etc/rc4.d/S99blah
   6 ln -s /etc/init.d/blah /etc/rc4.d/K10blah
   7 ln -s /etc/init.d/blah /etc/rc5.d/S99blah
   8 ln -s /etc/init.d/blah /etc/rc5.d/K10blah
Check symbolic links:
   1 ls /etc/rc*.d
Python /tmp/beat.py code:
   1 #!/usr/bin/python
   2 import threading
   3 import time
   4 import os
   5 import syslog
   6 import datetime
   7 
   8 class Beat(threading.Thread):
   9     def __init__(self):
  10         threading.Thread.__init__(self) #required
  11 
  12     def run(self):
  13         loop=True
  14         while loop:
  15             syslog.syslog(syslog.LOG_INFO, "Beat %s"%(datetime.datetime.now()) )
  16             time.sleep(5)
  17 
  18 if __name__=="__main__":
  19     f=open('/var/run/beat.pid','wa')
  20     f.write('%d'%(os.getpid()))
  21     f.close()
  22     os.getpid()
  23     b = Beat()
  24     b.start()
Packages updates
Check patches/packages and patches/PACKAGES.TXT for the desired Slackware version. URL for Slackware 14.0 ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/
Get packages to be updated
   1 cd ~/Downloads/slack14i386patches
   2 wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/PACKAGES.TXT
   3 cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g'  | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages;  cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/packages/{}.txz
Caching only nameserver/DNS server
   1  * chmod 755 /etc/rc.d/rc.bind
- Check the configuration with named-checkconf. 
- Start the service with /etc/rc.d/rc.bind start
Edit /etc/resolv.conf
nameserver 127.0.0.1
Edit /etc/named.conf
options {
 directory "/var/named";
 forwarders { 8.8.8.8; 8.8.4.4; };
};
// a caching only nameserver config
zone "." IN {
 type hint;
 file "caching-example/named.root";
};
zone "localhost" IN {
 type master;
 file "caching-example/localhost.zone";
 allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
 type master;
 file "caching-example/named.local";
 allow-update { none; };
};
logging {
  channel my_named_channel {
  file "/tmp/named.log";
  // syslog info;
  // Set the severity to dynamic to see all the debug messages.
  severity dynamic;
  print-time yes;
  print-severity yes;
  print-category yes;
 };
 category queries {   my_named_channel; };
 category client {   my_named_channel; };
 category default { default_syslog; };
};
Update bash on Slackware64 14
Upgrade from Slackware 14.0 to 14.1
   1 # ctrl+alt+f1
   2 mount /dev/cdrom /mnt/cdrom
   3 cd /mnt/cdrom
   4 cp slackware /root/ -r
   5 cd /root
   6 telninit 1
   7 # login as root
   8 cd /root/slackware
   9 upgradepkg a/glibc-solibs-*.t?z
  10 upgradepkg a/pkgtools-*.tgz
  11 upgradepkg a/tar-*.tgz
  12 upgradepkg a/xz-*.tgz
  13 upgradepkg a/findutils-*.txz
  14 upgradepkg --install-new /root/slackware/*/*.t?z
  15 removepkg Terminal aumix kdegames kdemultimedia ksecrets mysql printer-applet quanta rexima scim-bridge xxgdb
  16 # Check file /etc/lilo.conf to see which old kernel is used #/boot/vmlinuz-generic-smp-3.2.45-smp
  17 /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.10.17-smp | bash
  18 # In /etc/lilo.conf use image=/boot/vmlinuz-generic-smp-3.10.17-smp
  19 lilo -v
  20 telinit 3
  21 reboot
  22 # After the reboot shows the kernel version 3.10.17
  23 # In /etc/rc.d/rc.local add modprobe snd_mixer_oss
  24 
Get patches for Slackware 14.1
- Check patches/packages and patches/PACKAGES.TXT for the desired Slackware version.
- URL for Slackware 14.1 ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/ 
Get packages to be updated
   1 mkdir -p ~/Downloads/slack14_1i386patches
   2 cd ~/Downloads/slack14_1i386patches
   3 wget ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/PACKAGES.TXT
   4 cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/packages/{}.txz
   5 cd /tmp/packages
   6 mv * ~/Downloads/slack14_1i386patches
Upgrade from 14.1 to 14.2
Get and burn ISO
   1 wget http://ftp.slackware.com/pub/slackware-iso/slackware-14.2-iso/slackware-14.2-install-dvd.iso
   2 modprobe sg # fpr cdrecord
   3 cdrecord -scanbus #identify the device DVDRAM LG GP08NU6B
   4 cdrecord -dev=6,0,0 -pad -data slackware-14.2-install-dvd.iso
   5 # eject the DVD after burning
   6 cd /
   7 mount /dev/sr0 /mnt/cdrom #check DVD
   8 cd /mnt/cdrom
   9 ls
  10 cd /
  11 umount /mnt/cdrom 
Upgrade script
   1 #!/bin/sh
   2 #CURRDIR=`cd`
   3 CURRDIR=`pwd`
   4 URL=http://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware-14.2
   5 PACKAGEURL=packagesUrl.txt  
   6 LOCATIONS=locations.txt
   7 
   8 # get packages
   9 function getpackages
  10 {
  11   cd /tmp
  12   mkdir -p slack14_2
  13   cd slack14_2
  14   wget $URL/UPGRADE.TXT
  15   wget $URL/slackware/PACKAGES.TXT
  16   cat PACKAGES.TXT | grep 'NAME\|LOCATION' | tr -d '\n' | sed 's/PACKAGE NAME:/\n/g' | sed 's/PACKAGE LOCATION://g' | awk '/slackware/{print $2 , "/" , $1}' | sed 's/ \/ /\//g' | sort  | sed "s/\.\/slack/http:\/\/ftp.rnl.tecnico.ulisboa.pt\/pub\/slackware\/slackware-14.2\/slack/g" > $PACKAGEURL
  17 
  18   cat PACKAGES.TXT | grep 'LOCATION' | sort | uniq | sed "s/PACKAGE LOCATION:  \.//g" > $LOCATIONS
  19   cat $PACKAGEURL  | xargs -i wget {}
  20 }
  21 
  22 # upgrade stuff
  23 function upgrade
  24 {  
  25   # must be in single user mode !!!
  26   # telinit 1
  27   cd /tmp/slack14_2
  28   echo Backup /etc
  29   tar cvzf backetc14_3.tgz /etc
  30   
  31   echo Initial install 
  32   upgradepkg glibc-solibs-*.txz
  33   upgradepkg pkgtools-*.txz
  34   upgradepkg tar-*.txz
  35   upgradepkg xz-*.txz
  36   upgradepkg findutils-*.txz
  37   
  38   echo Install other stuff
  39   upgradepkg --install-new *.t?z
  40 
  41   echo Remove old packages 
  42   removepkg ConsoleKit apmd bluez-hcidump cxxlibs foomatic-filters gnome-icon-theme imlib kdeadmin kdenetwork kdesdk kdetoys kwallet lesstif libelf libjpeg libxfcegui4 networkmanagement obex-data-server obexfs open-cobol oxygen-gtk3 phonon-mplayer phonon-xine pil portmap procps qca-cyrus-sasl qca-gnupg qca-ossl udev xchat xf86-input-aiptek  xf86-video-modesetting xfce4-mixer xfce4-volumed xfwm4-themes
  43 
  44   echo Configure kernel
  45   /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14-smp | bash
  46  
  47   echo Check lilo.conf to point to 4.4.14-smp in image=
  48   cat /etc/lilo.conf | grep image
  49   echo Run lilo
  50   lilo
  51   echo Probable error above if image does not have the kernel 4.4.14-smp
  52   telinit 3
  53   # reboot 
  54   # in case of problems to get a login in lilo after '''boot: SlackwareGen single''' to start in single user mode
  55   # /etc/rc.d/rc.modules should point to rc.modules.new to use modules for 4.4.14
  56 }
  57 
  58 upgrade
  59 echo $CURRDIR
  60 cd $CURRDIR
Chromium
   1 cd /tmp
   2 wget https://slackbuilds.org/slackbuilds/14.2/development/ninja.tar.gz
   3 tar xvzf ninja.tar.gz
   4 cd ninja
   5 wget https://github.com/ninja-build/ninja/archive/v1.7.1.tar.gz
   6 ./ninja.SlackBuild
   7 installpkg /tmp/ninja-1.7.1-i486-1_SBo.tgz
   8 cd ..
   9 wget https://slackbuilds.org/slackbuilds/14.2/network/chromium.tar.gz
  10 tar xvzf chromium.tar.gz
  11 cd chromium
  12 wget https://commondatastorage.googleapis.com/chromium-browser-official/chromium-48.0.2564.97.tar.xz #about 413MB
  13 ./chromium.SlackBuild
VirtualBox
   1 wget http://download.virtualbox.org/virtualbox/5.1.4/VirtualBox-5.1.4-110228-Linux_x86.run
As root run the following commands:
As a normal user run the following:
BSD init script
/etc/rc.d/rc.beat
#chmod 755 rc.beat
   1 #! /bin/sh
   2 # /etc/rc.d/rc.beat
   3 #
   4 PROC_NAME=beat
   5 touch /var/lock/beat
   6 
   7 case "$1" in
   8   start)
   9     logger "Starting ${PROC_NAME}"     
  10     echo   "Starting ${PROC_NAME}"
  11     /usr/bin/python /tmp/${PROC_NAME}.py &
  12     ;;
  13   status)
  14     PID=$(cat /var/run/beat.pid)
  15     logger "${PROC_NAME} running with PID $PID"
  16     echo   "${PROC_NAME} running with PID $PID"
  17     ;;    
  18   stop)
  19     PID=$(cat /var/run/beat.pid)
  20     logger "Killing ${PROC_NAME} with PID $PID"
  21     echo   "Killing ${PROC_NAME} with PID $PID"
  22     kill -9 $PID
  23     rm /var/run/beat.pid
  24     ;;
  25   *)
  26     echo "Usage: /etc/rc.d/beat {start|status|stop}"
  27     exit 1
  28     ;;
  29 esac
  30 
  31 exit 0
/tmp/beat.py
   1 #!/usr/bin/python
   2 import threading
   3 import time
   4 import os
   5 import syslog
   6 import datetime
   7 
   8 class Beat(threading.Thread):
   9     def __init__(self):
  10         threading.Thread.__init__(self) #required
  11 
  12     def run(self):
  13         loop=True
  14         while loop:
  15             syslog.syslog(syslog.LOG_INFO, "Beat %s"%(datetime.datetime.now()) )
  16             time.sleep(5)
  17 
  18 if __name__=="__main__":
  19     f=open('/var/run/beat.pid','wa')
  20     f.write('%d'%(os.getpid()))
  21     f.close()
  22     os.getpid()
  23     b = Beat()
  24     b.start()
Pidgin-sipe build for Slackware 14.2
Slackbuild pidgin-sipe-1.21.1-i586-1_SBo.tgz
pidgin-skype slackbuild
   1 cd /tmp
   2 wget https://slackbuilds.org/slackbuilds/14.2/libraries/json-glib.tar.gz
   3 tar xvzf json-glib.tar.gz
   4 cd json-glib
   5 wget http://ftp.acc.umu.se/pub/GNOME/sources/json-glib/1.0/json-glib-1.0.4.tar.xz
   6 ./json-glib.SlackBuild
   7 installpkg /tmp/json-glib-1.0.4-i486-1_SBo.tgz
   8 cd /tmp
   9 wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-skypeweb.tar.gz
  10 tar xvzf pidgin-skypeweb.tar.gz
  11 cd pidgin-skypeweb
  12 wget https://github.com/EionRobb/skype4pidgin/archive/1.1.tar.gz
  13 ./pidgin-skypeweb.SlackBuild
  14 installpkg /tmp/pidgin-skypeweb-1.1-i486-1_SBo.tgz
Slackbuils json-glib-1.0.4-i486-1_SBo.tgz pidgin-skypeweb-1.1-i486-1_SBo.tgz json-glib-1.0.4-x86_64-1_SBo.tgz pidgin-skypeweb-1.1-x86_64-1_SBo.tgz
Get patches for Slackware 14.2
- Check patches/packages and patches/PACKAGES.TXT for the desired Slackware version.
- URL for Slackware 14.2 ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/ 
Get packages to be updated
   1 URL_PATCHES=ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches
   2 mkdir -p ~/Downloads/slack14_2i386patches
   3 cd ~/Downloads/slack14_2i386patches
   4 rm PACKAGES.TXT 
   5 wget $URL_PATCHES/PACKAGES.TXT 
   6 head PACKAGES.TXT 
   7 rm /tmp/packages/*
   8 cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/outpatches.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/outpatches.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | sed "s/'//g" | xargs -i wget $URL_PATCHES/packages/{}.txz
   9 cd /tmp/packages
  10 su # run as root the upgradepkg
  11 # ls *.txz | xargs -i upgradepkg {}
  12 find /tmp/packages/*txz | xargs -i upgradepkg {}
  13 exit # return to normal user
  14 mv * ~/Downloads/slack14_2i386patches 
Update kernel (4.4.14 to 4.4.172)
   1 function get_packages
   2 {
   3   cd /tmp/packages
   4   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-firmware-20190118_a8b75ca-noarch-1.txz
   5   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-generic-4.4.172-i586-1.txz
   6   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-generic-smp-4.4.172_smp-i686-1.txz
   7   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-headers-4.4.172_smp-x86-1.txz
   8   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-huge-4.4.172-i586-1.txz
   9   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-huge-smp-4.4.172_smp-i686-1.txz
  10   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-modules-4.4.172-i586-1.txz
  11   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-modules-smp-4.4.172_smp-i686-1.txz
  12   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-source-4.4.172_smp-noarch-1.txz
  13 }
  14 
  15 function update
  16 {
  17   cp /etc/lilo.conf /etc/lilo.conf.old20190222
  18   ls /boot
  19   cd /tmp/packages
  20   upgradepkg kernel-*.txz
  21   # uname -a says that it has a SMP kernel
  22   /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.172-smp | bash
  23   ls /boot
  24   cat /etc/lilo.conf | grep image
  25   echo "Check content, image should have kernel 4.4.172"
  26   read
  27   echo "Going to execute lilo"
  28   lilo
  29   mv *.txz /home/user/Downloads/slack14_2i386patches
  30 }
  31 
  32 #get_packages
  33 update
/etc/dhclient.conf
Toshiba NB200 and Samsung Monitor
Set nb200 monitor (LVDS1) on the left and Samsung on the right (VGA1)
   1 /usr/bin/xrandr --output LVDS1 --left-of VGA1
Slackware 15.0
- http://www.slackware.com/announce/15.0.php (2022-02-02) 
- http://ftp.slackware.com/pub/slackware/slackware64-15.0/UPGRADE.TXT 
- http://ftp.slackware.com/pub/slackware/slackware-15.0/UPGRADE.TXT 
The links above are for the Slackware file tree. If you already have Slackware 14.2 installed, you can use these files and follow the instructions in the UPGRADE.TXT document to upgrade your system to Slackware 15.0.
Update kernel to 4.4.301
- update_kernel_4_4_301.sh
   1 BASE_URL=http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.301/
   2 
   3 function get_packages
   4 {
   5   cd /tmp/packages
   6   wget $BASE_URL/kernel-generic-4.4.301-i586-1.txz
   7   wget $BASE_URL/kernel-generic-smp-4.4.301_smp-i686-1.txz
   8   wget $BASE_URL/kernel-headers-4.4.301_smp-x86-1.txz
   9   wget $BASE_URL/kernel-huge-4.4.301-i586-1.txz
  10   wget $BASE_URL/kernel-huge-smp-4.4.301_smp-i686-1.txz
  11   wget $BASE_URL/kernel-modules-4.4.301-i586-1.txz
  12   wget $BASE_URL/kernel-modules-smp-4.4.301_smp-i686-1.txz
  13   wget $BASE_URL/kernel-source-4.4.301_smp-noarch-1.txz
  14 }
  15 
  16 function update
  17 {
  18   cp /etc/lilo.conf /etc/lilo.conf.old20220213
  19   ls /boot
  20   cd /tmp/packages
  21   upgradepkg kernel-*.txz
  22   # uname -a says that it has a SMP kernel
  23   /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.301-smp | 
  24 bash
  25   ls /boot
  26   cat /etc/lilo.conf | grep image
  27   echo "Check content, image should have kernel 4.4.301"
  28   read
  29   echo "Going to execute lilo"
  30   lilo
  31   mv *.txz /home/vitor/Downloads/slack14_2i386patches
  32 }
  33 
  34 # get_packages
  35 # update
  36 
Slackware docker image
   1 docker run --rm -d -it --name slack15 liveslak/slackware cat
   2 docker exec -it slack15 bash
   3 # https://slackpkg.org/documentation.html
   4 slackpkg update 
   5 slackpkg search python 
   6 slackpkg install python3 nano python-pip
   7 # python3-3.9.16-x86_64-1_slack15.0.txz
   8 python3 -V
   9 cd /tmp/
  10 wget https://slackbuilds.org/slackbuilds/15.0/development/amazon-corretto.tar.gz 
  11 tar xvzf amazon-corretto.tar.gz 
  12 cd amazon-corretto
  13 wget https://corretto.aws/downloads/resources/17.0.4.8.1/amazon-corretto-17.0.4.8.1-linux-x64.tar.gz 
  14 sh amazon-corretto.SlackBuild 
  15 installpkg /tmp/amazon-corretto-17.0.4.8.1-x86_64-1_SBo.tgz 
  16 /usr/lib64/java/bin/java
  17 /usr/lib64/java/bin/javac
  18 PATH=$PATH:/usr/lib64/java/bin/ 
  19 echo $PATH 
  20 export PATH
  21 docker stop slack15
With slackpkg+ and slackonly (builds from slackbuilds)
   1 docker run --rm -d -it --name slack15 liveslak/slackware cat
   2 docker exec -it slack15 bash
   3 wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.8.0-noarch-7mt.txz/download
   4 mv download download.txz
   5 installpkg download.txz
   6 slackpkg update gpg
   7 slackpkg update 
   8 #vi /etc/slackpkg/slackpkgplus.conf
   9 #REPOPLUS=( slackpkgplus slackonly )
  10 #MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/
  11 sed -i 's/slackpkgplus /slackpkgplus slackonly /g' /etc/slackpkg/slackpkgplus.conf
  12 echo "MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/" >> /etc/slackpkg/slackpkgplus.conf
  13 slackpkg update gpg
  14 slackpkg update
  15 slackpkg search deb2tgz
  16 # [unin] slackonly : deb2tgz-0.2-noarch-1_slonl
  17 slackpkg search jdk17
  18 # [unin] slackonly : zulu-openjdk17-17.0.2-x86_64-1_slonly
  19 slackpkg install zulu-openjdk17-17.0.2-x86_64-1_slonly
  20 find . -name "java"
  21 ./etc/file/magic/java
  22 ./usr/lib64/zulu-openjdk17/bin/java
  23 ./usr/lib64/zulu-openjdk17/bin/java -version
  24 # openjdk version "17.0.2" 2022-01-18 LTS
  25 ./usr/lib64/zulu-openjdk17/bin/javac -version
  26 # javac 17.0.2
  27 
Slackware docker java environment
Dockerfile
FROM liveslak/slackware RUN wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.8.0-noarch-7mt.txz/download RUN mv download download.txz RUN installpkg download.txz RUN slackpkg update gpg RUN slackpkg update RUN sed -i 's/slackpkgplus /slackpkgplus slackonly /g' /etc/slackpkg/slackpkgplus.conf RUN echo "MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/" >> /etc/slackpkg/slackpkgplus.conf RUN slackpkg update gpg RUN slackpkg update RUN slackpkg install zulu-openjdk17-17.0.2-x86_64-1_slonly RUN slackpkg install apache-maven git-2.35 htop ENV PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/lib64/zulu-openjdk17/bin/ RUN mkdir /app WORKDIR /app COPY . . CMD ["/bin/bash"]
Steps
   1 docker build -t slack-openjdk-image  .
   2 docker run --rm -d -it --name slack15 slack-openjdk-image
   3 docker exec -it slack15 bash
   4 # inside the container
   5 git clone https://github.com/vborrego/springboot-test.git
   6 cd springboot-test/
   7 mvn clean install 
   8 nohup java -jar target/test-spring-boot-0.1.0.jar &
   9 curl localhost:8080/dummy
  10 curl http://localhost:8080/login
  11 exit # exit the container
  12 docker stop slack15 
