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?

Cheers
LVL 11
rafael_accAsked:
Who is Participating?
 
ryanhuntCommented:
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
 
ravenplCommented:
It usually is in /sbin
/sbin/lsmod
but You may need to be root to run that
also try: cat /proc/modules
0
 
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 ?

cheers
0
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!

 
XoFCommented:
do you have modutils installed?
0
 
Dushan De SilvaTechnology ArchitectCommented:
Insert Linux Installtion CD, then select the perticular package from the package list and install it.

BR Dushan
0
 
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.

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

cheers
0
 
gheistCommented:
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
 
gheistCommented:
0
 
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 ?

thanks
0
 
gheistCommented:
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
 
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.

Cheers
0
 
gheistCommented:
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
 
tlrandolphCommented:
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
 
tlrandolphCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.