Linux Question

Hi Experts,

I've been using windows for ages now. Suddenly, I decided giving a try to linux. I'm experiencing some problems though regarding the LSMOD command. I know what it does but it looks like it just doesn't exist. Anyway ... let me give some more details:

Running FreeBSD hosted by windows VMWare 5.0. After I have finished the installation, i tried to install vmware tools ... this was straight forward once  -so i've done it before. though, now I'm getting this message that "lsmod" command cannot be found.

It really looks like the command is not installed. When i run "which lsmod" i get nothing useful - well, i know this could also be related to the path not being included in the PATH env variable.

Anyway, the question is: Is there anyway I could install a package or somethign similar to make the command available?

LVL 11
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It usually is in /sbin
but You may need to be root to run that
also try: cat /proc/modules
rafael_accAuthor Commented:
it is not in /sbin - I checked that before i posted the question.
What would be the purpose of running cat /proc/modules since "cat" is a concatenation tool ?

do you have modutils installed?
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

Dushan De SilvaTechnology ArchitectCommented:
Insert Linux Installtion CD, then select the perticular package from the package list and install it.

BR Dushan
rafael_accAuthor Commented:
Is there anyone that really have FreeBSD to guide me through. Under my install there is a tool called SYSINSTALL which is sort of "add/remove programs" under windows. I cannot find any distribution/package with the name modutils. I did find "mtools" but after installing it, there is no difference.

Please advice.

rafael_accAuthor Commented:
And by the way, what is the difference between the distribution and package (I'm not talking about different Linux distributions!).

FreeBSD does not have lsmod. Equivalent command is kldstat.
FreeBSD is not Linux, similar parts are those that are common to all UNIX-es.
rafael_accAuthor Commented:
Ohh ... finally an acceptable answer ... What about if I rename the file from kldstat to lsmod ? do you think I could fool vmware-tools ?

No - FreeBSD is different from Linux, it supports userland programs made for linux, bu in no way kernel modules.
Better then " ln -s `which true` /bin/lsmod " just to fool vmware
I guess if you *really* wanted to install the VMWare tools you could fool VMWare/FreeBSD, keeping in mind any kernel modules it installs won't run on FreeBSD.

There is a port in the ports tree for the VMWare tools, but I'm not sure if it's what you need?

check in /usr/ports/emulators/

(make sure you installed the ports tree - you can do this from sysinstall)

cd /usr/ports/emulators/vmware-tools-VERSION
make clean && make && make install

read the pkg-descr and other readme files in that directory it should get you going


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rafael_accAuthor Commented:
Thanks ryan,

I'll try your suggestion. It sounds good. I am not sure when am I gonna be able to come with any feedback though.

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept ryanhunt http:#16443385

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
I had a very similar problem with VMWare 6.0, and it was traced to having the wrong Guest operating system selected. In the virtual machine settings, on the options pane is where the setting is. I had created the virtual machine as a Linux variant because I didn't see a FreeBSD item in the available options in the Wizard.

Anyway, select Other, then in Version select FreeBSD or the 64-bit equivalent to tell VMWare the actual OS you're going to load.

What this setting does is that it changes the VMTools edition that shows up in the cdrom. Logged in as root, here are the commands to run. some device and folder names might vary for you. Especially, your cdrom device name might be different; check the /dev folder to find the right name.
    mount -r /dev/acd0 /cdrom
    cd /tmp
    mkdir /vmtools
    cd vmtools
    tar zxpf /cdrom/vmware-freebsd-tools.tar.gz
    umount /cdrom
    cd vmware-tools-distrib

That (for me at least) was what it took. As an earlier poster mentioned, FreeBSD doesn't have the module utilities because those are part of the varieties of Linux that are closer to the mainline. Thus, FreeBSD has different scripts in the VMTools install that don't use commands that don't work.

Once the proper Guest OS is chosen, the Install VMTools command provides the correct set of files, which use the proper commands so it can do the install properly.

Looking at it from the opposite direction, the original poster ran the VMTools install script, which asked for a command that didn't exist. If he had managed to fix the lsmod, he'd find the script just wanted a different command that also didn't exist (yes, I tried that). In any event, the script wanted the wrong command because it was extracted from the wrong TAR file, because VMWare presented the wrong CD image, because the Client OS type was set incorrectly for the actual OS that was installed.

correction to the above, sorry for the bad edit-check before posting!

mount should be mount_cd9660, only 'cause that's what worked for me
also, the "options pane" mentioned above is really a "tab"

Again, sorry for those minor gotchas
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.