Post Reply  Post Thread 
FreeBSD CS:S quick notes
Author Message
efk
Junior Member
**


Posts: 5
Group: Registered
Joined: Apr 2005
Status: Offline
Post: #1
FreeBSD CS:S quick notes

If you want to run a Source DS in freebsd, you need to install a few things in order for it to run. Before you get started, make sure your ports are uptodate. To do this you need to use cvsup (more info on this at the freebsd handbook: http://www.freebsd.org/handbook).

Quote:
cvsup -g -L 2 /path/to/ports-supfile


First off, I already had linux emulation turned on from when I installed, so if you dont have it on, you can install it via the ports system. This may not be necessary, you may be able to just skip ahead to installing linux_base-rh-9, but I dont have a test box to confirm this.

Quote:
cd /usr/ports/emulators/linux_base


If you already have it installed, its probably a good idea to update it to make sure everything is up-to-date. Use portupgrade to do this. If you dont have portupgrade installed you can pkg_add -r portupgrade && rehash to get this going.

Quote:
portupgrade -r linux_base


Now you need to install linux_base-rh-9 to update glibc etc. To do this:

Quote:
cd /usr/ports/emulators/linux_base-rh-9
make && make install


I just did this and it works for me, Hope this helps the few of you out there that are stuck.

Eric

This post was last modified: 04-12-2005 10:26 PM by efk.

04-12-2005 10:25 PM
Find all posts by this user Quote this message in a reply
cryotek
Forum admin
*******


Posts: 1,208
Group: Administrators
Joined: Dec 2004
Status: Offline
Post: #2
RE: FreeBSD CS:S quick notes

using linux_base-8 works fine for me Toungue



starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
05-02-2005 01:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
puppynut5
Junior Member
**


Posts: 2
Group: Registered
Joined: Nov 2005
Status: Offline
Post: #3
Help

I'm setting up a server shortly and was planning on running it on Linux however I would prefer to run it on FreeBSD because it's quicker and more stable. I was just wondering if you would be willing to answer any questions that I might have. My e-mail is keithtshannon@gmail.com I would just like to get your e-mail if I have any problems with it.


Keith

11-29-2005 03:48 AM
Find all posts by this user Quote this message in a reply
yurricane
Junior Member
**


Posts: 4
Group: Registered
Joined: Apr 2006
Status: Offline
Post: #4
RE: FreeBSD CS:S quick notes

FreeBSD is a distro???? and all linux distros are stable!!!

04-06-2006 08:59 PM
Find all posts by this user Quote this message in a reply
cryotek
Forum admin
*******


Posts: 1,208
Group: Administrators
Joined: Dec 2004
Status: Offline
Post: #5
RE: FreeBSD CS:S quick notes

FreeBSD is not a linux distro. FreeBSD is a BSD variant which is more UNIX like than linux. and not ALL linux distros are stable.

http://www.freebsd.org read up Toungue



starting 9/24/2006 if your problem has been solved please edit your first post and add [solved] to the begining of the title. Thanks.
04-17-2006 01:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
get
Dark terminal user
***


Posts: 162
Group: Registered
Joined: Oct 2005
Status: Offline
Post: #6
RE: FreeBSD CS:S quick notes

Quote:
cd /usr/ports/emulators/linux_base-rh-9
make && make install


isn't it "make install clean" on FreeBSD?


05-05-2006 09:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
k2chris1983
Member
***


Posts: 55
Group: Registered
Joined: Mar 2006
Status: Offline
Post: #7
RE: FreeBSD CS:S quick notes

This information above is Right but it’s also old & lacks a lot of info for someone to switch over to FreeBSD. In this post I will tell you how to setup (Not Install) a FreeBSD from a Minimal Install…

If you can, login as “root” from the console box, because you can’t ssh as “root” by default in FreeBSD because it’s bad practice and you shouldn’t anyways. And you can’t use SU unless your user is in the wheel group!

So are first step is to modify your user group to the wheel group by doing this as “root”.

Code:
# pw user mod YOURUSERNAME –G wheel


Once this is completed you can log in as your User and execute “su –“. When you have become a Super User we are going to setup the CVSup package system.

What we need to do is make a folder and copy an example over to another folder so we can modify it. Just like this…

Quote:
# mkdir /usrports ; cp /usr/share/examples/cvsup/ports-supfile /usr/ports/


If “/usr/ports/” doesn’t exist, type this and try again.

Quote:
# mkdir /usr/ports



Now we need to edit the example we just copy over but before that we need to install a text editor like “nano”. Why you ask? I hate “vi”…… Sooo, if you want to install “nano” type this.

Quote:
# pkg_add –r nano && rehash


Ok let’s open up ports-supfile and edit the value “*default host=CHANGE_THIS.FreeBSD.org” to “*default host=cvsup4.FreeBSD.org”. Remember to save this File! For more Mirrors check out this URL Click Me

Quote:
# nano /usr/ports/ports-supfile


Now we can install CVSup by typing this

Quote:
# pkg_add –r cvsup-without-gui && rehash


From the “/usr/ports/” dir, we are going to download the whole ports tree to “/usr/ports/” by typing this command. *Go get a Cup of Coffee*

Quote:
# cvsup –g –L 2 ports-supfile


From this point on you can search for files to install with “make search name=filename” from the “/usr/ports/”. Example

Quote:
# cd /usr/ports
# make search name=wget

Port: wget-1.10.2
Path: /usr/ports/ftp/wget
Info: Retrieve files from the Net via HTTP and FTP
Maint: vd@FreeBSD.org
B-deps: gettext-0.14.5_2 gmake-3.81_1 libiconv-1.9.2_2 perl-5.8.8
R-deps: gettext-0.14.5_2 libiconv-1.9.2_2
WWW: http://www.gnu.org/software/wget/wget.html


Now if you want to install this you can just

Quote:
# cd /usr/ports/ftp/wget && make install clean


This was just an example on how to install a simple program but now we are going to check if your Box has Linux binary compatibility on or off but it’s not turned on by default. The easiest way to enable this functionality is to load the linux KLD object (“Kernel LoaDable object”). You can load this module by typing the following as “root”

Quote:
# kldload linux


If you would like Linux compatibility to always be enabled, then you should add the following line to /etc/rc.conf:

Quote:
linux_enable="YES"


The kldstat command can be used to verify that the KLD is loaded:

Quote:
% kldstat
Id Refs Address Size Name
1 2 0xc0100000 16bdb8 kernel
7 1 0xc24db000 d000 linux.ko



Now lets install Linux Runtime Libraries… This can be done one of two ways, either by using the linux_base port, or by installing them manually. Using the linux_base port is by far the easiest method to use when installing the runtime libraries. It is just like installing any other port from the Ports Collection. Simply do the following:

Quote:
# cd /usr/ports
# make search name=linux_base-

Port: linux_base-fc-4_9
Path: /usr/ports/emulators/linux_base-fc4
Info: Base set of packages needed in Linux mode (for i386/amd64)
Maint: freebsd-emulation@FreeBSD.org
B-deps:
R-deps:
WWW:

# cd /usr/ports/emulators/linux_base-fc4
# make install distclean

You should now have working Linux binary compatibility. Some programs may complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem.
Note: There may be multiple versions of the emulators/linux_base port available, corresponding to different versions of various Linux distributions. You should install the port most closely resembling the requirements of the Linux applications you would like to install.

P.S.

I almost forgot something, you need to add the following line to /etc/fstab so that the linprocfs is mounted every
time FreeBSD is started. After you've added the line reboot.

Quote:
linproc /compat/linux/proc linprocfs rw 0 0


This will make "steam" see the proc information to start the server up! If you don't add this you will get an error like this "Unable to determine CPU Frequency"...

Have FuN!

This post was last modified: 11-25-2006 05:53 AM by k2chris1983.

11-25-2006 03:46 AM
Find all posts by this user Quote this message in a reply
wiak
Junior Member
**


Posts: 4
Group: Registered
Joined: Mar 2007
Status: Offline
Post: #8
RE: FreeBSD CS:S quick notes

isnt there a way to mount linprocfs without rebooting?, i dont want to reboot, my box and lose my uptime Toungue

update:

Quote:
# mount -t linprocfs linproc /compat/linux/proc


and portsnap can be used instead of cvsup

Quote:
# portsnap fetch extract update


and fetch can be used instead of wget

Quote:


pkg_add is a faster way to add pico,nano,wget etc

Quote:
pkg_add -r pico nano wget

to add pico,nano & wget to system via package, just like rpm ^^

This post was last modified: 03-07-2007 04:54 PM by wiak.

03-07-2007 04:47 PM
Find all posts by this user Quote this message in a reply
wiak
Junior Member
**


Posts: 4
Group: Registered
Joined: Mar 2007
Status: Offline
Post: #9
RE: FreeBSD CS:S quick notes

the only way to fix this is to run the steam update command MANY times until it says up to date
that is what i did, now i can run ./srcds_run but i cant connect Sad the 27015 port is open to wreel

03-08-2007 07:43 AM
Find all posts by this user Quote this message in a reply
wiak
Junior Member
**


Posts: 4
Group: Registered
Joined: Mar 2007
Status: Offline
Post: #10
RE: FreeBSD CS:S quick notes

fixed it, forgot to add +map de_map

03-09-2007 01:33 PM
Find all posts by this user Quote this message in a reply
k2chris1983
Member
***


Posts: 55
Group: Registered
Joined: Mar 2006
Status: Offline
Post: #11
RE: FreeBSD CS:S quick notes

I am sorry but thats how i do it and i know there is many ways of doing something in *BSD & Linux.



wiak Wrote:
isnt there a way to mount linprocfs without rebooting?, i dont want to reboot, my box and lose my uptime Toungue

update:

Quote:
# mount -t linprocfs linproc /compat/linux/proc


and portsnap can be used instead of cvsup

Quote:
# portsnap fetch extract update


and fetch can be used instead of wget

Quote:


pkg_add is a faster way to add pico,nano,wget etc

Quote:
pkg_add -r pico nano wget

to add pico,nano & wget to system via package, just like rpm ^^

03-19-2007 11:48 PM
Find all posts by this user Quote this message in a reply
lord_rage
Junior Member
**


Posts: 1
Group: Registered
Joined: Sep 2007
Status: Offline
Post: #12
RE: FreeBSD CS:S quick notes

I have followed the instructions here

http://www.srcds.com/db/engine.php?subac...0&archive=

But when I get to the line

./steam -command update -game "Counter-Strike Source" -dir

I typed ./steam -command update -game "Counter-Strike Source" -dir BBH

This is so it would install to the BBH directory, then get the following messages repeated. Fyi I am doing this all through ssh

freebsd# ./steam -command update -game "Counter-Strike Source" -dir bbh
Checking bootstrapper version ...
Updating Installation
Checking/Installing 'Counter-Strike Source Shared Content' version 67

Broken pipe

09-26-2007 11:39 AM
Find all posts by this user Quote this message in a reply
eet_1024
Junior Member
**


Posts: 45
Group: Registered
Joined: Aug 2007
Status: Offline
Post: #13
RE: FreeBSD CS:S quick notes

Why do you want to defer from the tutorial by not using -dir . (don't forget the period)?

Did you use mkdir BBH???

If so, check your case:

lord_rage Wrote:
I typed ./steam -command update -game "Counter-Strike Source" -dir BBH


lord_rage Wrote:
freebsd# ./steam -command update -game "Counter-Strike Source" -dir bbh


I think that it's more typical to create a new directory for steam, than to change the subdirectory that a game installs into. For example, assuming that ./ is ~/srcds/:
Default: ~/srcds/cstrike
Your goal, steam executable in ~/srcds: ~/srcds/BBH/cstrike
Typical 1: ~/BBH/cstrike
Typical 2, steam executable in ~/srcds/BBH: ~/srcds/BBH/cstrike

Notice that Typical 2 is similar to what you're doing, but you would use that command line provided in the tutorial, because steam is in the same directory as the cstrike directory.

This post was last modified: 09-29-2007 07:09 AM by eet_1024.

09-29-2007 07:07 AM
Find all posts by this user Quote this message in a reply
alexus
Mr. Alexus
**


Posts: 6
Group: Registered
Joined: Feb 2008
Status: Offline
Post: #14
RE: FreeBSD CS:S quick notes

as soon as i do touch autoexec.cfg i get boo boo

box# touch autoexec.cfg
box# ./srcds_run +map de_dust2
Auto detecting CPU
Using SSE2 Optimised binary.
Server will auto-restart if there is a crash.

Console initialized.
Game.dll loaded for "Counter-Strike: Source"
maxplayers set to 32
*** glibc detected *** ./srcds_i686: free(): invalid pointer: 0x282ff000 ***
======= Backtrace: =========
/lib/obsolete/linuxthreads/libc.so.6[0x280fc200]
/lib/obsolete/linuxthreads/libc.so.6(__libc_free+0x63)[0x280fc72f]
bin/dedicated_i686.so(_ZN15CBaseFileSystem12FastFindFileEPKNS_11CSearchPathEPKc+0x213)[0x282a2713]
======= Memory map: ========
08048000-08054000 r-xp 0002d000 00:00 6410079 /hlds/srcds_i686
08054000-08055000 rw-p 0002d000 00:00 6410079 /hlds/srcds_i686
08055000-0805a000 rw-p 0016a000 00:00 0
0805a000-081bf000 rwxp 0016a000 00:00 0
28054000-2806d000 r-xp 0001e000 00:00 27579743 /usr/compat/linux/lib/ld-2.3.6.so
2806d000-2806e000 r-xp 0001e000 00:00 27579743 /usr/compat/linux/lib/ld-2.3.6.so
2806e000-2806f000 rw-p 00002000 00:00 0
2806f000-28070000 rwxp 00002000 00:00 0
28071000-28095000 r-xp 00032000 00:00 27579830 /usr/compat/linux/lib/obsolete/linuxthreads/libm-2.3.6.so
28095000-28096000 r-xp 00032000 00:00 27579830 /usr/compat/linux/lib/obsolete/linuxthreads/libm-2.3.6.so
28096000-28097000 rwxp 00032000 00:00 27579830 /usr/compat/linux/lib/obsolete/linuxthreads/libm-2.3.6.so
28097000-28098000 rwxp 00001000 00:00 0
28098000-2809a000 r-xp 00004000 00:00 27579771 /usr/compat/linux/lib/libdl-2.3.6.so
2809a000-2809b000 r-xp 00004000 00:00 27579771 /usr/compat/linux/lib/libdl-2.3.6.so
2809b000-2809c000Abort trap (core dumped)
Tue Mar 4 17:17:49 EST 2008: Server Quit

box#

03-05-2008 08:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
alexus
Mr. Alexus
**


Posts: 6
Group: Registered
Joined: Feb 2008
Status: Offline
Post: #15
RE: FreeBSD CS:S quick notes

oh yeah

box# uname -a
FreeBSD box.xxxxxx.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
box#

03-05-2008 08:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: