LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 03-15-2012, 02:57 PM   #16
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by k3lt01 View Post
You didn't read that article very well. The native configs are in /boot they will have a name like config-x.x.x-x-amd64 or similar (this is off my Debian system so Ubuntu may have something like Generic in the name as well but they will start with config-

If you have never done this before you should use the native config as a basis to start with.
There was an article? I might need to check back a few posts...

Another build is in progress. I'm going to figure this out yet.

Thanks for everyone's help so far.
 
Old 03-20-2012, 10:40 PM   #17
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Okay, update time...

I've been gone for a while, so I haven't been able to work on this until now. Even using a previous config file, no change in status.

So, I'm wondering, might it be that there's no /boot/initrd.img-3.2.11-custom file on my drive? In fact, there's no mention of init or initrd anywhere in the process of building and installing the kernel... I'm starting to wonder if there could be an issue with that.

From what I know about init, off the top of my head, I think this file looks like something that would tell init how to load the kernel or modules. Is this correct? If so, maybe init isn't loading everything. So, how would I get an initrd image for my kernel?
 
Old 03-20-2012, 10:56 PM   #18
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
Quote:
Originally Posted by Ryan Hoots View Post
Even using a previous config file, no change in status.
Old config files are just a start. You can use them as is but should, if you want to get the features of the new kernel, add more features by make menuconfig.

Can you post a step by step of how you are trying to do this? It may help to see if you are missing any important steps.
 
1 members found this post helpful.
Old 03-21-2012, 10:59 AM   #19
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Okay, here's how I'm trying to do this:

1. Download and extract the source tarball. If I'm compiling source that I already have, I skip this step.

2. In a terminal, start the configuration with make menuconfig. I go around, selecting anything that might apply. When using a previous config file, I ran make menuconfig and used the "Load alternate configuration file" to load the file I needed. I then fine tuned it.

3. I then run make to compile the kernel.

4. Then I run the command "make modules && sudo make modules_install" to compile and install the modules.

5. Then, to install the kernel, I run make install. I then have three new files in /boot for my kernel.

6. To let the boot loader know there's a new kernel on my hard drive, I run sudo update-grub. I then reboot into my not-exactly-functioning kernel.
 
Old 03-23-2012, 01:27 AM   #20
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
Quote:
Originally Posted by Ryan Hoots View Post
Okay, here's how I'm trying to do this:

1. Download and extract the source tarball. If I'm compiling source that I already have, I skip this step.

2. In a terminal, start the configuration with make menuconfig. I go around, selecting anything that might apply. When using a previous config file, I ran make menuconfig and used the "Load alternate configuration file" to load the file I needed. I then fine tuned it.

3. I then run make to compile the kernel.

4. Then I run the command "make modules && sudo make modules_install" to compile and install the modules.

5. Then, to install the kernel, I run make install. I then have three new files in /boot for my kernel.

6. To let the boot loader know there's a new kernel on my hard drive, I run sudo update-grub. I then reboot into my not-exactly-functioning kernel.
OK try this for step 2, cp /boot/config-WHATEVERYOURKERNELVERSIONIS .config and then make menuconfig. Be aware you need to be in the appropriate folder and you change the name of the bolded section to the name of your old config file.

For step 3 try this. fakeroot make-kpkg --jobs=2 --initrd --append-to-version=-custom --revision=insertdatehere kernel_image kernel_headers modules_image

At this stage I would just try and let it compile with the old config in place. If that doesn't work then try adding features. I suspect that what is happening is you are changing the config and either accidently removing something or not applying the old config correctly.

Let us know how you go.
 
Old 03-23-2012, 05:26 PM   #21
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
OK try this for step 2, cp /boot/config-WHATEVERYOURKERNELVERSIONIS .config and then make menuconfig. Be aware you need to be in the appropriate folder and you change the name of the bolded section to the name of your old config file.

For step 3 try this. fakeroot make-kpkg --jobs=2 --initrd --append-to-version=-custom --revision=insertdatehere kernel_image kernel_headers modules_image

At this stage I would just try and let it compile with the old config in place. If that doesn't work then try adding features. I suspect that what is happening is you are changing the config and either accidently removing something or not applying the old config correctly.

Let us know how you go.
Okay, sorry it took a while, but my computer crashed before the first compile attempt finished, and on try two there was an error. Same error for try 3. Here it is:

Code:
checking for directory with ALSA kernel sources... ./configure: line 4715: cd: ../alsa-kmirror: No such file or directory
../alsa-kmirror
checking for directory with kernel source... /home/ryanjh/Downloads/linux-3.2.12
checking for directory with kernel build... /home/ryanjh/Downloads/linux-3.2.12
checking for kernel linux/version.h... yes
checking for kernel linux/autoconf.h... no
The file /home/ryanjh/Downloads/linux-3.2.12/include/linux/autoconf.h does not exist.
Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /usr/src/linux).
make[2]: *** [configure-stamp] Error 1
make[2]: Leaving directory `/usr/src/modules/alsa-driver'
make[1]: *** [kdist_image] Error 2
make[1]: Leaving directory `/usr/src/modules/alsa-driver'
Module /usr/src/modules/alsa-driver failed.
Hit return to Continue
I have no idea what that means. But there are two new .deb files in my downloads folder. Although I think it wouldn't be a good idea to install them, unless you say it's okay.
 
