# Noob question reguarding modules

## Rustylinux

Hey,

Sorry for the noobish question but I know lspci shows you what your system has detected and lsmod shows you which modules have been installed but how do you know which modules the system has avilable and how do you make the connection from what lspci detects and which modules to unpack ?

----------

## wah

 *Rustylinux wrote:*   

> how do you know which modules the system has avilable and how do you make the connection from what lspci detects and which modules to unpack ?

 

Hey,

To your first - do a 

```

# modprobe -l

```

to output the modules currently available on your system.

To your second - if you are unsure what module/kernel item applies to a given item in your lspci output, best thing to do is google/search the forum for one of the items in lspci.  If you post your lspci, I may be able to help.

Cheers,

W.

----------

## jpl888

To see what modules you have available look at "/lib/modules/insert your kernel name here" i.e for the latest stable sources "/lib/modules/2.6.16-gentoo-r13". 

Type.

```
find -name "*.ko"
```

And you will see all of the modules built for your system.

Marrying up your lspci output with what modules you should have can be a bit of a black art, but start by trying to find a kernel driver that matches. Then see if you can find an ebuild that will build some modules for you. Finally there might be some GPLed or not driver on the internet that you can build.

Drivers will more often than not match more than one chipset so don't be discouraged if you can't find an exact match.

Some examples of drivers/modules I have installed on various PCs.

Broadcom 4318 wireless - Using ndiswrapper and 64bit Windows XP driver from Dell website.

Belkin RT73 usb wireless adapter - Using Ralink recently GPLed driver (until the unified rt2x00 open source drivers are in a fit state)

"Unpack" is not really correct terminology where kernel modules are concerned. You choose which modules to install at kernel build time, the modules merely sit there in a directory waiting to be modprobed, loaded by hald (or whatever it is) or inserted into "/etc/modules.autoload.d/kernel-2.6" to be loaded at startup.

If there is a particular one your are stuck on give me some details and I will go through the steps with you.

----------

## Rustylinux

Thanks for the heads up and the help.

The particular module i'm trying to find is for my Dlink 530TX+ network card or for my onboard NIC which is a A-BIT NSF7 2nd generation Nvidia chipset board.  Preferably i'd like to use the Dlink 530TX+  but both the live cd of gentoo and the min install cd doesn't detect the Dlink 530TX+ so i was in the process of trying to hunt down the module i will have to load to get it running properly.

----------

## wah

 *Rustylinux wrote:*   

> Thanks for the heads up and the help.
> 
> The particular module i'm trying to find is for my Dlink 530TX+ network card or for my onboard NIC which is a A-BIT NSF7 2nd generation Nvidia chipset board.  Preferably i'd like to use the Dlink 530TX+  but both the live cd of gentoo and the min install cd doesn't detect the Dlink 530TX+ so i was in the process of trying to hunt down the module i will have to load to get it running properly.

 

No prob - for the Abit onboard nic, try the forcedeth module (Device Drivers->Network Device Support->Ethernet10/100->Reverse Engineered Nforce Ethernet)...that works on my NF4 based Abit board.  It is a gig driver, even though it's in the 10/100 slot  :Laughing: 

As for the Dlink - I could only find a gig Dlink card in the kernel config, which leads me to believe that it's based on another chipset.  If you do a lspci, what is the output?

Cheers,

W.

----------

## jpl888

The onboard NIC is probably an nforce then. If you go to "Device Drivers -> Network Device Support -> EISA, VLB, PCI and onboard controllers -> nforce ethernet support"  in menuconfig enabling if you need to, as you go that will be that one at least.

As far as the Dlink is concerned is that what lspci says?

Edit - Sorry wabman must have been writing mine at the same time as you, you go ahead.

----------

## jpl888

According to FAQs on dlink.co.uk the 530 tx is based on a VIA Rhine chipset, you can see that one further past the nforce!

----------

## Rustylinux

So when doing a minimal install one of its first steps is to get the nic working long before you configure the kernal ?  should i configure the kernal first  then ? to enclude that module?

----------

## wah

 *Rustylinux wrote:*   

> So when doing a minimal install one of its first steps is to get the nic working long before you configure the kernal ?  should i configure the kernal first  then ? to enclude that module?

 

No, you just need to make sure you modprobe the right module after booting the LiveCD and then when you get to the kernel config, include them for your main kernel.

----------

## 1clue

 *Rustylinux wrote:*   

> So when doing a minimal install one of its first steps is to get the nic working long before you configure the kernal ?  should i configure the kernal first  then ? to enclude that module?

 

When doing ANY install, get the basics working first!  Follow the installation documentation.

You have to set up networking twice, and the second time will probably be hardest.  The first time, you'll set up networking so you can get the basic installation complete, get your kernel compiled, etc (you booted off the CD) and get a base filesystem going.  Then you boot from that, and hopefully networking works for you.  If not, either it's misconfigured or you left something out of your kernel.  If the latter, you'll have to boot back from the CD to fix it.  (this does NOT mean you have to completely reinstall, but maybe you have to recompile your kernel.)

Once you have a working system that boots on its own, AND you have your USE variable set right (You can do this as soon as you mount your filesystem and get the base package in), then you emerge --sync and emerge -DuNv world.  That gets you to the current release BEFORE you build everything else.  I managed to install everything down to the last detail, THEN rethink my USE variable and had to recompile everything after I thought it was done.  One weekend down the toilet, since it was an older system.  You only make that mistake once, let me tell you.

----------

## Rustylinux

For the Onboard nic if it uses "Device Drivers -> Network Device Support -> EISA, VLB, PCI and onboard controllers -> nforce ethernet support" as its support drivers what would i type at the beinging for the modprobe ?

