# Build gentoo 2.6.22-r8 on P4 then move HD to AMD K6-2/333Mhz

## GeorgiaCougar

Someone gave me an old AMD K6-2/333Mhz, 364MB RAM, Triton 100 Video card, 30 Gig HD, no floppy, no cdrom. 

I built gentoo 2.6.22-r8 on my P4 and thought I did everything OK. It boots on the P4 no issues. Anyway, the AMD gets PANIC: CPU too old for this Kernel. I didn't choose a CPU during the kernel build and I didn't set CHOST.  I was hoping the default for x86 processor would be OK. Ideas?

My ultimate goal is to turn it into a home router / firewall rather than purchase a cheep router, I'll just use cable modem to AMD then 3 cross over cables to PCs.

What I want to do now is create a 60M partition on the end of the 30 gig drive without loosing my data. Resize is a two step process and I'm running reiser. Then I'll somehow create an exact copy of the 2.6.22-r8 installation CD in 57M of that 60M partition. I then want to edit grub to be able to select to boot from that partition. I'll do all that on the P4 then move the drive back to the AMD and hopefully I'll be able to solve my troubles without moving the drive back and forth so much.

----------

## poly_poly-man

You have two options: First of all, you could fix it. It appears that you may have (inadvertently) chosen too high a CPU in the kernel, or even your USE flags. Try building a few things over again, and see if that works. Note, even if your accidentally enabled, for example, SSE or SSE2, the K6-2 can't do that. Your second option is just to get like devil-linux or something and be done with it.

hih,

poly-p man

----------

## pteppic

I have a similar machine doing my firewall/router (k6-2 400 mhz). If there is any specific setting you would like, or a stage4 maybe...

----------

## saellaven

I've got a K6II/450 working as my web/nntp server and the kernels through the most recent (2.6.23) work fine.

686 is the default CPU optimization for the kernel if you don't select one. Chances are the 686 (same as Pentium Pro) code is using some functionality not present on the K6. Select K6/K6II/K6III instead (the equivalent of -march=i686 versus -march=k5).

----------

## drwook

I'm pretty certain the k6's are all i586 CHOST, not i686 which covered from the first Athlons upwards.

I'd advise you re-install using i586 chost and generic/i586 optimisations on the newer machine then try again, or just install a basic minimal sys that can boot on the k6 then set up distcc which will make updating easier in the future.

----------

## pteppic

 *drwook wrote:*   

> I'm pretty certain the k6's are all i586 CHOST, not i686

 You are correct, I had to rebuild to i586 from i386 to get nptl in glibc.

----------

## NeddySeagoon

GeorgiaCougar,

Create a partition in file on the P4 and install into the partition in a file.

Set up everything inside the partition as if for a k6 CPU. Untar the x86 (not i686) tarball there.

You can save some time by bind mounting your /usr/portage inside the partition in a file, so your tree and distfiles are waiting for you when you chroot.

When the install is done, you can NFS share it with the real system and copy it over the network

----------

