# kernel upgrade

## steelrose

i am running emerge --update world for first time.during the process i noticed that it was unpacking linux-2.4.19-gentoo-r7 while i was running 

linux-2.4.19-gentoo-r5.now in my /usr/src i have the following directories

/usr/src/linux-2.4.19-gentoo-r5/

/usr/src/linux-2.4.19-gentoo-r5

/usr/src/linux-2.4.19-gentoo-r7

.and i am still running 2.4.19-gentoo.r5

how can i update to r7?

----------

## metalhedd

basically the wrld update just downloaded the new kernel source for you, you still need to build and install the kernel.

what you should first do is change /usr/src/linux to point to /usr/src/linux-whatever-r7. (its just a simlink, makes compiling easier, if it doesn't already exist just create it.

Next go to /usr/src/linux (or the -r7 directory) and run:

$ make menuconfig

set all of your kernel options. (can't help you there, it depends on your hardware)

when your done, exit the config program and run the following commands:

$ make dep && make clean bzImage modules modules_install

when thats done copy the kernel to your /boot (You will probably have to mount it first)

$ cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage

Then just reboot and you should be golden.

Oh.. If you have alsa or the nvidia drivers or anything like that installed you will have to reemerge them after you boot.

----------

## masseya

Basically, it doesn't matter that you have the sources to two different kernels.  All the sources do is let you build a kernel.  Once the kernel is built you have to move it to where it's recognized by a boot loader like GRUB or LILO.  This means that you can certainly have multiple copies of the linux kernel sources.  If you want to keep your old r5 sources, be my guest.  The only thing I would be careful of is always be sure to have a known good bzImage to boot off of.  Sometimes I'll leave some stupid, yet vital, option out of my configuration and I'll have to reboot on something that acutally is working.  I generally have a "Known Good" option on my menu.lst file with GRUB.

----------

## delta407

I name my bzImages by date (i.e. cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-2002.06.19), label them by date in my GRUB menu, and keep 2-3 entries in the menu. I keep about 6 bzImages in my /boot partition, for no real reason other than I have hard drive space.  :Wink: 

----------

## lx

 *Tristam29 wrote:*   

> Basically, it doesn't matter that you have the sources to two different kernels.  All the sources do is let you build a kernel.  Once the kernel is built you have to move it to where it's recognized by a boot loader like GRUB or LILO.  This means that you can certainly have multiple copies of the linux kernel sources.  If you want to keep your old r5 sources, be my guest.  The only thing I would be careful of is always be sure to have a known good bzImage to boot off of.  Sometimes I'll leave some stupid, yet vital, option out of my configuration and I'll have to reboot on something that acutally is working.  I generally have a "Known Good" option on my menu.lst file with GRUB.

 

Just a note:

Modules (alsa / Nvidia) are compiled against the /usr/src/linux directory and put in /lib/modules/(kernel version).

Cya lX.

----------

## line72

Why doesn't  gentoo-sources come with a .config, i dont' know every option to put in my kernel and an already configured kernel would be great

----------

## Maldrim

 *line72 wrote:*   

> Why doesn't  gentoo-sources come with a .config, i dont' know every option to put in my kernel and an already configured kernel would be great

 

That would kind of go against the gentoo learning experience as well as the  feeling of control you get from gentoo. =P

----------

## jtanner

Still, having SOME sensible defaults would be nice--such as devfs!   :Smile: 

Jim

----------

## bidz

is there a way to keep, for example, your -r5 configuration when you move to a -r7 source/compile/make ? a config file just to copy over, or what ?.

----------

## craftyc

 *bidz wrote:*   

> is there a way to keep, for example, your -r5 configuration when you move to a -r7 source/compile/make ? a config file just to copy over, or what ?.

 

Copy the .config file over from the -r5 to -r7. Then run make menuconfig. Change any options that you need. Then follow metalhedds' instruction from make dep && blah blah.

Hope this helps.

----------

## steelrose

well guys thanx for the info.i want to ask if a pentium 4 pc will compile fine gentoo.also if it is a good idea to test 1.3 b release .which are the benefits of gcc3.1?

----------

## steelrose

after upgrading the kernel is it necessary to edit my menu.lst?

----------

## leej

 *steelrose wrote:*   

> after upgrading the kernel is it necessary to edit my menu.lst?

 

No.  The bzImage is still in the same place.  :Smile: 

----------

## steelrose

unfortunely after compiling my new kernel i tried to mount my boot partition and i get this error:

bash-2.05a# mount /dev/hda1 /boot

mount: wrong fs type, bad option, bad superblock on /dev/hda1,

       or too many mounted file systems

here is my /etc/fstab

/dev/hda1               /boot           ext3            noauto,noatime         $ 1 2

/dev/hda3               /               ext3            noatime                $ 0 1

/dev/hda2               none            swap            sw                     $ 0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro  0 0

proc                    /proc           proc            defaults               $ 0 0

can you help me?

----------

## leej

 *steelrose wrote:*   

> unfortunely after compiling my new kernel i tried to mount my boot partition and i get this error:
> 
> bash-2.05a# mount /dev/hda1 /boot
> 
> mount: wrong fs type, bad option, bad superblock on /dev/hda1,
> ...

 

Did you compile ext3 support into the kernel?  When you made the filesystem did you use mke2fs with the -j switch?

----------

## steelrose

yes i did that.when i was building my box i remember that when i was trying to umount the partitions on the finish /mnt/gentoo/boot didnt umount

----------

## klieber

 *jtanner wrote:*   

> Still, having SOME sensible defaults would be nice--such as devfs!  

 

devfs is not required to run gentoo.  Gentoo tends to only put in things that are absolutely, positively necessary for your system.  Much/most of the control is left up to you.  That's a good thing (more control) but it can also be a bad thing (you have to know what you're doing.).

--kurt

----------

## klieber

 *steelrose wrote:*   

> bash-2.05a# mount /dev/hda1 /boot

 

Try:

```
mount -t ext3 /dev/hda1 /boot
```

If that doesn't work, try running fsck on it to make sure it's a healthy partition:

```
/sbin/fsck -t ext3 /dev/hda1
```

--kurt

----------

## jtanner

 *klieber wrote:*   

> 
> 
> devfs is not required to run gentoo.  
> 
> 

 

True, but the common case (under gentoo) is to use it.  Not a big deal, but if we're going to discuss a kernel package with non-vanilla defaults,  I thought it might make things a little easier.

Jim

----------

## klieber

 *jtanner wrote:*   

> True, but the common case (under gentoo) is to use it.  Not a big deal, but if we're going to discuss a kernel package with non-vanilla defaults,  I thought it might make things a little easier.

 

Even with the gentoo-kernel, the patches are applied, but the options in the kernel are not selected by default.  You have to go in and toggle the low latency and preempt options.

--kurt

----------

## jthj

I just did a kernel switch whent form 2.4.19-r5 to 2.4.18 and I re-emerged the nvidia and alsa drivers.  But they still fail to load on boot in fact when I do the emerge it seems like it's still wanting to install them to the path of my old kernel.  How do I rectify this?

----------

## leej

 *jthj wrote:*   

> I just did a kernel switch whent form 2.4.19-r5 to 2.4.18 and I re-emerged the nvidia and alsa drivers.  But they still fail to load on boot in fact when I do the emerge it seems like it's still wanting to install them to the path of my old kernel.  How do I rectify this?

 

You need to update the /usr/src/linux symbolic link to resolve to the new kernel version.  Then emerge third party kernel modules.

[code]

ln -si /usr/src/linux/2.x.x /usr/src/linux

[code]

----------

## klieber

leej is right, but I'm pretty sure the code part should be something similar to:

```
ln -sf /usr/src/linux-2.4.19-gentoo-r7 /usr/src/linux
```

Where 'linux-2.4.19-gentoo-r7' is whatever the real name of the kernel version you just emerged (vanilla-sources, etc.)

--kurt

----------

## jthj

 *leej wrote:*   

>  *jthj wrote:*   I just did a kernel switch whent form 2.4.19-r5 to 2.4.18 and I re-emerged the nvidia and alsa drivers.  But they still fail to load on boot in fact when I do the emerge it seems like it's still wanting to install them to the path of my old kernel.  How do I rectify this? 
> 
> You need to update the /usr/src/linux symbolic link to resolve to the new kernel version.  Then emerge third party kernel modules.
> 
> [code]
> ...

 

ok I did that but it's still loading the modules into the old kernel path is there another symbolic link I need to change?

lib/modules/2/4/19-gentoo-r5/... to be exact

----------

## delta407

What is the output of "uname -r"?

----------

## jthj

 *delta407 wrote:*   

> What is the output of "uname -r"?

 

2.4.18

this line from X might be helpfull 

Build Operating System: Linux 2.4.19-gentoo-r5 i686 [ELF]

Also there is a symbolic link in my /usr/src/linux-2.4.19-r5/ dir the link is linux-2.4.18 -> /usr/src/linux-2.4.18/  I don't know if that's of any importance but none of the other source directorys have such a link

----------

## jthj

well I deleted the link reran emerge got it to error then recreated the link and now it's working strange huh

----------

## pjp

Is there a location to discover what is broken under certain versions?

 *Quote:*   

> linux-2.4.19-gentoo-r5
> 
> linux-2.4.19-gentoo-r5
> 
> linux-2.4.19-gentoo-r7
> ...

 For example, I'm still using 2.4.19-r1.  However, I've read of some people having problems with later 'r' versions and the 

Promise controller I use.  Would kind of like to avoid upgrading to something that is known to break my system.

----------

## klieber

 *kanuslupus wrote:*   

> Is there a location to discover what is broken under certain versions?

 

bugs.gentoo.org, these forums and the mailing list archives are going to be your best bet.  There is no one source for all problems.  (though bugs.gentoo.org is closest)

--kurt

----------

## mellofone

 *kanuslupus wrote:*   

> Is there a location to discover what is broken under certain versions?
> 
>  *Quote:*   linux-2.4.19-gentoo-r5
> 
> linux-2.4.19-gentoo-r5
> ...

 

Which promise card are you using?

----------

## pjp

TX2, I forget if it is ata/100 or 133.  This thread suggests that r1-r7 don't work with it.  Also in that thread is this:

 *Xaannin wrote:*   

> Lol now it works with 2.4.19-gentoo-r7 kernel..
> 
> make mrproper
> 
> make menuconfig (select everything again)
> ...

 make mrproper seems to be the key, though I haven't tried it.  Anyone know what it does differently?

----------

## klieber

 *kanuslupus wrote:*   

> Anyone know what it does differently?

 

yes

--kurt

----------

## pjp

Just for the record, I hadn't gotten around to looking it up yet  :Wink: 

Thanks for the link.

----------

## masseya

 *kanuslupus wrote:*   

> Just for the record, I hadn't gotten around to looking it up yet   

 

Awe, c'mon!  You've got the whole SEARCH thing in your signature!  And you *still* didn't do it.  That's the last time I look for an answer before asking a question.    :Razz:    I've got to respect what a Guru has to say...  

<nudge, nudge..  wink, wink..>

----------

## pjp

I was just trying to do too many things at once.  I had a search page and was wading through results and 

reading other threads at the same time.  I shouldn't have asked  :Very Happy: 

----------

