LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-04-2015, 01:53 PM   #16
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,210

Original Poster
Rep: Reputation: 71

You have a typo. You wrote:
Code:
make deb-pkg LOCALVERSION=-3.16.0-4-amd64 KDEB PKGVERSION=1
It should be:
Code:
make deb-pkg LOCALVERSION=-3.16.0-4-amd64 KDEB_PKGVERSION=1
 
Old 09-04-2015, 02:34 PM   #17
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Darn me and my myopia, you have already taught me to purge as below:
Code:
su 
rm -rf /lib/modules/4.2.0
rm -f /boot/vmlinuz-4.2.0* 
rm -f /boot/initrd.img-4.2.0* 
rm -f /boot/config-4.2.0* 
rm -f /boot/System.map-4.2.0*
update-grub
There was a reference to "stale .o files' in the README. Does this cover that before i try again?
 
Old 09-04-2015, 04:44 PM   #18
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,210

Original Poster
Rep: Reputation: 71
I think you are fine in regards to stale .o files as long as you run "make clean" first before compiling.
 
Old 09-05-2015, 09:48 AM   #19
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Success at last. yu de man!
Code:
dpkg-deb: building package `linux-firmware-image-4.2.0-3.16.0-4-amd64' in `../linux-firmware-image-4.2.0-3.16.0-4-amd64_1_amd64.deb'.
dpkg-deb: building package `linux-headers-4.2.0-3.16.0-4-amd64' in `../linux-headers-4.2.0-3.16.0-4-amd64_1_amd64.deb'.
dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_1_amd64.deb'.
dpkg-deb: building package `linux-image-4.2.0-3.16.0-4-amd64' in `../linux-image-4.2.0-3.16.0-4-amd64_1_amd64.deb'.
dpkg-deb: building package `linux-image-4.2.0-3.16.0-4-amd64-dbg' in `../linux-image-4.2.0-3.16.0-4-amd64-dbg_1_amd64.deb'.
root@Sinai:/usr/src/linux#
Along with this;
Code:
dpkg -i linux-image-4.2.0-3.16.0-4-amd64_1_amd64.deb
dpkg -i linux-headers-4.2.0-3.16.0-4-amd64_1_amd64.deb
do you advise
Code:
dpkg -i linux-firmware-image-4.2.0-3.16.0-4-amd64_1_amd64.deb
dpkg -i linux-image-4.2.0-3.16.0-4-amd64-dbg_1_amd64.deb
?

Whether i am able to boot in the new kernel or not will be related to compatibility of my H/W with the combination of the distribution and the new kernel and i will pursue that elsewhere. I have only just begun to appreciate the thought and care put in, the in-depth understanding of the Linux kernel and the upgrade process involved, and the many years of Linux experience behind it, compressed into every step you have outlined in this tutorial and i am truly grateful for it.

Last edited by mzsade; 09-05-2015 at 10:18 AM.
 
Old 09-07-2015, 07:13 AM   #20
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Ran
Code:
dpkg -i linux-image-4.2.0-3.16.0-4-amd64_1_amd64.deb
and it returned an error in locating archive. Felt like i was punched hard in my stomach. Then collected myself and ran
Code:
dpkg -i /usr/src/linux-image-4.2.0-3.16.0-4-amd64_1_amd64.deb
dpkg -i /usr/src/linux-headers-4.2.0-3.16.0-4-amd64_1_amd64.deb
Yaba-daba-doo!
Code:
sade@Sinai:~$ uname -r
4.2.0-3.16.0-4-amd64
 
Old 11-21-2015, 08:25 AM   #21
silvanus-deb
LQ Newbie
 
Registered: Dec 2013
Posts: 11

Rep: Reputation: Disabled
Because I am on the "testing" release (64 bit), the upgraded kernels (both 4.1 and 4.2) have been installed through regularly running "apt-get dist-upgrade".

However, the system won't boot using 4.1 or 4.2. In order to successfully boot to the login screen, I have to select 4.0.0-2-amd64 in GRUB. When I try using 4.1 or 4.2, the last boot message I get is the result of fsck (clean). Shortly later the screen flickers and the message font changes (as in normal boot-up), so presumably the video driver has loaded successfully (???) but the system freezes at this point. I installed the realtek firmware, in case that was causing the problem, but it didn't help.

For what it's worth, I'm on a Dell Inspiron Mini 1012. Is there something in the latest kernels that won't cooperate with my old hardware?

I'm a non-technical user, but can type terminal commands and edit settings files like a trained seal if given specific instructions
 
Old 11-22-2015, 12:40 AM   #22
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,210