modprobe ???

----------

## wah

 *Rustylinux wrote:*   

> For the Onboard nic if it uses "Device Drivers -> Network Device Support -> EISA, VLB, PCI and onboard controllers -> nforce ethernet support" as its support drivers what would i type at the beinging for the modprobe ?
> 
> modprobe ???

 

modprobe forcedeth

That's the name of the actual module.

----------

## Rustylinux

One more question.  Once you do a modprobe on a module it good to go or temporarly installed untill the kernal is compiled ? there is nothing else you have to do ?

----------

## wah

 *Rustylinux wrote:*   

> One more question.  Once you do a modprobe on a module it good to go or temporarly installed untill the kernal is compiled ? there is nothing else you have to do ?

 

On the LiveCD, it's active as long as you're running the LiveCD...

After you configure your kernel (you'll see this step in the handbook), you'll need to set the module to load at boot:

```

# echo "forcedeth" >> /etc/modules.autoload.d/kernel-2.6

# modules-update (not on LiveCD...when inside your kernel)

```

This is the same for any modules you want to load at boot.

----------

## Rustylinux

Thanks for all the help I managed to get the nic talking.  One more question.  During the minimal install what is the point agian of the CHrooting and mounting the proc folder?

----------

## wah

 *Rustylinux wrote:*   

> Thanks for all the help I managed to get the nic talking.  One more question.  During the minimal install what is the point agian of the CHrooting and mounting the proc folder?

 

Chrooting allows you to install Gentoo on the filesystem you created - it creates an environment for you to work in.

Proc (and I'm not a pro here) contains various info regarding your system - for instance, if you were to do a 'cat /proc/cpuinfo', it would return lots of useful info about your cpu.  /proc/mounts houses mounted drive info, etc... The system requires this info to configure properly, so that's why it's included...I think  :Embarassed: 

Glad you got your NIC running!

W.

----------

## 1clue

 *wahman143 wrote:*   

> 
> 
> Proc (and I'm not a pro here) contains various info regarding your system - for instance, if you were to do a 'cat /proc/cpuinfo', it would return lots of useful info about your cpu.  /proc/mounts houses mounted drive info, etc... The system requires this info to configure properly, so that's why it's included...I think 
> 
> Glad you got your NIC running!
> ...

 

Not exactly.  /proc is a filesystem view inside your kernel.  It does not exist on the disk drive, it's a separate filesystem that exists only in RAM.

Files in there don't behave the way regular files do.  You can't open them in an editor and save them, but in some cases you can write stuff to one of those files and make your system behave differently.  For example, TCP/IP packet forwarding can be turned on by putting a "y" into one of those files.  In other words, don't change anything unless you know what you're doing.

----------

## wah

Thanks for clearing that up 1clue - as I stated, I am not a pro in that venue  :Laughing: 

Cheers,

W.

----------

## Rustylinux

Got a LiveCD question.  When your using the LiveCD install half way through it asks which loader your want grub or lilo and asks if you should write this to the MBR, is it talking about the master MBR on the drive or the writing it to /boot volume ?  Becuase if your dual booting your system writing to the MBR will screw your MBR up and you have to fix your MBR or you wouldn't be able to load windows.

----------

## 1clue

When you're installing dual boot and one OS is a Microsoft OS, install the MS one first.  Then install Linux on a different partition, write to the master boot record, and configure grub or lilo to boot your Windows partition.

Grub and lilo replace the boot loader that Microsoft installs.  Since Microsoft's boot loader doesn't want you to load anything except their brand of OS, you need the Linux version (or any other open source loader) to make it all work.

----------

## Rustylinux

K the setup I have is I have 2 Western Digital Raptor SATA 36GB drives.  One for windows, one for Gentoo.  I have the windows one installed already.  So when I install grub I should write it to the MBR on the windows drive ? or just write it to the boot partition on the gentoo drive then edit NTLDR and grub to get it to boot ?

----------

## 1clue

At this point I have to comment that I've never done this.  I have never had a dual boot system, let alone one that had a Microsoft operating system on it.  I've also never bought a Microsoft OS and have never illegally possessed one either.  Read:  Every intel-based computer I've had came without an OS on it, because I bought them used or built them from scratch and put some sort of Open Source OS on it the first time I powered them up.  Every install was single boot, and it was always "make it or die trying" for a motto.

Back to the point, your system has a boot sequence.  Floppy, CDROM, hard disk for example.  Your master boot record is on what Windows would call C:\.  It is the first sector of the drive, and your firmware knows to look there for a program to run.  That program is the boot loader, and that first sector needs to have everything it needs in order to load the rest of the OS you want.

Modifying the MBR of the second drive does nothing, because the firmware will never look there.  In effect, you have exactly one MBR on the entire computer.

That boot loader can know about your second hard drive, and it can know about any other OS you might have.

----------

## Rustylinux

When dual booting the system can grub alone work as the loader for both windows and gentoo and if so how do you setup the grub config file?  Or do you have to use windows ntlder and load grub from there.

----------

## 1clue

That's the whole point.

You use the linux boot loader for all operating systems.  Windows does not play well with Linux.  The Windows boot loaders have historically done their best to make sure that only Microsoft operating systems will boot.

Choose grub or lilo, and configure all your operating systems to boot from that.  I use lilo because that's what I started with, and grub never really made much sense to me.  Since you're starting out fresh, I'd say go with grub because it's newer and evidently solves some problems with lilo.  Either one will work, but you won't need to have any Microsoft-based boot loader on your computer at all.

----------

