Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Quick quest to install gentoo on < 5 Gigabytes
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
LIsLinuxIsSogood
l33t
l33t


Joined: 13 Feb 2016
Posts: 853

PostPosted: Sun Feb 11, 2018 9:23 pm    Post subject: Quick quest to install gentoo on < 5 Gigabytes Reply with quote

Hi wondering if someone could provide suggestions on how I might find a way of installing gentoo but without syncing the entire portage tree.

I am doing some experimenting with many different distributions, and trying to keep the installation footprint on each one down, possibly including if I can a similarly sized (3-4 GB) install of gentoo.

I have used the installation methods described online but I would like to figure out if there is some way to make use of Portage (like maybe through the desktop tower that I have also running Gentoo). And therefore would not need to sync in order to build packages. Ideally what that would mean is that I could hopefully install packages so that I can use the portage tools, like emerge, but not store all the information in /usr/portage which is last I checked way over 5Gb of information. Actually, since I also have a second install with Portage tree synced on the local disk of my laptop, can it be done by simply mounting the portage directories in the virtual machine that I am setting up?

Oh yeah, forgot to mention this is a virtual machine environment that I am working to install a large number of small operating systems side by side.

Since I did look around already to scope out some solutions, what would help is to hear a bit about each of the possible ways I considering going about it, including a Binary package method of install, versus a sync and compile method from portage tree.

Specifically, i thought that it would be cool if Portage had some feature involved in it but it doesn't look like it. For me to sync portions of the packages only and then install piece by piece sort of like if it was a toolkit or whatever to further system installation.

Please help my to get the bare bones packages instsalled on this small virtualized hard disk that cannot sync itself to portage due to limited space.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6401
Location: Saint Amant, Acadiana

PostPosted: Sun Feb 11, 2018 9:30 pm    Post subject: Reply with quote

I have been sharing portage over NFS for ages. Why can't you? The machine I keep portage in is up 24x7, BTW, it is not even running Linux.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
l33t
l33t


Joined: 13 Feb 2016
Posts: 853

PostPosted: Sun Feb 11, 2018 9:48 pm    Post subject: Reply with quote

Ok, so does that mean that you can update the portage tree from any host with a connection, or just on the machine that houses it locally? How do you update the portage tree, since it isn't on a linux PC I assume you are using git to update it, or something like that...Keeping in mind this installation is going to be on a virtual machine, what would you think is ideal, the approach involving NFS, or the one mentioned in the Portage page on the wiki, which involves copying over pre-built binaries, from a working install of gentoo.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6401
Location: Saint Amant, Acadiana

PostPosted: Sun Feb 11, 2018 9:58 pm    Post subject: Reply with quote

Yes you can update it from any host, I also keep $DISTDIR on NFS in a separate directory, so if any host downloads a tarball it will be available to all. Only $PKGDIR is not shared.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41141
Location: 56N 3W

PostPosted: Sun Feb 11, 2018 10:24 pm    Post subject: Reply with quote

LIsLinuxIsSogood,

I build on an external HDD and install onto a 8G SSD. That gives me a Xfce4, fifefox, libreoffice and 1.5G swap.
The build space, /usr/portage/[distfile,packages] are left behind, as in /usr/src.

It fits into 6.5G and leaves me about 500Mb for swap.
If I'm desperate, I still have the toolchain and can install more using an SDCard or USB drive.
I could squeeze it harder and not have the toolchain, info, man and other docs but it fits, so I don't.

I would expect 5G to be workable for a running Gentoo.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
l33t
l33t


Joined: 13 Feb 2016
Posts: 853

PostPosted: Mon Feb 12, 2018 12:47 am    Post subject: Reply with quote

Thanks for the quick replies again guys. Obviously the separate answers represent some differences in the chosen methods of doing things, but I am going to ask for a bit more information regarding installation procedures now, and whether you would like me to first select an approach is fine, or else maybe you can both share a bit more specifics after I include my thoughts or questions on the subject matter.

Since I don't know which method will work better for a VM, and specially my VM manager, which is virtualbox, I want to gather some more information and decide for myself.

