On Fri, 2005-09-23 at 07:05 +0800, W.Kenworthy wrote:
> I saw a post (I think it was this list, and the following was from
> memory) a month or two back of someone who did just this.  They
> installed with a past date, then ran the system for a week or so and
> exercised it extensively.  They then did the remove everything based on
> atime that hadnt been touched.
> 
> The result was very successful, but they did come across the odd file
> they had to put back. Testing after the initial delete was considerable.

yeah, that was probably me (earlier on in the year at least).  For the
initial install, I made the date somewhere around the epoch, or somehow
I altered every file on the filesystem to be this date (can't remember).
Then I fixed the date and booted the system.  I posted quite a few
questions and findings on the mailing list and ended up with that
option.  It works quite well in theory, however here are some notes to
help you:

1. symlinks aren't (or at least weren't in my case) picked up by the
process, probably because when you access a symlink, only the date of
the target appears to be altered.  I had to manually copy many symlinks
(which were mostly like /lib/libgcc_s.so -> libgcc_s.so.1) to even get
the system to boot.  And the error messages threw me way off.

2. The more you want the system to do, the harder it will be.  We didn't
want a whole host of features (no X), in fact only really ssh, ftpd,
iptables, and limited others.

3. don't delete everything you don't need, because you _will_ make a
mistake.  In fact, we redid the entire process a few times from scratch,
to refine it more.  To make it easier, make two partitions, or if your
final copy will only have one disk and one partition, put in a spare
disk just for the testing phase.  Make an exact copy on both before you
start deleting.  Then you can keep going back to the full installation
to get files you missed.  In fact, we made the machine dual boot to both
disks, just in case we wanted to test the full install versus our
minimal install.

4. write down the commands that you use to find and copy the files you
want, that way the second and third and subsequent times you do it, you
don't have to remember.


> >From my point of view, such a "stripped system" would always be
> classified as unstable as you never know when it will ask for a file you
> removed as it is just too complex to check every circumstance.

I did much of the initial work to prove the concept and handed it over
to someone else to turn into a reproducible system.  As far as I know,
we've had 3 or 4 running continuously for quite a few months now.

Our particular requirement was to make a running system for a 64 Mb
sandisk, with enough space left over for about 10-12 Mb of our own
software.  This is an embedded control system (no X), and we wanted a
very similar installation on our HMI (X, gnome, and other such boggy
apps :) running the same kernel so we could copy programs between them
if need be.  (The HMI runs a complete installation.)


If you're planning on doing it in a short amount of time, think again!
It won't be trivial, but the concept is at least possible.

HTH,
-- 
Iain Buchanan <[EMAIL PROTECTED]>

-- 
gentoo-user@gentoo.org mailing list

Reply via email to