Tiny Core Linux

General TC => Tiny Core on Virtual Machines => Topic started by: Ulysses_ on October 28, 2010, 10:39:30 AM

Title: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on October 28, 2010, 10:39:30 AM
Just noticed the following:

I've seen posts where vmware player runs on TC but you'll never see an extension due to restrictions on distribution. The most you can get is step-by-step installation instructions, and I think I saw someone do that

But no luck yet locating those vmware player installation instructions.  Any hints what to search for, what is likely to appear in the instructions?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on October 28, 2010, 12:48:55 PM
Someone tried (http://forum.tinycorelinux.net/index.php?topic=6183.0), but we never heard from him again. I'll give it a shot with the latest player and write up some instructions.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on October 29, 2010, 12:36:49 PM
If TC is not a debian derivative, was that guy wrong in copying directories from debian?

Vmware site says run-level related directories the installer is asking for should be just made and left empty.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on October 29, 2010, 12:48:28 PM
No, the installer expects certain directories to be present, but they are not required. I didn't copy them myself, I just created empty directories and it seemed happy with that.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on October 30, 2010, 02:12:41 PM
Any luck?

I tried the instructions with vmware player 2.5.4 and created those empty directories.  Installed ok but on execution it says something about Unicode.c.  You get the same error?  Is it source code from TC or vmware?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 05, 2010, 08:01:55 AM
Quote
Any luck?
I am trying to get 3.0 installed, but it keeps asking for the linux headers, even when I point it to the full kernel source. I have no idea what it needs. I'll keep trying.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: curaga on November 05, 2010, 08:07:20 AM
If it tries to build modules, it needs a built-from kernel source. The headers extension is for that.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 05, 2010, 11:58:16 AM
VMware player 3.1.0 installed successfully with:
# yes no | bash VMware-Player-3.1.0-261024.i386.bundle

I tested first with Tiny Core 2.11.6 because I figure my odds are better with an older kernel. The header files are in /lib/modules/2.6.29.1-tinycore/build/include as expected, but:

# vmware-modconfig --console --install-all
gcc and kernel headers must be installed

# vmware-modconfig --validate-gcc $(which gcc) && echo OK
OK

# vmware-modconfig --validate-kernel-headers /lib/modules/2.6.29.1-tinycore/build/include || echo FAIL
FAIL

This indicates the kernel headers directory does not meet its requirements, and I don't know what it's requirements are. Out of curiosity I tried all directories with find / -type d, and they all failed. This means it isn't a matter of specifying the wrong directory but that something it expects is missing.

So I tried TC 3.2. The same command reports:
# vmware-modconfig --console --install-all
sh: /etc/init.d/vmware: not found
Unable to stop services

so as a hack I executed:
# echo true > /etc/init.d/vmware
# chmod +x /etc/init.d/vmware

and it installed successfully. I then started X and ran vmplayer, so only a few questions remain:
1) What is missing in the 2.x linux-headers that is present in the 3.x linux-headers?
2) Why wasn't /etc/init.d/vmware installed and what is necessary for it to install properly?

I expect to be able to resolve these with a little more effort, but I wanted to give the details I had so far. Note that I did not list all of the extensions I had to load because I want to make sure I know what the minimal set is first. Before that, I need to get it installing without any errors at all.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 05, 2010, 02:49:57 PM
Quote
What is missing in the 2.x linux-headers that is present in the 3.x linux-headers?
Using strace, I discovered the missing file is /usr/local/src/linux-headers-2.6.29.1/build/.config. Once I got that file (http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/archive/src/config-2.6.29.1-tinycore) and saved it as .config, vmware-modconfig worked.

Curaga: should it be in the 2.x linux-headers extension? It is in the 3.x version.

So, the full installation procedure for vmware player is:
1) Install extensions
$ for e in compiletc bash coreutils module-init-tools linux-headers-$(uname -r); do tce-load -i $e; done

2) Get config for Tiny Core 2.x only
$ sudo wget -O /lib/modules/2.6.29.1-tinycore/build/.config
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/archive/src/config-2.6.29.1-tinycore

3) Install VMware Player
$ for n in $(seq 0 6); do sudo mkdir -p /etc/rc.d/rc$n.d/; done
$ yes no | sudo bash VMware-Player-3.1.0-261024.i386.bundle
$ sudo sed 's:/sbin/::' -i /etc/rc.d/init.d/vmware
$ sudo vmware-modconfig --console --install-all

I confirmed this exact sequence will install VMware Player in Tiny Core 2.11.6 and 3.2.
$ sudo /etc/rc.d/init.d/vmware start

Starting VMware services:
   VMware USB Arbitrator                    done
   Virtual machine monitor                  done
   Virtual machine communication interface  done
   VM communication interface socket family done
   Blocking file system                     done
   Virtual ethernet                         done
   Shared Memory Available                  done

My initial testing indicated you will probably need the following extensions loaded when running it:

I was able to create a virtual machine and boot a Tiny Core iso using VMware Player after following these steps.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: curaga on November 06, 2010, 01:25:14 AM
You should contact hats for that, he's the linux-headers extension maintainer.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: ^thehatsrule^ on November 06, 2010, 11:16:33 AM
I'm not sure why that file isn't there, it's even stated in the .info that it was used.  Perhaps it was lost during update/conversion.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 07, 2010, 12:56:00 PM
I followed the instructions on a fresh install of TC on a usb flash drive with nothing but syslinux and dosfstools.  

Seems to install but when you power up a VM, it brings up a popup that says:

Error
The virtual machine is busy

The VM has a brand new .vmx and no other files in its folder initially.  Plays normally with vectorlinux as a host (it boots a ubuntu .iso).

Rebooting TC, it seems that vmware-related directories are deleted.  Is this supposed to happen?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 07, 2010, 06:55:39 PM
Quote
Rebooting TC, it seems that vmware-related directories are deleted.  Is this supposed to happen?
With Tiny Core, everything is stored in memory. When you reboot, you will lose anything which is not specifically saved. This lack of persistence is a benefit for many users (zero cruft), but it means that anything which needs to be permanent requires extra work.

The VMware Player install creates 4562 files, so your best bet is to create an extension (or backup file) containing those files. This might be a challenge for a new user. I was able to create an extension for my own personal use, so with some effort, I know it can be done. Unfortunately, since no one can redistribute vmware player, no one can resolve the dependencies and create a nice, tidy package.

As for the "virtual machine is busy" error, I got that once, but I don't know what caused it. I think it was not having Xorg or some dependency loaded but I'm not sure.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 08, 2010, 05:22:34 AM
When you do a shutdown there is an option to also do a backup.  Does that only include the home directory and the extensions, as in damnsmalllinux?  If yes, what's to stop us from also including other directories, or even the rebuilt kernel?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 08, 2010, 07:32:11 AM
The backup will include all files and directories listed in /opt/.filetool.lst. You can include whatever you want, but the more files you include the longer it takes to extract during bootup. Extensions are fast because they are simply loop mounted.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 08, 2010, 12:22:51 PM
Remains to be seen then, how long a boot takes if it restores all 4562 vmware files.  Hopefully many can be skipped.

How do I uninstall all extensions except your recommended ones for launching VM's with vmware?

Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 08, 2010, 03:44:22 PM
Giving it another go, this time reporting everything because of some newbie issues I faced.  

- Burn a TC 3.2 liveCD
- Boot from liveCD
- Using AppBrowser, install syslinux and dosfstools
- Using ControlPanel, do a USB Install onto a flash drive (type [E]xt)
- Boot from usb flash drive
- Using AppBrowser, install compiletc, bash, coreutils, module-init-tools, and linux-headers-2.6.33.3-tinycore

[ question: why doesn't gcc get installed when you enter "tce-load -wi compiletc"? This is why AppBrowser is used instead of the script]

- Type the following:
sudo mkdir -p /etc/rc.d/rc0.d/
sudo mkdir -p /etc/rc.d/rc1.d/
sudo mkdir -p /etc/rc.d/rc2.d/
sudo mkdir -p /etc/rc.d/rc3.d/
sudo mkdir -p /etc/rc.d/rc4.d/
sudo mkdir -p /etc/rc.d/rc5.d/
sudo mkdir -p /etc/rc.d/rc6.d/

- Install vmware player
sudo bash VMware-Player-3.1.0-261024.i386.bundle
(at the prompts enter yes and no)

- Type this:
sudo sed 's:/sbin/::' -i /etc/rc.d/init.d/vmware

[ question: what does the substitute command "s:" do here? ]

[ note: this is where I ran vmplayer and it produced the "VM is busy" popup ]

- Type this:
sudo vmware-modconfig --console --install-all

[ question: vmware-modconfig does not exist so this fails - why? ]

Type this:
sudo /etc/rc.d/init.d/vmware start
It should produce the following output:
Starting VMware services:
   VMware USB Arbitrator                    done
   Virtual machine monitor                  done
   Virtual machine communication interface  done
   VM communication interface socket family done
   Blocking file system                     done
   Virtual ethernet                         done
   Shared Memory Available                  done

Ready to run the player:
vmplayer
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 08, 2010, 04:04:26 PM
Executing "tce-load -w -i compiletc" will load gcc. Something else must be wrong.

Quote
- Type the following:
sudo mkdir -p /etc/rc.d/rc0.d/
...
The for ... each statement I gave is simpler, but this works too.

Quote
- Install vmware player
sudo bash VMware-Player-3.1.0-261024.i386.bundle
(at the prompts enter yes and no)
I didn't mean "answer yes and no," I meant for you to type:

yes no | sudo bash VMware-Player-3.1.0-261024.i386.bundle

exactly, but that won't affect the installation.

Quote
- Type this:
sudo sed 's:/sbin/::' -i /etc/rc.d/init.d/vmware

[ question: what does the substitute command "s:" do here? ]
The vmware start/stop script includes absolute pathnames to the binaries (provided by module-init-tools) which do not match their locations in Tiny Core. The alternative is to create softlinks where vmware expects to find them, but I thought it simpler to just edit the script.

Quote
[ note: this is where I ran vmplayer and it produced the "VM is busy" popup ]
You can't run vmplayer yet at this point because it isn't fully installed until after vmware-modconfig is run.

Quote
- Type this:
sudo vmware-modconfig --console --install-all

[ question: vmware-modconfig does not exist so this fails - why? ]
If vmware-modconfig does not exist, then the install must have failed.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 09, 2010, 03:48:43 AM
There's a possible bug/unexpected behaviour in tce-load -w -i compiletc.  If you stop this while it's running (or if it stalls in the middle, saw this happen during the download of ppl, someone was checking in?), then the next time you run it it thinks the extension is fully installed ie that all extensions it depends are installed.

By the way, I was aware what you were doing with "yes no |", just felt I'd be safer to know what I'm saying yes to.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 09, 2010, 04:24:41 PM
Hurray!  Vmware up and running, posting this from a TC VM.  

This baby is hereby running a VM with 1.9 GB of ram on a 2 GB host without using any swap space... 8)  On windows xp you can't use more than 1.3 GB for your VM's so this is a major improvement.  :)

The trick to make the installation work was Xorg, it is required by the vmware .bundle script, otherwise that script fails without any error message and subsequent commands are missing or fail.  

Alsa was also required.  Might OSS be better? It is recommended for flash videos in the VM.

With Xorg and alsa added, the .bundle script produces a window like it does in any other linux distro, where you say yes/no by ticking circles in the window.

VM's need some adjustments too, /dev/dsp does not work but the first alsa option does for sound,etc.

Can't wait to run some performance benchmarks and see how TC and vectorlinux VM's perform compared to having windows xp as a host.  

What's a good benchmark for flash videos and browser scripts?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 09, 2010, 05:10:49 PM
How do I get the list of 4562 files that vmware installs, in order to fill in /opt/.filelist.lst appropriately?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: tinypoodle on November 09, 2010, 05:35:35 PM
Perhaps http://forum.tinycorelinux.net/index.php?topic=7157.0 could be of help...
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: maro on November 09, 2010, 07:17:25 PM
How do I get the list of 4562 files that vmware installs, in order to fill in /opt/.filelist.lst appropriately?

You would only have to add the respective top-most directory, as long as as no other (unwanted) files would be included as a side effect by this.

OTHO using the TC backup mechanism to backup / restore 4562 files at each shutdown and boot is IMHO simply "insane". I reckon you could be waiting there several minutes and assume that the system has come to a "standstill" whilst it's just busy with backup or restore. You really should create a private tcz extension (needs the 'squashfs-tools-4.x.tcz' extension installed).
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: curaga on November 10, 2010, 12:17:45 AM
Browser perf is usually measured by the various javascript tests, and the peacekeeper bench.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 10, 2010, 10:31:22 AM
How do I get the list of 4562 files that vmware installs, in order to fill in /opt/.filelist.lst appropriately?
Simplest method:

$ touch /tmp/stamp
... install vmware player ...
$ find / -newer /tmp/stamp

You'll need to trim out any superfluous entries, but once you have the list you can use it to create an extension. It will be a learning experience. :)
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 10, 2010, 11:49:23 AM
Probably 90% of them are superfluous or unnecessary anyway.  Maybe the vmware folks are the ones to ask about this, rather than use trial and error till hell freezes. :D

It should be like the GetFlash extension, which is only a script that you run manually in order to download flash.  

People should really be insulated from all this typing and trial and error.  I believe in computers as means to ends, it is easy to forget this is what they are.  Even extension creation should be automated somewhat as much as possible.

Is there any template for an extension like GetFlash complete with instructions how to create it?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 10, 2010, 03:53:44 PM
Quote
Even extension creation should be automated somewhat as much as possible.
My extensions are. This is how I calculated the 4562 figure. I rather doubt anyone else could use my highly-customized script, but I agree: automating it is helpful. My extensions would never get updated, otherwise. Here's a rough description of my script:

1) Create a temporary directory for the following steps.
2) Extract tinycore.gz.
3) Extract compiletc deps and any other extensions required to build the source.
4) Chroot into the directory, perform a few initialization steps, then build from source.
5) Remove all files extracted in steps 2 and 3, leaving only the binaries built in the previous step.

That much isn't too difficult to automate, but the next steps are real time savers:
6) Package remaining files into a base extension with -dev, -doc, and -lib extensions as appropriate.
7) Create a .list and .md5.txt file for each extension.
8) Create a .info using a T2 desc file (http://www.t2-project.org/packages/) as a template.
9) Run ldconfig recursively on every file to create a list of required libraries.
10) Search the tce directory for extensions containing those libraries and create a .dep file (not comprehensive).
11) Audit using a customized version of the extension audit script (http://forum.tinycorelinux.net/index.php?topic=2475.msg18128#msg18128).
12) Package all of the generated files into a bcrypted tar for submission.

Bugs in my script cause Jason grief on occasion (a good reason to not distribute it), but the concepts are worth sharing. They could be discussed and refined in the scripting forum, so I might do that.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 11, 2010, 08:13:39 AM
What if you create an extension that takes the current state of the filesystem and does a backup of it into a .tcz.  This would then be the user's private extension, dependent on all their chosen extensions.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on November 11, 2010, 08:44:06 AM
An extension is read-only. You can't include the whole filesystem in an extension or else lots of things will break. Do you mean only changed files? You have a couple of methods to find changed files:
1) Use a timestamp and "find -newer"
2) Install in a chroot then subtract out the files.

The timestamp method is widely used for its simplicity. Does it work for you?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: tinypoodle on November 11, 2010, 10:54:49 AM
Even if doing a scatter install or creating a new initrd based on "current state of the filesystem" (which as opposed to an extension would be on a writable resp. expanded to a writable file system) certain dirs could not be included, e.g. /mnt and /proc.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on November 12, 2010, 11:39:50 AM
Currently using the timestamp method for another purpose, to find out what might be missing from a "tce-load -wi" download that is not missing from an Appbrowser download resulting in vmware being uninstallable in the former case.

Hasn't anyone noticed the error messages while "tce-load -wi" is downloading?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on December 09, 2010, 01:52:59 PM
The instructions that used to work for this do not currently.  Neither in TC 3.2, nor in TC 3.3.  Here's the script that used to work:

Part 1:

for e in compiletc bash coreutils module-init-tools linux-headers-$(uname -r) Xorg-7.5 alsa GConf; do tce-load -wi $e; done

Now exit X, and type startx

Part 2:

for n in $(seq 0 6); do sudo mkdir -p /etc/rc.d/rc$n.d/; done
sudo bash VMware-Player-3.1.0-261024.i386.bundle
if [ ! -f /etc/rc.d/init.d/vmware ]; then
echo VMware .bundle installation script has failed
exit
fi
sudo sed 's:/sbin/::' -i /etc/rc.d/init.d/vmware
sudo vmware-modconfig --console --install-all
sudo /etc/rc.d/init.d/vmware start


Currently this exits with "VMware .bundle installation script has failed"
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on December 10, 2010, 12:35:32 PM
I repeated my procedure with a "base norestore" boot of 32-bit Tiny Core 3.3 and it still works for me. Note that I used VMware Player 3.1.2:

Here is my script:

PLAYER=VMware-Player-3.1.2-301548.i386.bundle
for e in compiletc bash coreutils module-init-tools linux-headers-$(uname -r); do
[ -d /tmp/tcloop/$e ] || tce-load -i $e
done

for n in $(seq 0 6); do sudo mkdir -p /etc/rc.d/rc$n.d/; done

ls $PLAYER >/dev/null || exit
yes no | sudo bash $PLAYER

ls /etc/rc.d/init.d/vmware >/dev/null || exit
sudo sed 's:/sbin/::' -i /etc/rc.d/init.d/vmware

which vmware-modconfig >/dev/null || exit
sudo vmware-modconfig --console --install-all

sudo /etc/rc.d/init.d/vmware start
for e in Xorg-7.5 GConf alsa; do
[ -d /tmp/tcloop/$e ] || tce-load -i $e
done

I was able to create a VM and run Tiny Core within the VM.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on December 11, 2010, 05:40:29 PM
Thanks.  Back to working order.  Any newbie reading, better replace -i with -wi after tce-load.

In the interest of future users running this script, it would be nice if they could run it with current extensions and current TC.  Otherwise it might not work.

Do you have a public place where current extensions that are relevant to TC as a host for vmware can go?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on December 11, 2010, 05:45:06 PM
Is Xorg-7.5-vmware.tcz for TC as a guest only?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: curaga on December 12, 2010, 01:20:52 AM
Is Xorg-7.5-vmware.tcz for TC as a guest only?

Yes. Of no use in the host.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on December 12, 2010, 05:25:36 AM
In order to play videos as well as possible in the guest (especially flash videos),

1. Should I have Xorg-7.5-3d.tcz on the host?

2. Should I have Xorg-7.5-3d.tcz in the guest together with Xorg-7.5-vmware.tcz?

Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on December 12, 2010, 05:27:36 AM
My host has an ATI Mobility Radeon X700.  Is there a better driver than the default with Xorg?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: curaga on December 12, 2010, 06:48:03 AM
In order to play videos as well as possible in the guest (especially flash videos),

1. Should I have Xorg-7.5-3d.tcz on the host?

2. Should I have Xorg-7.5-3d.tcz in the guest together with Xorg-7.5-vmware.tcz?

I don't know. Never even tried to play media in a virtualized guest, the idea seems quite wrong to me. The recent acceleration efforts work differently in every VM, you'd need to ask vmware how theirs works.

My host has an ATI Mobility Radeon X700.  Is there a better driver than the default with Xorg?

No. In fact that's the only driver, AMD's official one dropped support for that card over a year ago.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: Ulysses_ on December 20, 2010, 02:30:22 AM
In order to make the changes introduced by the vmware installation persistent, /opt/.filelist.lst could be edited.  Below is the list of changes vmware causes as derived using the timestamp method.

Which entries would you delete before copying the rest to /opt/.filelist.lst?
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on December 20, 2010, 11:23:04 AM
Using the backup method will create a large archive. It is useful as proof of concept, but you will want to create an extension with the proper files eventually.

The biggest tip is to exclude any pathnames with begin with /mnt, /dev, /sys, /proc, /tmp, /home/tc, or /lib/modules/2.6.33.3-tinycore/modules. You should also remove any files which were present before the installation. I see a bunch of files under /usr/local which are not part of vmplayer.

I'll create a list for comparison when I get a chance.
Title: Re: Anyone succeeded with installing vmware on TC?
Post by: danielibarnes on December 20, 2010, 12:59:04 PM
Attached list from TC 2.x build