LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2010, 07:38 AM   #1
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
installing linux from source code


Hi all,

I am trying to install linux from its source code. After running make bzImage and adding its path in menu.lst file of grub when I boot this kernel, than many of the functionalities do not work like mouse, low graphics mode is enabled etc... I use make oldconfig to configure.

Please help..........

Regards
_Linux_Learner
 
Old 03-01-2010, 07:57 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
AFAIK: make oldconfig looks for an old configuration file (.config or .config.old). If you don't have one then it won't help. You now need to go through and make menuconfig to make sure you got everything.

Note: you should also say where you got your kernel and what version it is.
 
Old 03-01-2010, 07:58 AM   #3
usdanskys
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora, Ubuntu, Puppy
Posts: 17

Rep: Reputation: 1
Quote:
Originally Posted by _Linux_Learner View Post
Hi all,

I am trying to install linux from its source code. After running make bzImage and adding its path in menu.lst file of grub when I boot this kernel, than many of the functionalities do not work like mouse, low graphics mode is enabled etc... I use make oldconfig to configure.

Please help..........

Regards
_Linux_Learner
Did you create an initrd or initramfs file to go with your kernel so as to ensure loading of all of the needed device drivers?

I haven't ever tried it, but this might help:
http://www.linuxfromscratch.org/lfs/
 
Old 03-01-2010, 08:12 AM   #4
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by usdanskys View Post
Did you create an initrd or initramfs file to go with your kernel so as to ensure loading of all of the needed device drivers?

I haven't ever tried it, but this might help:
http://www.linuxfromscratch.org/lfs/
If the system booted then there's no need for the initramfs or an initrd as this is only needed to load modules that will be needed during bootup.

As far as LFS goes I don't think the OP is talking about building an entire distro from source although in the title it sounds that way. It sounds like OP is just trying to roll his own kernel. While LFS is in large part following directions, it's probably a little involved for a brand new linux user.

What tutorial or HOW-TO is being followed and what kernel version is presently installed as well as the version being added. Are you using proprietary video drivers at all?

Last edited by damgar; 03-01-2010 at 08:14 AM.
 
Old 03-01-2010, 10:04 PM   #5
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
reply

Quote:
Originally Posted by damgar View Post
If the system booted then there's no need for the initramfs or an initrd as this is only needed to load modules that will be needed during bootup..........................
You are absolutely right that I am not trying LFS. My aim is only to add a system call into linux Kernel. I did it successfully but the problem is while booting that new kernel.

Currently I am using ubuntu 9.04 and the kernel version is 2.6.28-18-generic and I am trying to compile linux 2.6.32.8 version.....

Regards
_Linux_Learner

Last edited by _Linux_Learner; 03-01-2010 at 10:06 PM.
 
Old 03-01-2010, 11:00 PM   #6
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
I'm no expert, but I've rolled several kernels in the last 6 months (the latest one was actually the oldest one yet, 2.6.27.4 for LFS, which I finished the 6.4 book today............AND IT BOOTED! Sorry, but I had to tell someone). The obvious points to look at are going to be in the build configuration stage. If you were following an online how-to or tutuorial please post the link. I'm thinking that maybe there was a problem with
Code:
make oldconfig
Either it wasn't run or there wasn't a .config file in the source directory. Easiest thing to do is get the current working .config file, copy it into the new kernel source directory issue
Code:
make oldconfig #hit enter for defaults to all the new options
make {g/menu}config #find the changes you are trying to make
and then follow a recommended method for your distro or a related distro for instance I've heard of the Debian-method which involved a couple of commands I've never used build Slackware kernels.

The above should work fairly well, the wildcard being does your distro use a heavily patched kernel where those patches aren't available in the vanilla kernel from kernel.org?
 
Old 03-02-2010, 04:57 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Second that - advise as post #2 stands:
Check you have a .config file in your source - if so, redo from make oldconfig.
Either way, do a make menuconfig to make sure all the needed drivers are present.

If you have working kbd, then try manually loading the extra modules.
 
Old 03-02-2010, 05:35 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by _Linux_Learner View Post
You are absolutely right that I am not trying LFS. My aim is only to add a system call into linux Kernel. I did it successfully but the problem is while booting that new kernel.

Currently I am using ubuntu 9.04 and the kernel version is 2.6.28-18-generic and I am trying to compile linux 2.6.32.8 version.....

Regards
_Linux_Learner
That's useful info. First, be aware that you are going to need some manual work. If you don't want so, better pick up a 2.6.28/29 kernel, since that will be closed to yours, and hence, you will have to guess a lesser number of things.

"oldconfig" is a target that takes a config file from an older kernel and configures it to fit the current sources. The problem is that in between .29 and .32 a lot (and I really mean A WHOLE LOT) of things changed.

Your best bet, if you are using a .28 kernel, is to pick the latest 2.6.28 kernel from kernel.org. Download, save and uncompress it. Boot your regular Ubuntu kernel, then go to the directory where your new kernel sources live and do this:

Code:
zcat /proc/config.gz > .config
make oldconfig
And go from there.

Code:
make && make install modules_install
Configure your grub.conf or whatever and boot your new kernel. Once you've done that training, you can then worry about upgrading to .32 if you really need to do so.
 
Old 03-03-2010, 07:21 AM   #9
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
no config.gz

Code:
zcat /proc/config.gz > .config
I have no such config.gz in /proc directory..... What to do now?

regards
_Linux_Learner
 
Old 03-03-2010, 07:34 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Oh, yet another "smart" thing from the Ubuntu guys, it doesn't surprise me at all. That means that you won't be able to retrieve your current kernel config, so you'll have to configure the kernel yourself, or pick a working .config file from another distro you've got installed.
 
Old 03-03-2010, 08:06 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,632
Blog Entries: 4

Rep: Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931
The easiest way to "add a system call" is actually to implement a kernel module. Also, it is easiest to define a "virtual device" that you can talk to via ioctl() calls.
 
Old 03-03-2010, 09:50 AM   #12
usdanskys
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora, Ubuntu, Puppy
Posts: 17

Rep: Reputation: 1
Quote:
Originally Posted by i92guboj View Post
Oh, yet another "smart" thing from the Ubuntu guys, it doesn't surprise me at all. That means that you won't be able to retrieve your current kernel config, so you'll have to configure the kernel yourself, or pick a working .config file from another distro you've got installed.
Current kernel config is in /boot.
Code:
/mnt/Lucid/boot$ ls
abi-2.6.32-14-generic         memtest86+.bin
config-2.6.32-14-generic      System.map-2.6.32-14-generic
grub                          vmcoreinfo-2.6.32-14-generic
initrd.img-2.6.32-14-generic  vmlinuz-2.6.32-14-generic
 
Old 03-20-2010, 12:56 AM   #13
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Back To Track

Hi all

Sorry for late resume but I faced a number of problems while going through this process of adding system call. But the result is still I didn't get the answer..........

Is there any command in linux to check all available system calls in linux kernel....

Thanks in advance
 
Old 03-20-2010, 04:05 AM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by _Linux_Learner View Post
Hi all

Sorry for late resume but I faced a number of problems while going through this process of adding system call. But the result is still I didn't get the answer..........
To my eyes, every question you asked has been answered. We don't have a crystal ball though, and we can't read your mind. So, if you feel that something isn't clear enough just ask again, and ask for clarification in any concrete aspect.

Quote:
Is there any command in linux to check all available system calls in linux kernel....

Thanks in advance
I doubt it. Even more, considering that it will depend on the concrete kernel version you are using. The kernel is alive and changes everyday. The kernel headers are probably the most comprehensive guide ever that you will find about the kernel API.
 
Old 03-20-2010, 04:49 AM   #15
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by i92guboj View Post
To my eyes, every question you asked has been answered. We don't have a crystal ball though, and we can't read your mind. So, if you feel that something isn't clear enough just ask again, and ask for clarification in any concrete aspect.
You took me wrong. I mean that I was not able to solve my problem of adding system call even with so much help. Sorry if I was rude....

Regards
_Linux_Learner
 
  


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
Is Installing from source code from any Linux OS be done? hrishikesh_am Linux - General 4 03-11-2007 03:43 PM
Installing Source Code Help Thorlord Linux - Software 5 03-12-2006 07:31 PM
installing source code MilkyBar_Kid Slackware 2 07-18-2004 01:46 AM
Installing from source code chuckeff Mandriva 2 03-16-2004 10:30 PM
installing source code - slackware lmellen Slackware - Installation 0 01-17-2004 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 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
Open Source Consulting | Domain Registration