Re: Buggy Kernel How-To?
On Mon, 2003-12-08 at 17:28, David Z Maze wrote: Wolfgang Pfeiffer [EMAIL PROTECTED] writes: So, in short, what I found by googling about for some time: The correct way seems to be to put the kernel-source in my (non-root) home directory, and then cd /usr/src/ ln -s /home/someuser/kernel-sources linux and then, as non-root, compile the kernel in /usr/src/linux/ (And then forget about some of the stuff I read in the Kernel-HowTo ?) I'd certainly believe that the Kernel-HOWTO isn't the best source of information for compiling kernels on Debian. Unpack, build, and install everything as root will *work* on every Linux out there, even if it's unsafe. ... another reason why I came here: One of the first things, IIRC, I learned on Linux (on RedHat Linux then) was that the fact something *works* doesn't necessarily mean it's right ... I'd look at the kernel-building documentation on http://newbiedoc.sourceforge.net/ (specific to Debian). Thanks a lot: That seems to be exactly what I need currently ... As as we're already at it: Here's what I found on Kernel-Builds for 2.6: 1: The first document is on the very specifics of the new kernel, i.e. what's new in it, caveats etc.. I found it on several URL's. The first one on codemonkey.org.uk doesn't work at the time of this writing, but I hope they're back soon: http://www.codemonkey.org.uk/post-halloween-2.5.txt ftp://ftp.kernel.org/pub/linux/kernel/people/davej/misc/post-halloween-2.5.txt http://www.kernel.org/pub/linux/kernel/people/davej/misc/post-halloween-2.5.txt http://ftp.kernel.org/pub/linux/kernel/people/davej/misc/post-halloween-2.5.txt http://www.portalcon.com.br/kernel/post-halloween-2.5.txt 2: The following article is targeted towards Linux users that are already comfortable with compiling their own 2.4 kernels [ - excerpt] One could call it perhaps a Kernel-2.6-HowTo http://kerneltrap.org/node/view/799 http://kerneltrap.org/node/view/799/3666 I can't guarantee for the quality of the URL's I found ... But I hope it helps anyway. None of my machines have a /usr/src/linux. I don't miss it. On my laptop I build kernels in /home/dmaze/src/kernel/kernel-source-$KVERS; my home desktop machine builds kernels for both itself and my firewall machine in /usr/local/src. Real root privileges are only involved in building the kernel when I install the kernel-image packages using dpkg and the subsequent reboot. :-) The background to all this is that I tried to get the kernel sources as non-root while being in /usr/src/some.kernel.directory with rsync: Which, IIRC, isn't possible. A non-root doesn't have the permission to download stuff to this dir, right? Add yourself to the 'src' group to get write access to /usr/src; the 'staff' group for /usr/local/src. Thanks for the clarification. Best Regards, Wolfgang -- Profile, Links: http://profiles.yahoo.com/wolfgangpfeiffer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Buggy Kernel How-To?
Wolfgang Pfeiffer [EMAIL PROTECTED] writes: So, in short, what I found by googling about for some time: The correct way seems to be to put the kernel-source in my (non-root) home directory, and then cd /usr/src/ ln -s /home/someuser/kernel-sources linux and then, as non-root, compile the kernel in /usr/src/linux/ (And then forget about some of the stuff I read in the Kernel-HowTo ?) I'd certainly believe that the Kernel-HOWTO isn't the best source of information for compiling kernels on Debian. Unpack, build, and install everything as root will *work* on every Linux out there, even if it's unsafe. I'd look at the kernel-building documentation on http://newbiedoc.sourceforge.net/ (specific to Debian). None of my machines have a /usr/src/linux. I don't miss it. On my laptop I build kernels in /home/dmaze/src/kernel/kernel-source-$KVERS; my home desktop machine builds kernels for both itself and my firewall machine in /usr/local/src. Real root privileges are only involved in building the kernel when I install the kernel-image packages using dpkg and the subsequent reboot. :-) The background to all this is that I tried to get the kernel sources as non-root while being in /usr/src/some.kernel.directory with rsync: Which, IIRC, isn't possible. A non-root doesn't have the permission to download stuff to this dir, right? Add yourself to the 'src' group to get write access to /usr/src; the 'staff' group for /usr/local/src. -- David Maze [EMAIL PROTECTED] http://people.debian.org/~dmaze/ Theoretical politics is interesting. Politicking should be illegal. -- Abra Mitchell -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Buggy Kernel How-To?
Hi all, Either the Kernel How-To, as it is available from http://www.uni-tuebingen.de/zdv/zriinfo/linux/howto/English/Kernel-HOWTO-4.html#ss4.2 is completely outdated, maybe even dangerously wrong, or ideas I found in postings from http://lists.debian.org/debian-user/2000/debian-user-28/thrd3.html#01345 are wrong. The Kernel How-To above, as I understand it, tells me to unpack the kernel source as root in /usr/src/. Whereas in the postings from debian-user to exactly *not* do this: another good reason to avoid extracting tarballs as root is one could send you a tarball with a file /etc/passwd (with the absolute path embedded), if you extract it as root your /etc/passwd would be replaced... And: And Linus has also pointed out several times that people should *not* compile kernels in /usr/src/linux, and instead do it in their home directory as a regular user, not root. The only time you should become root is when you install the kernel. So, in short, what I found by googling about for some time: The correct way seems to be to put the kernel-source in my (non-root) home directory, and then cd /usr/src/ ln -s /home/someuser/kernel-sources linux and then, as non-root, compile the kernel in /usr/src/linux/ (And then forget about some of the stuff I read in the Kernel-HowTo ?) The background to all this is that I tried to get the kernel sources as non-root while being in /usr/src/some.kernel.directory with rsync: Which, IIRC, isn't possible. A non-root doesn't have the permission to download stuff to this dir, right? So the only chance I have to get the sources in there is to run rsync as root: Which is ugly wrong if I learned my lessons well: You never even try to access the net as root. Right? Thanks in anticipation. Best Regards, Wolfgang -- Profile, Links: http://profiles.yahoo.com/wolfgangpfeiffer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Buggy Kernel How-To?
On Sun, 2003-12-07 at 18:12, Wolfgang Pfeiffer wrote: Hi all, Either the Kernel How-To, as it is available from http://www.uni-tuebingen.de/zdv/zriinfo/linux/howto/English/Kernel-HOWTO-4.html#ss4.2 is completely outdated, maybe even dangerously wrong, or ideas I found in postings from http://lists.debian.org/debian-user/2000/debian-user-28/thrd3.html#01345 I meant to point to the thread: proper permissions for /usr/src/linux Sorry I forgot to make this clear in my previous posting: Best Regards, Wolfgang are wrong. -- Profile, Links: http://profiles.yahoo.com/wolfgangpfeiffer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Buggy Kernel How-To?
Wolfgang Pfeiffer wrote: Hi all, Either the Kernel How-To, as it is available from http://www.uni-tuebingen.de/zdv/zriinfo/linux/howto/English/Kernel-HOWTO-4.html#ss4.2 is completely outdated, maybe even dangerously wrong, or ideas I found in postings from http://lists.debian.org/debian-user/2000/debian-user-28/thrd3.html#01345 are wrong. The Kernel How-To above, as I understand it, tells me to unpack the kernel source as root in /usr/src/. Whereas in the postings from debian-user to exactly *not* do this: another good reason to avoid extracting tarballs as root is one could send you a tarball with a file /etc/passwd (with the absolute path embedded), if you extract it as root your /etc/passwd would be replaced... And: And Linus has also pointed out several times that people should *not* compile kernels in /usr/src/linux, and instead do it in their home directory as a regular user, not root. The only time you should become root is when you install the kernel. So, in short, what I found by googling about for some time: The correct way seems to be to put the kernel-source in my (non-root) home directory, and then cd /usr/src/ ln -s /home/someuser/kernel-sources linux and then, as non-root, compile the kernel in /usr/src/linux/ (And then forget about some of the stuff I read in the Kernel-HowTo ?) The background to all this is that I tried to get the kernel sources as non-root while being in /usr/src/some.kernel.directory with rsync: Which, IIRC, isn't possible. A non-root doesn't have the permission to download stuff to this dir, right? So the only chance I have to get the sources in there is to run rsync as root: Which is ugly wrong if I learned my lessons well: You never even try to access the net as root. Right? Thanks in anticipation. Best Regards, Wolfgang This is why you add yourself to the src group (which in the group that owns /usr/src. Then you untar in that directory as regular user and then do something like this: make menuconfig fakeroot make-kpkg clean fakeroot make-kpkg options kernel_image kernel_headers cd .. sudo dpkg -i *.deb That way you only become root for the very last step. -Roberto pgp0.pgp Description: PGP signature