Tiny Core Linux
General TC => Tiny Core on Virtual Machines => Topic started by: alphons on November 29, 2021, 12:22:56 AM
-
Here are some preliminary results of my attempt to get TinyCore running on Windows Subsystem for Linux (WSL)
This can be an alternative to the other Virtual-Machine options.
For more information on this technique https://docs.microsoft.com/en-us/windows/wsl/ (https://docs.microsoft.com/en-us/windows/wsl/)
What I did, was making a tar file from a running (live) TinyCore system, including installed tce extensions by running this command:
$ sudo su
# cd /
# tar -cvpf tinycore.tar --exclude=tinycore.tar --exclude=proc --exclude=dev --exclude=sys /
This file is needed to 'install' it on the WSL system.
First have the Windows WSL system up and running, this is a trickey part because there are so many Windows distributions out there, after some experiments this was my summary of actions:
Search for PowerShell, richt click and run as Administrator and execute these 2 commands:
> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
> Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
After this, you have to reboot your windows system.
In the process of importing the tar file (later on) i got an error 'FATAL: kernel to old'
I did some of these things (not sure which solved it) and the error went away:
Download the 'kernel' update package from
https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package (https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package)
Execute on windows:
wsl_update_x64.msi
In PowerShell execute:
> wsl --set-default-version 2
If all goes well, it is time to 'import' our tar file into the WSL system.
Choose your destination directory, for me it was c:\temp\TinyCore
Execute this command in PowerShell:
> wsl --import TinyCore c:\temp\TinyCore .\tinycore.tar
Make sure to use the new WSL kernel on our TinyCore distribution.
Execute this command in PowerShell:
> wsl --set-version TinyCore 2
(takes some minutes....)
Time to 'boot' your TinyCore system, execute in PowerShell:
> wsl -d TinyCore
For the result see the attachement. All works, including tce-load etc.
The backup / restore features of TinyCore are a bit crippled,
and my 'sda1' user disk is turned into a directory.
So keep in mind it has some caveats.
-
For more information on this technique https://docs.microsoft.com/en-us/windows/wsl/ (https://docs.microsoft.com/en-us/windows/wsl/)
iv not read this link ...but was reminded of this topic while reading https://github.com/giuliano108/guix-packages/blob/master/notes/Guix-on-WSL2.md this overview of the "Subsystem for Linux "
ftr via
https://gist.github.com/giuliano108/49ec5bd0a9339db98535bc793ceb5ab4
WSL2 distros are, in fact, more like OS containers:
A single instance of the Microsoft-shipped Linux Kernel is running at any given time (under Hyper-V).
Running, from a command prompt, wsl -d distroname instructs the Kernel to create one such container, the root filesystem coming an ext4.vhdx disk image.
The Kernel executes an /init binary which, again, is supplied by Microsoft and cannot be changed/customized. Together with the Kernel itself, init can be found in %systemroot%\System32\lxss\tools.
/init executes a shell or the command supplied to wsl.exe
/init also takes care of mounting all the file systems, setting up /dev, ...
A very useful side-effect of the "single Kernel for all distros" thing is that if, say, you've got a working Ubuntu WSL distro, and a Guix WSL distro that doesn't boot, you can run dmesg under Ubuntu and see what's wrong with Guix. The Kernel is shared, the Kernel ring buffer is also shared.
:-\
-
stumbled across an omgubuntu piece that seems to fit the size and shape of this thread
https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10
wonder how Lennart Poettering figures in on all this?
https://forum.tinycorelinux.net/index.php/topic,17247.msg166685.html#msg166685
also reminded of Eric S. Raymond's commentary
https://www.zdnet.com/article/open-sources-eric-raymond-windows-10-will-soon-be-just-an-emulation-layer-on-linux-kernel/