[QUOTE]
Originally posted by duffmckagan
I have decided to give it a try this time.
I need to boot multiple distros off the same kernel. I will use the latest and the greatest.
[quote]
I can't understand the reason why you want to install different distros with the same kernel.
What exactly are you trying to do?
Install more than one distro on a hard disk?
So if you are still wanting to continue, first choose the distros carefully. They must be distros which are able to run form a vanilla kernel.
AFAIK Gentoo, Slackware and Debian Sid would be good choices.
Once you got the distros you can use two approaches: Modular kernel and Initrd. As initrd is harder, and every distro calls it's own modules using a script we will use the first approach. The second, initerd is more elegant and effective, but it changes a lot from distro to distro, although there is a quick and dirty way to do even this, but I can't guarantee it works on Debian or Slackware.
As for the first try we will begin installing a Debian Sid. Choose the 'minimum install' so that you don't waste too much time in case it goes wrong. The most important thing to keep in mind is partitioning:
You must create a partition of 200-500MB in size called
/boot and place it on the first sectors of the hardisk. If you are using more than one disk, place the /boot partition on the first ide, master. For the veterans: The size of /boot is big, I know, but it's preferable in order to be able to have various kernels and perhaps initrds stored there.
during install choose the GRUB bootloader as it's easier to use and in someway more powerful than Lilo
I haven't talked about hardware detection and all this, but it's more or less straightforward and I'm sure you know which hardware you have attached to your box.
So first install the Debian Sid and get the vanilla sources from here
linux-2.6.12.2.tar.bz2 (Vanilla means 'untouched, simple' like vanilla ice).
Place the sources in /usr/src, decompress and make a symlink called
linux:
Code:
mv linux-2.6.12.2.tar.bz2 /usr/src
cd /usr/src
tar xvfj linux-2.6.12.2.tar.bz2
ln -s linux-2.6.12.2.tar.bz2 linux
A trick:
Make a small partition to be mounted at /usr/src, so you can share the same sources on all the distros.
Now you are done and you will be able to work with the kernel just like with the distro kernels. Compile a modular kernel...
If you have no clues on how to do this, please ask, I will tell you on a separate thread as it deserves an explanation of it's own.
Things to keep in mind:
Remember to enable all the filsystems you are going to use, this is no problem since you are using modules.
Once you have a running Debian make a copy of lsmod to see what modules are running with the distro's own kernel:
Code:
lsmod > /home/youruser/lsmod_backup
Copy also your /etc/modules.conf file so that you have a reference.
Now install the other distros. You can install Gentoo from a LiveCD, so this woul be my next choice.
Be sure that you are using the same versions of GCC, Binutils and the libc6 on each distro. Take Debian as the base for comparing. Gentoo has a deep repository and you will find any version there.
The trick is now to install the next distro ensuring that the compiler and the binutils are the same.
Keep in mind to not format /boot and /usr/src (You can also share /home/youruser to save space).
To get the same modules
As you already have the kernel in place what you need to do is editing /etc/grub/grub.conf so that it has an entry referring to the same kernel but with different root partitions.
From inside the new distro or a livecd mount the root partitions of both distros and using MC (the midnight commander) cd to the directory /lib/modules/2.6.12.2 on the first distro and just copy it to the second.
Now you need to edit the second istro's modules.conf so that it contains the same modules as the first and also all the other modules related stuff. I can't help you further here as every distro does this in a different way. In Debian it's /etc/modules.conf and in Gentoo it's /etc/modules.autload/kernel-2.6, dunno how this is configured in Slack...
I it happens that you need a module whih si not compiled just compile the kernel, as you sahre the source directory there will be no problem.
So that would be all. There will surely be lot's of problems as this is extremely experimental and you would need an exhaustive knowledge of every distro , how the base is set up, with which compiler and what differences exist between a vanilla and the distro's own kernel.
To ensure a proper functioning you would need to recompile at least the libc6 against the kernel sources with the same compiler.
Good luck.