WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCorePure64-14.0 - Virtualbox Guest Addition  (Read 2946 times)

Offline pek

  • Full Member
  • ***
  • Posts: 111
TinyCorePure64-14.0 - Virtualbox Guest Addition
« 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

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #1 on: June 07, 2023, 11:35:57 PM »
So, I tried this

Code: [Select]
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
Code: [Select]
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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10993
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #2 on: June 08, 2023, 02:12:47 AM »
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.

Code: [Select]
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.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14643
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #3 on: June 08, 2023, 05:38:30 AM »
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

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #4 on: June 08, 2023, 07:24:47 AM »
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.

Code: [Select]
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

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #5 on: June 08, 2023, 07:34:56 AM »
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
Code: [Select]
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
Code: [Select]
$ 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?

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 684
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #6 on: June 08, 2023, 08:13:35 AM »
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.
« Last Edit: June 08, 2023, 08:16:18 AM by patrikg »

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #7 on: June 08, 2023, 09:00:12 AM »
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
Code: [Select]
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
Quote
..... 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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14643
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #8 on: June 08, 2023, 09:47:31 AM »
Are there any files named *.ko in the virtualbox folder?

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #9 on: June 08, 2023, 10:11:18 AM »
Are there any files named *.ko in the virtualbox folder?

No.. I invoked find -name *.ko in the virtualbox folder.
But nothing is found.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14643
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #10 on: June 08, 2023, 10:25:53 AM »

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #11 on: June 08, 2023, 11:29:09 AM »
Ok.. So I only found
Code: [Select]
/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
Code: [Select]
result/usr/local/lib/modules/6.1.2-tinycore64/kernel/misc/vbox/
then create tcz
Code: [Select]
mksquashfs result vbox7.tcz -noappend
then load the tcz
Code: [Select]
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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14643
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #12 on: June 08, 2023, 12:02:24 PM »
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?

Quote
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.

Offline pek

  • Full Member
  • ***
  • Posts: 111
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #13 on: June 08, 2023, 01:45:26 PM »
I rebooted tinycore... then tce-load -i vbox7.tcz

lsmod gives
Code: [Select]
$ 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
$


Quote
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.
Code: [Select]
#!/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)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14643
Re: TinyCorePure64-14.0 - Virtualbox Guest Addition
« Reply #14 on: June 08, 2023, 02:21:53 PM »
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.