Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2000 07:50:16 +1000 
From:      Matthew Peacock <Mattp@innerrange.com.au>
To:        'Mike Meyer' <mwm@mired.org>
Cc:        "Freebsd (E-mail)" <questions@freebsd.org>
Subject:   RE: Please help with linux compatibility
Message-ID:  <B1A814C42460D311B10F009027589E4E093FCD@EXCHANGE>

next in thread | raw e-mail | index | archive | help
Thanks for your help. I'll try it tonioght.

	-----Original Message-----
	From:	Mike Meyer [SMTP:mwm@mired.org]
	Sent:	Monday, December 04, 2000 8:21 PM
	To:	Matthew Peacock
	Cc:	questions@freebsd.org
	Subject:	Re: Please help with linux compatibility

	Matthew Peacock <Mattp@innerrange.com.au> types:
	> *	When Installing FreeBSD I said "Yes" to the question "Would
you like
	> to have linux compatibility". This then installed some
compatibility
	> libraries which I assume are all the librararies that are needed.

	Ok, I don't know what asking for Linux compatability at install time
	does. You need to do two things, though: 1) enable the kernel API
	support for Linux, and install the linux_base port.

	> *	After installation I checked the /usr/compat/linux/ shadow
	> directories and saw that there wer lots of directories that were
ther. I
	> looked in /usr/compat/linux/lib and saw that there were lots of
linux
	> libraries there.

	That would indicate that the linux_base port was installed. You
might
	verify that /compat is a symlink to /usr/compat, or /compat/linux is
a
	symlink to /usr/compat/linux.

	> *	Next I edited the /etc/defaults/rc.conf file and added
	> LINUX_ENABLE="YES". I thought that this was a bit strange that it
said no to
	> start with because I had asked for linux compatibility during
install.

	You should *never* touch anything in /etc/defaults/. Those files
hold
	default values for things you set in files in /etc. In this case,
	/etc/rc.conf - which should have had LINUX_ENABLE="yes" added by the
	install process.

	> *	I rebooted and did "kldstat". I expected to see the linux
module but
	> I did not. I am running a recent version of FreeBSD (dated About
June this
	> year and purchased as FreeBSD Toolkit v5). I am thinking that
maybe the
	> linux compatibility module is now statically linked to the kernel.
Is this
	> correct? I wasnt sure so I tried typing "linux" as the handbook
advised but
	> it said that this module was unknown.

	It doesn't look like the Linux module is statically linked.  You
	should try loading it by hand, though. Try running "/sbin/kldload
	linux", then check the console error messages. If Linux is already
	already loaded, it will say "module linux already present" or words
to
	that effect. If it's wasn't loaded, and the module exists, that will
	load it for you. If you can't get it loaded, you won't be able to
get
	them to run.

	Care to provide the exact text of the message you got from running
	"linux"? There are a number of things that can be interpreted as
	saying the module was unknown, but don't mean that.

	> *	Anyway, after assuming that the linux compatibility is
statically
	> linked, I then tried to install a few linux apps to see what would
happen. I
	> got StarOffice3.1 to install and I got Wingz (spreadsheet) to
install. When
	> I tried to execute these programs they both gave me the results
	> "/lib/libname not found" (I cant remember the exact name of the
library but
	> it did exist in the linux shadow library directory). I realised
that the
	> program was still looking for where linux keeps its modules. I
therefore
	> created a /lib directory and copied the linux modules from the
	> /usr/compat/linux/lib directory and then tried to run the app. I
got
	> "segmentation fault core dumped". 

	Um - if you have the linux module loaded, it will check
	/compat/linux/lib before it checks /lib. If you managed to overwrite
	FreeBSD libraries with their Linux version, your system is going to
be
	*very* flaky.

	> *	I then consulted the manual again and it said that I should
put the
	> binaries (Wingz and swriter etc) into the /usr/compat/linux/lib
directory
	> and run them from there. This did not work - it just said
"/lib/libname not
	> found".

	Binaries? In a lib directory? Where in the manual does it say that?

		<mike
	--
	Mike Meyer <mwm@mired.org>
http://www.mired.org/home/mwm/
	Independent WWW/Unix/FreeBSD consultant,	email for more
information.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B1A814C42460D311B10F009027589E4E093FCD>