On Thursday 27 Jul 2017 09:48:43 symack wrote:
> There must be an easy way to do this. Something like download the latest
> portage and source package. Untar on live system and rebuild!
> That would be so amazing if possible.​

There are a number of ways you could approach this.

1. Offline Update

Emerge within a chroot on an offline system having set the same CFLAGS with 
your production box, build binary packages, copy them over and run:

emerge -uaNDkv @system

Run dispatch, gcc-config, @represerved-rebuild, depclean and the like and 
assuming all is good reboot in the new kernel and repeat for world.

This will ensure minimal downtime.

2. Online Update

If downtime can be tolerated and your system is fast, you can back up /etc, 
/var/lib/portage/world and your database(s), take the system offline and 
reinstall with the latest stage 3 filesystem and portage from a LiveCD.  This 
will take considerably longer.

3. Hybrid

Personally, I would opt for a combo of 2 and 1.  In other words, I would re-
install offline using the configuration and databases of the live system, then 
test the new build to make sure all is working as expected.  Finally, take the 
prod system offline, and tar over the whole filesystem from the recently 
rebuilt mirror.  There may be some minor tweaks needed for fstab, hosts files 
between the two, but otherwise you will end up with a fresh build on your 
production box with relatively small amount of downtime.  You will also have 
an offline/cold standby system to manage emergencies and emerges with.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to