Requirements
In the previous post, I explain how I got tired of Gentoo. The obvious distribution to switch to, for a Linux "geek" like me, is Archlinux: A flexible distribution that gives a lot of power to the user, bleeding edge packages, without the hassle of having to recompile everything.I found several pages on how to migrate from Gentoo to Archlinux, but nothing that fits my requirements:
- Minimum downtime. I only have one computer, so I want to be able to use Gentoo up to the point where Archlinux is ready to boot, fully functional (or almost), with all the packages I need.
- No reformatting: I want to keep my Gentoo install in case something goes wrong
- No installing on another partition: First, I don't have any free partition, and resizing partitions requires some downtime.
So, here is what I did:
- Install Archlinux in a chroot (/arch), on the same partition as my existing Gentoo root filesystem.
- Install all the packages I need, on my Archlinux chroot install.
- Configure the Archlinux system.
- Reboot on a bootable Linux CD/memory stick, move the Gentoo system from / to /gentoo, then move in the Archlinux one from /arch to /.
- Reboot, enjoy Archlinux.
Install Archlinux in a chroot
So, here is what I did: I created a /arch folder in my root partition, and followed the instructions on this page (replace all instances of /var/lib/arch with /arch). I believe that the instructions on the Archlinux wiki also work (Install from Existing Linux), try it out if you can, and let me know.You now have a base Archlinux system in /arch: time to install the packages you need.
Open /var/lib/portage/world on your Gentoo system. It should look like this:
media-gfx/gimp
media-video/mplayer
net-im/pidgin
net-im/skype
x11-base/xorg-server
[...]
Look at every single package. Those are all the packages that you explicitly installed on your Gentoo system, through a command like
media-video/mplayer
net-im/pidgin
net-im/skype
x11-base/xorg-server
[...]
# emerge -a package
This list doesn't include dependencies, but that should be fine, Archlinux knows how to install the required dependencies.For each of these package, first, think if you still need it (an OS change is a good opportunity for some cleanup ,-)), and if you do need it, run, in your Archlinux chroot (you will overwrite your Gentoo system if you forget that part):
pacman -S package
There is no 1:1 name correspondence between package in Gentoo and Archlinux. Some have the same name (gcc, firefox, etc.), some may not. In this case, a quick Google search will tell you the package name in Archlinux.Install missing packages
For some Gentoo packages, you may not find an equivalent in the official repositories. However, there is the great AUR, which has tons of user-contributed unofficial packages. AUR package descriptions are very similar to Gentoo ebuilds: they are recipe describing how to build the package from source.Installing these packages manually is a bit of a pain, so I recommend that you install yaourt. Yaourt plays a role similar to emerge: it fetches the AUR descriptions, compiles the package, then installs it on your system.
After installing yaourt, think about running this command:
# yaourt -S yaourt package-query
This will make sure that yaourt is updated automatically when you update your system with:
# yaourt -Syu --aur
# yaourt -S package
# yaourt package
The second one search for packages that contain "package" in their description as well.# yaourt package
All for now, next post will concentrate on configuring Archlinux, and rebooting on your new system.
No comments:
Post a Comment