public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Kernel upgrade confusion
@ 2017-12-30 18:43 Jalus Bilieyich
  2017-12-30 18:57 ` Wol's lists
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jalus Bilieyich @ 2017-12-30 18:43 UTC (permalink / raw
  To: gentoo-user

Recently there was a kernel update and I don't want to reconfigure it
from scratch. In the official documentation, it told me to move the old
.config into the new kernel source tree and type
make oldconfig

This is where I'm confused; which .config file (/proc/config.gz or
/boot/config) and where in the kernel source tree do I put this file in.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Kernel upgrade confusion
  2017-12-30 18:43 [gentoo-user] Kernel upgrade confusion Jalus Bilieyich
@ 2017-12-30 18:57 ` Wol's lists
  2017-12-30 18:58 ` Andrew Barchuk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Wol's lists @ 2017-12-30 18:57 UTC (permalink / raw
  To: gentoo-user

On 30/12/17 18:43, Jalus Bilieyich wrote:
> Recently there was a kernel update and I don't want to reconfigure it
> from scratch. In the official documentation, it told me to move the old
> .config into the new kernel source tree and type
> make oldconfig
> 
> This is where I'm confused; which .config file (/proc/config.gz or
> /boot/config) and where in the kernel source tree do I put this file in.
> 
> 
/usr/src/linux/.config

Cheers,
Wol


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Kernel upgrade confusion
  2017-12-30 18:43 [gentoo-user] Kernel upgrade confusion Jalus Bilieyich
  2017-12-30 18:57 ` Wol's lists
@ 2017-12-30 18:58 ` Andrew Barchuk
  2017-12-30 19:11 ` Mick
  2017-12-30 21:57 ` Alan McKinnon
  3 siblings, 0 replies; 7+ messages in thread
From: Andrew Barchuk @ 2017-12-30 18:58 UTC (permalink / raw
  To: gentoo-user

Hi Jalus,

> This is where I'm confused; which .config file (/proc/config.gz or
> /boot/config)

The two should have the same content most of the time. You can use
either. config.gz needs to be decompressed (e.g. with zcat).

> where in the kernel source tree do I put this file in.

In the root of the kernel source tree which is /usr/src/linux if the new
kernel is set with eselect kernel.

Make sure to read https://wiki.gentoo.org/wiki/Kernel/Upgrade which
explains all these steps in detail.

---
Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Kernel upgrade confusion
  2017-12-30 18:43 [gentoo-user] Kernel upgrade confusion Jalus Bilieyich
  2017-12-30 18:57 ` Wol's lists
  2017-12-30 18:58 ` Andrew Barchuk
@ 2017-12-30 19:11 ` Mick
  2017-12-30 19:43   ` Wol's lists
  2017-12-30 21:57 ` Alan McKinnon
  3 siblings, 1 reply; 7+ messages in thread
From: Mick @ 2017-12-30 19:11 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

Hi Jalus,

On Saturday, 30 December 2017 18:43:12 GMT Jalus Bilieyich wrote:
> Recently there was a kernel update and I don't want to reconfigure it
> from scratch. In the official documentation, it told me to move the old
> .config into the new kernel source tree and type
> make oldconfig
> 
> This is where I'm confused; which .config file (/proc/config.gz or
> /boot/config) and where in the kernel source tree do I put this file in.

You will need to *copy* your old/existing kernel .config file to the new 
kernel source directory.

Where you copy it from depends on where you have stored your previous kernel 
.config file.  It may be in your /boot, if you have copied it there from /usr/
src/linux/.config last time you compiled your kernel.  It should be in /usr/
src/linux/ if this symlink is still pointing to your previous kernel.  You may 
be able to obtain it from your /proc/config.gz if you have configured your 
kernel to use this option.

So, as root you would for example do:

cp /usr/src/linux-4.4.87-r1/.config /usr/src/linux/4.9.49-r1/ && \
rm /usr/src/linux && \
ln -s /usr/src/linux-4.9.49-r1 linux && \
cd /usr/src/linux && \
make oldconfig

to copy the existing .config into the new kernel sources directory,
to remove the symlink pointing to the previous kernel,
to create a new symlink to the new kernel sources directory,
to change your working directory into the new kernel source tree, and
finally to run make oldconfig in order to configure any new options available 
in kernel 4.9.49-r1, without having to reconfigure each and every option 
already set in your kernel 4.4.87-r1.

If you have a /proc/config.gz you can unpack it and redirect it to your new 
kernel source directory:

zcat /proc/config.gz > /usr/src/linux-4.9.49-r1/.config

before you proceed with the last four steps I showed above.

HTH.
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Kernel upgrade confusion
  2017-12-30 19:11 ` Mick
@ 2017-12-30 19:43   ` Wol's lists
  2017-12-30 21:14     ` Jalus Bilieyich
  0 siblings, 1 reply; 7+ messages in thread
From: Wol's lists @ 2017-12-30 19:43 UTC (permalink / raw
  To: gentoo-user

On 30/12/17 19:11, Mick wrote:
> to remove the symlink pointing to the previous kernel,
> to create a new symlink to the new kernel sources directory,

Or, to use the supplied gentoo tools ...

eselect kernel list

eselect kernel set n

to see what kernels the system thinks are available, and to change the 
current selected kernel.

Note that "emerge --depclean" will clear out all the files IT KNOWS 
ABOUT in /usr/src, so if you don't clean it out manually it will be full 
of debris from previous kernels - basically all the output of make.

But eselect kernel won't show those as available because depclean clears 
up all the references to them.

Cheers,
Wol


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Kernel upgrade confusion
  2017-12-30 19:43   ` Wol's lists
@ 2017-12-30 21:14     ` Jalus Bilieyich
  0 siblings, 0 replies; 7+ messages in thread
From: Jalus Bilieyich @ 2017-12-30 21:14 UTC (permalink / raw
  To: gentoo-user

This worked.

Thank you all a thousand times!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Kernel upgrade confusion
  2017-12-30 18:43 [gentoo-user] Kernel upgrade confusion Jalus Bilieyich
                   ` (2 preceding siblings ...)
  2017-12-30 19:11 ` Mick
@ 2017-12-30 21:57 ` Alan McKinnon
  3 siblings, 0 replies; 7+ messages in thread
From: Alan McKinnon @ 2017-12-30 21:57 UTC (permalink / raw
  To: gentoo-user

On 30/12/2017 20:43, Jalus Bilieyich wrote:
> Recently there was a kernel update and I don't want to reconfigure it
> from scratch. In the official documentation, it told me to move the old
> .config into the new kernel source tree and type
> make oldconfig
> 
> This is where I'm confused; which .config file (/proc/config.gz or
> /boot/config) and where in the kernel source tree do I put this file in.
> 


Either. As long as the *running* kernel is the one you want to copy
from, the contents are identical. You als very likely have a third copy
is /usr/src/<whatever>, assuming you left the sources intact after
kernel installation (the usual case)

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-30 22:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-30 18:43 [gentoo-user] Kernel upgrade confusion Jalus Bilieyich
2017-12-30 18:57 ` Wol's lists
2017-12-30 18:58 ` Andrew Barchuk
2017-12-30 19:11 ` Mick
2017-12-30 19:43   ` Wol's lists
2017-12-30 21:14     ` Jalus Bilieyich
2017-12-30 21:57 ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox