Building your own kernel (was: Re: Xcape)

Liste des GroupesRevenir à ol advocacy 
Sujet : Building your own kernel (was: Re: Xcape)
De : vallor (at) *nospam* cultnix.org (vallor)
Groupes : comp.os.linux.advocacy
Date : 11. Jun 2024, 03:21:21
Autres entêtes
Message-ID : <lcpn4hF3qcnU1@mid.individual.net>
References : 1 2 3
User-Agent : Pan/0.159 (Vovchansk; 764d7cd; Linux-6.9.3)
vallor <vallor@cultnix.org> wrote:
 
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
  OS: Linux 6.9.3 Release: Mint 21.3 Mem: 258G
 
 
You're using Mint but somehow compiling the kernel, yourself?

Yes indeed.

I've built my own kernel -- at least once -- for every distro
I've ever run as a daily driver.

Used to do it all the time on Fedora.  Since I like NVIDIA hardware,
I've had to contend with the drivers failing on reboot, and having
to re-install the drivers.

The biggest hurdle to building your own Linux is coming up
with an appropriate .config.  For that, I cheated:  I used the
.config from Mint's then-current low-latency kernel.  Then you
"make oldconfig" and answer the questions.

You just have to know how to do it.  It's actually not that
hard, it just sounds totally boss to tell someone you compiled
your own running kernel.

Apparently some distros (Gentoo, I've heard) will download
and compile _some_ kernels.  But for the latest, download the
sources from https://kernel.org and have at it.

Once you've downloaded the sources, unpack them, and
type "make help" to see all the make targets.  You'll at least
to:

"make oldconfig", after placing the appropriate .config file
in the root of the sources.  Answer all the questions.  (Some folks
have been known to just lean on the Enter key for this, and accept
all the defaults.)

"make -jX", where "X" is the number of parallel builds you want
to run.

"sudo make modules_install" will install modules

"sudo make install" will install the kernel, and it
will become the first (and default) entry in grub.

(This is all integrated with support scripts on Linux Mint.)

Note that I'm running the latest stable kernel.
There is an option that is one step closer to the
abyss: "linux-next".  I don't do that -- what, do I look crazy?

If you have NVIDIA, then after you reboot, use ctrl-alt-f1 (or
whatever) to get to a virtual terminal, log in as root, and
then "telinit 1", which will take you to single-user mode.
Unload the nvidia modules if you want:

rmmod nvidia_drm nvidia_modeset nvidia_uvm nvidia

Then you can run the binary blob that you _already downloaded_
from NVIDIA for the latest driver.  After that, you can either reboot,
or if you did the rmmod command, "telinit 5".  That should load
the drivers as the session manager starts.

This works for me.  (If it breaks, you get to keep both parts.)

BTW, I'm using driver version: 555.42.02, which includes CUDA support.
I got it from installing the CUDA binary blob, which includes all
the libraries and tools to use CUDA.  If CUDA isn't important to you,
you can just run the regular driver downloaded from nvidia.com.

Finally, a word about the symlink to sources.  "make modules_install"
will add a symlink to (say) /lib/modules/6.9.3 called "build" that
points to the root of the unpacked Linux sources.  So, if you move
the sources, make sure to change that symlink, or the NVIDIA binary
blob won't be able to find them...and it needs them while it compiles
a few things.

--
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
   OS: Linux 6.9.3 Release: Mint 21.3 Mem: 258G

Date Sujet#  Auteur
10 Jun 24 * Xcape17Chris Ahlstrom
10 Jun 24 +- Re: Xcape1rbowman
10 Jun 24 `* Re: Xcape15vallor
10 Jun 24  +* Re: Xcape3Joel
11 Jun 24  i`* Building your own kernel (was: Re: Xcape)2vallor
11 Jun 24  i `- Re: Building your own kernel (was: Re: Xcape)1rbowman
11 Jun 24  +* Re: Xcape4candycanearter07
11 Jun 24  i`* Re: Xcape3Chris Ahlstrom
11 Jun 24  i `* Re: Xcape2rbowman
11 Jun 24  i  `- Re: Xcape1Chris Ahlstrom
12 Jun 24  `* Re: Xcape7vallor
12 Jun 24   +* Re: Xcape4vallor
12 Jun 24   i+- Re: Xcape1rbowman
12 Jun 24   i`* Re: Xcape2DFS
12 Jun 24   i `- Re: Xcape1vallor
12 Jun 24   `* Re: Xcape2Chris Ahlstrom
13 Jun 24    `- Re: Xcape1candycanearter07

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal