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

  • 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 64

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 # target # /dev/sysvg/root select 
  33 # quick format, ok ext 4
  34 # select other linux partition /dev/sda1 
  35 # quick format, ext4 
  36 # select mount point for /dev/sda1 mount point /boot 
  37 # fstab 
  38 # /dev/sysvg/root for the root directory (/) 
  39 # /dev/sda1 for /boot 
  40 # mount point /boot 
  41 # install from slackware cd or dvd 
  42 # auto 
  43 # only select package A and AP
  44 # full 
  45 # configure the system, yes 
  46 # make usb flash boot: skip ok 
  47 # install lilo, simple 
  48 # lilo standard 
  49 # optional <blank> 
  50 # select lilo destination MBR 
  51 # GPM configuration: no 
  52 # services crond messagebus syslog 
  53 # custom screen fonts no 
  54 # hw clock set to utc no 
  55 # europe/lisbon 
  56 # nvi classic BSD utf8 
  57 # set root password vagrant 
  58 # exit setup, go to shell 
  59 
  60 chroot /mnt 
  61 $( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r )
  62 # /boot/initrd.gz 
  63 cat /etc/lilo.conf | grep -v "#"
  64 
  65 vi /etc/lilo.conf
  66 append=" "
  67 boot = /dev/sda
  68 compact 
  69 
  70 prompt
  71 timeout = 50
  72 change-rules
  73   reset
  74 vga = normal
  75 image = /boot/vmlinuz-generic
  76   label = LinuxTest
  77   initrd = /boot/initrd.gz
  78   read-only
  79  
  80 lilo
  81 exit 
  82 reboot 
  83 
  84 # Got errors after reboot due to lack of lvm command (AP package)
  85 

Test installation and install extra packages

   1 # login root:vagrant 
   2 df -h # used 1.4G 
   3 # error while loading libunistring.so.2 
   4 mount DVD slack iso virtualbox 
   5 mount /dev/sr0 /mnt/dvd 
   6 cd /mnt/dvd/slackware64/
   7 installpkg l/libunis*txz 
   8 installpkg k/kernel-source*txz 
   9 installpkg d/make-4.3*txz 
  10 installpkg d/gcc-11.2*txz 
  11 installpkg d/perl-5*txz 
  12 installpkg d/guile-3*txz 
  13 installpkg l/gc-8*txz 
  14 installpkg d/binutils*txz 
  15 installpkg ap/slackpkg-15*.txz 
  16 installpkg l/ncurses-6*txz
  17 installpkg n/network-scripts-15.0-noarch-18.txz
  18 installpkg n/net-tools-20181103_0eebece-x86_64-3.txz
  19 installpkg n/dhcp-4.4.2_P1-x86_64-1.txz
  20 installpkg n/iproute2*.txz
  21 installpkg n/libmnl-1*.txz
  22 installpkg n/dhcpcd-9*txz
  23 installpkg n/iputils-*.txz
  24 installpkg ap/sudo-*.txz
  25 installpkg n/openssh-*.txz
  26 installpkg n/wget-1*.txz
  27 installpkg n/ca-certificates-2021*.txz
  28 installpkg n/openssl-1*.txz
  29 installpkg n/gnupg-1.4.23-x86_64-4.txz
  30 
  31 vi /etc/rc.d/rc.inet1.conf 
  32 USE_DHCP[0]="yes" 
  33 
  34 /etc/rc.d/rc.inet1 
  35 cd / 
  36 umount /mnt/dvd  
  37 reboot 
  38 
  39 # login root:vagrant 
  40 ping -c3 www.sapo.pt 
  41 ping 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 adduser vagrant # com pwd vagrant 
   2 groupadd sudo 
   3 
   4 usermod -aG sudo vagrant 
   5 visudo
   6 
   7 vagrant ALL=(ALL) NOPASSWD: ALL
   8 
   9 exit 
  10 login vagrant:vagrant 
  11 
  12 sudo bash # should not ask for password 
  13 exit 

UseDNS in SSH

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

SSH insecure pair in vagrant

   1 mkdir ~/.ssh 
   2 cd ~/.ssh 
   3 wget --no-check-certificate https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub
   4 mv vagrant.pub authorized_keys
   5 chmod 0600 authorized_keys 
   6 chmod 0700 /home/vagrant/.ssh 
   7 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 slackware64-15
   3 ls
   4 # package.box
   5 vagrant box add --name slack64-15-box /tmp\package.box
   6 vagrant init slack64-15-box
   7 vagrant up
   8 vagrant ssh
   9 df -h
  10 # /dev/mapper/sysvg-root   61G  3.0G   55G   6% /
  11 md5sum /vagrant/package.box
  12 xxxxx  /vagrant/package.box

Update Slackware 64

   1 vagrant ssh 
   2 sudo bash 
   3 cd /tmp 
   4 wget --no-check-certificate  https://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware64-15.0/slackware64/n/openssl-1.1.1m-x86_64-1.txz
   5 wget --no-check-certificate  https://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware64-15.0/slackware64/n/ca-certificates-20211216-noarch-1.txz
   6 /sbin/installpkg ca-certificates-20211216-noarch-1.txz
   7 /sbin/installpkg openssl-1.1.1m-x86_64-1.txz
   8 /usr/sbin/update-ca-certificates --fresh
   9 echo "https://mirror.slackbuilds.org/slackware/slackware64-15.0/" >>  /etc/slackpkg/mirrors
  10 wget  https://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware64-15.0/slackware64/n/gnupg-1.4.23-x86_64-4.txz
  11 /sbin/installpkg gnupg-1.4.23-x86_64-4.txz
  12 /usr/sbin/slackpkg update gpg 
  13 /usr/sbin/slackpkg update
  14 /usr/sbin/slackpkg upgrade-all
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01