Old 03-23-2012, 05:47 PM   #22
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
I'll do a compile on my system and see what happens. If it works ok I'll post a complete step by step for you. It may take a while so don't expect anything until the end of the weekend.
 
Old 03-23-2012, 06:21 PM   #23
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
I'll do a compile on my system and see what happens. If it works ok I'll post a complete step by step for you. It may take a while so don't expect anything until the end of the weekend.
Okay, I'll keep a watch on this thread. Thanks for your help.
 
Old 03-23-2012, 10:14 PM   #24
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
I should be working but the tv is showing a repeat of motor racing from a few weeks ago is on TV so I'm watching the v8 utes racing while I compiled 3.2.11

OK here is the process I followed.
1. cd into the extracted folder.
2. cp /boot/config-3.2.0-2-amd64 .config
3. make menuconfig
4. select exit on make menuconfig, unless you need to enable things like non-free drivers etc in which case you will need to go through the lists and select the things you need. Make sure you save the config after enabling anything.
5. fakeroot make-kpkg --jobs=2 --initrd --append-to-version=-custom --revision=yyyymmdd kernel_image kernel_headers modules_image Change the bold to suit your purpose, append-to-version=-custom is what you want to call it mine is called cobber make sure you keep the - infront of the name. revision= is the date you compile on write it in this order year month date yyyymmdd.
6. let it work through the process and if there are no errors listed at the end install the debs.

I just went through this with 3.2.11 and it works a treat apart from the fact I didn't do my wireless driver which I will do now.
 
Old 03-24-2012, 11:54 AM   #25
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
I should be working but the tv is showing a repeat of motor racing from a few weeks ago is on TV so I'm watching the v8 utes racing while I compiled 3.2.11

OK here is the process I followed.
1. cd into the extracted folder.
2. cp /boot/config-3.2.0-2-amd64 .config
3. make menuconfig
4. select exit on make menuconfig, unless you need to enable things like non-free drivers etc in which case you will need to go through the lists and select the things you need. Make sure you save the config after enabling anything.
5. fakeroot make-kpkg --jobs=2 --initrd --append-to-version=-custom --revision=yyyymmdd kernel_image kernel_headers modules_image Change the bold to suit your purpose, append-to-version=-custom is what you want to call it mine is called cobber make sure you keep the - infront of the name. revision= is the date you compile on write it in this order year month date yyyymmdd.
6. let it work through the process and if there are no errors listed at the end install the debs.

I just went through this with 3.2.11 and it works a treat apart from the fact I didn't do my wireless driver which I will do now.
I've got a problem over here. My computer complained that it didn't know what the jobs option was. So I omitted it. But then, that Alsa module failed again. I forgot to mention that I omitted it last time, too.

So, I guess I have a problem. If that jobs option is important, the Alsa module won't work without it. But nothing works when I do use it.
 
Old 03-24-2012, 04:40 PM   #26
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
The jobs just means if you have a dual core you can do 2 jobs, if you have a quad core yo can do 4 jobs.

I'm at a loss as to why alsa is failing, unless I see a complete (and they are extremely long) log for the job I doubt I can offer any more help.
 
Old 03-24-2012, 04:46 PM   #27
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
The jobs just means if you have a dual core you can do 2 jobs, if you have a quad core yo can do 4 jobs.

I'm at a loss as to why alsa is failing, unless I see a complete (and they are extremely long) log for the job I doubt I can offer any more help.
Yeah, the log was pretty long... maybe I should save it as a file and send you a download link?
 
Old 03-24-2012, 08:02 PM   #28
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
ok save the log and post the link, I'll look at it when I can
 
Old 03-24-2012, 09:41 PM   #29
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,899

Rep: Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623Reputation: 623
I've been a bit slow with remembering something. From memory Ubuntu doesn't use alsa anymore it uses Pulse Audio. You may be able to use the new debs anyway.
 
Old 03-24-2012, 09:47 PM   #30
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
I've been a bit slow with remembering something. From memory Ubuntu doesn't use alsa anymore it uses Pulse Audio. You may be able to use the new debs anyway.
In that case, I guess I'll try it. If it fails, I can always try posting the log.

I'll report back when done...

Edit:

Exact same error as before. I'm starting to think the build method is irrelevant here, I think I need to check the configuration a little more. However, because I'm using the same configuration as a known working kernel, I'm not sure.
It's getting late, so I guess I'll have to think up a solution in the morning. But I will find a solution.
Maybe I need to go at this a different way. I mean, what if it's Ubuntu that is the problem? Perhaps I should install Debian on this free space I have on my hard drive left over from a Linux Mint installation, and then build MATE and Linux 3.2 on top of that.

Last edited by Ryan Hoots; 03-24-2012 at 10:02 PM.
 
  


Reply

Tags
compile, kernel 3


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems booting custom kernel smartacus Linux - General 2 02-10-2011 12:07 AM
[SOLVED] Custom kernel problems after encrypting disk brooky9999 Slackware 15 09-18-2008 03:30 PM
Problems with custom kernel k3rnel Debian 9 03-08-2007 02:15 PM
Custom Kernel Problems Penguin of Wonder Ubuntu 13 03-14-2006 11:20 PM
problems installing custom 2.6.14 kernel (for SATA problems) Ekkume Ubuntu 0 12-29-2005 03:39 PM


All times are GMT -5. The time now is 03:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration