Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multiple gentoo installs & maintenance
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
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Jan 20, 2016 7:45 pm    Post subject: multiple gentoo installs & maintenance Reply with quote

i have two laptops and a desktop. i also look after my mother's laptop. and i might be possibly support my sister's two laptops too, depending on how well we get along with each other..

i'm wondering if i need to build everything from scratch, as i have done with my gentoo install. i don't mind doing all those emerges one time. but i'm a bit hesistant about compiling everything all over again separately on each machine everytime a change/update happens.

so my question is about the most efficient way to gentoo all these above computers, perhaps from one of my computers, and (sync??) transfer update all the others. i think i will probably use the same profile & flags on all computers, to keep it simpler.
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey


Last edited by josephg on Sat Aug 25, 2018 11:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Jan 20, 2016 7:54 pm    Post subject: Reply with quote

i'm picking this post from another thread, as i think it might be relevant here.. i suppose i could just replicate this setup for each computer, with some further tweaks?

NeddySeagoon wrote:
My netbook install is maintained on a USB HDD. Its a traditional install, following the handbook with a few exceptions.
1. /usr/portage has its own partition.
2. Everything needed for USB Support is configured in the kernel as <*>, since I don't use an initrd and with root on USB, the kernel needs to be able to read USB storage all on its own.
3. The kernel command line contains root_delay=7. Normally, root is mounted before USB is started, so root on USB fails. root_delay=7 tells the kernel to wail 7 seconds before attempting to mount root. During this time the USB system becomes ready.

Everything just works off the USB HDD, which is the way I use it at my desk.

For travelling, I boot the netboot with a USB stick and make new /boot and root filesystems on the netbook internal drive.
Its about 32Mb for boot, swap=RAM, in case I want to play with hibernate and the rest for root. That gives me just over 6G for root from an 8G SSD.
I mount the USB install at /mnt/gentoo - read only ... In case I do the copy the wrong way but leave /usr/portage unmounted.
I mount the internal partitions at /mnt/new
Then cp -a one to the other. There are several ways to do the copy.
Now empty /usr/src because its not needed. Its a good idea to prune /usr/src to one kernel before you start.

Once the copy is complete, chroot into /mnt/new.
Fix /boot and /etc/fstab as root will have moved from sdb to sda. It may have changed partition number too.
localmount will complain about the /usr/portage filesysem not being found but that's cosmetic. Remove it from fstab if its annoying.
Reinstall the boot loader to the MBR. Mixing and matching bits of bootloader across different versions is usually a bad idea.

I leave the ssh host key, static IP, hostname and so on unchanged. This is harmless to me as both installs are never booted at the same time and both refer to the same machine anyway.
You need to consider your use case.

As long as you do the copy as root and preserve permissions, cp -a, tar and rsync all work.

Reboot to the internal HDD to test.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Wed Jan 20, 2016 8:05 pm    Post subject: Reply with quote

If you have similar USE flags at all those boxes, you can share /usr/portage and build binary packages (once) and then install them without recompiling.
Packages with not matching flags will either be forced or recompiled, by your choice. You can force either behaviour with command line options.

Finally, you might consider using some agent for maintaining all those systems. I know there is puppet is in portage. Never used it though, as I don't need it for a single box, and it doesn't fit the idea of actually "minimal" images I'm using for virtual machines. It may (or may not) fit your use case though.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Jan 20, 2016 8:08 pm    Post subject: Re: mutliple gentoo installs & maintenance Reply with quote

josephg wrote:
[...] my question is about the most efficient way to gentoo all these above computers, perhaps from one of my computers, and (sync??) transfer update all the others. i think i will probably use the same profile & flags on all computers, to keep it simpler.

josephg ... there are various ways you might go about this:

Setup a binary package server, set PORTAGE_BINHOST in make.conf on the client machines, and use '--getbinpkg', or '--getbinpkgonly'.

Set '--buildpkg' in EMERGE_DEFAULT_OPTS on a buildhost, nfs mount "$(portageq pkgdir)" on the client and use '--usepkgonly'.

Make stage4 images, or chroots, on a buildhost and tar-over-ssh, or rsync to the clients (when booted from some boot medium).

The first is probably preferable, and the recommended method ...

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jan 20, 2016 8:34 pm    Post subject: Reply with quote

josephg,

This is a slightly different question.

If you can find common -march and USE settings, you can deploy binary packages from a BINHOST.
You build for the BINHOST test the packages, then deploy them. This in the way that enterprise Gentoo users do it.
They may use management software but for a small number of machines, its not required.

Think of it as distributing "Josephg Linux".
_________________
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
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Jan 21, 2016 11:00 am    Post subject: Reply with quote

thank you folks :) so i know i can do this, when i get there.. something to aim for. and perhaps build some of these bits as i go along. i am still on the way to getting my gentoo fixed up for myself.

i don't need a corporate infrastructure, just something really simple for home use. and i don't them all computers always updated, unless need be.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Jan 21, 2016 11:03 am    Post subject: Reply with quote

i also wonder if i can move portage to a usb, and mount only when i need to emerge? that way, i could plug in the portage usb to whatever computer i'm on and emerge away..
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Thu Jan 21, 2016 1:51 pm    Post subject: Reply with quote

You need portage in only one computer on your LAN, share it over NFS.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Jan 21, 2016 2:39 pm    Post subject: Reply with quote

josephg wrote:
i also wonder if i can move portage to a usb, and mount only when i need to emerge?

josephg ... yes, you could do that, or use nfs to mount it on the netbook as and when you're connected on the local network (and as netifrc uses 'runlevels' you can create a runlevel specifically for 'home' with /etc/conf.d/net.{iface}.{runlevel} and {service}.{runlevel} to make such a setup automatic). Something else you might look at is "compressing portage using squashfs".

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 21, 2016 6:46 pm    Post subject: Reply with quote

josephg,

Yes but take care.
I share the USB HDD setup I described between my netbook and Raspberry Pis.
The netbook is a 32 bit Intel Atom CPU and the Pis are arm6j.

The portage tree and distfiles are architecture agnostic. That's /usr/portage and /usr/portage/distfiles
However, the binary packages are quite different. They go in /usr/portage/packages by default.
You need to change the default location for /usr/portage/packages if you share /usr/portage and you keep packages for your BINHOST and you have more than one arch.
_________________
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
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Jan 21, 2016 10:42 pm    Post subject: Reply with quote

fabulous maestros :) this is getting me really excited!

now i don't think my mother's computer needs any portage bits or other dev/toolkit stuff. she will never deliberately or even accidentally emerge. the most she does, if she has a problem, is try to shutdown and wait for me. going online is not that important to her life, as it is to mine ;) so i like to keep her laptop really minimal, like my netbook.

what all directories can i move out of that? from your posts, i'm guessing /usr/portage can be completely removed, and only /usr/portage/packages needs to be mounted for binary package updates.


Last edited by josephg on Fri Jan 22, 2016 10:06 am; edited 1 time in total
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Jan 21, 2016 10:46 pm    Post subject: Reply with quote

i just had a quick look at portage in a squashfs compressed file. i'm very impressed by his thinking outside the box! this seems very efficient and portable too. i need to digest all of that thread.. thanks khay.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Thu Jan 21, 2016 10:52 pm    Post subject: Reply with quote

/usr/portage/packages does not need to be local.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jan 22, 2016 5:43 pm    Post subject: Reply with quote

josephg,

You can point to a BINHOST on the web, say, and install from there.
Using a binhost needs a portage tree.
_________________
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
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