Can i compile a kernel on Betsy and install it on Debian?

Archived topics about LMDE 1 and LMDE 2
Locked
User avatar
mzsade
Level 5
Level 5
Posts: 776
Joined: Sun Jul 19, 2009 4:36 am

Can i compile a kernel on Betsy and install it on Debian?

Post by mzsade »

Hi, I have two instances of kernel 4.4.0 running on Debian Sid to which i have upgraded following the guide here; http://www.linuxquestions.org/questions ... 175552272/
This is how i compiled and installed them, after copying the kernel tar package to /usr/src;
1)

Code: Select all

    :~# cd /usr/src
    :~# tar xf linux-4.4.tar.xz
    :~# ln -s linux-4.4 linux
    :~# cd linux
    :~# cp /boot/config-3.16.0-4-amd64 .config
    :~# make silentoldconfig
    :~# make menuconfig
    :~# make clean
    :~# make deb-pkg LOCALVERSION=-3.16.0-4-amd64 KDEB_PKGVERSION=1

    :-# dpkg -i /usr/src/linux-image-4.4.0-3.16.0-4-amd64_1_amd64.deb
    :-# dpkg -i /usr/src/linux-headers-4.4.0-3.16.0-4-amd64_1_amd64.deb
2)

Code: Select all

    :~# cd /usr/src
    :~# tar xf linux-4.4.tar.xz
    :~# ln -s linux-4.4 linux
    :~# cd linux
    :~# make menuconfig
    :~# make clean
    :~# make deb-pkg
It's a pretty lean and mean system without a DE and managed with OpenBox (boots on <140MB), however every once in a while, when i am running Blender or streaming videos, the system just freezes, keyboard and mouse freeze and i have to manually power off. It's resilient though, comes back right on after clearing the "orphaned inodes". This never happens on LMDE2, so i was thinking i'd use it's perfectly crafted /boot/config, in fact compile the latest kernel on it, avoid make menuconfig and do with make oldconfig, and install the image and headers on Debian. Would appreciate any advice. Thanks.
Edit: Took 6 hrs 17 mins, doesn't seem to have made any difference, iwconfig still returns <eth0 no wireless extensions> <lo no wireless extensions> and i still get "microcode not found in modules.dep" at boot. I suppose i should happy that everything else works fine despite that and my system hasn't frozen yet. So much for my simple laic belief in Mint's infallibility. :wink:
Edit: Installed b43 installer and it installed the firmware blob into the kernel as a module. Now i get,

Code: Select all

:~$ sudo iwconfig
[sudo] password for sade: 
eth0      no wireless extensions.

wlp2s0    IEEE 802.11abg  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=200 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
lo        no wireless extensions.
Not that i have a wireless connection but it bugged me that my system was not wifi ready, i think it is now. :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux User #481272 Reg: 15th Sept., 2008
User avatar
mzsade
Level 5
Level 5
Posts: 776
Joined: Sun Jul 19, 2009 4:36 am

Re: Can i compile a kernel on Betsy and install it on Debian

Post by mzsade »

Hey guys, Wouldn't have extended this topic as nobody seems to be interested but i've just gotta share this.
Built kernel 4.4.1 on LMDE but this time i chose 'make localyesconfig' instead of 'make oldconfig' and installed the image and headers on Debian. There's a lot of other stuff that got built too, the linux-image-dbg, linux-libc-dev and linux-firmware-image amd64.deb packages but i have no idea what to do with them, had installed them once before after a previous compile, didn't make any difference either way so i am making do with just the image and headers. The linux-image-4.4.1-3.16.0.0-4-amd64.deb is only 7 MB! And everything seems to be working fine, so what've i stumbled onto here? :D

Forgot to mention, the entire build took less than an hour!

References on my to-do list: http://www.linuxtopia.org/online_books/ ... index.html
http://www.linux.org/threads/linux-kern ... uide.5384/
Linux User #481272 Reg: 15th Sept., 2008
bigbenaugust

Re: Can i compile a kernel on Betsy and install it on Debian

Post by bigbenaugust »

LMDE2 and Debian Stable share enough that a kernel compiled on one should run on the other, provided they are the same arch.

And assuming the prerequisites are met, jumping to 4.4 should work too.

I just use the backports kernel (currently 4.3.3) because it's easier. :)
User avatar
mzsade
Level 5
Level 5
Posts: 776
Joined: Sun Jul 19, 2009 4:36 am

Re: Can i compile a kernel on Betsy and install it on Debian

Post by mzsade »

This latest make option is working out so well, i feel like the cat's whiskers for stumbling onto it. :lol: A word of caution for noob Mint users, don't overreach yourselves, don't upgrade kernels the Mint developers deem unsafe. If you feel adventurous, mess around with another partition. My LMDE partition is my safe zone, my goto place when everything else goes bust but where everything works without my working for it. But i have to admit i am partial to this kooky configuration of mine, it's a poor thing but my own. :D
Edit:
scrot.png
Anyone else got the latest kernel yet? LMDE and LMDE's /boot/config is such an awesome base to compile and build a kernel for your Debian! Normally i choose "fair-share" for the power allocator governor but this time i stuck with "step-wise" and this has turned out to be my best Debian build yet. Hasn't frozen on me once while streaming videos. CPU core temps. run a little hotter but only by a wee bit more.
Linux User #481272 Reg: 15th Sept., 2008
Locked

Return to “LMDE Archive”