Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Small Hard Drive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ds123
n00b
n00b


Joined: 22 Mar 2004
Posts: 64

PostPosted: Tue Jul 05, 2005 3:15 am    Post subject: Small Hard Drive Reply with quote

I'm trying to install Gentoo on a system with an old 2gig drive, and I got through the installation just fine. Then, when I did emerge sync, it ran out of disk space. I then checked my other Gentoo system and discovered that /usr/portage is pretty big.

What's the best strategy for running on a small drive? Yes, I know getting a bigger hard drive would fix this too. :)

This computer is going to be used as a router/firewall, so the functionality requred is pretty basic.
Back to top
View user's profile Send private message
palmer
Guru
Guru


Joined: 17 Nov 2004
Posts: 322
Location: Berkeley, CA

PostPosted: Tue Jul 05, 2005 4:05 am    Post subject: Reply with quote

It is possible
I have a mail server (2 users), web server (hosting text), and rsync server on ~1.4gb (of an 8gb HDD)

It might not be what you want to hear, but you could but a USB HDD (if opening it up is the problem)
I am assuming that you want to put no money into this, though (just like I would)

If you have another computer, you could mount the portage tree over samba
Not sure if this would be secure though...
Also not sure if it's possible

Did you remove the files you downloaded when installing (the stages, and the portage tree)
They take up a few megs

Try pruning your system to the minimum possible
Remove unused programs
Is anything graphical installed? (They tend to be big, and unneeded for a server)
Remove extra kernel sources (in /usr/src/, all of them but what linux points to, and whatever you have compiled, and the newest)

You can safely delete (please wait for someone to confirm this)
/usr/portage/distfiles/*
/var/tmp/portage/*
/tmp/* <-- (I have mounted in RAM, so it's erased after every boot)
Make sure that nothing is going on (emerging stuff is stored in /var/tmp/portage)
Back to top
View user's profile Send private message
gesiel
Apprentice
Apprentice


Joined: 13 Feb 2005
Posts: 197
Location: Brasil - Rio de Janeiro

PostPosted: Tue Jul 05, 2005 4:43 am    Post subject: Reply with quote

Hardware Requirements:
CPU..................486 or later
Memory..............64 MB
Diskspace...........1.5 GB (excluding swap space)
Swap space......At least 256 MB

Well,
2GB - 300MB (swap) = diskspace ok
CPU = ???
Memory = ???

try:
Partitioning Scheme:
/dev/hda1 1.7GB (for / , /boot and all outhers directories) ext3 or reiserfs
/dev/hda2 300MB (for swap)

delete all files in /usr/portage/distfiles
delete stage?*.tar.bz2
delete portage*.tar.bz2
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Tue Jul 05, 2005 10:49 am    Post subject: Reply with quote

/usr/portage over NFS works nicely
Back to top
View user's profile Send private message
ds123
n00b
n00b


Joined: 22 Mar 2004
Posts: 64

PostPosted: Tue Jul 05, 2005 9:19 pm    Post subject: Reply with quote

Thank you for your messages. I tried removing distfiles, temp files etc, but couldn't seem to work it down very much.

I tried reinstalling again. I had used stage 3 the first time, so I tried stage 2, and emerge sync early in the process. Halfway through compilation of kernel and modules I ran out of disk space again. I then removed the distfiles, and got through it.

I'm currently at 87%, but as long as I do my logging to another system, I'm probably fine.

Thanks again.
Back to top
View user's profile Send private message
gesiel
Apprentice
Apprentice


Joined: 13 Feb 2005
Posts: 197
Location: Brasil - Rio de Janeiro

PostPosted: Wed Jul 06, 2005 1:00 am    Post subject: Reply with quote

Great... good news... :D

good luck
Back to top
View user's profile Send private message
Unther
Apprentice
Apprentice


Joined: 20 Feb 2005
Posts: 163

PostPosted: Wed Jul 06, 2005 8:36 pm    Post subject: Reply with quote

A strategy I used when building a system on a 2GB device (memstick) was to reduce the block size of the file-system.
Code:
mke2fs -b 1024 -j /dev/<partition>
gives an ext3 partition with the smallest possible block size (according to the man). Performance will take a slight hit, but I found I saved about 300MB in the base system with this.

It is also worth avoiding the more extreme optimisations as they can generate larger executables. I considered trying -Os, but never got round to it, but in principle it should help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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