Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Old computer with small harddrive how-to
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
eivinn
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 219
Location: Norway

PostPosted: Sun Dec 01, 2002 11:03 am    Post subject: Old computer with small harddrive how-to Reply with quote

To use an old computer with Gentoo you should preferrably have at least an 800MB harddrive. I tried this with an 540MB drive. It worked well, but I needed to compile and build my system on a faster computer with more space.

Remember you only need <10MB for /boot and maybe 32MB for swap...
Follow the install instructions on Gentoo x86/install, but instead of making /mnt/gentoo you must mount your current filesystem and mkdir gentoo-build. Use this directory to chroot into. For convenience I used the stage 3 tarball, and gentoo-sources with no extras compiled in except local file-sys and nfs.

When you are ready to install GRUB, skip that step.

Code:
emerge fluxbox;
emerge -u world;
emerge clean;
emerge nfs-utils;
emerge dillo;

#Now it's time to strip down:
rm -rf /var/tmp/portage/*;
rm -rf /usr/portage/distfiles/*;
du -h  #Gives me 777M
find /usr -iname 'doc'; #Find the doc's directories which can be deleted
rm -r /usr/share/doc/*;
rm r /usr/X11R6/lib/doc/*;
du -h # Gives me 478M  -> This might be good enough for you


I had to remove some more files and dirs, so I removed all ebuild dirs in /usr/portage. I did not remove meta-data and scripts.

Now what you must do is exit your chrooted shell and mount your small hd. When it is set up you mount it at /mnt/gentoo + /mnt/gentoo/boot as normal.

When this is done you need to transfer your files (be sure that pwd points to your build dir):
Code:
tar lcf - .|(cd /mnt/gentoo;tar xpvf - );


The rest you have to do is make yourself a boot floppy, place your newly filled harddrive into your old computer and boot with the floppy (as described in Gentoo install guide). This will allow you to boot you kernel from harddrive and do the last step of the install-guide. Run grub.

Of course setup of X etc is up to you


If you did this I hope it will be as successfull for you like it was for me. :wink:
Back to top
View user's profile Send private message
reves
Apprentice
Apprentice


Joined: 25 Jun 2002
Posts: 215
Location: South Florida

PostPosted: Sun Dec 01, 2002 7:47 pm    Post subject: Reply with quote

Another way to trim the size down is to use -Os instead of -O3 in the CFLAGS. It optimizes everything for small size.
_________________
Robert
Back to top
View user's profile Send private message
janneand
n00b
n00b


Joined: 13 Sep 2002
Posts: 48
Location: Stockholm, Sweden

PostPosted: Tue Dec 03, 2002 9:42 am    Post subject: Reply with quote

If you have a few programs installed /usr/share/locale is filled up with translations you will probably never use. I made this script to erase everything you don't need. You probably want to backup them first because they are not easy to remerge.

If you want to save more translations, just add them to the exclude list. You probably don't want to remove anything from the list though.

Code:

#!/usr/bin/env python

# file: clean_locale
# Script to remove unwanted translations.

import os, commands

# Add directories to save here:
exclude = ['locale.alias', 'C', 'POSIX', 'US_ASCII']

path = "/usr/share/locale"

dirs = os.listdir(path)
for dir in dirs:
   if dir not in exclude:
      print "Removing %s/%s..." % (path, dir)
      (err, output) = commands.getstatusoutput('rm -rf %s/%s' % (path, dir))
      if err:
         print "Could not remove %s/%s: %s" % (path, dir, output)


-J
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum