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

Re: Non-root kernel compiling--Continue...



On Wed, Dec 06, 2000 at 12:29:55AM +0100, paolo massei wrote:
> 
> Is there a reason to copy /tmp/kernel_image in /home/user/ before installing? and

yes, when you reboot everything in /tmp is deleted, you may want to
keep the .deb around in which case you must move it out of /tmp

> Do you know if there are troubles using dpkg -i and grub like loader?

nope, just say `no' when it asks you if you want to install lilo.  or
just deinstall lilo.  grub need not be reinstalled every time you
install a kernel as it reads the filesystem instead of loading a list
of blocks.  

just to toss my personal preference in...  i created a dedicated user
account for building things like kernels and locally installed
software, user `build' with primary group `src'.  this user then has
write permission to /usr/src and /usr/local/src where he can extract
the kernel source (/usr/local/src/linux-2.2.17) and compile it.  i
like this method as it keeps my standard user account unprivileged and
unable to write to /usr or /usr/local partitions. but it keeps the
source in the standard locations so other users can browse it if they
wish.  i also keep kernel configs, patches, tarballs and such in
build's home directory which is completely public, again for benifit
of other users.  

also i wrote a small wrapper for make-kpkg:

===
#! /bin/sh -e

PRG=`basename $0`

if [ $# = 0 ] ; then
        echo 1>&2 "$PRG: need revision"
        exit 1
fi

echo "make-kpkg "--revision=5:$1" build"
make-kpkg "--revision=5:$1" build
echo "fakeroot make -f debian/rules kernel-image-deb"
fakeroot make -f debian/rules kernel-image-deb
===

this takes care of adding the epoch of 5 to whatever version tag i
decide to use, ensuring my package is never `upgraded' to the standard
debian package.  also it does not run the compile inside fakeroot,
that way /proc/version has the real username of who built the kernel
and not `root@hostname' (i don't like people thinking i am a fool who
compiles kernels and such as root ;-)).  running the compiler inside
fakeroot can be risky at times too, for example glibc is miscompiled
if you compile it in a fakeroot environment.  the above only packs the
already compiled kernel into the .deb package inside fakeroot.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpxio8fuW3CM.pgp
Description: PGP signature


Reply to: