View previous topic :: View next topic |
Author |
Message |
steelrose Apprentice
Joined: 06 May 2002 Posts: 245 Location: Cyprus
|
Posted: Wed Jun 19, 2002 6:51 pm Post subject: kernel upgrade |
|
|
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? _________________ Hey.I am new to Linux and i will ask some stupid questions sometimes so please don't get angry with me and help |
|
Back to top |
|
|
metalhedd l33t
Joined: 30 May 2002 Posts: 692 Location: Ontario Canada
|
Posted: Wed Jun 19, 2002 7:05 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Wed Jun 19, 2002 8:37 pm Post subject: |
|
|
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. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Wed Jun 19, 2002 8:39 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Wed Jun 19, 2002 9:03 pm Post subject: |
|
|
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. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
line72 Apprentice
Joined: 13 Jun 2002 Posts: 212
|
Posted: Wed Jun 19, 2002 9:10 pm Post subject: .config |
|
|
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 |
|
Back to top |
|
|
Maldrim n00b
Joined: 30 May 2002 Posts: 30
|
Posted: Wed Jun 19, 2002 9:14 pm Post subject: Re: .config |
|
|
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 |
|
Back to top |
|
|
jtanner Tux's lil' helper
Joined: 23 May 2002 Posts: 121 Location: Atlanta, GA
|
Posted: Wed Jun 19, 2002 9:28 pm Post subject: |
|
|
Still, having SOME sensible defaults would be nice--such as devfs!
Jim |
|
Back to top |
|
|
bidz n00b
Joined: 08 Jun 2002 Posts: 54 Location: Norway
|
Posted: Wed Jun 19, 2002 10:22 pm Post subject: |
|
|
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 ?. _________________ bidz @ efnet |
|
Back to top |
|
|
craftyc Guru
Joined: 23 May 2002 Posts: 443 Location: Behind You.
|
Posted: Wed Jun 19, 2002 10:42 pm Post subject: |
|
|
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. _________________ Postcount ++ |
|
Back to top |
|
|
steelrose Apprentice
Joined: 06 May 2002 Posts: 245 Location: Cyprus
|
Posted: Thu Jun 20, 2002 6:33 am Post subject: |
|
|
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? _________________ Hey.I am new to Linux and i will ask some stupid questions sometimes so please don't get angry with me and help |
|
Back to top |
|
|
steelrose Apprentice
Joined: 06 May 2002 Posts: 245 Location: Cyprus
|
Posted: Thu Jun 20, 2002 9:26 am Post subject: |
|
|
after upgrading the kernel is it necessary to edit my menu.lst? _________________ Hey.I am new to Linux and i will ask some stupid questions sometimes so please don't get angry with me and help |
|
Back to top |
|
|
leej Apprentice
Joined: 18 May 2002 Posts: 280
|
Posted: Thu Jun 20, 2002 9:56 am Post subject: |
|
|
steelrose wrote: | after upgrading the kernel is it necessary to edit my menu.lst? |
No. The bzImage is still in the same place. |
|
Back to top |
|
|
steelrose Apprentice
Joined: 06 May 2002 Posts: 245 Location: Cyprus
|
Posted: Thu Jun 20, 2002 10:14 am Post subject: |
|
|
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? _________________ Hey.I am new to Linux and i will ask some stupid questions sometimes so please don't get angry with me and help |
|
Back to top |
|
|
leej Apprentice
Joined: 18 May 2002 Posts: 280
|
Posted: Thu Jun 20, 2002 10:27 am Post subject: |
|
|
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,
or too many mounted file systems |
Did you compile ext3 support into the kernel? When you made the filesystem did you use mke2fs with the -j switch? |
|
Back to top |
|
|
steelrose Apprentice
Joined: 06 May 2002 Posts: 245 Location: Cyprus
|
Posted: Thu Jun 20, 2002 10:33 am Post subject: |
|
|
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 _________________ Hey.I am new to Linux and i will ask some stupid questions sometimes so please don't get angry with me and help |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu Jun 20, 2002 11:54 am Post subject: |
|
|
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 _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu Jun 20, 2002 11:58 am Post subject: |
|
|
steelrose wrote: | bash-2.05a# mount /dev/hda1 /boot |
Try:
Code: | mount -t ext3 /dev/hda1 /boot |
If that doesn't work, try running fsck on it to make sure it's a healthy partition:
Code: | /sbin/fsck -t ext3 /dev/hda1 |
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
jtanner Tux's lil' helper
Joined: 23 May 2002 Posts: 121 Location: Atlanta, GA
|
Posted: Thu Jun 20, 2002 3:21 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu Jun 20, 2002 3:25 pm Post subject: |
|
|
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 _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
jthj Apprentice
Joined: 04 Jun 2002 Posts: 176 Location: The Matrix Has Me....
|
Posted: Thu Jun 20, 2002 8:30 pm Post subject: |
|
|
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? |
|
Back to top |
|
|
leej Apprentice
Joined: 18 May 2002 Posts: 280
|
Posted: Thu Jun 20, 2002 8:43 pm Post subject: |
|
|
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] |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu Jun 20, 2002 8:55 pm Post subject: |
|
|
leej is right, but I'm pretty sure the code part should be something similar to:
Code: | 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 _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
jthj Apprentice
Joined: 04 Jun 2002 Posts: 176 Location: The Matrix Has Me....
|
Posted: Thu Jun 20, 2002 8:57 pm Post subject: |
|
|
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]
ln -si /usr/src/linux/2.x.x /usr/src/linux
[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 |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Thu Jun 20, 2002 9:04 pm Post subject: |
|
|
What is the output of "uname -r"? |
|
Back to top |
|
|
|