Note
The main issue here was guest additions, which allow shared folders and suchlike. They worked with the installed system, but not once I had updated to the 4.4.172 kernel. There seems to be an issue with that. It will be resolved I’m sure but has not been resolved yet. See step 116 below!
I found Slackware to be far less daunting than some comments on the web would suggest. As long as the user is OK with using a text-based disk partitioner (cfdisk), it’s quite straightforward. And with tools like slackpkg and sbotools, maintenance (install, remove and upgrade packages) is not a problem either, and the range of packages is good, although split between the Slackware repository and the stuff curated at slackbuilds.
Indeed, I think you could make a good case that the split has significant benefits — for example, an application built via slackbuilds is compiled natively on and for your system, which can/may/might give performance benefits. (https://www.linuxquestions.org/questions/slackware-14/how-to-set-slackbuild-cflags-cxxflags-qmake-c-cxx-flags-globally-4175621306/) See also the documents for sbotools for globally setting the -j option to speed compiling.
I tried to put in all the steps, but I might have missed out a detail. If so — sorry!
Introduction
I need to test some eLearning I’ve written on a variety of browsers and environments. I’ve tried the big 3 (Firefox, Chrome, Edge) on the Windows 10 machine on my desk. I want to try Linux. So I’m going to set up VirtualBox and install a distro. I’m sure there will be nothing of interest here, but if I am going to do the task I might as well record the steps.
I make a lot of dumb mistakes as I go, and I should probably read the docs more carefully, but this below is the truth of it!
The many steps
-
-
- Install VirtualBox on my Windows host machine: Went to https://www.virtualbox.org/wiki/Downloads and hit the big download button.
- Clicked on ‘Windows hosts’ and wait for the download. Ran the download.
- Clicked ‘Next >’
- Clicked ‘Next >’
- Unchecked creation of desktop shortcut and Quick Launch Bar icon — I don’t want that clutter.
- ‘Next >’
- Yes
- Clicked through the installer. Watch it go!
- Choose a Linux distribution: What distro shall we use? Try Slackware.
- In a Cygwin window: $ wget https://ftp.yzu.edu.tw/Linux/Slackware/slackware-iso/slackware-14.2-iso/slackware-14.2-install-dvd.iso
- check md5sum ($ md5sum slackware-14.2-install-dvd.iso) — looks good.
- Create the virtual machine: So began by starting VirtualBox and creating a new machine. (New; Name: Slack, Type: Linux 32-bit; Other 32-bit.
- 1GB RAM
- Defaults until set virtual hard disk size; chose 12GB.
- System → Processor → enable PAE/NX
- Boot the VM: Storage → Empty → Optical Driver → Choose virtual optical disk file
- Double-clicked to boot
- Hit Enter at ‘boot’ prompt
- Enter to select default keyboard map
- Log in as root
- Partition the disk: cfdisk
- Select dos partition
- New
- Set to 11G (later repeated this with 40GB)
- Set Type to Linux filesystem
- Highlight ‘Free space’
- New, remaining space (1023M)
- Set Type to Linux swap
- Write to disk — yes!
- Quit
- Set up Slackware: Ran setup
- Add swap (/dev/sda2) and accept defaults
- Select root partition (/dev/sda1)
- Quick format
- ext4 file system
- Source media selection — use Slackware CD or DVD
- auto
- Choose what to install — I left defaults
- full install
- watch it go
- Skip making USB boot stick
- simple (Try to install LILO automatically)
- standard console
- no kernel parameters
- no for UTF-8 console
- Install LILO to MBR
- Select USB mouse (not sure about this)
- Add gpm (I use it)
- Hostname
- Domain
- Choose Autoconfigure using NetworkManager
- Boot time services … accept defaults
- Not interested in custom screen fonts
- Hardware clock
- Time zone
- Choose window manager (KDE will do for now)
- Root password
- It’s not taking keyboard input! I cannot set root password!
- Use the VB menu to send Ctrl+Alt+Del to the virtual machine
- It captured my mouse and does not respond to the keyboard! I can’t do anything!
- Unplugged and replugged keyboard and got it back!
- Repeated the install
- Turn off/exit install
- The first boot from the virtual hard drive: Remove the virtual DVD and reboot
- Enter to boot
- Log in as root
- Add a user: Ran adduser
- Enter through most options, but add them to most groups (up arrow at the ‘Or press the UP arrow’ prompt)
- VirtualBox guest additions: Still as root, click on Devices menu and Insert Guest Additions
- Could not find it user /mnt or /media (turns out it is under ‘/run‘ or something)
- Ran # startx
- Launch the file manager and there it is ‘VBox_GAs_6.0.4’
- Run VBoxLinuxAdditions.run
- Seems good.
- Shut down the VM
- In the VB manager, chose Shared Folders
- Clicked the ‘Add folder’ icon — little folder with a green plus on it
- Click on Folder Path and Other and browse to the desired folder on the host
- I set it as Read-only since I am testing some files and do not want to change them
- Clicked Auto-mount ‘on’
- Put ‘tests’ in the ‘Mount point’ box — this is a change to the interface, and I think I misunderstood it — should have read the docs!
- OK
- Rebooted the guest and logged in again
- As regular user, got output of id -u (1000) and id -g (100)
- As superuser, in the guest:
- # mount -t vboxsf -o uid=1000,gid=100 tests /home/username/shareslack
- ‘Protocol error’ — uh oh
- Reinstalled guest additions
- as root, # usermod -a -G vboxsf username
- # mount -t vboxsf -o uid=1000,gid=100 tests /home/username/shareslack
- Turn off automount and make permanent and Read only and reboot the guest
- Turn on automount and read only and reboot
- Nope. This is proving a real problem
- Simplify the path to the host folder I want to share — a simple directory off C:
- Nope.
- I got myself tied in knots here. Start again.
- Shared folders — give it a name but no mount point and turn on Auto-mount
- Well, at some point the shared folder turned up under /media/sf_username. Not quite sure how, to be honest, but there it is
- Opened command prompt and switched to superuser (su command). Now update the system
- # vim /etc/slackpkg/mirrors and uncomment the one I want
- # slackpkg update
- # slackpkg install-new
- # slackpkg upgrade-all
- Boy, that was easy.
- Well, it seems pretty much set up now. Though the screen is not scalable. Check the log from compiling the additions
- Log says kernel config is invalid! Odd.
- 4.4.172 kernel does not play nicely with guest additions. https://slackblogs.blogspot.com/2019/02/kernel-44172-breaking-some-application.html
- Slackbuilds: Oh well. Use links to download the slackbuild files for sbotools, and install that to automate slackbuilds.
- Go to https://slackbuilds.org and search for sbotools. Download the build script and the source code and follow the instructions …
- See https://slackbuilds.org/howto/
- # sbosnap fetch
- # sboinstall --reinstall dkms
- groupadd -g 215 vboxusers
- # usermod -a -G vboxusers username (for root and my user)
- logout and back in again
- To get the guest additions to compile on the 4.4.172 kernel
- edit /etc/fstab and uncomment the cdrom line (so I can do this without gui); then Devices menu and insert guest additions CD
- # mount /dev/cdrom
- #cd /mnt/cdrom
- Try the install: #sh VBoxLinux ...etc...run
- Nope, something went wrong — it just won’t work
- It looks like this is not my fault! https://slackblogs.blogspot.com/2019/02/kernel-44172-breaking-some-application.html. It gives a fix
- Mount the GA CD and try to run it
- find / -name memobj-r0drv-linux.c
- Go there and make the changes shown at the link
- but vboxconfig is not in sbin! It is nowhere!
- Lower down the same post, though, it says:
-
- And rcvboxadd is present, so try that
- Seems to have worked! Try a reboot
- Login as user and startx
- Autoresize guest display is not greyed out. How about shared folders? Yep. Clipboard — yep. That’s most of what I need.
- Shared folders found under /media/sf_darren, which will do!
- OK, so at last we are done, or done enough, at least.
-
Last thing I did was make a Windows batch file and put it in my path:
C:\>type c:\Users\username\bin\slack.bat "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm Slack
And got a little icon and put a shortcut to the batch file on my desktop. So no need to run the VirtualBox GUI manager.
So I can’t pretend I did it all with complete mastery, but it works, more or less.