Tiny Core Linux
Tiny Core Extensions => TCE Talk => Extension requests => Topic started by: pek on May 30, 2023, 12:18:10 AM
-
Hi All,
I mainly need "text copy & paste" functionality between host and guest of virtualbox.
Can someone please provide Virtualbox Guest Addition tcz for TinyCorePure64-14.0?
or guide me to make this?
or suggest other more effective ways to be able to "copy & paste"?
Thank you.. ;D
-
So, I tried this
tce-load -i compiletc perl5 ncursesw-dev bc glibc_apps elfutils-dev
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/Module.symvers-6.1.2-tinycore64.gz
tar -xvf linux-6.1.2-patched.txz
cd linux-6.1.2
make mrproper
cp ../config-6.1.2-tinycore64 .config
make oldconfig
make prepare
make modules_prepare
gunzip ../Module.symvers-6.1.2-tinycore64.gz
mv Module.symvers-6.1.2-tinycore64 Module.symvers
make SUBDIRS=scripts/mod
mkdir virtualbox7
##copied guest addition files into the folder
cd virtualbox7
sudo ./VBoxLinuxAdditions.run
Then I got this
Verifying archive integrity... All good.
Uncompressing VirtualBox 7.0.6 Guest Additions for Linux
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel
6.1.2-tinycore64. Please install them and execute
/sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
Setting up modules
Building the VirtualBox Guest Additions kernel modules. This may take a while.
To build modules for other installed kernels, run
/sbin/rcvboxadd quicksetup <version>
or
/sbin/rcvboxadd quicksetup all
Kernel headers not found for target kernel 6.1.2-tinycore64. Please install
them and execute
/sbin/rcvboxadd setup
Running kernel modules will not be replaced until the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
Kernel headers not found for target kernel 6.1.2-tinycore64....
Am I at the right direction?
Where can I get this "kernel headers"?
How to install and execute it?
Thanks
-
You can use netcat if you don't need to paste often. These IPs work for Qemu, you may need a different IP for vbox.
nc -l -p 6666 # on your host
nc 10.0.2.2 6666 # on your VM
When it's running, you can transfer text between the two terminals.
-
When compiling out of tree modules for the kernel you often need to create a symlink pointing to the kernel source, for example /lib/modules/6.1.2-tinycore64/build --> /usr/src/linux-6.1.2
-
You can use netcat if you don't need to paste often. These IPs work for Qemu, you may need a different IP for vbox.
nc -l -p 6666 # on your host
nc 10.0.2.2 6666 # on your VM
When it's running, you can transfer text between the two terminals.
Thank you Curaga. This is actually sufficient for me and works easily since it's already built in tinycore :o
-
When compiling out of tree modules for the kernel you often need to create a symlink pointing to the kernel source, for example /lib/modules/6.1.2-tinycore64/build --> /usr/src/linux-6.1.2
Hi Juanito..
So I did
ln -s "real src" /usr/src/linux-6.1.2
then
ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
This ln command actually confusing to me as it seems to be invoked in reverse ;D
Then i did sudo ./VBoxLinuxAdditions.run and I think this time it worked. Here's the result
$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.6 Guest Additions for Linux 100%
VirtualBox Guest Additions installer
Removing installed version 7.0.6 of VirtualBox Guest Additions...
vboxadd-service.sh: Stopping VirtualBox Guest Addition service.
stopped /usr/sbin/VBoxService (pid 15040)
You may need to restart your guest system to finish removing guest drivers.
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 6.1.2-tinycore64.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
Setting up modules
Building the VirtualBox Guest Additions kernel modules. This may take a while.
To build modules for other installed kernels, run
/sbin/rcvboxadd quicksetup <version>
or
/sbin/rcvboxadd quicksetup all
Building the modules for kernel 6.1.2-tinycore64.
Running kernel modules will not be replaced until the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
$
Now.. what file should I search to make the module/tcz?
-
Here is a good start to read:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions
Don't brake the licens with virtualbox by makeing your own package.
With proprietary code within.
-
Here is a good start to read:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions
Don't brake the licens with virtualbox by makeing your own package.
With proprietary code within.
Hi patrikg..
After invoking sudo ./VBoxLinuxAdditions.run I tried
touch /tmp/mark
make DESTDIR=/tmp/package install
But it gives
make: *** No rule to make target 'install'. Stop.
I think I miss understood something here..
-------------------------------
btw. regarding my reply to Juanito
..... Then i did sudo ./VBoxLinuxAdditions.run and I think this time it worked. Here's the result
I did not mean the copy paste worked.
It's just "sudo ./VBoxLinuxAdditions.run" seemed to finish without error.
Then I don't know what to do from here, to make copy pasting work.
Sorry for confusions.
-
Are there any files named *.ko in the virtualbox folder?
-
Are there any files named *.ko in the virtualbox folder?
No.. I invoked find -name *.ko in the virtualbox folder.
But nothing is found.
-
I'm guessing you're looking for files named like these: http://tinycorelinux.net/4.x/x86/tcz/virtualbox-ose-additions-modules-3.0.21-tinycore.tcz.list
-
Ok.. So I only found
/lib/modules/6.1.2-tinycore64/kernel/fs/vboxsf/vboxsf.ko.gz
/lib/modules/6.1.2-tinycore64/kernel/drivers/virt/vboxguest/vboxguest.ko.gz
then I copied them to
result/usr/local/lib/modules/6.1.2-tinycore64/kernel/misc/vbox/
then create tcz
mksquashfs result vbox7.tcz -noappend
then load the tcz
tce-load -i vbox7.tcz
Everything shows OK.. no error whatsoever
Then I tried copy pasting, still does not work.
Perhaps I need this files (which are not produced when invoking sudo ./VBoxLinuxAdditions.run)?
usr/local/lib/modules/3.0.21-tinycore/kernel/misc/vboxvideo.ko.gz
usr/local/tce.installed/virtualbox-ose-additions-modules-3.0.21-tinycore
-
Everything shows OK.. no error whatsoever
Then I tried copy pasting, still does not work.
Does lsmod show that vboxsf and vboxguest have loaded?
Are you loading them on the host or the guest?
Perhaps I need this files (which are not produced when invoking sudo ./VBoxLinuxAdditions.run)?
usr/local/lib/modules/3.0.21-tinycore/kernel/misc/vboxvideo.ko.gz
usr/local/tce.installed/virtualbox-ose-additions-modules-3.0.21-tinycore
Those files are old, perhaps vboxvideo is no longer used?
It might be worth checking the script /usr/local/tce.installed/virtualbox-ose-additions-modules-3.0.21-tinycore to see what it does.
-
I rebooted tinycore... then tce-load -i vbox7.tcz
lsmod gives
$ lsmod
Module Size Used by Not tainted
cpufreq_userspace 12288 0
cpufreq_conservative 12288 0
cpufreq_powersave 12288 0
squashfs 36864 1
video 45056 0
backlight 12288 1 video
wmi 16384 1 video
xhci_pci 12288 0
vboxguest 28672 0
xhci_hcd 102400 1 xhci_pci
e1000 81920 0
loop 20480 2
xhci_pci_renesas 12288 1 xhci_pci
ac 12288 0
battery 16384 0
pcspkr 12288 0
$
Are you loading them on the host or the guest?
I'm loading them on the guest. My host is Windows 10.
...It might be worth checking the script /usr/local/tce.installed/virtualbox-ose-additions-modules-3.0.21-tinycore to see what it does.
#!/bin/sh
# creating daemon group if it isn't already there
if ! getent group daemon >/dev/null; then
# Adding system group: daemon
addgroup -S daemon >/dev/null
fi
# creating vboxadd user if it isn't already there
if ! getent passwd vboxadd >/dev/null; then
# Adding system user: vboxadd
adduser \
-S \
-D \
-H \
-G daemon \
-s /bin/sh \
vboxadd >/dev/null
fi
if [ -e /dev/vboxuser ]; then
chmod 666 /dev/vboxuser
chown vboxadd:daemon /dev/vboxuser
fi
if [ -e /dev/vboxguest ]; then
chmod 600 /dev/vboxguest
chown vboxadd:daemon /dev/vboxguest
fi
I don't know what this means..
Perhaps I need to recreate vbox7.tcz to include
"/usr/local/tce.installed/virtualbox-ose-additions-modules-3.0.21-tinycore"
but with other numbers? (probably 6.1.2)
-
lsmod shows that vboxguest is loaded, but not vboxsf - perhaps it loads when needed.
If you add the script to your extension you need to give it the same name as your extension i.e. vbox7.
-
lsmod shows that vboxguest is loaded, but not vboxsf - perhaps it loads when needed.
If you add the script to your extension you need to give it the same name as your extension i.e. vbox7.
Sorry I just realized after I rebooted few times and do lsmod with different scenarios gave exactly same result:
1. boot TinycorePure64 then lsmod
2. boot TinycorePure64 then tce-load -i vbox7.tcz then lsmod
3. boot TinycorePure64 with vbox7.tcz in onboot.lst
All these 3 methods actually gave output the same like the one i posted above (before this reply).
I guess sudo ./VBoxLinuxAdditions.run probably not compatible with TinycorePure64.