Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
|
04-24-2006, 04:05 AM
|
#1
|
Member
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100
Rep:
|
Kernel rebuild by ordinary user?
Hi there,
Is there a way to sucessfully rebuild and install a linux kernel while logged in as a ordinary user (e.g. not root)? I mean do all the neccesary task for a kernel rebuild require root privileges?
The problem I encounter is that I try to cross-compile an kernel for a PPC target on a publica machine (the cross compiler is available only there), and when I attempt to build the target filesystem I get this message from 'make':
Code:
Failed to execute: make hello.tgz
make: *** [hello.tgz] Aborted
It's only a 'Hello World' example, nothing speccific but nevertheless it is a fully functional kernel... But if I cannot make the 'Hello' example work, I'm in big troubl...
P.S. Sorry for double posting this thread here and in the Newbie forum, butit seems that nobody in the newbie forum is willing to reply.
|
|
|
04-24-2006, 05:25 AM
|
#2
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
Quote:
Is there a way to sucessfully rebuild and install a linux kernel while logged in as a ordinary user (e.g. not root)? I mean do all the neccesary task for a kernel rebuild require root privileges?
|
You can, and in fact should, compile software as an ordinary user. Compiling as root is discouraged since e.g. an error in a Makfile can screw up your system. However, you will need to su to root to install the kernel.
Quote:
Failed to execute: make hello.tgz
make: *** [hello.tgz] Aborted
|
Hard to see exactly what's going on here without more info. The target would usually just be 'make hello' At first glance, it looks like you're trying to compile the tarball! You have untarred it, right?
|
|
|
04-24-2006, 05:51 AM
|
#3
|
Member
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100
Original Poster
Rep:
|
No actually the thing I'm trying to do is compile the root-filesystem which should be stored in a .tgz file after the build is complete... At least according to the descriptions in the README file... However I found that these descritions are quite messy and lead to nowhere... So now I'm trying to understand what's going on myself, and of course with your help.
Another thing:
In order to have a working linux kernel (i.e. one that boots and starts a shell after init is done), you need the following stuff:
-> zImage, the compressed linux kernel
-> System.map, the kernel symbol table
-> the root filesystem
Am I right about that?
Thanks.
P.S. I'm trying to build for a PPC target (MVME6100 board) on a RedHat-based host. The host is running kernel 2.4.21 while the new kernel for the target should be 2.6. Can some problems arouse from this difference?
Last edited by halturata; 04-24-2006 at 05:53 AM.
|
|
|
04-24-2006, 06:12 AM
|
#4
|
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
|
If you are trying to compile a kernel for an existing/working system, you don't need 'root file system' and 'root file system' is not something you compile using make.
The root file system is the heirarchy of directories comprising /, /boot, /bin, /sbin, /usr.... etc and containing the minimal set of binaries and the associated config files.
Here, I'm presuming that you already have a working linux system and you just want to upgrade the kernel or compile it yourself to make it smaller/faster. So, if you are trying to compile a kernel for your machine, while carrying out the actual compilation on another machine and then copying/porting it to your machine, you wouldn't need root file system as you already have a working linux machine.
If you don't have a linux machine, compiling a kernel for your machine is a bit ..., er ! what can I say !
|
|
|
04-24-2006, 06:27 AM
|
#5
|
Member
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100
Original Poster
Rep:
|
Quote:
The root file system is the heirarchy of directories comprising /, /boot, /bin, /sbin, /usr.... etc and containing the minimal set of binaries and the associated config files.
|
Yes, I know that. The thing I cannot understand is where the root-filesystem is stored before you boot you box? On the hard-drive? Or in the kernel image?
Quote:
If you are trying to compile a kernel for an existing/working system, you don't need 'root file system' and 'root file system' is not something you compile using make.
|
And how do you create it then? There must be a way to specify what you want in your filesystem.
Actually, the thing I want to do is build a whole new system and then run it on a PPC box. A kind of building "embedded" system... I compile the kernel on a host and then net-boot it (or at least try to net-boot it). That's why I need to know what files (concerning the linux system) are necessary to make this possible, i.e. what to build/compile and how to put it all together.
|
|
|
04-24-2006, 06:32 AM
|
#6
|
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
|
|
|
|
04-24-2006, 06:47 AM
|
#7
|
Member
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100
Original Poster
Rep:
|
I had that in mind... Well, after all I guess i'll end up there
Thanks anyway
|
|
|
04-24-2006, 07:49 AM
|
#8
|
Member
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100
Original Poster
Rep:
|
OK, one last - for what stands the vm in vmlinux / vmlinuz?
|
|
|
04-24-2006, 08:00 AM
|
#9
|
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
|
Virtual Memory ? Just a wild guess !! ;-D
|
|
|
04-24-2006, 08:11 AM
|
#10
|
Member
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100
Original Poster
Rep:
|
Well, maybe...
As far as I know the vmlinux is the actual kernel executable and the vmlinuz is the boot-sector...
Not that I'm convinced about it anyways...
Other opinions?
|
|
|
All times are GMT -5. The time now is 11:49 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
|
|