LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   newbie bsd questions (https://www.linuxquestions.org/questions/%2Absd-17/newbie-bsd-questions-513293/)

twelvenine 12-23-2006 11:44 PM

newbie bsd questions
 
hi, i'm a linux user and i've been considering trying out bsd, probably freebsd, but i have a few questions about it:

1. whats with the kernel/distro situation? do netbsd, freebsd, and openbsd have their own kernels or is there one bsd kernel that they all use?

2. what is hardware support like for bsd? will i be able to get good drivers for my video card, wifi, sound, etc. with bsd? do ati or nvidia put out a bsd driver?

3. i have heard that it's possible to use linux software with bsd, but that it requires some kind of emulation. i assume that if compiled from source, this emulation wouldn't be necessary, but i thought that both bsd and linux used elf binaries.

Why wouldn't i be able to execute a linux binary on a bsd system if they both support elf? i actually tried executing my linux 'ls' binary from a freebsd live cd(freesbie) and it didn't work.

btmiller 12-24-2006 12:00 AM

Quote:

Originally Posted by twelvenine
hi, i'm a linux user and i've been considering trying out bsd, probably freebsd, but i have a few questions about it:

1. whats with the kernel/distro situation? do netbsd, freebsd, and openbsd have their own kernels or is there one bsd kernel that they all use?

Net, Free, Open, and DragonflyBSD have their own kernels. I believe both PC-BSD and DesktopBSD are basically FreeBSD and use the FreeBSD kernel.

Quote:

Originally Posted by twelvenine
2. what is hardware support like for bsd? will i be able to get good drivers for my video card, wifi, sound, etc. with bsd? do ati or nvidia put out a bsd driver?

There's a FreeBSD Nvidia driver. I've found the hardware support to be generally quite good, but this can be a hard question to answer if you don't tell us a little bit about the hardware that you want to use.

Quote:

Originally Posted by twelvenine
3. i have heard that it's possible to use linux software with bsd, but that it requires some kind of emulation. i assume that if compiled from source, this emulation wouldn't be necessary, but i thought that both bsd and linux used elf binaries.

Why wouldn't i be able to execute a linux binary on a bsd system if they both support elf? i actually tried executing my linux 'ls' binary from a freebsd live cd(freesbie) and it didn't work.

Basically, the system call interfaces and standard libraries differ between Linux and the BSDs. I believe the "Linux binary compatibility" features in the BSDs just translate the Linux system and library calls into their BSD equivalents. This is not emulation per se, but it's more like what WINE is. a compatibility layer that translates certain service requests designed for one platform into that understood by the kernel and system libraries of another.

twelvenine 12-24-2006 12:21 AM

i'm thinking i'll try bsd out on my computer with a nvidia card so i can try that driver out. the rest of it's hardware is pretty generic, so i'm not worried about support issues. i'm thinking i'll just install it and see how things go.

what i've heard about bsd is that most hardware "just works" out of the box, but i was expecting that the support might be kind of generic, especially if the major distrobutions have their own kernels. say, for example, i'm running openbsd and it doesn't support my sound card for whatever reason, but freebsd has a driver for it. would i be able to use that freebsd driver with openbsd or are the kernels too different for that?

are there any third party driver projects in bsd or is everything pretty much handled by the bsd devs? i guess net/free/open each have their own group of bsd devs that work on their kernels?

chort 12-24-2006 06:04 AM

Quote:

Originally Posted by twelvenine
i'm thinking i'll try bsd out on my computer with a nvidia card so i can try that driver out. the rest of it's hardware is pretty generic, so i'm not worried about support issues. i'm thinking i'll just install it and see how things go.

I believe most of the BSD OSs maintain a list of compatible hardware on their site. You should double-check prior to installation to make sure yours is supported.

Quote:

what i've heard about bsd is that most hardware "just works" out of the box,
Mostly, but a lot of HW manufacturers are being stupidly secretive about their newest hardware as a "trade secret" and will not release documentation to developers unless they sign a Non-Disclosure Agreement, or won't even release the documentation at all. That means some hardware might not be supported. The best support is on older hardware from when manufacturers weren't so paranoid, or if they were there has been ample time to reverse-engineer their devices.

Quote:

but i was expecting that the support might be kind of generic, especially if the major distrobutions have their own kernels. say, for example, i'm running openbsd and it doesn't support my sound card for whatever reason, but freebsd has a driver for it. would i be able to use that freebsd driver with openbsd or are the kernels too different for that?
The projects do often import driver code from each other to build native drivers, but simply having the source for a driver in one of the OSs will not allow it to run on another.

Quote:

are there any third party driver projects in bsd or is everything pretty much handled by the bsd devs? i guess net/free/open each have their own group of bsd devs that work on their kernels?
Each project has their own devs.

frob23 12-24-2006 02:55 PM

Quote:

Originally Posted by twelvenine
3. i have heard that it's possible to use linux software with bsd, but that it requires some kind of emulation. i assume that if compiled from source, this emulation wouldn't be necessary, but i thought that both bsd and linux used elf binaries.

Why wouldn't i be able to execute a linux binary on a bsd system if they both support elf? i actually tried executing my linux 'ls' binary from a freebsd live cd(freesbie) and it didn't work.

Like it has been said, it's not really emulation but rather system call translation. You need to understand that elf(5) is a file format and not an assurance that the files will be executable on any machine other than the one they were built to run on. Many Un*x and Unix-like systems use the elf format. The format defines how the file is laid out internally and the structures that can be expected... but does not define the way system calls are made (for example) or the byte-order of the file. There are many reasons why one file would not run on another system.

On FreeBSD you typically need to tell the system that it's looking at a Linux binary with brandelf(1) which tells the system to use that ABI when it runs the file. If the file is statically linked, then you're done and it usually works just fine at this point. But if it's not (like ls from your Linux system probably was not) then you need to have the proper libraries installed (under /compat/linux in this case) so that FreeBSD can find the other bits the program needs to run. Once you have the linux_base sets installed, this is usually not a problem anymore. As it installs most generic things. If you're installing larger Linux programs you should use ports because it will ensure all the proper linux bits are in order. If it's not in ports then you need to make sure of those things for yourself -- but that is rare.

So yes, you can use Linux binaries... but it's not as simple as just running them because they are both the same format.

ericfx 01-21-2007 07:23 PM

Quote:

Originally Posted by twelvenine
i'm thinking i'll try bsd out on my computer with a nvidia card so i can try that driver out. the rest of it's hardware is pretty generic, so i'm not worried about support issues. i'm thinking i'll just install it and see how things go.

Nvidia drivers work great for linux/bsd. My rule of thumb with linux/bsd hardware is if it is a year old or older, itll most likely work fine. It is just the really new chips that are still iffy.

I like to stick with NVIDIA video cards, although ATI has been accquired by AMD and is promising to take over the linux/bsd users. Sound, I like CMI8738 and SB Audigy pci cards. Network, pretty much everything. Boards, I only use AMD, but I have found the NForce4 chipsets excellent in both socket 939 and 940. The newer AM2 socket chips like 570 and 590 work pretty poor, for now.

Good luck! FreeBSD is cool.

PS - Try booting FreeSBIE, a freebsd live CD. Version 2.0 is out, which is based on freebsd 6.2. It will give you a good idea as far as hardware support. http://www.freesbie.org


All times are GMT -5. The time now is 11:05 AM.