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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-20-2003, 12:50 AM
|
#1
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Rep:
|
buildin a custom kernel
hi, i would like to build a kernel, and was wondering wht this line meant :
"unpack the kernel source package on any partition where you have free disk space (like /home)."
i have seen posts where ppl have recommended this - but im not sure why, instead of in /usr/src.
culd someone breifly explain to me why and how i would go about building it from /home?
thnx.
|
|
|
08-20-2003, 01:00 AM
|
#2
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
The location of the build is irrelevant for the most part. If you try to build drivers for the kernel that aren't part of the kernel, most driver applications will look in/at /usr/src/linux for the sources of the current kernel by default. However, the newer ones seem to allow a --kernel-source= option in the configure script, so you don't have to follow suit on the /usr/src anymore (although that would seem to be standard practice).
So, if you are going to be using drivers that ARE in the kernel, and the kernel contains everything you need, build it anywhere you'd like (the above sentence means anywhere you have enough disk space to unpack and build something). And after you build it, test it, and successfully run it, you can even delete the source, I'd save the .config somewhere safe though, that way if you ever need to 'update' or something, you have an old config to use
Cool
|
|
|
08-20-2003, 01:09 AM
|
#3
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
thnx for the quick reply, masterc.
im also a bit confused bout permissions when compiling this.
if i place them in either /ur/src or /home, i will have to do it with root permission. i read in the documentation that all commands till the "make install' should not be done using root.
how do i go about this?
thnx again!
|
|
|
08-20-2003, 08:15 AM
|
#4
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
You have a few options:
* chmod or chown /usr/src to allow a specific group access to that directory, then add your user to that group.
* Do it as root (no no)
* Give your user priv's to write in the /home directory
* Unpack it in the user's home directory
* Unpack it in /tmp
I'd go with the group gettin perms on /usr/src and adding the user to that group.
Cool
|
|
|
08-20-2003, 09:17 AM
|
#5
|
Senior Member
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713
Rep:
|
Interesting... Why is it that one should not compile a kernel with root privelidges? I've done this several times without any problems.
|
|
|
08-20-2003, 09:37 AM
|
#6
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
aha - thank u very much masterc.
|
|
|
08-20-2003, 08:01 PM
|
#7
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Quote:
Originally posted by adz
Interesting... Why is it that one should not compile a kernel with root privelidges? I've done this several times without any problems.
|
As have I. But you take a risk when you compile anything as root, if you and I are willing to do that, so be it. However, to teach someone how to do it, that's a whole different ball game, and you wanna teach correctly so later they can make their own judgements on what to cut corners on
Cool
|
|
|
08-20-2003, 08:38 PM
|
#8
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
hmm-i built it (i didnt know how else to break the news)
but im not happy with the way i did it. i did everything as root.
and it started up. i didnt configure some modules and ....
at least, it started running this time round - i hadnt been able to uptil now.
sigh. soooo not happy with it - i felt like i was using a hammer to swat a fly. 
|
|
|
08-20-2003, 08:42 PM
|
#9
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
ive been tryin to compile the kernel with the patch as i havent been able to get my soundcard working (i810 ac97).
sigh.
|
|
|
08-20-2003, 09:40 PM
|
#10
|
Senior Member
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713
Rep:
|
Make sure you save your config to another filer (not ".config") so that you can have a place to work from when you debug. How big is your kernel (in kb), btw?
|
|
|
08-20-2003, 09:54 PM
|
#11
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
i shud be lookin at the vmlinuzxxx filesize to answer that?
 i am exhausted with this.  but its fun! 
|
|
|
08-20-2003, 09:57 PM
|
#12
|
Senior Member
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713
Rep:
|
Yep. That's the one. Mine's just over 700kb.
|
|
|
08-20-2003, 10:00 PM
|
#13
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
aha ok. well, ill let u know in a bit, cos i switched to windows for my cam. 
i notice ur on debian.
im downloading the debian cd right now (cos i dont have any floppies on me, but cd's i have lots - haha).
u wudnt be using an nvidia card, wud ya?
i was thinking of trying debian out b4 i pack up for the day.
any words of advice?
|
|
|
08-20-2003, 10:02 PM
|
#14
|
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286
Original Poster
Rep:
|
it wud be ok to install it with the first cd itself right? or do i need to get cd 2 too?
and i was wondering, since debian was the one with apt ... wud it not do an apt-get for installing packages?
is there any option to install stuff with apt during the first install?
|
|
|
08-23-2003, 06:57 AM
|
#15
|
Senior Member
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713
Rep:
|
OK. I'm going to try this one more time. So far every time I've tried to reply my browser crashes. It's nothing to do with LQ but rather with another site I think. This time I'm writing this reply in a text editor and even if Opera crashes on me I'll still have my message. So, here goes...
Yes I do use nvidia on my other computer which also runs debian. This computer runs some sort of nvidia compatible card or something but I never compiled the proper nvidia driver for it.
With regards to debian tips, I have a few. One is: try it, debian rocks! It's a little more manual but the package management is second to none and it runs lighter than most other distros. You're right, as a result of the package management you only really need the first CD. Then you can apt-get the rest of the system. It helps to have a broadband connection. If you don't (like me) you have to set it over night and in the morning you have an updated system.
My debian installation tips are as follows.
1. If you want a newer kernel (2.4.18) straight off the bat, then at the "boot:" prompt type "bf24". If you just press enter then you get 2.2.20. Press F3 for more boot options.
2. You do have the option of using apt at first install but I wouldn't. the automated install never seems to get the "sources.list" configuration right. You can always install other things later.
3. Don't install too many modules (possibly none at all), it's pretty easy to do later.
4. Do NOT run tasksel or dselect. Tasksel is clumsy and will install a whole bunch of stuff you weren't expecting and dselect just made me want to cry the first time I saw it. Additional programs can be gotten later through apt-get.
5. I don't configure exim (option 5) but if you use it than this may be a good time.
6. Once the automated install is over, set up your internet connection and your "/etc/apt/sources.list" file. Type "man sources.list" and follow the examples they have there. Check out www.debian.org for a list of mirror sites near you.
7. Once you have done all that type "apt-get update" and then "apt-get dist-upgrade". The latter command ugrades your system to either testing or unstable (which you'll probably want unless you're running a server) as stable is a little old. I recommend testing because it's not as bleeding edge and it's much easier to go from testing to unstable than vice versa.
8. Now, just install the packages you want (all dependencies are take care of for you) by typing "apt-get install <package names>". Multiple packages can be specified at once. Common package names include:
* x-window-system (xfree86 and dependencies)
* kde, gnome, wmaker, blackbox, fluxbox (Your choice of DE or WM)
* mozilla, mozilla-firebird, galeon, konqueror, lynx (Your choice of browser. If you want opera you can d/l the .deb package from their site directly. It's not available through apt-get)
* tk8.2 (and/or libncurses5), make, gcc, bin86, libc6-dev (packages necessary to compile your own kernel)
That's about all. If you want some good links here's one about installing debian: http://www.osnews.com/story.php?news_id=2016. And here's one about kernel comilation: http://www.osnews.com/story.php?news_id=2949. They're both by the same author and the one about compilation helped me a lot.
Have fun.
Last edited by adz; 08-23-2003 at 07:02 AM.
|
|
|
All times are GMT -5. The time now is 12:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|