LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-12-2013, 12:04 PM   #1
snicolas68
LQ Newbie
 
Registered: Jun 2013
Location: France
Distribution: archlinux, windows10, debian, centos ...
Posts: 1

Rep: Reputation: Disabled
Lightbulb I don't really understand how Linux handles hardware, could you explain it to me?


Hello,

Well, on Windows, you have to install drivers for everything, even for NIC.

Under Linux: no. I read about the kernell and what I understood is that a part of it handles the hardware with a material compatibility list that will be recognized without driver installation.

Stupid question as example: ethernet cards, they all have the same purpose, their is nothing special about it, no big secrets (compared to graphic cards). So, at which level, and how are ethernet cards automatically working under Linux distributions & not under Windows?

Other question: if I keep all my devices and cards, hard disk with a linux distribution on it and that I only change the motherboard with one that has only a better chipset (and maybe more slots) that will better fit with my CPU? I mean, under Windows, you have often to install a driver for the chipset.

Last one, for wireless devices, it almost works out of the box, and sometimes, you need a driver. And even if I see access points, does it means I don't need a driver for my wifi device?

I'm really confuse and the more I read about it, the more confuse I'm becoming!

Thanks
 
Old 06-12-2013, 12:45 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Under Linux: no. I read about the kernell and what I understood is that a part of it handles the hardware with a material compatibility list that will be recognized without driver installation.

Stupid question as example: ethernet cards, they all have the same purpose, their is nothing special about it, no big secrets (compared to graphic cards). So, at which level, and how are ethernet cards automatically working under Linux distributions & not under Windows?
The main reason why Linux usually works out of the box and why you (in most cases) don't have to install drivers it pretty simple: It comes already with most drivers. There is no secret hardware handling that Windows couldn't do.

Quote:
Other question: if I keep all my devices and cards, hard disk with a linux distribution on it and that I only change the motherboard with one that has only a better chipset (and maybe more slots) that will better fit with my CPU? I mean, under Windows, you have often to install a driver for the chipset.
Same thing here: Usually linux has all the drivers already, if the distribution you use is recent enough.

Quote:
Last one, for wireless devices, it almost works out of the box, and sometimes, you need a driver. And even if I see access points, does it means I don't need a driver for my wifi device?
Same here. Many drivers for wireless devices are already onboard. sometimes you need a special firmware that has to be installed, in rare cases you have to install a driver. If your device sees an access point already right after installation that doesn't mean that you don't need a driver for that device, but that a driver is installed on your distribution by default.

In short: Linux, as Windows, needs drivers to get your hardware working, but most drivers are already installed in your distribution by default.
 
Old 06-12-2013, 02:49 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Linux uses drivers even more than windows does or maybe more easily accessed via a file.

Linux uses hardware in one of three ways usually.

The kernel has support for the device(s) chipset and version.
One add's in a driver outside the kernel.
One uses ndiswrapper to run a windows driver.
 
Old 06-13-2013, 02:52 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by snicolas68 View Post
Hello,

Well, on Windows, you have to install drivers for everything, even for NIC.
Windows tends to use a slightly different model for how you get your drivers; historically, Windows has been produced in a somewhat generic form, and then you get drivers (on a disc, off the 'net) from the manufacturer of the peripheral that you are trying to use. This gets modified a bit with recent versions and driver signing, but essentially it only works because some particular version of windows is such a big market that if manufacturers of, say, ethernet cards didn't produce drivers for significant versions of windows, they wouldn't have much of a market.

For Linux, the distro collects and bundles up drivers and they take care of the detection/installation routines. So, if Debian doesn't have it, there is still a chance that Fedora will.

In fact, I wonder whether the distinction between Linux (which is, technically, just a kernel, although in everyday parlance quite often refers to the kernel plus some basic utilities plus installation and detection scripts plus various management bits plus package management plus software ap-plications) and the distro isn't behind at least part of this confusion.

Quote:
Originally Posted by snicolas68 View Post
So, at which level, and how are ethernet cards automatically working under Linux distributions & not under Windows?
Automatically? really, they only work because someone has written a script that detects which card it is and instantiates the correct driver. That may or may not be 'automatic' depending on your definition; it isn't an automatic part of Linux (the kernel) but it might just be an automatic part of your distro.

Quote:
Originally Posted by snicolas68 View Post
Other question: if I keep all my devices and cards, hard disk with a linux distribution on it and that I only change the motherboard with one that has only a better chipset (and maybe more slots) that will better fit with my CPU? I mean, under Windows, you have often to install a driver for the chipset.
i) define 'better'; if that means, in some way 'backward compatible, then, ab definitio, it will work, even if not optimally
ii) if better means, eg, 'more modern, but with no compatibility, then the question is about when chipset detection is done
iii) My preference in this kind of circumstance is always to re-install, because then I know that I won't be '...getting away with the use of somewhat compatible drivers and I will be using the real thing...'. Other people do the opposite, but I'm happier knowing that I won't get bitten by some obscure bug that only shows its ugly head after some other update. YMMV. But, with the relative ease of updating a properly configured system, why not do things correctly?

Obviously, you don't have any of the idiocy of applying to Microsoft for them to decide whether you are allowed to use this software with the newer hardware (without paying all over again), because that's not how things work here.


Quote:
Originally Posted by snicolas68 View Post

Last one, for wireless devices, it almost works out of the box, and sometimes, you need a driver. And even if I see access points, does it means I don't need a driver for my wifi device?
In reverse order
  1. If you 'see' access points, then it means that you do have a driver, the driver has been installed and configured and all of this happened automagically.
  2. If it isn't quite working (I think that's what you are saying, but you could be discussing a hypothetical possibility)
    • maybe a separate thread to discuss getting it working
    • The problem is probably with Networkmanager/wicd (whichever you are using) or traditional networking, and their configuration, You'd have to give a lot more info to really make progress
(apologies for the extra bullet point - I seem to have done something wrong, but then I don't do nested lists often!)
 
Old 06-13-2013, 08:37 AM   #5
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
You shouldn't need to reinstall the OS when changing hardware (including the motherboard - or even the whole system minus the HDD). There may be a few issues with bootloader/fstab mixing up ids (udev), but these can be resolved, and proprietary drivers should be removed before upgrading the hardware.

The only times when you might want to reinstall is if you get a new HDD with the new hardware and/or switch to a different architecture e.g. i386 to amd64 (or vice versa). So yes you can in many cases just pull the HDD from one machine, put it into another and boot up - no "blue screens", crashes - or if you even get that far "anti-piracy" restrictions. That's how it should be.
 
Old 06-13-2013, 01:39 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Since Linux is Free Software, many products have historically had to be reverse-engineered, and drivers written for them by volunteers. In spite of, or perhaps because of this, it now has a huge code base of drivers available for it, covering a much wider selection of hardware and architectures than any Windows release. And now that it's big business, more and more hardware companies are actively participating in diver creation, working directly with the Linux community to improve their quality as well as their quantity.

There are still some holdouts though, and hardware that cannot be easily reverse-engineered. There are also some companies that only offer binary-only secret "blobs" of driver code that can be used, but not examined or modified.


Structurally, the Linux kernel has a kind of hybrid monolithic/dynamic organization. Depending on how you compile it, a "driver" can be incorporated directly into the kernel, or loaded from an external module file (these have .ko extensions and usually reside in /lib/modules/<kernelno>). Modules can be loaded manually with programs like insmod or modprobe, or automatically by udev (the main device management process) or by hardware detection scripts.

Edit: I should also mention that it's possible to run drivers outside of kernel space with some systems, such as fuse for various file-system drivers.

http://kernelnewbies.org/LinuxChanges is a good place to see what changes are being made to kernel drivers in each kernel version, along with all the other improvements.

Last edited by David the H.; 06-13-2013 at 01:47 PM. Reason: as stated
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't understand linux source trees roxanne Linux - Newbie 4 06-19-2009 02:05 PM
I don't understand partitioning in Linux QueenZ Linux - Newbie 16 02-21-2009 06:04 PM
I don't understand Linux AT ALL scott123 Linux - Newbie 2 10-28-2006 11:06 PM
[SOLVED] I'm happy but I still don't understand linux filosophem Linux - General 5 11-27-2004 11:29 AM
Trying to understand how a boot loader handles initrd/initramfs/ramdisk ... cyril Linux - Software 0 04-08-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration