MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 66 as of 2026-10-24 22:00:56
  • Slackware
  • VagrantSlack3215Box

Contents

  1. VagrantSlack3215Box
    1. Get ISO and install
    2. Test installation and install extra packages
    3. Install guest additions
    4. vagrant sudoers
    5. UseDNS in SSH
    6. SSH insecure pair in vagrant
    7. Disable audio in Virtualbox
    8. Set first network adapter as a NAT one
    9. Remove optical devices
    10. Create vagrant box
    11. Update Slackware

VagrantSlack3215Box

Steps to create a Slackware 15 (32-bit) vagrant box with LVM support.

Get ISO and install

   1 cd ~
   2 https://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware-iso/slackware-15.0-iso/slackware-15.0-install-dvd.iso
   3 sudo modprobe -r kvm_intel
   4 virtualbox &
   5 # start virtualbox 
   6 # new, name: slackware32-15
   7 # linux, other linux,  other linux(32-bit) , next 
   8 # 512 RAM, next 
   9 # Create a virtual hard disk now, create, VDI, next,  dynamically allocated, next,  64GB, create 
  10 # start VM 
  11 # choose slackware-15.0-install-dvd.iso
  12 # start 
  13 # boot: <enter>
  14 # 1, select keyboard 
  15 # qwerty/pt.map 
  16 # 1 <enter>
  17 # login as root 
  18 # create 2 partitions ...
  19 fdisk /dev/sda 
  20 # n p 1 default 2048 +512M
  21 # n p 2 default 1050624 +63G
  22 # select Linux LVM
  23 # t 2 L 8e 
  24 # p
  25 # w
  26 # LVM stuff 
  27 pvcreate /dev/sda2
  28 vgcreate sysvg /dev/sda2
  29 lvcreate -L 62G -n root sysvg
  30 pvscan 
  31 setup 
  32 
  33 # go to target 
  34 # select /dev/sysvg/root 
  35 # quick format, ok ext 4
  36 # select other linux partition /dev/sda1 
  37 # quick format, ext4 
  38 # select mount point for /dev/sda1 mount point /boot 
  39 # fstab 
  40 # /dev/sysvg/root for the root directory (/) 
  41 # /dev/sda1 for /boot 
  42 # mount point /boot 
  43 # install from slackware cd or dvd 
  44 # scanning for cd or dvd: auto 
  45 # only select serie A 
  46 # full 
  47 # configure the system, yes 
  48 # make usb flash boot: skip ok 
  49 # install lilo, simple 
  50 # configure lilo: lilo standard 
  51 # optional lilo:  <blank> 
  52 # Select lilo destination: MBR 
  53 # GPM configuration: no 
  54 # select services: rc.crond rc.messagebus rc.syslog 
  55 # custom screen fonts no 
  56 # hw clock set to utc no 
  57 # timezone configuration: europe/lisbon 
  58 # Choose default ex/vi: vim
  59 # set root password: vagrant 
  60 # exit setup, go to shell 
  61 
  62 vgscan --mknodes
  63 vgchange -ay
  64 mount /dev/sysvg/root /mnt
  65 mount /dev/sda1 /mnt/boot
  66 
  67 mount -o bind /dev /mnt/dev
  68 mount -o bind /proc /mnt/proc
  69 mount -o bind /sys /mnt/sys
  70 
  71 chroot /mnt /bin/bash
  72 # in chroot
  73 # make sure the Slack ISO is chosen in virtualbox
  74 mount /dev/sr0 /mnt
  75 upgradepkg --reinstall /mnt/slackware/a/kernel-modules-5.15.19*.txz
  76 ls -l /lib/modules/5.15.19/kernel/fs/ext4/
  77 
  78 KERNEL_VER=$(ls /lib/modules | head -n 1)
  79 echo $KERNEL_VER
  80 mkinitrd -c -k $KERNEL_VER -f ext4 -r /dev/sysvg/root -m dm-mod:ext4 -L
  81 
  82 #Several modules added after mkinitrd
  83 #jdb2 mbcache ext4 dm-bufio dm-snapshot
  84 
  85 vi /etc/lilo.conf
  86 append=" "
  87 boot = /dev/sda
  88 compact 
  89 
  90 prompt
  91 timeout = 50
  92 change-rules
  93   reset
  94 vga = normal
  95 image = /boot/vmlinuz-generic
  96   label = LinuxTest
  97   initrd = /boot/initrd.gz
  98   read-only
  99 
 100 exit 
 101 
 102 lilo -r /mnt
 103 exit
 104 # unomount DVD in virtualbox 
 105 reboot 

Test installation and install extra packages

   1 # login root:vagrant 
   2 df -h # used 1.5G
   3 # mount DVD slack iso virtualbox 
   4 mount /dev/sr0 /mnt/dvd 
   5 cd /mnt/dvd/slackware/
   6 installpkg k/kernel-source*txz 
   7 
   8 installpkg l/libunis*txz 
   9 installpkg l/gc-8*txz 
  10 installpkg l/ncurses-6*txz
  11 
  12 installpkg d/make*txz 
  13 installpkg d/gcc-11.2*txz 
  14 installpkg d/perl-5*txz 
  15 installpkg d/guile-3*txz 
  16 installpkg d/binutils*txz 
  17 
  18 installpkg ap/slackpkg-15*.txz 
  19 installpkg ap/sudo-*.txz
  20 
  21 installpkg n/network-scripts-15.0-noarch-18.txz
  22 installpkg n/net-tools-20181103_0eebece-x86_64-3.txz
  23 installpkg n/dhcp-4.4.2_P1-x86_64-1.txz
  24 installpkg n/iproute2*.txz
  25 installpkg n/libmnl-1*.txz
  26 installpkg n/dhcpcd-9*txz
  27 installpkg n/iputils-*.txz
  28 installpkg n/openssh-*.txz
  29 installpkg n/wget-1*.txz
  30 installpkg n/ca-certificates-2021*.txz
  31 installpkg n/openssl-1*.txz
  32 installpkg n/gnupg-1.4.23-x86_64-4.txz
  33 
  34 vi /etc/rc.d/rc.inet1.conf 
  35 USE_DHCP[0]="yes" 
  36 
  37 /etc/rc.d/rc.inet1  # run command, it should get an ip
  38 ping -c 3 www.google.com # should get replies
  39 
  40 cd / 
  41 umount /mnt/dvd  
  42 # remove in virtualbox the ISO for slack
  43 reboot 
  44 
  45 # login root:vagrant 
  46 ping -c 3 www.sapo.pt 

Install guest additions

   1 umount /mnt/dvd 
   2 # Menu "Devices" followed by "Insert guest additions cd image ". 
   3 mount /dev/sr0 /mnt/dvd
   4 cd /mnt/dvd 
   5 ./VBoxLinuxAdditions.run 
   6 # unmount cd image in Virtualbox
   7 reboot 
   8 # login and reboot again 
   9 

vagrant sudoers

login with root:vagrant

   1 df -h # 3.0 GB at /
   2 adduser vagrant # with pwd vagrant 
   3 groupadd sudo 
   4 
   5 usermod -aG sudo vagrant 
   6 visudo # insert after root user line
   7 
   8 vagrant ALL=(ALL) NOPASSWD: ALL
   9 
  10 exit 
  11 login vagrant:vagrant 
  12 
  13 sudo bash # should not ask for password 
  14 exit 

UseDNS in SSH

   1 sudo bash 
   2 vi /etc/ssh/sshd_config 
   3 # disable line with "UseDNS" no 
   4 #UseDNS no
   5 /etc/rc.d/rc.sshd restart # run command
   6 exit

SSH insecure pair in vagrant

   1 # in /home/vagrant folder as vagrant user
   2 cd /home/vagrant
   3 mkdir ~/.ssh 
   4 cd ~/.ssh 
   5 wget -k https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub
   6 mv vagrant.pub authorized_keys
   7 chmod 0600 authorized_keys 
   8 chmod 0700 /home/vagrant/.ssh 
   9 sudo /sbin/shutdown -h now 

Disable audio in Virtualbox

Virtualbox, vm settings, audio, disable

Set first network adapter as a NAT one

Virtualbox, settings vm, adapter 1, NAT

Remove optical devices

Virtualbox, settings, storage, remove mounted optical drives

Create vagrant box

   1 cd /tmp 
   2 vagrant package --base slackware32-15
   3 ls -lah *box
   4 # package.box 1.8 G
   5 vagrant box add --name slack32-15-box /tmp/package.box --force 
   6 rm Vagrantfile
   7 vagrant init slack32-15-box
   8 vagrant up
   9 vagrant ssh
  10 df -h
  11 # /dev/sysvg/root   61G  3.0G   55G   6% /
  12 exit
  13 cp package.box ~/vagrant-boxes/slack32-15.box 
  14 cd ~/vagrant-boxes/
  15 git add .
  16 git commit -m "Added slackware 15 32 bit"
  17 git pull origin 
  18 git push origin 
  19 
  20 md5sum /vagrant/package.box
  21 xxxxx  /vagrant/package.box
  22 
  23 cd /tmp/
  24 mkdir -p slack32-15
  25 cd slack32-15
  26 vagrant box remove slack32-15-box
  27 vagrant box list
  28 
  29 curl -L -o slack32-15.box "https://github.com/vborrego/vagrant-boxes/raw/refs/heads/main/slack32-15.box?download="
  30 vagrant box list
  31 vagrant box add --name slack32-15 slack32-15.box
  32 vagrant init slack32-15
  33 cat Vagrantfile | grep -v "#"
  34 vagrant up
  35 echo "hello" > hello.txt
  36 vagrant ssh

Update Slackware

   1 vagrant ssh 
   2 sudo bash 
   3 
   4 sudo bash
   5 export SLACK_MIRROR="https://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware-15.0"
   6 /usr/sbin/slackpkg install diffutils
   7 /usr/sbin/slackpkg update gpg 
   8 /usr/sbin/slackpkg update
   9 /usr/sbin/slackpkg upgrade-all # unselect all related with kernel
  10 # keep old files
  11 exit
  12 exit 
  13 vagrant reload 
  14 
  15 vagrant ssh-config
  16 scp -P 2222 -i $(vagrant ssh-config | grep IdentityFile | awk '//{print $2}') /home/vitor/Documents/slackbuild-libb64/libb64.tar.gz vagrant@127.0.0.1:/home/vagrant/
  17 
  18 vagrant ssh 
  19 sudo bash
  20 tar xvzf libb64.tar.gz
  21 cd libb64
  22 wget $(cat *info | grep DOWNLOAD= | sed 's/=/ /g'| awk  '//{print $2}' | sed 's/\"//g')
  23 /usr/sbin/slackpkg install flex
  24 ./libb64.SlackBuild 
  25 /usr/sbin/slackpkg install glibc 
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01