I have a Funtoo system now, but want to migrate (back) to Gentoo. If possible keeping a usable system during the installation (not rebuilding from scratch using a live CD). Both systems should be ~amd64
.
I found an old description of someone who did it the other way round. To me it sounds as if the steps are:
- Replace
/usr/portage/
with a gentoo portage snapshot. - Regenerate the manifest of portage's ebuild.
- Reemerge portage and do
emerge --sync
- Rebuild system (
emerge -e @system
). - Rebuild the rest where necessary (
emerge -uND @world
)
Do I miss anything?
What about the profiles?
Are there possible incompatibilities in the init scripts (e.g. network interfaces and configuration)?
Should I expect problems from UEFI during boot (using grub)?
Are there differences in genkernel?
Best Answer
Well, first off all, what do you have to loose? If it doesn't work out, you can still do a fresh install.
Backup
It goes without saying that you need to backup important items. Maybe even do an archive of
/etc
, in case you want to look back.Personally, whenever I try something radical, I rsync my root file system to a separate disk beforehand. Whenever something goes terribly wrong, I just rsync it back ;). Mount the root partition on a separate mount point, to prevent recursion to all mounted partitions. And run something like:
To restore:
Just make sure that the backup file system is a linux type (not FAT or NTFS), to transfer permissions, symlinks and file ownership correctly up and down.
Although never done personally, you could try the below options as a guideline. Some comments above suggest different compiler profiles, but most of that are just useflags to gcc and
CFLAGS
inmake.conf
, I don't see the real issue there.Option #1
What you could try, but no personal experience, is do it the
repo.conf
way. Create a separate directory, like/usr/gentoo
and put the vanilla Gentoo portage tree there.File
/etc/portage/repos.conf/gentoo.conf
:And something similar should exist for Funtoo, and with a lower priority. After you run
emerge --sync
, both trees will exist next to each other. If same version packages exist, the repo with higher priority wins (in theory). You can force package selection, by suffixing the desired repo like this:Using this setup you can move to Gentoo step-by-step. The profiles from both repositories will be available for selection, so you can try out some
emerge --pretend
commands when selecting the Gentoo profiles, play around with useflags etc. Emerge gcc, portage from the Gentoo tree etc. If you just make sure that GCC is re-emerged with the same useflags (edit make.conf to your liking) and you keep the same CFLAGS, you probably don't even need to empty the system tree.Maybe you want to read the GCC upgrade guide, and
/usr/share/portage/config/make.conf.example
.Finally, you could drop the
repo.conf
entry for funtoo and do aemerge -uND --newrepo @world
.Option #2
In the past, when I was doing some big profile change, I used this method.
emerge -uND @world
), handle the @preserved-rebuild set and depclean./var/lib/portage/world
into a user defined set. This can be one set, or if you want to be organized, categories of sets. For instance, I created 3 sets, usable in separate stages of the process./etc/portage/sets/boot
/etc/portage/sets/admin
/etc/portage/sets/desktop
Make sure that
/var/lib/portage/world
andword_sets
are both empty files after this migration.emerge --depclean
to get rid of all packages that where pulled in by@world
/etc/portage/package.use
. (Move the file(s) somewhere if you intend using it later again.USE=
line inmake.conf
default/linux/amd64/17.0
emerge -uND @world && emerge --depclean
You will be in the smallest configuration possible for Funtoo, smallest risk on conflicts.repos.conf
)emerge @boot
And do what you need to do to conigure the kernel, grub etc. (follow the handbook) This should give you a completely reboot-able Gentoo system. Reboot if you want to test at this point.make.conf
and maybe package specific flags inpackage.use
emerge -uND @world @admin @desktop && emerge --depclean
: if this went ok, you have successfully transferred Funtoo to Gentoo!Incompatibilities
To answer the remaining questions; During the re-intallation of packages, portage will check if file in
/etc/
are the originals or modified. If they are un-modified since installation, portage will just replace them. Same goes for files in /etc/init.d. These files, in the end, all belong to a package. A package rebuild should give the right version in the end.Modified config files are protected by config-protect. These will need to be updated using tools like
etc-update
.Note
I am aware this was an old question and probably doesn't help the OP anymore. However, the subject interests me. It would be nice if someone who came across this answer will give it an actual try :).