Neddy, your solution seems super easy and possible, all except for the one element of how the install is done onto the 8GB SSD (or in my case the Virtual hard disk image). I am concerned that depending on the method either archiving or bare metal that it could potentially interfere. What are you used to doing for the installation at that time?

And Jaglover, sort of a similar question, but because this method is a bit more complicated but it has the added benefit of being able to manage in real time if I want to add/remove software making use of the package manager regularly etc. So before asking any questions, confirming just the facts of the way that the Portage related files are stored and shared via NFS...in your setup...
1. Package files in /usr/portage organized I assume by package parent and atom, as usual in Gentoo packaging manner.
2. Distfiles moved to elsewhere , e.g. into /usr/local/portage or /root/

And then everything shared via NFS so that we have exports to multiple locations, which are then mountable at whatever location on the target host. If that is all true, then once mounted I would assume that Portage on the target host, i.e. not the server with sync to tree, is going to interact using the same commands, like emerge, and eix or whatever. Now comes some of my further questions, do the files mostly just remain on the NFS server, like the distfiles and how does portage know where to look to install the distributed tar.xz or gz or whatever. What does the make.conf look like on the target machine so that it can understand "how" to install things from the NFS mounted shares? I bet it would be possible to just mount the directories in the same location on the system that they would be in otherwise, is that the easiest thing to do? Should the mount be done with rw privileges? What options are used in the NFS export file?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6401
Location: Saint Amant, Acadiana

PostPosted: Mon Feb 12, 2018 1:43 am    Post subject: Reply with quote

Yes you can mount portage over NFS in /usr/portage and you do not need to change a thing in your portage setup. By default distfiles go in /usr/portage/distfiles so these will be shared too with no additional setup. I have them separated because it was recommended by developers at some point. Don't remember the reasoning.
Of course, you can mount it anywhere and set your PORTDIR in make.conf accordingly.
Portage is NFS ready, it locks files which are in process of downloading so there will be no conflict. Everything just works.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41141
Location: 56N 3W

PostPosted: Mon Feb 12, 2018 10:39 am    Post subject: Reply with quote

LIsLinuxIsSogood,

This install is for my Acer One
Its had the RAM upgrade to 1.5G and Gentoo installed in place of Linpus Lite.

It builds its i686 install by booting to a USB HDD then building in the normal way, with the help of cross distcc.
The install onto the internal SSD is performed by booting with System Rescue CD, making a new root filesystem on the SSD them using cp -a to copy over the bits of the new install I want to the SSD.
Selecting the right bits is a matter of not mounting things I don't want to copy.
/usr/portage is its own partition
/usr/src is its own partition.
Other things can be left behind by using more partitions or by bind mounting an empty filesystem over the top of something, so the content is hidden.

Once the copy is complete, /boot needs to be copied over too, so the new kernel binary is in place.

There are a few gotchas:
Don't forget to edit /etc/fstab. The SSD is always /dev/sda and the external USB is /devsdb.
If the boot loader has been updated, chroot into the new SSD install and reinstall the boot loader to the MBR.

My requirement is to fit it all into the 8G SSD, with 1.5G for swap, so I can use Hibernate and have some space left for /home.
I could squeeze it harder but I don't need to, yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
l33t
l33t


Joined: 13 Feb 2016
Posts: 853

PostPosted: Tue Feb 13, 2018 5:51 am    Post subject: Reply with quote

Well, I've been serving via NFS like jaglover mentioned, and so far everything is A ok even in the virtual environment, where my worry was that maybe the nfs share would experience issues based on routing slowing things down. So far, this hasn't been the case, but what has been an issue. But something else kinda funny got in the way with an attempt to update the tree that took way to long, I'm talking like 20 minutes (I think network related).

And at this point, since I'm effectively running everything off of my nfs server, it seems like it will just be a matter of making sure that the software on here is kept up to date.

On the VM's if you remember my goal was to keep a very small size, which has of course helped becuase of moving the /usr/portage off of it altogether it is really pretty cool!

One thing I have been unable to do is boot into either of the VM's post installation, so I have to read more about what could be causing it, but I will let that go for now, since I am certain it isn't related.
Thanks for the help, and I will keep in mind the suggestion to partition (or save externally) these large portions of the /usr folder.

Thanks again.
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