LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-06-2005, 04:30 AM   #16
runlevel0
Member
 
Registered: Mar 2005
Location: Hilversum/Holland
Distribution: Debian GNU/Linux 5.0 (“Lenny”)
Posts: 290

Rep: Reputation: 31

Quote:
Originally posted by duffmckagan

Did not get this.
Can you provide more info on
1.How the base is setup and what compiler is used.
2.Differences between Vanilla and distros own kernel.
The base is what you need to bootstrap the system.
Basically it's the libc6, GCC, the binutils package and the kernel.

I already pointed you to the Gentoo documentation, but more basic insight can be found int the LFS docu.

What you need to do is using the same versions on all distros... But you can make some exceptions here if you don't plan to use every distro for developing.

To be sure the best thing you can do is (If you start with a slack or a Debian) using this version as th base for the others.
So if you have say GCC 3.3.4 in Debian try if you can get it also on the other distros. In Gentoo this is very easy as you can tell the portage system what version you exactly want:

Code:
emerge -u '=sys-libs/glibc-2.3.5'
Normally the 'packaged' distros such as Debian or Slack use more or less the same versions. And as the libc6 and the compiler narrowly depends one from the other, the version of GCC will surely be the same.

After you have chosen the base software, it would be a good thing to recompile them... But I don't recommend recompiling GCC by hand as it's strongly adapted to each distro. On Gentoo this is straightforward, and you can also do it in an easy and secure way in Debian, but Slack is a mystery to me.

Keep in mind that you will not find problems if you use different versions of the libc6 or the compiler as long as you aren't going to compile anything, such as the nVidia drivers. You can happily use a gcc version other than the one you have compiled the kernel with w/o a single complaint.
 
Old 07-06-2005, 04:38 AM   #17
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
Alright. I need to compile C programs in the distros.
I guess, installing Debian, Gentoo and Slackware is not a good idea.
Better to go with Debian OR Slackware. They are very different.
Would you recommend any other distro that accepts tweaking at this level?
If not, I will boot only two of them.

Now, i was just wondering (this is without any basis, and just a quick reply is expected, not a full explanation, as I think I will get it after reading on....)

How do I tell Gentoo to USE A ALREADY COMPILED KERNEL, that rests on my /boot partition?
 
Old 07-07-2005, 06:18 AM   #18
runlevel0
Member
 
Registered: Mar 2005
Location: Hilversum/Holland
Distribution: Debian GNU/Linux 5.0 (“Lenny”)
Posts: 290

Rep: Reputation: 31
The only distros I know which can be tweaked w/o much effort are the three I already told you and it's forks, such as Vidalinux or Magix which are gentoo.

Gentoo can easily use any kernel, just put it in a line in /boot/grub/grub.conf and Gentoo will start with any kernel you like. If you also mount the /lib/modules/2.6.12-2 into Gentoo's root tree you will even be able to recompile the glibc and the binutils for this particular kernel, and even GCC w/o any problems.

IMHO it's a good idea to start first with two distros. Say Debian and Gentoo, install first Debian and then as Gentoo is very flexible, just adapt Gentoo to use the Debian Kernel.

Even more: There is an easy way of 'debianizing' a vanilla kernel w/o much effort and in a semi-automated way: make-kpkg, this tool is very easy to use, so you can forget about all the steps of the compilation except configuring and install the kernel using DPKG.

The command is:
Code:
cd /usr/src/linux
make-kpkg buildpackage
You will get a linux-2.6.12-12-image.deb package and also headers and sources.

For the compilation in Gentoo, Gentoo will use the kernel which resides in /usr/src/linux (during compilation the important is the headers, not the kernel which is running).

So once you have the Debian kernel, telling Gentoo to use it is piece of cake: Only a line in Grub.conf is enough.

To get the modules to start:

Debian:

Code:
modconf        - this is a console interface where you can select and enable modules -
update-modules 
lsmod > modules_list
So you will have an idea of which modules are Debian using to run all the HW you need. Then in Gentoo edit the file /etc/mudules.autolad/kernel-2.6 and include the modules you need. Not every module in the list are needed as many are called by other modules or by the kernel itself, but calling them twice will be no problem.

Synopsis:
  • Partition your hardisk so that you have:
    /boot
    /home
    /lib/modules/2.6.12.2
    /usr/src
  • Install a basic Debian and boot it.
  • Install the needed tools in Debian to be able to compile a kernel.
    Code:
    apt-get install make-kpkg
    Will surely install all that you need to build binary kernels on the fly.
  • Install Grub and configure it (refer to the Gentoo documentation which covers this subject) in case you didn't before.
  • Compile a custom kernel
    Code:
    make-kpkg buildpackage
  • Install the kernel using the deb package:
    Code:
    dpkg -i kernel-image-2.6.12.2.deb
  • Begin the Gentoo install from the LiveCD
  • mount the /boot you created to /mnt/gentoo/boot
  • mount your /home to /mnt/gentoo/home
  • Go through the rest of the process (stage tarball and portage snapshot)
  • Mount the rest of the partitions:
    /usr/src and /lib/modules/2.6.12.2 so that the kernel sources and the modules are shared.
  • Edit /boot/grub/grub.conf to point at the kernel you have in /boot.
  • Edit /etc/modules.autoload/kernel-2.6 to include the modules you need.
  • To finish reboot into the running Gentoo and recompile the base system:
    Code:
    emerge -u glibc gcc binutils
    Done.

There is even another interesting thing you will be able to do: you can build debian packages with the sources stored in Gentoo's portage/distfiles... There is even an app called "checkinstall" which would be able to build deb packages using gentoo's ebuild specs, so that you get the same binaries with the same optimizations on both distros. I don't know how this works but this is how packagers in KDE for example, build the packages for all distros on the fly.

If you focus on Gentoo and Debian, ask me just about anything.


Last edited by runlevel0; 07-07-2005 at 06:21 AM.
 
Old 07-07-2005, 06:38 AM   #19
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
The Synopsis thing ROCKS.
 
Old 07-07-2005, 06:45 AM   #20
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
>>>There is even another interesting thing you will be able to do: you can build debian packages with the sources stored in Gentoo's portage/distfiles... There is even an app called "checkinstall" which would be able to build deb packages using gentoo's ebuild specs, so that you get the same binaries with the same optimizations on both distros. I don't know how this works but this is how packagers in KDE for example, build the packages for all distros on the fly.


I am using the LFS thing to get these things done.
And yes, the Gentoo Documentation too.

LFS requires me to only use sources, and no DEB packages.
I will do this thing soon, and be back.

@ runlevel0, I will surely get your help.

You know the inside out of Gentoo and Debian.

Last edited by duffmckagan; 07-07-2005 at 06:48 AM.
 
  


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
Multiple booting options srivastava Linux - Software 2 05-19-2005 04:27 AM
booting new kernel. Booting new kernel dies with INIT: VFS issue, really mus335 Linux - General 0 04-21-2004 11:52 AM
Multiple booting NoviceW Debian 3 01-28-2004 07:08 AM
Multiple Booting xcaliba Linux - Software 2 12-29-2003 10:09 AM
multiple booting nonLinuxGuru Linux - General 7 03-16-2002 03:21 PM

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

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