View previous topic :: View next topic |
Author |
Message |
hazza n00b
Joined: 30 Dec 2002 Posts: 68 Location: Burton on Trent
|
Posted: Mon May 19, 2003 8:24 pm Post subject: How to trim fat off a very fat-free distro (GentooLITE?) |
|
|
Hi,
First a little background (I'll try and keep it short!): I've been using Gentoo for about six months now and I'm more than happy with the way it behaves, operates and is generally as robust as any of the more well known Distros. With the exception of using RedmondWare for checking compatibility with web site designs, I use Gentoo as my primary OS.
However, I'm looking at building a (semi-)embedded system to live in my new car. Its all being done for educational purposes (read "a bit of a laugh") and, after having used Gentoo, I'm damned if I'm going to be forced back into using something like RedHat 7.2 simply because I don't have to install all of the developer tools.
So, the problem: I need to be able - once everything has been set up - to strip the machine of its development packages, spurious libraries and >>GASP<< portage / python etc. as once the machine's in place, it won't need any of these toys and, more to the point, it needs to fit on to a compact flash card!
Before I start decimating various installs, I was wondering if anyone else had attempted anything similar and to what degree of success? I'm going to be using VMWare to run the system initially so I can build and install, then copy the virtual disk files and then tear the guts out, hence allowing me to always add bits by using the "master" image.
Once how to unmerge the development / portage subsystems has been defined, it strikes me that you'd have a very configurable, versatile base on which to build semi-embedded systems...
If anyone has their two cents, they'd be great to hear
ATB,
Harry |
|
Back to top |
|
|
ctford0 l33t
Joined: 25 Oct 2002 Posts: 774 Location: Lexington, KY,USA
|
Posted: Mon May 19, 2003 10:42 pm Post subject: |
|
|
if you dont care about anything but booting the system, just delete the gcc dir... del the portage dir....
with *nix, you dont have to worry about uninstall something, just delete it.
As far as I can see if you leave the basic things that the system needs to run you should be fine.
Chris |
|
Back to top |
|
|
El_Presidente_Pufferfish Veteran
Joined: 11 Jul 2002 Posts: 1179 Location: Seattle
|
Posted: Mon May 19, 2003 11:56 pm Post subject: |
|
|
go through the base system profile (what you get when you emerge system) and you can trim programs
i think its in /etc/profile/packages
you can also delete the /usr/src/linux/ directory if you dont plan on compiling anything against the kernel headers |
|
Back to top |
|
|
krinkle Guru
Joined: 04 Feb 2003 Posts: 338 Location: Garden Grove, CA
|
Posted: Tue May 20, 2003 12:40 am Post subject: |
|
|
could just be talking out my ass, but maybe could you use distcc or something similar and do all the compiling on a seperate computer with all the developer libraries installed and then just copy the binaries on the small machine? that way you would optimize for the computers architecture, get faster compile times, and not waste space. I've been thinking of making a carputer myself (based on a via c3 most likely), and that was the route i was looking at... let me know how it turns out |
|
Back to top |
|
|
id10t Tux's lil' helper
Joined: 18 May 2002 Posts: 100
|
Posted: Tue May 20, 2003 2:52 am Post subject: |
|
|
Right tool for the job - and as much as i hate to say it, in this case Gentoo is not quite the right tool. For the minimal systems I've done, I just use whatver version of Slack I can lay my hands on (I have all of them from 7.0 up laying around in stratiegic locations) and install all of the A, AP, and N disk sets. When I did my dumb X terminal project a few months ago, I added the X (but not XAP) directory. _________________ ---
this space for rent |
|
Back to top |
|
|
mlynx n00b
Joined: 07 Feb 2003 Posts: 27
|
Posted: Tue May 20, 2003 4:31 am Post subject: |
|
|
Another thing to consider would be the flags you choose when installing the system. Make sure that USE flags are in order and remember that while a -O3 can really increase performance, -Os produces much smaller binaries.
I would also look at some of the smaller disk based distros for ideas on what to include, the bootable business card distros come to mind with (IIRC) about 50M in size. _________________ mlynx
-------------------------
Did your mom -Os your brain when you were a baby? |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue May 20, 2003 4:33 am Post subject: |
|
|
krinkle wrote: | maybe could you use distcc or something similar and do all the compiling on a seperate computer with all the developer libraries installed and then just copy the binaries on the small machine? | Would that it were so. Unfortunately, the current incarnation of distcc does the preprocessing and liking on the target, so you still need a fully functional toolchain on the target. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
krinkle Guru
Joined: 04 Feb 2003 Posts: 338 Location: Garden Grove, CA
|
Posted: Tue May 20, 2003 7:42 am Post subject: |
|
|
Quote: | krinkle wrote:
Quote: | maybe could you use distcc or something similar and do all the compiling on a seperate computer with all the developer libraries installed and then just copy the binaries on the small machine? |
Would that it were so. Unfortunately, the current incarnation of distcc does the preprocessing and liking on the target, so you still need a fully functional toolchain on the target.
|
heh, talking out my ass... my bad =) |
|
Back to top |
|
|
hazza n00b
Joined: 30 Dec 2002 Posts: 68 Location: Burton on Trent
|
Posted: Tue May 20, 2003 8:28 pm Post subject: |
|
|
Quote: | Right tool for the job - and as much as i hate to say it, in this case Gentoo is not quite the right tool. | I know what you're saying mate, and I do tend to agree, but I just like the gentoo setups too much! The way init is handled, the way portage is tweakable to your heart's content... Don't want to loose that during the setup / development stage of this project...
Quote: | if you dont care about anything but booting the system, just delete the gcc dir... del the portage dir.... |
Quote: | go through the base system profile (what you get when you emerge system) and you can trim programs
i think its in /etc/profile/packages | This looks like a better plan: once I've done it a couple of times hopefully I'll be able to automate it
Thanks for your help guys,
--Harry |
|
Back to top |
|
|
fidzysss Tux's lil' helper
Joined: 16 Feb 2003 Posts: 109 Location: Paris (France)
|
Posted: Tue May 20, 2003 9:52 pm Post subject: |
|
|
You could also take a look at
Code: | ebuild foo.ebuild package |
or
Code: | ebuild foo.ebuild rpm |
and also
Code: | emerge --buildpkg foo |
since these instructions tell portage to compile the source and then build a binary package ready to be installed (tbz2 or rpm). So by tweaking the use flags and gcc options you should be able to create your own distrib. In fact I think gentoo could be the perfect tool to create customized distribution , even if I didn't personnally try those feature.
fid |
|
Back to top |
|
|
|