Original Poster
Rep: Reputation: 71
Silvanus-deb: You will probably get more help by creating a new thread. You should also clarify what kernel version works, since 4.2 is the default in Testing and you say it won't boot. You were apparently able to boot some kernel and install firmware. If all you care about is having it working, you can always just boot into the one that works, uninstall the others, and pin the kernel version in apt so it won't be upgraded again.
 
Old 11-25-2015, 02:04 PM   #23
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,210

Original Poster
Rep: Reputation: 71
If anyone follows this guide for compiling the 4.3 kernel from the sources from kernel.org, it will fail with the error:
Code:
openssl/opensslv.h: No such file or directory
You can fix that by installing libssl-dev:
Code:
apt-get install libssl-dev
After that do:
Code:
make clean
Then re-start the compilation and it will proceed as normal. I was going to put this in the original post, but it looks like I can no longer edit it.
 
1 members found this post helpful.
Old 02-20-2016, 02:33 AM   #24
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
@m_yates, i cannot thank you enough for this awesome compile guide, learn something new each time i use it. This time i compiled the kernel on LMDE 2 using it's /boot/config and
<make localyesconfig> instead of <make oldconfig> and the results seem to have worked out very well for me. For one thing, the whole build took just a little over an hour as compared to the usual 4-5 hours, the linux-image and linux-headers were only 7 MB each and my system hasn't frozen on me once since then. What are your recommendations in this respect? I mean, is there a downside to this?

My laptop screen.

Last edited by mzsade; 02-20-2016 at 02:34 AM.
 
Old 02-20-2016, 10:09 PM   #25
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,210

Original Poster
Rep: Reputation: 71
Glad it has been of use. I've never actually tried using the localyesconfig target. As I understand it, localyesconfig takes all loaded modules from your running kernel and compiles them into a monolithic kernel without modules. There is also a localmodconfig option that is similar, except it selects all of your currently loaded modules from your running kernel and selects only those modules to compile for the new kernel.

The localmodconfig and localyesconfig targets will eliminate all modules that you aren't currently using, so it will be fast to compile and also make the kernel smaller. It is actually pretty clever to automate it, because a lot of people want to eliminate unused modules and options. Eliminating all the unused modules manually using menuconfig is time consuming and prone to error. If you do it manually and mistakenly delete something you need, the kernel won't work.

There are only a couple of problems with localyesconfig that I see:

1) The kernel you compile will only work on the computer that you compiled it on (or another computer that has exactly the same hardware).

2) If you add new hardware to your computer (such as an expansion card or peripheral), it won't work without compiling a module for it, or compiling a new kernel that has the required module for the new hardware built into it.

When you follow what I did, there are tons of modules compiled that you don't need. That is why the compile time is long and the size is huge. On the plus side, you take the resulting deb files that you compiled the way I did and install them on most any computer and it will work. What you did is make the kernel about as slim and lean as it can be.

Last edited by m_yates; 02-20-2016 at 10:11 PM.
 
Old 02-21-2016, 03:51 AM   #26
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Thanks for the clarification, you are right about the peripherals, didn't think to check it before but now after you mentioned it i see that my flash drives are not being detected. But the localyesconfig/localmodconfig options are too attractive to pass up as i intend to compile the kernel only for the machine i am currently running it on, will try it once more with a couple of them plugged in while compiling. If i have understood the whole thing correctly that ought to work..

Edit: Oh yes, it works and how! Except for the odd SanDisk all my pen drives are Transcend so i plugged in a Transcend before compiling but now i can see every pen drive i plug in, in xfe file manager.

Last edited by mzsade; 02-22-2016 at 10:33 AM.
 
Old 06-14-2016, 03:03 PM   #27
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by mzsade View Post
Thank you for the guide, @m_yates. In my peculiar case both the kernels that came with the distribution, 4.1 and 4.1-rt, failed to boot but i somehow bungled my way into successfully upgrading to kernel 4.2 without recourse to the old config.
Don't wish to clutter the thread by rambling on about it so i'll just post a link to my screenshot.

Your method is quite long and might be much simpler.

You mention that you just need to grab the .config to make it work, but there is visibly much more than that to make a working kernel like you can find already compiled on the repositories !

best regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Compile Guide for 2.6.0 DaOne Slackware 581 04-11-2009 07:31 AM
Kernel compile guide k3rnel Linux - Kernel 1 03-12-2007 03:11 PM
Help - Need guide on how to (re)compile kernel in 9.2 timko SUSE / openSUSE 1 02-17-2005 09:17 AM
re :kernel compile guide sh4d0w331 Slackware 1 10-02-2004 06:38 PM
Kernel re-compile guide marlor Slackware 6 08-08-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration