Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What can I migrate to a new install?
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
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Tue Apr 07, 2020 8:39 am    Post subject: What can I migrate to a new install? Reply with quote

I spent years tweaking and hammering away at my Gentoo install. Now moving to a new laptop. What if anything can I migrate to it? Can I just grab the portage stuff (make, use, etc) and use it on the new machine to have something as close to what I am currently using? Would like to do the same thing with packages. I understand that there will be different hardware tweaks. Or will this just create more problems than it will solve? Not trying to be lazy but efficient.
Thanks
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Apr 07, 2020 9:30 am    Post subject: Reply with quote

For LVM, did you consider LVM disk migration (and there are tons of other links on the internet)?
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 474
Location: Brisbane, Australia

PostPosted: Tue Apr 07, 2020 10:55 am    Post subject: Re: What can I migrate to a new install? Reply with quote

Budoka wrote:
I spent years tweaking and hammering away at my Gentoo install. Now moving to a new laptop. What if anything can I migrate to it? Can I just grab the portage stuff (make, use, etc) and use it on the new machine to have something as close to what I am currently using? Would like to do the same thing with packages. I understand that there will be different hardware tweaks. Or will this just create more problems than it will solve? Not trying to be lazy but efficient.
Thanks


I look after more than 20 Gentoo laptops. My system, developed over the past 5 years, is to connect a USB Harddrive formatted with Ext4 old laptop and boot with Systemrescue CD. Then backup the drive's partitions with rsync to a directory on an external USB disk.

When done, connect the USB drive to the new laptop and boot with Systemrescue CD. Format the hard drive same as the old laptop with the same filesystems. Then mount the partitions to /mnt/gentoo/ and the USB drive partition to /mnt/backup/ on the Systemrescue CD and use rsync to restore the backup to the new laptop.

Now change root, modify make.conf, CPU_FLAGS_X86, VIDEO_CARDS, maybe fstab and whatever else is required. Then run emerge -av @world. Check the output and if all is OK enter yes.

When recompiling is done, rebuild and install the kernel to match the new laptop hardware, install and configure your bootloader. Shutdown the laptop, remove the CD and boot your ne laptop.

You may need to install new network drivers

NOTE: I use genkernel to build the kernels and grub-static as bootloader.
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Tue Apr 07, 2020 10:56 am    Post subject: Reply with quote

I hope that your actual processor is compatible with the new one and that there is not too much things to modifiy in your new installation compare to the actual one. I would prefer to compile everything from scratch on the new installation and configure everything according with the new material before make an emerge --world unless you know what you do.

Than all your binaries will come from your new installation and the actual one will have nothing to do with it and cannot be in cause of anything.
_________________
Paul
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Apr 07, 2020 3:33 pm    Post subject: Reply with quote

Budoka,

You can keep /home and your world file.
Most of /etc/portage can be kept but you will need to check make.conf as it will contain some CPU specific options.

On your new system, install as far as a stage3 and portage snapshot.
Put your /home in place.
Put /etc/portage and your world file in place. Edit make.conf to suit its new home.

Install linux-firmware, your kernel and boot loader, set it up and reboot into your own kernel.

Run
Code:
emerge -e --keep-going @world
Portage may shout at you as your world file contains lots of things that are not installed but should be.
When that completes, your packages are installed in their new home.

You can refer to your old /etc as a configuration guide but you cannot use at as is.
Several files here need to be unique to the hardware, like the ssh host key, hence refer to the old /ect, do not copy it.
_________________
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