[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with compiling kernel



On Tue, 08 May 2007 17:29:38 -0500
Manoj Srivastava <srivasta@ieee.org> wrote:

> On Tue, 8 May 2007 16:11:54 -0400, Celejar  <celejar@gmail.com> said: 
> 
> > On Tue, 08 May 2007 12:47:28 -0500
> > Manoj Srivastava <srivasta@ieee.org> wrote:
> 
> >> On Tue, 8 May 2007 16:10:29 +0200, Raffaele Morelli
> >> <raffaele.morelli@gmail.com> said:
> >> 
> >> > That's ok, I follow the general (healthy) rule and do not log as
> >> > root if unnecessary, but for kernel (and program) compile I can not
> >> > picture 'make-kpkg' or 'configure && make' doing something
> >> > regrettable.
> >> 
> >> Thanks for the vote of confidence, but you know, you should not have
> >> to do this.  make-kpkg --rootcmd fakeroot kernel_image should work
> >> perfectly well.
> 
> > When I'm not being lazy, I often do it that way, largely because you
> > suggest it in the docs.
> >> From /usr/share/doc/kernel-package/README.gz:
> 
> > With the addition of fakeroot ( a really nice program, I recommend
> >  it). Steps 1 to 4 can be carried out as a non root user. Step 5 does
> >  require root privileges.
> 
>         Hmm. I should amend that to say:
>  Step 5 does require (fake)root privileges.

Huh? Here's a longer excerpt:

---Begin Quote---

Phase ONE: Getting and configuring the kernel
 1% cd <kernel source tree> (make sure you have write permission there)
 2% make config # or make menuconfig or make xconfig (or, for 2.6.x
    kernels, make gconfig) and configure

Phase TWO: Create a portable kernel image .deb file
 3% make-kpkg clean
 4% $Get_Root make-kpkg --revision=custom.1.0 kernel_image 
      (Get_Root is whatever you need to become root -- fakeroot or
      sudo are examples that come to mind).  NOTE: if you have
      instructed your boot loader to expect initrd kernels (which is
      the norm for recent official kernel image packages) you need to
      add --initrd to the line above.
   % $Get_Root make-kpkg --initrd --revision=custom.1.0 kernel_image 
      Personally, I prefer non initrd images for my personal machines,
      since then adding third party modules to the machine has fewer
      gotchas

Phase THREE: Install the kernel image on one or more machines
 5# dpkg -i ../kernel-image-X.XXX_1.0_<arch>.deb
 6# shutdown -r now # If and only if
LILO/SILO/QUIK/PALO/VMELILO/ZIPL/yaboot/.. # worked or you have a means
of # booting the new kernel. YOU HAVE BEEN WARNED!!

 With the addition of fakeroot ( a really nice program, I recommend
 it). Steps 1 to 4 can be carried out as a non root user. Step 5 does
 require root privileges.

---End quote---

So step 5 requires *real* root privileges, and it's step 4 that can be
done with fakeroot, while steps 1-3 don't require any sort of root
(provided you have write privileges in the appropriate directory. 

> 
>         I did not mean it to be a suggestion; I only meant it was
>  possible. Which it is.

You wrote "a really nice program, I recommend it".

> 
>         manoj
> -- 
> Youth is such a wonderful thing.  What a crime to waste it on
> children. George Bernard Shaw

I see lots of web sites attributing this to Shaw, but they don't
provide a source, and I've seen some people wondering aout the source.
Do you know?

> Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>
> 1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator



Reply to: