View previous topic :: View next topic |
Author |
Message |
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Sun Oct 14, 2012 2:22 pm Post subject: [newbie] updating kernel 2.x -> latest |
|
|
oi
so I have my kernel in /boot/mykernel
If I make new kernel, updated one that is, and apply it (/boot/myNEWkernel)
and system does not boot up,
I can stil remove myNEWkernel and put back mykernel,
(thoes that require cd? I mean chrooting stuff? my cdrom is out of bussines)
and try to compile better myNEWkernel?
my kernel is over two years old, I read that updating that old gentoo system is tricky,
and might be better off with fresh installation, does the same apply for old kernels?
I update my system weekly. _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54244 Location: 56N 3W
|
Posted: Sun Oct 14, 2012 2:43 pm Post subject: |
|
|
while true,
You may have many kernels in boot, like this Code: | $ ls -l /boot
total 23502
-rw-r--r-- 1 root root 2579920 Mar 7 2012 3.2.9-gentoo
-rw-r--r-- 1 root root 2615600 Apr 14 2012 3.3.1-gentoo
-rw-r--r-- 1 root root 2594464 Jul 8 12:53 3.4.4-gentoo
-rw-r--r-- 1 root root 2610208 Aug 18 10:21 3.4.5-gentoo
-rw-r--r-- 1 root root 2980240 Aug 19 12:17 3.5.2-gentoo
-rw-r--r-- 1 root root 2988096 Oct 13 10:12 3.6.2-gentoo
lrwxrwxrwx 1 root root 1 Apr 12 2009 boot -> .
drwxr-xr-x 2 root root 1024 Aug 23 2009 grub
-rw-r--r-- 1 root root 3787044 Apr 17 18:28 initrd.cpio.gz
-rw-r--r-- 1 root root 3787031 Apr 16 21:25 initrd_1.cpio.gz
drwx------ 2 root root 12288 Apr 11 2009 lost+found
| notice that the file names all contain the kernel version number. That makes it easy to tell which is which.
Likewise, in grub.conf, you may have many boot stanzas, I only show three but I do have more ...
Code: | #3.5.2-gentoo
title=Kernel 3.5.2-gentoo (hd0)
root (hd0,0)
kernel (hd0,0)/3.5.2-gentoo root=UUID=ff5730d5-c28d-4276-b300-5b0b0fc60300 vga=0x317 video=vesafb:mtrr:3,ywrap
initrd /boot/initrd.cpio.gz
#3.4.5-gentoo
title=Kernel 3.4.5-gentoo (hd0)
root (hd0,0)
kernel (hd0,0)/3.4.5-gentoo root=UUID=ff5730d5-c28d-4276-b300-5b0b0fc60300 vga=0x317 video=vesafb:mtrr:3,ywrap
initrd /boot/initrd.cpio.gz
#3.4.4-gentoo
title=Kernel 3.4.4-gentoo (hd0)
root (hd0,0)
kernel (hd0,0)/3.4.4-gentoo root=UUID=ff5730d5-c28d-4276-b300-5b0b0fc60300 vga=0x317 video=vesafb:mtrr:3,ywrap
initrd /boot/initrd.cpio.gz |
The point of this is that when you make a new kernel and it won't boot ... and we all do that from time to time, you can choose a good kernel from the grub menu, knowing it will boot and let you try to make the new kernel again.
As your kernel is two years old, start configuring the kernel from the beginning. make oldconfig might work but over the last two years, kernel options have been restructured, so you will have to fix things with make menuconfig anyway. You might want to look at kernel-seeds.org to help you with your kernel.
You do not need to boot with a CD to edit the kernel file name in grub.conf. At the grub splash screen, press 'e' and follow the on screen instructions.
This only changes the copy of grub.conf in RAM. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Mon Oct 15, 2012 3:02 pm Post subject: |
|
|
Hello NeddySeagoon,
aha, so adding to/editing grub.config
it picks up kernels from /boot at boot time
for me to choose.
and as I read how-to on updating kernel,
I too concluded I should configure it from scratch,
mostly since there are major versions in change.
"You do not need to boot with a CD to edit the kernel file name in grub.conf. At the grub splash screen, press 'e' and follow the on screen instructions. This only changes the copy of grub.conf in RAM."
aha, as it boots I can make permanent changes in grub.conf, aha ok I see.
ok thanks for this, my next question is,
as I go /usr/src/linux and run make menuconfig,
I am puzzled, I have 2 gentoo-sources
my old 2.6 version and 3.4.9,
which kernel will I be modifying with: make menuconfig?
or is chapter 4 Updating the /usr/src/linux symbolic link
http://www.gentoo.org/doc/en/kernel-upgrade.xml
taking care of just that? _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54244 Location: 56N 3W
|
Posted: Mon Oct 15, 2012 5:11 pm Post subject: |
|
|
while true,
Updating the symbolic link takes care of it. The linux symbolic link points to the kernel of your choice.
Look atto see where it points and change it if you wish.
Be aware that third part kernel modules use it to find the kernel they need to build against. Thats things like nvidia-drivers, ati-drivers, dmraid and other packages that need to build against the kernel. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
wcg Guru
Joined: 06 Jan 2009 Posts: 588
|
Posted: Tue Oct 16, 2012 8:45 am Post subject: |
|
|
You need to think about the linux-headers package, too.
What are "linux-headers"? They are C headers split out from
the kernel sources for the use of glibc, util-linux, iptables,
and other packages that directly include kernel "somename.h"
files in their source code. These headers change as the kernel
evolves. A linux-headers package consistent with the data
type definitions in kernel 2.6.38, for example, will not necessarily
be consistent with the definitions of the data types with the
same data type name in kernel 3.6.x.
So once you get kernel 3.6.[minor_version_number] to boot,
you need to update to a newer linux-headers package of the closest
version number that you can find in /usr/portage/sys-kernel/linux-headers/
to the new kernel version that you have booted. You can look in
the ebuild files in that directory to see if they are considered stable
on your architecture. Look for the line that begins with
If it says "amd64" (among other things), it is considered stable on amd64
architectures (both AMD and Intel x86-64 cpus). If it says "~amd64", it
is still in testing.
Then re-emerge glibc, and go from there. (Other stuff will
turn up that depends on the linux-headers version number
when you run "emerge -DuNp system", etc.) _________________ TIA |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|