LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Virtual Slackware, good solutions for VM? (https://www.linuxquestions.org/questions/slackware-14/virtual-slackware-good-solutions-for-vm-4175636650/)

WLD 08-18-2018 05:30 PM

Virtual Slackware, good solutions for VM?
 
Hi folks,

I'm running Slackware in VMs but they're quite huge, several Gb each even with basic packages. I really need to find an alternative that fits a few basic desires, so any pointers to existing solutions greatly received.

There are a couple of suggestions my research found but they fall quite short in one or two of the following requirements.
  • Small! (Ideally 1-100Mb)
  • Based on Slackware (so I know how to use it right away + won't deal with systemd cancer)
  • Fairly modern (x64 arch, Kernel 4.x, modern packages)
  • No swap disk required, it can have many Gb RAM
  • Preferably can run entirely from RAM/no virtual disk required
  • Console only, no GUI required
  • Ok to be stateless with changes to be lost on reboot, however...
  • Can ideally mount NFS network storage for persistent changes/config
  • Need to be able to compile my own custom packages to be embedded or loadable in it
  • (^ it's fine if that happens in an environment outside the VM and I rebuild a VM image containing them, fun!)

If nobody knows of anything suitable then I am reticent to roll my own but I want to keep it as close to the stock Slackware installation as possible, via the use of tag files for setup and some additional setup scripts to create fully unattended creation of a new VM image. If anybody knows of any projects in this area that I could use as a starting point would also be gratefully received.

The target will be for VirtualBox and I would probably include the guest extensions, but the hypervisor used shouldn't make any difference to what I'm looking for.

Thanks in advance for pointers and suggestions,
WLD

Darth Vader 08-18-2018 05:52 PM

Quote:

Originally Posted by WLD (Post 5893141)
Small! (Ideally 1-100Mb)

Did you are aware that only the x86_64 generic kernel and its modules have around of 250MB?

WLD 08-18-2018 05:56 PM

Quote:

Originally Posted by Darth Vader (Post 5893145)
Did you are aware that only the x86_64 generic kernel and its modules have around of 250MB?

Thank you, yes, but that covers a very wide range of exotic hardware beyond what any virtualised x64 system would actually be using. TinyCore Linux runs with most of my requirements in 8Mb or so, but is not based on Slackware - so it's entirely possible for other distros.

Darth Vader 08-18-2018 06:04 PM

To be honest, I find is hard to believe that a Linux having 100MB can be still loosely named as based in Slackware, which have around 9GB in the 14.2 version.

Probably you want to study something like LFS and to build your minimal and ultra-customized operating system. ;)

BTW, the TinyCore Linux uses BusyBox (like the Slackware's initrd) for its userland and a custom Xfree86 server only for VESA.

Didier Spaier 08-18-2018 07:02 PM

As Darth Vader alluded, you could take the Slackware initrd as a basis it weighs 70M plus 7.6M for the kernel (in Slackware64-14.2) and meets most if not all your requirements including ability to mount NFS network storage. You can probably strip it down a bit, e.g. maybe you won't need the hardware database /lib/udev/hwdb.d (5.2M) as well as some firmware in /lib/firmware (12M) and modules in /lib/modules (15M). However you will need to add some modules if you need sound.

To help you, distinguished members of the Slackware team have been kind enough to provide all you need to customize the installer in http://slackware.uk/slackware/slackware64-current/source/installer/, the script build_installer.sh is well documented.

phalange 08-19-2018 06:24 PM

Puppy linux is probably closest to what you want. They have a flavor based on Slackware, and it's meant to be tiny. Strip away the DE and you should have something fairly raw free of any bloat or frills.
https://puppylinux.org/wikka/Homepage

There's also Alpine Linux, which meets all your needs very well (run in ram, good build environment, CLI only, OpenRC not systemd), except the Slackware part. It's an independent distro.
https://alpinelinux.org/

There's also Void, which I would rank third for you. It's almost as minimal as Alpine, checks the same boxes, but again, is not Slackware.
https://voidlinux.org/

smaclennan 08-19-2018 06:49 PM

You're not going to get Slackware down to 100MB without it no longer being Slackware.

I have an experimental stripped down Slackware that uses busybox and it needs 200M.

The problem is that Slackware is not meant to be an embedded distro. The packages are not granular enough. So you either have to keep too much, or start deleting individual files... which makes package upgrade a problem.

At the other end of the scale I have a minimal initramfs system: the initramfs is 4.9M and the kernel is 4.3M.


All times are GMT -5. The time now is 05:56 AM.