LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-24-2006, 04:05 AM   #1
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Rep: Reputation: 16
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.
 
Old 04-24-2006, 05:25 AM   #2
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
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?
 
Old 04-24-2006, 05:51 AM   #3
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
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.
 
Old 04-24-2006, 06:12 AM   #4
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
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 !
 
Old 04-24-2006, 06:27 AM   #5
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
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.
 
Old 04-24-2006, 06:32 AM   #6
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
http://www.linuxfromscratch.org/
 
Old 04-24-2006, 06:47 AM   #7
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
I had that in mind... Well, after all I guess i'll end up there
Thanks anyway
 
Old 04-24-2006, 07:49 AM   #8
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
OK, one last - for what stands the vm in vmlinux / vmlinuz?
 
Old 04-24-2006, 08:00 AM   #9
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Virtual Memory ? Just a wild guess !! ;-D
 
Old 04-24-2006, 08:11 AM   #10
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
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?
 
  


Reply



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 rebuild by ordinary user? halturata Linux - Newbie 5 04-28-2006 04:29 PM
NFS Mount as an ORDINARY USER fahad26 Linux - Newbie 1 06-22-2005 02:30 AM
Can't startx as ordinary user WoodLark Slackware 8 03-26-2005 04:40 PM
Using k3b as ordinary user friendly_guy Slackware 4 11-06-2003 01:16 PM
Ordinary user can shutdown benjaminrtz Linux - Security 12 07-11-2002 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 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