# Discouraged :(

## K-Dawg

Well DANG it seems I have once again crapped out my system trying to fix ALSA (oh how I hate you ALSA).  I was following the ALSA guide step-by-step and after I did the make menuconfig, set my soundcard up as a modules and deselect everything else, make dep clean, make modules modules_install (using 2.4.20) kernel, and do a modules-update and BAM all my spiffy nice modules are all but just about gone when I now do a lsmod cmd.  This is the second time I have done this (done it on my server as well this is my lappy).  Now my pcmcia scripts are messed (no wireless card worky now) and of course my broadcom ethernet is gone as well.  So my question to you all is first off wtf am I doing wrong and second how to I fix my modules problem?

Or should I just forget all this headache and upgrade to the 2.6.3 kernel which I was planning to do soon anyways (just wish I could figure out how I keep muffing my sys up)Last edited by K-Dawg on Fri Mar 19, 2004 2:51 am; edited 2 times in total

----------

## mdowney

Unless you put the modules in /etc/modules.autoload.d/<kernel version>

Then you might need to do a insmod to actually load the module.

----------

## K-Dawg

Ok how can I get a list of all the modules I need to re-install back into /etc/modules.autoload.d/2.4.20-gentoo-r6.  Or should I just insmod the bcm4400 (ethernet) back into kernel.  How do I get my wireless orinoco card back up and running also?  Another question, how can I go about emerging development-sources or gentoo-dev-sources kernel to upgrade to the 2.6 kernel if I have no network connection now?  This is a no go w/out network connectivity out to the gentoo portage servers.  (Seems weird to me that it wants to retreive something for the 2.6 kernel as I just did an emerge -u world last week and I know the 2.6 kernel serise are in /usr/portage/sys-kernel already.)

----------

## K-Dawg

Ok I have tried to insmod bcm4400 and get "no module found by that name" and modprobe gives me "Can't locate module bcm4400".  This module is already added to my /etc/modules.autoload.d/kernel-2.4 file but still a no go.  I have tried to recomplie my kernel w/ make menuconfig to no avail also. Where to go from here.  :Sad: 

Please I need all your help folks

----------

## slycordinator

1. When you copied the kernel into your /boot did you first mount /boot?  This is the most common error I've seen in kernel compilation.  They'd forget to mount the partition then try and copy stuff over to it and then find when they reboot that nothing was changed (ie old kernel still used).

2. If everything of that went well, you could make module loading automated by using "hotplug."  Just enter "emerge hotplug" then "rc-update add hotplug default" as root.

----------

## mattjgalloway

When you run:

make dep clean bzImage modules modules_install

It removes all your modules you had before. So you need to re-emerge them. For instance, once I have done that command, I do this:

emerge ati-drivers

emerge alsa-driver

emerge nforce-net

emerge xfree-drm

(with some USE settings set before some of them, like ALSA_CARDS="intel8x0" for alsa, etc)

You need to re-emerge your modules i'd say...

----------

## K-Dawg

My gentoo lappy is doomed I do believe.  When I try to configure and complie my new kernel (which btw I have mounted my /boot directory) by changing to the /usr/src/linux directory and then doing a make menuconfig and settign all options up in kernel properly and then make dep && make clean bzImage modules modules_install FAILS and gives me the following error:

There is a slew of compiling info above this but here are the last few lines that look important:

BASENAME=ide_cd  -c -o ide-cd.o ide-cd.c

In file included from ide-cd.c:320:

ide-cd.h:440: error: long, short, signed or unsigned used invalidly for 'slot_tabelen'

make[3]: *** [ide-cd.o] Error 1

make[3]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'

make[2]: ***[first_rule] Error 2

make[2]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'

make[1]: *** [_subdir_ide] Error 2

make[1]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r6/drivers'

make: *** [_dir_drivers] Error 2

After this error it returns to the shell prompt  :Sad:  Scary stuff

Ohhh what to do...what to do?

----------

## mattjgalloway

Are you using root?

In /usr/src/linux run:

make mrproper

This will clean up completely (i suggest you save your .config first). Then run make menuconfig, etc. Alternatively you could unmerge your kernel sources and then re-emerge them

----------

## K-Dawg

Tried this:

In /usr/src/linux run: 

make mrproper 

then after configuring the kernel through make menuconfig I ran:

make dep && make clean bzImage modules modules_install

and...it still fails at the same point  :Sad: 

I dont think your suggestion of unmerging the current kernel ver (2.4.20-gentoo-r6) would work as if I mes this up and go to re-emerge and it wants to go out on the portage servers adn grab some updates I am stuck in the water as I have no network connecton w/ wither my wireless orinoco card or my regular NIC 10/100 ethernet adapter.  The orinoco modules look like their one of the only modules that did nto disappear earlier but when I ifconfig for the eth1 device which is what the orinoco card was set up as befor I get an no such device error (Although the light is on the wireless card and the orinoco_cs module is still there)

----------

## mattjgalloway

Can you not boot from the LiveCD? The kernel on that should have support for your network

----------

## K-Dawg

Oh yes I sure can boot from the Live CD but where does that get me?  Maybe I'm just confused as to what you are suggesting.  Am I supposed to chroot into my system and emerge another kernel or what?  (I believe this is what you are suggesting if I cannot get my current kernel to play nice).  All in all I'm just looking for a way to salvage my system as I do not want to reinstall from scratch as the moderator rac states concerning kernel compilation problems:

"First of all, this isn't too big of a problem, so stay calm about this. You shouldn't have to reinstall Gentoo from scratch, and repairing your system usually isn't much of a problem."

and

"Is it important to tell people not to panic? I often see newbies talking about reinstalling all of Gentoo when they run into this problem."

----------

## jschellhaass

With the 2.4 kernel you need to emerge alsa-driver whenever you recompile the kernel.

Did you edit /etc/modules.d/alsa ?

Jeff

----------

## WannaBe

A couple tips....

1. Use "genkernel --config" to compile new kernels, it is much easier than all of the manual steps.

2. If your PCMCIA was originally working by emerging pcmcia-cs, you will need to re emerge pcmcia-cs every time you re-compile your kernel.  Reason being is that the pcmcia-cs modules are created with version tags that any kernel other than one they were compiled against will reject.  Thus, it should be expected that your pcmcia will stop working when the kernel is recompiled.  Simply recompile the modules (by running "emerge pcmcia-cs") and it will magically work again.

