[svlug] Red Hat pulls plugs on Red Hat Linux product line

Kim kim at linuxpuppy.net
Wed Nov 5 17:14:08 PST 2003


First, the hard way:

If you mean a simple way to get gentoo on a bunch of your own boxes (via RPM) 
I don't think it would be very difficult, especially if you know in advance 
what hardware is installed on each box you do this on.

This isn't a perfect how-to, just some thoughts on how it could be done.

1. Make an inventory of all the hardware in your target machines.

2. determine the lowest common denominator of all your cpus. ie: if you have 
i586 and i686 boxes make note to do all you compilling for the i586. This can 
easily be done by setting the proper CFLAGS for the lowest arch you need 
support for. If you have some older systems you may want to use the gcc-2.95 
compiler instead of a gcc3.* verson just for a little extra safety. Don't 
specify high compiller optimisation. Probably not over -O2.

3. On your build system, start with stage 1 and use the normal procedure to 
build it up to a point where you can boot to a prompt (no X or anything gui).

4. Make shure your kernal config includes everything you need for all the 
boxes. For simplicity I'd build a monolithic kernal so you don't have to 
modprobe everything for each box. Your kernel will be a bit bigger, but 
diskspace is cheap.

5. create a directory that will be the root of an iso image and put tarballs 
of your /boot and / filesystems there. Be careful to exclude things like 
devfs and simmilar psudo filesystems. Make a script to unpack these tarballs 
on the target machine and move it to your iso dir.

6 next, choose one of the micro-distributions to use for something to boot 
from and put this into you iso dir. Read the instructions for the 
micro-distro you choose to get any additional info you need for it.

7. emerge rpm and then build checkinstall. (follow the checkinstall README for 
details. then emerge cdr-tools (I think thats the package name)

8. use emerge -p some-program-name (kde for example)
The output of the above command will show you exactly what packages would be 
built for your chosen package.

My output looks like this:
bash-2.05b# emerge -p kde

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] media-libs/libid3tag-0.15.0b
[ebuild  N    ] media-libs/libmad-0.15.0b-r1
[ebuild     U ] kde-base/arts-1.1.4 [1.1.2]
[ebuild     U ] kde-base/kdelibs-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdeedu-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdemultimedia-3.1.4-r1 [3.1.2-r1]
[ebuild     U ] kde-base/kdebase-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdenetwork-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdeaddons-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdepim-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdetoys-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdegames-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdegraphics-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdeadmin-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdeartwork-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kdeutils-3.1.4 [3.1.2]
[ebuild     U ] kde-base/kde-3.1.4 [3.1.2]

So now you know all the dependencies for KDE.
Go to /usr/portage/kde-base/ and took at the ebuild script for each 
dependancy. You will find the path to that programs tarball. Use wget to 
download all the proper tarballs.

For each tarball do:
./configure
make
checkinstall --noinstall

You will end up with (in this case) 17 rpms that all together make up kde.

9. In your iso directory do mkdir kde and then copy all the kde rpms there.
in the end you would use a command like: rpm -Uvh kde/*.rpm to put kde onto 
another box.

Repeat steps 8 and 9 for each package you want to support.

10. Create a bootable (e-ltorito)cd (follow the micr-distros instructions)
You will need mkisofs and growisofs (possably others) and the appropriate 
flags for each command.

11. Take your shiny new cd and stuff it into a target machine and let it boot 
your micro-distro.

12. Use fdisk to make the proper partitions. It would be nice if all your 
filesystems were the same from box-to-box so you don't have to mess with 
/etc/fstab on each new box.

13. make an extra cd of rpms if everything won't fit on one disk.

14. Unpack the base system tarballs onto the proper partions.

15. See if you can boot your new system. (you will have to decide how to set 
up grub or lilo properly to boot the new box.)

16. If it does boot, then start adding packages from the cd(s) for the stuff 
you want.

A simpler way:

Sounds like a lot of work. Something much easier (if it fits your needs) is to 
make an image of your /boot and / partitions and then to clone a box take the 
disk from the new box (assuming its a blank disk) and plug it into your main 
box temporarily and and fdisk it. Then just dd your images to the partitions 
on the cloned disk. Mount the newly cloned disk and install grub or lilo and 
make any specific tweaks you might need. Put the disk back into the machine 
you are cloning and (hopefully) it will boot up. If so, take the CD (or DVD) 
you made from building all those rpms you made in steps 8 and 9 and install 
whatever packages you want.

I've probably left out many important things but the above is just a general 
outline that I just made up and I'm not really shure if I understood your 
question exactly. If I'm way off base, sorry.

Other possability:

You could also consider using one of the disk cloning progs like ghost. I 
don't know much about them but its another possability.

As far as problems caused by incorrect USE flags, search on forums.gentoo.org 
and you'll find many more specific examples than I can recall. There is also 
a USE flag tutorial on gentoo.org that gives lots of good info.

Kim

PS: if you actually try this, let me know. Would be fun to see a working 
solution.

K


On Wednesday 05 November 2003 12:10 pm, Ivan Sergio Borgonovo wrote:
> On Wed, 5 Nov 2003 13:54:51 -0800
>
> Kim <kim at linuxpuppy.net> wrote:
> > I havent seen any gentoo equiv of linuxconf with gentoo, but that
> > dosent mean there isn't a similar beast.
> >
> > If you install gentoo from stage one, by the time you're done I
> > doubt you would need a gui tool to config the system. You might want
> > to go and grab the gentoo install docs from http://www.gentoo.org
> > and read through them to get an idea of what you're getting into.
> > (they are long, but very well written)
> >
> > But don't expect the install can be done in a day. (maybe it can)
> > But my last gentoo install took about a week for me to get
> > everything setup and tweaked to my idea of what a PC should be like.
>
> OK suppose I just want to use Gentoo as the "framework" to build up a
> binary distro... I remember vaguely there were some tools to make
> binary packages.
>
> Is it possible? Reasonable?
>
> I don't want to make a stage3 tar ball. I want rpm/deb alike packages
> to place on a CD, with dependencies so I could install a Gentoo distro
> on several boxes chosing just the packages I want without the need to
> recompile everything. Maybe packages won't be perfectly optimized but
> at least I'll know all the libs there are on my box.
>
> > Also, pay extra attention to setting up your USE flags. It's easy to
> > waste a lot of time building a botched system if you mess up here.
>
> What do you mean *exactly*?
> When I did my experiments with Gentoo there were a lot of - and very
> few + in my USE and everything worked fine till that unlucky perl
> security update. And I doubt the 2 things were related.
>
>
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug





More information about the svlug mailing list