On 6/28/2025 9:38 AM, whiteman808 wrote:
Is it necessary to reinstall Gentoo if I change CPU or motherboard? If
not, what steps should be done on the existing Gentoo installation? Do I need to do these operations from chroot?
I'm assuming this is amd64->amd64.
So the main thing to worry about is CPU compatibility, and your CFLAGS.
If you're using -march=native, there's a chance your system won't work
as compiled. This isn't always true, but these days it's no longer a guarantee that a newer CPU will have all the features of the old.
What I usually do in this case is:
- set -march=x86-64-v3 (or whatever lowest-common-denominator CPU arch generic target works) -- https://wiki.gentoo.org/wiki/Safe_CFLAGS#Generic_psABI_levels can help
with this. - Ensure my system is fully updated, and `emerge
--depclean`'d. - emerge -e @world # this will rebuild your entire system.
You can *significantly* reduce the pain of this by using the binary
package host.
-JayF
Is it necessary to reinstall Gentoo if I change CPU or motherboard? If
not, what steps should be done on the existing Gentoo installation? Do I
need to do these operations from chroot?
On 6/28/2025 9:38 AM, whiteman808 wrote:
Is it necessary to reinstall Gentoo if I change CPU or motherboard? If
not, what steps should be done on the existing Gentoo installation? Do I need to do these operations from chroot?
I'm assuming this is amd64->amd64.
So the main thing to worry about is CPU compatibility, and your CFLAGS. If you're using -march=native, there's a chance your system won't work as compiled. This isn't always true, but these days it's no longer a guarantee that a newer CPU will have all the features of the old.
What I usually do in this case is:
- set -march=x86-64-v3 (or whatever lowest-common-denominator CPU arch generic target works) -- https://wiki.gentoo.org/wiki/Safe_CFLAGS#Generic_psABI_levels can help with this. - Ensure my system is fully updated, and `emerge --depclean`'d. - emerge -e @world # this will rebuild your entire system.
You can *significantly* reduce the pain of this by using the binary package host.
-JayFShould I execute `emerge -e @world` inside chroot on some livecd?
Jay Faulkner wrote:
On 6/28/2025 9:38 AM, whiteman808 wrote:
Is it necessary to reinstall Gentoo if I change CPU or motherboard? If
not, what steps should be done on the existing Gentoo installation? Do I
need to do these operations from chroot?
I'm assuming this is amd64->amd64.
So the main thing to worry about is CPU compatibility, and your CFLAGS. If
you're using -march=native, there's a chance your system won't work as
compiled. This isn't always true, but these days it's no longer a guarantee
that a newer CPU will have all the features of the old.
What I usually do in this case is:
- set -march=x86-64-v3 (or whatever lowest-common-denominator CPU arch
generic target works) -- https://wiki.gentoo.org/wiki/Safe_CFLAGS#
Generic_psABI_levels can help with this. - Ensure my system is fully
updated, and `emerge --depclean`'d. - emerge -e @world # this will rebuild
your entire system.
You can *significantly* reduce the pain of this by using the binary package
host.
-JayF
Follow Jay's advice on the march setting in make.conf. You want a setting thatDoes portage need to be able to execute some files already present on
is compatible with both CPUs as Jay mentioned. Do a emerge -e world. Also,
--depclean as well.
When you install the new CPU. You will need a kernel. Your current one may
work, may not. If it does, I'd stick to a console with no GUI running. Method
below may be faster since you only have to recompile once if you want to switch
the march setting back to native.
A somewhat shorter method, after you install new CPU, boot another boot media,
Gentoo Live CD, Knoppix or whatever your system can boot with and you like. Then mount your partitions as needed for the OS, chroot in, emerge -e world.
It should see the new CPU and change all the settings. Since the boot media is
handling the boot, it doesn't matter what your version of OS is as long as the
Arch is the same. Don't forget to build a new kernel as well. The command lspci -k can be a really awesome friend. Also, you can leave the MARCH set to
native setting and this way you only compile once.
If you can make it without the computer a bit, I'd boot from other media and rebuild only once. Oh, don't forget to change the CPU flags if you have it set. The command cpuid2cpuflags is good for that. If you don't have it, package is the same name. You can unmerge it when done if you want.
Just another idea. There are likely several ways to accomplish this. Biggest
thing is the kernel.
Dale
:-) :-)
On 28 Jun 2025, 10:33:24, Jay Faulkner wrote:
On 6/28/2025 9:38 AM, whiteman808 wrote:Should I execute `emerge -e @world` inside chroot on some livecd?
Is it necessary to reinstall Gentoo if I change CPU or motherboard? IfI'm assuming this is amd64->amd64.
not, what steps should be done on the existing Gentoo installation? Do I >>> need to do these operations from chroot?
So the main thing to worry about is CPU compatibility, and your CFLAGS. If >> you're using -march=native, there's a chance your system won't work as
compiled. This isn't always true, but these days it's no longer a guarantee >> that a newer CPU will have all the features of the old.
What I usually do in this case is:
- set -march=x86-64-v3 (or whatever lowest-common-denominator CPU arch
generic target works) --
https://wiki.gentoo.org/wiki/Safe_CFLAGS#Generic_psABI_levels can help with >> this. - Ensure my system is fully updated, and `emerge --depclean`'d. -
emerge -e @world # this will rebuild your entire system.
You can *significantly* reduce the pain of this by using the binary package >> host.
-JayF
Me tho, I'd install the CPU and try booting. I'd just stick to a
console, no GUI. Run emerge -ae world and go take a nap, go to work or whatever. Make sure to include --resume tho. If something fails, it
will keep trying.
If anything does fail, it will spit out a list. Try
them on their own. If you don't have --oneshot set, make sure to
oneshot those so your world file doesn't get full of unwanted entries.
Someone else may have more info on that question. I just think it will
work and at least worth a try. Save a lot of time for sure if it does
work.
Dale
:-) :-)
How does situation look in binary-based distros like Debian, Arch? Is rsyncing old Debian or Arch installation to PC with new processor or motherboard and configuring hardware-specific stuff sufficient?
On 6/28/2025 9:38 AM, whiteman808 wrote:
Is it necessary to reinstall Gentoo if I change CPU or motherboard? If
not, what steps should be done on the existing Gentoo installation? Do I need to do these operations from chroot?
I'm assuming this is amd64->amd64.
So the main thing to worry about is CPU compatibility, and your CFLAGS. If you're using -march=native, there's a chance your system won't work as compiled. This isn't always true, but these days it's no longer a guarantee that a newer CPU will have all the features of the old.
What I usually do in this case is:
- set -march=x86-64-v3 (or whatever lowest-common-denominator CPU arch generic target works) -- https://wiki.gentoo.org/wiki/Safe_CFLAGS#Generic_psABI_levels can help with this. - Ensure my system is fully updated, and `emerge --depclean`'d. - emerge -e @world # this will rebuild your entire system.
Am Sat, Jun 28, 2025 at 10:33:24AM -0700 schrieb Jay Faulkner:
On 6/28/2025 9:38 AM, whiteman808 wrote:
Is it necessary to reinstall Gentoo if I change CPU or motherboard? If not, what steps should be done on the existing Gentoo installation? Do I need to do these operations from chroot?
I'm assuming this is amd64->amd64.
So the main thing to worry about is CPU compatibility, and your CFLAGS. If you're using -march=native, there's a chance your system won't work as compiled. This isn't always true, but these days it's no longer a
guarantee
that a newer CPU will have all the features of the old.
What I usually do in this case is:
- set -march=x86-64-v3 (or whatever lowest-common-denominator CPU arch generic target works) -- https://wiki.gentoo.org/wiki/Safe_CFLAGS#Generic_psABI_levels can help
with
this. - Ensure my system is fully updated, and `emerge --depclean`'d. - emerge -e @world # this will rebuild your entire system.
I see no point in rebuilding the system on the old machine with with a generic -march, just to migrate it to a new machine where you rebuild it again with -march=native. So if you do run march=native and it doesn’t just boot, I would build from scratch and migrate my settings. It’s more efficient.
On 6/28/2025 9:38 AM, whiteman808 wrote:
Is it necessary to reinstall Gentoo if I change CPU or motherboard?
If not, what steps should be done on the existing Gentoo
installation? Do I need to do these operations from chroot?
On Sat, 28 Jun 2025 10:33:24 -0700
Jay Faulkner<jayf@gentoo.org> wrote:
On 6/28/2025 9:38 AM, whiteman808 wrote:You don't say if the kernel is compiled locally or if you use
Is it necessary to reinstall Gentoo if I change CPU or motherboard?
If not, what steps should be done on the existing Gentoo
installation? Do I need to do these operations from chroot?
something like '-march=native' compiling everything.
If you do then the simplest fix is (assuming you don't have it
all glommed onto one partition) is just do a fresh install on
a new /root + /var LV and mount the old stuff. The baseline
stage3, mount your existing non-stage LV's, build a kernel,
then "emerge @world" isn't that much hands-on time.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 04:32:57 |
Calls: | 10,386 |
Calls today: | 1 |
Files: | 14,058 |
Messages: | 6,416,623 |