?
Solved

Linux Question

Posted on 2006-04-05
16
Medium Priority
?
824 Views
Last Modified: 2013-12-23
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?

Cheers
0
Comment
Question by:rafael_acc
  • 5
  • 4
  • 2
  • +4
15 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 16384353
It usually is in /sbin
/sbin/lsmod
but You may need to be root to run that
also try: cat /proc/modules
0
 
LVL 11

Author Comment

by:rafael_acc
ID: 16384762
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 ?

cheers
0
 
LVL 7

Expert Comment

by:XoF
ID: 16388372
do you have modutils installed?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 16389018
Insert Linux Installtion CD, then select the perticular package from the package list and install it.

BR Dushan
0
 
LVL 11

Author Comment

by:rafael_acc
ID: 16389845
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.

0
 
LVL 11

Author Comment

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

cheers
0
 
LVL 62

Expert Comment

by:gheist
ID: 16395253
FreeBSD does not have lsmod. Equivalent command is kldstat.
FreeBSD is not Linux, similar parts are those that are common to all UNIX-es.
0
 
LVL 62

Expert Comment

by:gheist
ID: 16395260
0
 
LVL 11

Author Comment

by:rafael_acc
ID: 16397088
Ohh ... finally an acceptable answer ... What about if I rename the file from kldstat to lsmod ? do you think I could fool vmware-tools ?

thanks
0
 
LVL 62

Expert Comment

by:gheist
ID: 16401132
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
0
 
LVL 3

Accepted Solution

by:
ryanhunt earned 2000 total points
ID: 16443385
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

Ryan.
0
 
LVL 11

Author Comment

by:rafael_acc
ID: 16443734
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.

Cheers
0
 
LVL 62

Expert Comment

by:gheist
ID: 16626411
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.

gheist
EE Cleanup Volunteer
0
 

Expert Comment

by:tlrandolph
ID: 21458865
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
    ./vmware-install.pl

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.

0
 

Expert Comment

by:tlrandolph
ID: 21458869
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
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Make the most of your online learning experience.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question