Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Converting a working Gentoo setup to a new CPU/mobo
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
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sat Feb 15, 2003 12:00 am    Post subject: Converting a working Gentoo setup to a new CPU/mobo Reply with quote

Hi!

I've been running Gentoo on a P3 since November, and have been having a great time with it, but now it's time to upgrade.

I bought a dual MP 2400+ mobo ... Question: Can I move the HDD over to the new machine, change the flags and re-compile everything for the new optimizations .. will it BOOT?

Or am I screwed, and have to re-install from stage 1, like 4 months ago?

thanks !!
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sat Feb 15, 2003 1:22 am    Post subject: Reply with quote

If I re-compile the kernel with SMP support, and new USE flags .. then move the kernel as an alternate boot line under GRUB .. and then power down the machine ..

And move the HDD to the SMP mobo, and boot, then emerge -e world ..

Would that work?

I basically have the machine nice and set up as I like it ;)
Back to top
View user's profile Send private message
fifo
Guru
Guru


Joined: 14 Jan 2003
Posts: 437

PostPosted: Sat Feb 15, 2003 1:53 am    Post subject: Reply with quote

At least in theory I think it should work. One thing to look out for is, if the hard disk will be seen as a different device in the new computer (for example as /dev/hdb where it was /dev/hda before) then you'll need to modify /etc/fstab. Presumably you'll also want to update your CFLAGS before doing that "emerge -e world" :) .
Back to top
View user's profile Send private message
s003apr
Apprentice
Apprentice


Joined: 04 Oct 2002
Posts: 162

PostPosted: Sat Feb 15, 2003 1:56 am    Post subject: Reply with quote

You could use the livecd to boot with and chroot into the environment, then make a new kernel. That should at least get you a working linux environment. I think.
Just make sure you backup everything important in case it doesn't work and you have to rebuild from scratch.
I definetely don't think it would hurt to try, since starting from scratch is the only alternative.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Sat Feb 15, 2003 2:10 am    Post subject: Re: Converting a working Gentoo setup to a new CPU/mobo Reply with quote

JKay wrote:
Or am I screwed, and have to re-install from stage 1, like 4 months ago?
Oh, come on. This is Linux; unlike M$, the solution is not "reformat, re-install". You're not screwed. In fact, the machine I'm typing this on is as up-to-date as any other Gentoo box (GCC3, latest kernel, fresh packages, etc.), has had hardware swapped out repeatedly (dual P3 -> single P3 from hardware failure -> new mobo with dual P3) despite being originally installed using Gentoo 1.0_rc6 -- yes, pre-1.0 -- and it's still going strong. Heck, my second CPU went out and all I did was boot back up again and Gentoo came up just peachy. You're never completely screwed, and voluntary hardware changes are the least of your worries.

Jkay wrote:
If I re-compile the kernel with SMP support, and new USE flags .. then move the kernel as an alternate boot line under GRUB .. and then power down the machine ..
Let's look at this. You have all of your code compiled with '-march=pentium3', correct? (Check CFLAGS in /etc/make.conf.) From everything I've read, Athlon [XM]Ps fully support the entire Pentium 3 instruction set, meaning that an -march=pentium3 binary will run without modification on an Athlon MP. This applies to both your system binaries (the shell, for instance) and the kernel. This is good. This means that you don't need to `emerge -e world`, though on a dual Athlon MP, it wouldn't take long. ;)

Okay, now to kernel workings. SMP support is an option in the kernel config, under "Processor type and features". SMP support, when enabled, adds extra spinlocks to make the kernel SMP-safe and the resulting kernel image does extra checks on boot to see if you have a second CPU. It's an option because the spinlocks make the kernel bigger (and slightly slower due to cache misses) and because the CPU probing can confuse some older chipsets. On modern hardware, however, SMP can be enabled with no ill effects even on a uniprocessor computer.

Here's the attack plan I would give to you. First, compile an SMP-capable kernel, being sure to enable drivers for both your current setup and your new setup. (IDE chipset support, sound, network, SCSI, etc.) However, make sure to leave CPU type set to Pentium 3. Add a menu entry to GRUB, and reboot on your P3 system into the new kernel to make sure everything is happy.

If your P3 box comes up nicely, power it down nicely, rip out the disk, and plop it in your new box. Power it up -- you ought to see GRUB, and you ought to see your common kernel boot and launch init. If you see "Gentoo Linux" appear in colored letters, all will be good. Once your system is done booting, log in, and modify /etc/make.conf such that your CFLAGS include '-march=athlon-mp' (personally, I would also suggest '-fomit-frame-pointer') and add a line that says 'MAKEOPTS="-j3"'. Then, rebuild whatever packages you want to get extra speed out of -- I suggest mozilla, kdebase, glibc, gcc, your kernel, and multimedia stuff like avifile -- and you're done.

