FreeBSD and linux emulator problem

Hello,
I use FreeBSD 7.2 and have some problems with Linux emulator instalation.I can't load it via kldload:

Code:
caph# kldload linux
kldload: can't load linux: No such file or directory

Also I try with:

Code:
sysctl compat.linux.osrelease=2.6.16

Add:

compat.linux.osrelease=2.6.16 to /etc/sysctl.conf

and

Code:
caph# pkg_add -r linux_base-f9
Fetching [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Latest/linux_base-f9.tbz[/url]... Done.
sysctl: unknown oid 'compat.linux.osrelease'
linuxulator is not (kld)loaded, exiting
pkg_add: install script returned error status

but... nothing.
If I run it via /ports/

Code:
===>  linux_base-f10-10_2 linuxulator is not (kld)loaded.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-f10.

Thanks
 
Have a look in /boot/kernel/ the module should exist there.

Did you set any options in /etc/make.conf?

How do you update, source or freebsd-update?
 
1st sorry for the wrong section :)
2nd:

Code:
caph# pwd
/boot/kernel
caph# ls lin*
linker.hints
caph# cat /etc/make.conf
# added by use.perl 2010-01-08 00:23:55
PERL_VERSION=5.8.9

Sorry but Im new in FreeBSD and... I thing that I update ports, when smokeping was installed:

Code:
# cvsup -L 2 /root/ports-supfile
# portsdb -Uu

and than:

Code:
# portversion -l "<"
# portupgrade -arR
# pkgdb -F

but Im not 100% sure what this cmd do :)
 
installing linux module ,you have to be have already kernel source or install linux emulatio from sysinstall from command line .
Code:
cd /usr/src/sys/modules/linux
make install clean
add to rc.conf :
Code:
linux_enable="YES"
load linux module :
Code:
kldload linux
install linux emulation :
Code:
/usr/ports/emulators/linux_base-f9
make install clean
i did not try to install f10 in FreeBSD 7.1 only f9 or f8 .
add to /etc/fstab this line :
Code:
linproc                 /usr/compat/linux/proc  linprocfs       rw              0       0
finally mount linproc and start linux emulation :
Code:
mount linproc
/etc/rc.d/abi start
/etc/rc.d/sysctl restart
 
thx bro but:

Code:
caph# cd /usr/src/sys/modules/linux
caph# make install clean
install -o root -g wheel -m 555   linux.ko /boot/kernel
install: linux.ko: No such file or directory
*** Error code 71

Stop in /usr/src/sys/modules/linux
.

google didnt find any solution :(

From sysinstall I have some error like:

Code:
sysctl: unknown oid 'compat.linux.osrelease'
linuxulator is not (kld)loaded, exiting

and:

Code:
caph# cd /usr/ports/emulators/linux_base-f9
caph# make install clean
===>  linux_base-f9-9_1,1 linuxulator is not (kld)loaded.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-f9.
caph# cd ..
caph# cd /usr/ports/emulators/linux_base-f8
caph# make install clean
===>  linux_base-f8-8_12 linuxulator is not (kld)loaded.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-f8.

I thing that may be something missing, but... :(
 
sry cant find how to edit post, so I will write it in new replay:

Code:
caph# locate linux.ko
/boot/kernel/3dfx_linux.ko
/boot/kernel/3dfx_linux.ko.symbols
/boot/kernel/aac_linux.ko
/boot/kernel/aac_linux.ko.symbols
/boot/kernel/amr_linux.ko
/boot/kernel/amr_linux.ko.symbols
caph# whereis linux.ko
linux.ko:
 
ah and again :(

Code:
caph# find / -name linux.ko
/boot/kernel/linux.ko

file is there, wtf?!?
I try to edit Makefile ( /usr/src/sys/modules/linux ), but cant find where linux.ko is... !?!
 
try this :
Code:
cd /usr/src/sys/modules/linux
make
make install
make clean
then install linux emulation .
to edit your post ,under your reply you will see a red button named EDIT .
 
SIFE said:
to edit your post ,under your reply you will see a red button named EDIT .
You can edit posts after 10 posts and 10 days.
 
SIFE said:
try this :
Code:
cd /usr/src/sys/modules/linux
make
make install
make clean
then install linux emulation .
to edit your post ,under your reply you will see a red button named EDIT .

Nothing again :(

Code:
caph# make 
...........
...........
 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/linux/../../i386/linux/imgact_linux.c
ld  -d -warn-common -r -d -o linux.kld linux_locore.o linux_support.o linux_dummy.o linux_emul.o linux_file.o linux_futex.o linux_getcwd.o 
linux_ioctl.o linux_ipc.o linux_machdep.o linux_mib.o linux_misc.o linux_signal.o linux_socket.o linux_stats.o linux_sysctl.o linux_sysent.o 
linux_sysvec.o linux_uid16.o linux_util.o linux_time.o assym.o linux_ptrace.o imgact_linux.o
echo  linux_emul_path linux_get_osname linux_get_osrelease linux_ifname linux_ioctl_register_handler linux_ioctl_unregister_handler > 
export_syms
awk -f /usr/src/sys/modules/linux/../../conf/kmod_syms.awk linux.kld  export_syms | xargs -J% objcopy % linux.kld
ld -Bshareable  -d -warn-common -o linux.ko linux.kld
objcopy --strip-debug linux.ko

caph# make install
install -o root -g wheel -m 555   linux.ko /boot/kernel
install: /boot/kernel/linux.ko: Input/output error
*** Error code 71

Stop in /usr/src/sys/modules/linux.
caph#

Thx for the edit info ;)
 
SIFE said:
try to update your /usr/src using cvsup ,and then install the module .

can you help me to create a supfile? :)
Is this correct:

Code:
caph# cat supfile

*default tag=.
*default host=cvsu.FreeBSD.org
*default prefix=/usr
*default base=/var/db
*default release=cvs delete use-rel-suffix compress

src-all

caph# cvsup supfile

:)
 
Skip the installation of net/cvsup. Since 6.4 the base OS includes csup. It's similar in features and use.
 
This is my cvs-supfile:

Code:
*default host=cvsup.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs
*default delete use-rel-suffix

*default compress

src-all

#ports-base

doc-all
www
projects-all
cvsroot-all

Code:
caph# cvsup cvs-supfile
...............
...............

when I came home ( after 1h ) and run:

Code:
caph# make
......
......
echo  linux_emul_path linux_get_osname linux_get_osrelease linux_ifname linux_ioctl_register_handler linux_ioctl_unregister_handler > export_syms
awk -f /usr/src/sys/modules/linux/../../conf/kmod_syms.awk linux.kld  export_syms | xargs -J% objcopy % linux.kld
ld -Bshareable  -d -warn-common -o linux.ko linux.kld
objcopy --strip-debug linux.ko
caph# make install
install -o root -g wheel -m 555   linux.ko /boot/kernel
install: /boot/kernel/linux.ko: Input/output error
*** Error code 71

Stop in /usr/src/sys/modules/linux.

Is my cvs-supfile wrong ?!?

P.S. after 5h+ I close putty ( I was at work so I use putty ) from the X button.Is this interrupt the compilation?Here is ps aux before my last make->make install
 
try to remove first /usr/src/*
Code:
cd /usr/src
rm -R *
cd /usr/obj
rm -R *
then cvsup :
Code:
*default host=cvsup7.de.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_1
*default delete use-rel-suffix
*default compress
are you have custom kernel or generic kernel .
 
SIFE said:
try to remove first /usr/src/*
Code:
cd /usr/src
rm -R *
cd /usr/obj
rm -R *
then cvsup :
Code:
*default host=cvsup7.de.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_1
*default delete use-rel-suffix
*default compress
are you have custom kernel or generic kernel .

Thanks,I use - generic FreeBSD 7.2

Code:
*default release=cvs tag=RELENG_7_2

?
 
SIFE said:
now what happend .

box was down for a while :)
Now seems all is OK.I have some success:

Code:
caph# make install
install -o root -g wheel -m 555   linux.ko /boot/kernel
kldxref /boot/kernel


than I run, make clean and:

Code:
caph# cd linux_base-f10
caph# make install clean
===>  linux_base-f10-10_2 compat.linux.osrelease: 2.4.2 is not supported, please use 2.6.16.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-f10.
caph# pwd
/usr/ports/emulators/linux_base-f10
caph# cd ..
caph# cd linux_base-f9
caph# make install clean
===>  linux_base-f9-9_1,1 compat.linux.osrelease: 2.4.2 is not supported, please use 2.6.16.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-f9.

Now I must run:
Code:
caph# sysctl compat.linux.osrelease=2.6.16

? :)
 
Code:
echo compat.linux.osrelease=2.6.16 >> /etc/sysctl.conf
this will take effect next boot and ,ake your life easy .
 
SIFE said:
Code:
echo compat.linux.osrelease=2.6.16 >> /etc/sysctl.conf
this will take effect next boot and ,ake your life easy .

Code:
===>   Registering installation for linux_base-f10-10_2
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/compat/linux/lib/libdb-4.7.so
/compat/linux/usr/lib/libgssrpc.so.4.0
/compat/linux/lib/libselinux.so.1
/compat/linux/lib/libresolv-2.9.so

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
===>  Cleaning for rpm-3.0.6_14
===>  Cleaning for automake-1.4.6_5
===>  Cleaning for autoconf-2.13.000227_6
===>  Cleaning for linux_base-f10-10_2

Thank you ppl :beergrin
All is done now :e
 
Sometimes you just don't want to reboot the machine so you can do the following:

Code:
sysctl compat.linux.osrelease=2.6.16

and then install linux_base-f10 from ports.
 
hexabit said:
Sometimes you just don't want to reboot the machine so you can do the following:

Code:
sysctl compat.linux.osrelease=2.6.16

and then install linux_base-f10 from ports.

Be sure to end every process that uses linuxolator, first.
 
Hi,

Sorry for reviving this old thread. I had the same problem as the OP. I managed to fix the issue with linux.ko by doing this:

Code:
cd /boot/kernel
install -o root -g wheel -m 555 linux.ko .
 
Back
Top