3. The same thing goes for any other externally compiled moudles, such as ALSA (if using a 2.4.x kernel, 2.6 has ALSA built into the kernel sources), and BroadCom drivers (although some versions of the 2.4.x sources seem to have the bcmxxxx drivers available, and some don't)  You need to re-compile em everytime you make a new kernel.  

If anyone knows how to avoid this annoying hassle, please let me know!  Maybe there is a way to turn the strict module versions checking off in a new kernel?

Hopefully this helps you get stuff working again!

----------

## mattjgalloway

I was just saying that using LiveCD you should be able to access the internet, etc. So you can recompile your kernel, emerge all the drivers for your network card, etc...

Will that not work?

Then you can boot into your linux as normal?

----------

## WannaBe

That will work.

However you should not need a network connection to fix what was once working....

If you have previously emerged pcmcia-cs, and you recompile your kernel, and now your pcmcia is not working, you should be able to "emerge pcmcia-cs" without a network connection because Portage keeps the packages around after the first emerge. At least it did in my case

----------

## K-Dawg

OK I think we need to start back at square one and review a few things.  I emerged the pcmcia-cs and alsa-driver packages successfully but that does not help my state of missing modules and specifically does not get either of my network cards working again.  

ifconfig gives me no such device for both eth0 (which was my 10/100 broadcom NIC) and eth1 (which was my wireless orinoco gold card)

I get error eth1: fetching interface information: Device not found

When I boot and my gentoo sys is going through it's initialization phase I can see it fail to load module bcm4400 

How do I fix this and my slew of other probs still.  Geez I've had otehr probs b4 and been able to fic them rather quickly but this issue I seem to be making no progress on  :Sad:   I could have re-installed by now dealing w/ this issue for over a day now.  Still no clear resolution or answers as how to get my network ethernet cards back up and running.  I never did get an answer as to why I was getting the above mentioned error when trying to compile a new kernel. sighs  :Sad: 

BTW not being ungreatful or anything just though I should point out that "So you can recompile your kernel, emerge all the drivers for your network card, etc..." there is no emerging or compiling my network drivers or modules.

When I booted the LIVE 1.4 CD this is all I did to get my networking working

ifconfig eth0 192.168.1.123 broadcast 192.168.1.255 netmask 255.255.255.0

route add default gw 192.168.1.1

nano w /etc/resolv.conf to include router ip 192.168.1.1 (default gw)

(i see no module loading there)

----------

## gospleOfLinux

The suggestion of using the LiveCD to boot and chroot onto your system is the best option in my eyes (ie use the LiveCD as a rescue disk).  You will have a functioning network and a solid base to recompile your kernel.

Another thought.  If you have changed the name of your kernel in your /boot partition, make sure you change it in your bootloader as well.  You may well have a good kernel, but you are booting to an old one.  If you have already done so, my bad.

If you are trying to use ALSA, just upgrade to the 2.6.x kernel series.  ALSA is much easier in that world.  You don't need to emerge alsa-drivers because they are part of the kernel (I had to unmerge alsa-drivers before my 2.6.3 gento-dev-sources would work correctly with ALSA).  Just compile the ALSA driver right into your kernel or as a module.

----------

## WannaBe

Did your networking (non pcmcia NIC) "just work" before?  If so something in your kernel's config changed.  In which case you should run genkernel --conifg and check that the driver for your NIC is set to compile as a module.

If you separely compiled the bcm driver (bcm4400.o) before then you need to re-compile it against your newer kernel.  I got my broadcom 5705 driver source  from www.broadcom.com and I have to re-compile the network module every time I make a new kernel.  Any of this ringing a bell?  Do you ever rember running a command like "insmod bcm4400" when you were intially getting things to work?

As for the pcmcia....

Try the following:

boot up into your current kernel.

emerge pcmcia-cs

insmod i82635

insmod ds

/etc/init.d/pcmcia start

/etc/init.d/net.eth1 start <-(probably not needed, but won't hurt)

That should result in a working pcmcia NIC assuming you had it working at some point and you havent changed any other config files.

Good luck!

----------

## K-Dawg

SAD  :Sad:  fact is I'm prolly headed on my way to chroot into my system off the LIVE cd to try and save my system.  Since noone seems to be addressing why I cannot ifconfig my ethernet cards and only get errors I am assuming after some research that it is because there are no drivers listed in:

/lib/modules/2.4.20-gentoo-r6/kernel/drivers/net directory and it only contains a file called dummy.o

This is why I am assuming that modprobe fails and possibly insmod because there are no availablr drivers listed in there.  Maybe I'm wrong thogh

----------

## WannaBe

Correction:

insmod i82365

----------

## mattjgalloway

Do this:

find /lib/modules/<kernel_version>/ -type f -iname '*.o' -or -iname '*.ko'

Then if you have pcmcia_cs there somewhere, then you atleast have the module. If not, you have problems.

Did you compile the pcmcia_cs into the kernel as a module, or actually into the kernel? Also, if you needed to emerge them when you first compiled your kernel then you will need to AGAIN.

For instance, my kernel recompiling goes like this:

```
make dep clean bzImage modules modules_install

mount /boot

cp arch/i386/boot/bzimage /boot/kernel-2.4.25

cp System.map /boot/System.map-2.4.25

cp .config /boot/config-2.4.25

emerge ati-drivers

emerge ati-drivers-extra

env ALSA_CARDS="intel8x0" emerge alsa-driver

env ALSA_CARDS="intel8x0" emerge alsa-utils

emerge nforce-net

```

Notice I emerge all my drivers, again. It needs to be done you see. This is probably why you can't insmod them...

----------

## K-Dawg

insmod i82365 and insmod ds tells me that a module named this already exists.  When I try and /etc/init.d/pcmcia stop (jaust fine) but start gives me some wild errors.  I will post in a few.  What is up w/ ifconfig telling me no such device for both eth0 and eth1.  I dunno what to do about my orinoco card, I can see that those modules are still there by doing a lsmod cmd but the broadcom 10/100 NIC module bcm440 is gone.  I dunno why my pcmcia orinoco card wont work

----------

## mattjgalloway

Well, I am currently recompiling my kernel because I want to clean out my modules folder, and then remake it. (I was having issues with xfree-drm, another matter).

If I were you then I would do this. It'll take you 5 minutes. Just recompile kernel, and then reemerge all the drivers you need. You should be set then...

----------

## K-Dawg

Ok then from here what exactly are my steps I should be taking to save my gentoo system by going off the LIVE CD to upgrade my kernel to the 2.6 series kernel?  Do I just need to:

mount /dev/hda4 /mnt/gentoo

# mkdir /mnt/gentoo/boot

# mount /dev/hda2 /mnt/gentoo/boot

cd /mnt/gentoo

 then...

chroot /mnt/gentoo /bin/bash and go from there or am I worng.  Basically I need a step by step guide to upgrade my kernel from this stage.  Also do I have to remove the 2.4.20-gentoo-r6 in /usr/src or what?  I noticed when I emerged gentoo-sources again it grabbed the 2.4.22-gentoo-r7 kernel and put it in /usr/src also so what to do here?

----------

## cyrillic

 *K-Dawg wrote:*   

> I noticed when I emerged gentoo-sources again it grabbed the 2.4.22-gentoo-r7 kernel and put it in /usr/src also so what to do here?

 

The 2.6 version of gentoo-sources is called gentoo-dev-sources.

```
# cd /usr/src

# rm linux        <--- this only deletes the symlink

# emerge gentoo-dev-sources 
```

----------

## K-Dawg

Thanks for the reply cyrillic.  Yeah I was debating whether to go w/ gentoo-dev-sources or development-sources for the 2.6 kernel.  What's your opinion?  Also can you read above and see if there is any other suggestions you might have as to why ifconfig cmd doesnot recognize any of my network cards?  

-Thanks for the help

Also why am I getting errors and my kernel wont compile properly when I do this cmd:

make dep && make clean bzImage modules modules_install 

after editing my kernel w/ a make menuconfig once inside /usr/src/linux?

Here is the error I get when trying to recompile my current 2.4 kernel:

BASENAME=ide_cd -c -o ide-cd.o ide-cd.c

In file included from ide-cd.c:320:

ide-cd.h:440: error: long, short, signed or unsigned used invalidly for 'slot_tabelen'

make[3]: *** [ide-cd.o] Error 1

make[3]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'

make[2]: ***[first_rule] Error 2

make[2]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'

make[1]: *** [_subdir_ide] Error 2

make[1]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r6/drivers'

make: *** [_dir_drivers] Error 2

----------

## cyrillic

 *K-Dawg wrote:*   

> I was debating whether to go w/ gentoo-dev-sources or development-sources for the 2.6 kernel.  What's your opinion? 

 

I like gentoo-dev-sources, but 2.6 in general is quite a bit nicer than 2.4

Having alsa-driver come with the kernel is one of the many improvements.

 *K-Dawg wrote:*   

> Also can you read above and see if there is any other suggestions you might have as to why ifconfig cmd doesnot recognize any of my network cards? 

 

It sounds like the modules don't load properly because they match a different kernel than the one you are currently booting.  Look at the time and date given by "uname -a" to find out when the currently running kernel was compiled (this should tell you if you are booting an old/stale kernel).

 *K-Dawg wrote:*   

> Here is the error I get when trying to recompile my current 2.4 kernel:
> 
> BASENAME=ide_cd -c -o ide-cd.o ide-cd.c
> 
> In file included from ide-cd.c:320:
> ...

 

If "make mrproper" doesn't help this, then I would try compiling with an older version of gcc (hard) or newer kernel sources (easy).

----------

## K-Dawg

Ok then thanks for the info and continuing to work w/ me  :Smile: .  My next question is from my current system state where I have no network connection (both built in NIC and orinoco pcmcia card are outta whack), do I just throw the LIVE cd in and chroot into my "real" established gentoo environment.  If my dell 5100 laptop layout is like this:

/dev/hdc2 (boot)

    /dev/hdc3 (swap)

    /dev/hdc4 (/)

Dang I just hope I can fix my gentoo sys cause I sure dont want to re-install the whole system ( I already have KDE, Gnome, openoffice, VNC, VLC, mplayer, etc...) and we all know how long these can take to emerge.

----------

## cyrillic

Since networking works for you from the LiveCD, just chroot into your Gentoo installation, straighten out the kernel/modules situation, then you should be good to go (no reinstallation necessary   :Very Happy:  )

----------

## K-Dawg

And just for peace of mind cause this was really never answered for my setup and the way I have my HD partitioned w/ the dual boot I would just:

mount /dev/hda4 /mnt/gentoo

# mkdir /mnt/gentoo/boot

# mount /dev/hda2 /mnt/gentoo/boot

cd /mnt/gentoo

then...

chroot /mnt/gentoo /bin/bash and go from there w/ emerging the new gentoo-dev-sources since I will now be boored off the LIVE cd and have networking working or am I wrong?

Sorry if I seem to be monotanous...I just need to make sure I am doing this right  :Smile: 

----------

## cyrillic

Right after you chroot, you should also do this.

```
# env-update

# source /etc/profile 
```

At this point, networking should still work so you will be able to emerge stuff, build a new kernel, etc.

----------