Jkay wrote:
will it BOOT?
If you don't break your hard drive when moving from one computer to the other, yes. :D

Have fun.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sat Feb 15, 2003 2:29 am    Post subject: Reply with quote

Thank you all for these *very* informative posts - one thing tho;

I have read in 2 or 3 posts that march'ing = mp breaks some things in GCC, and even if you have an MP mobo, to march XP ... am I totally wrong here?

I know I have read it more than once on this board.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Sat Feb 15, 2003 3:08 am    Post subject: Reply with quote

I've have neither heard of nor expericenced GCC-related problems with -march=athlon-mp on a dual MP 2100+. Of course, your mileage may vary. ;)
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sat Feb 15, 2003 6:39 pm    Post subject: Reply with quote

OK .. that was interesting .. I lost connectivity, and a LOT of modules were borked after I switched my CPU type and march to Athlon-mp .. I did a search from my other PC, and found out about:

# make mrproper

So I did that and Im now able to load the eepro100 module and get online .. but a lot are STILL borked .. I'll keep bonking.

Code:

# modules-update

depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/adm1021.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/adm1024.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/adm1025.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/adm9240.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/bt869.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/ddcmon.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/dmi_scan.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/ds1621.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/eeprom.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/fscpos.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/fscscy.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/gl518sm.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/gl520sm.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-ali1535.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-ali15x3.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-amd756.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-hydra.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-i801.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-i810.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-isa.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-piix4.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-savage4.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-sis5595.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-sis630.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-sis645.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-via.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-viapro.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-voodoo3.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/it87.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/lm75.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/lm78.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/lm80.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/lm87.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/lm92.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/ltc1710.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/matorb.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/maxilife.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/mtp008.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/pcf8574.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/pcf8591.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/sis5595.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/smbus-arp.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/smsc47m1.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/thmc50.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/via686a.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/vt1211.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/vt8231.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/w83781d.o
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sat Feb 15, 2003 7:07 pm    Post subject: Reply with quote

OK... re-emerging lm_sensors cleared up almost ALL those bad modules.

Now, only:

Code:

www linux # modules-update
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-hydra.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-i810.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-savage4.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-via.o
depmod: *** Unresolved symbols in /lib/modules/2.4.19-gentoo-r10/misc/i2c-voodoo3.o


Can someone pass me a clue here .. are these all XFree modules, and therefore an XFree re-emerge will fix them?

thanks!
Back to top
View user's profile Send private message
bmph8ter
n00b
n00b


Joined: 06 May 2002
Posts: 46

PostPosted: Sat Feb 15, 2003 9:38 pm    Post subject: Reply with quote

According to Google, the modules that you have left are still LM Sensors stuff. I think maybe another kernel compile (leaving those out-you shouldn't need them) should pretty much fix you up.
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sun Feb 16, 2003 12:23 am    Post subject: Reply with quote

Now that things are halfway+ working, I notice (watching Gkrellm2) that the CPU usage for the emerges almost never goes over 50% .. when 1 CPU is 100%, the other drops to 0% .. if I combine them into 1 virtual CPU display, it remains rock steady at 50%

Only running 2 emerges at once forces usage up to 100%

This is with a **test** setting of -j10 BTW ... mem usage is very low as well.
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sun Feb 16, 2003 2:59 am    Post subject: Reply with quote

Hm .. a simple re-emerge of alsa-driver will max out the CPUs to 100% but something like a gcc recompile won't .. I don't get it.
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Feb 16, 2003 6:05 pm    Post subject: Reply with quote

AFAIK gcc recompile forces MAKEOPTS="-j1" , so it will only make one gcc process, so there SMP won't help you.

Correct me if i'm wrong.
_________________
Queen Rocks.
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Sun Feb 16, 2003 9:58 pm    Post subject: Reply with quote

OK .. so there it is! Some ebuilds simply define a *local* -j value which precludes optimum SMP use ... anyone to second or confirm this tidbit?
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Feb 16, 2003 10:00 pm    Post subject: Reply with quote

To find an example, try reading the bootstrap.sh script in /usr/portage/scripts/ .
_________________
Queen Rocks.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Feb 17, 2003 2:08 am    Post subject: Reply with quote

Jkay wrote:
OK .. so there it is! Some ebuilds simply define a *local* -j value which precludes optimum SMP use ... anyone to second or confirm this tidbit?
Seconded. Some export MAKEOPTS (which overrides MAKEOPTS in /etc/make.*), but that practice is discouraged when I last checked. I believe ebuilds are supposed to use `emake` when the package supports a parallel make and `make` when serial make is the only option.
_________________
I don't believe in witty sigs.
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