# 64bit kernel-config > 32bit kernel-config differences ?

## kernelOfTruth

Hi everyone,

I'd like to install a 32bit system (via a stage3-tarball) from inside of my 64bit system,

after I've finished emerging the basics, I'd like to compile and boot with my 32bit kernel

but I haven't built 32bit kernels since ages what would be lines in .config I had to change for building a 32bit instead of an 64bit kernel ?

here's the beginning of the 64bit-config:

 *Quote:*   

> #
> 
> # Automatically generated make config: don't edit
> 
> # Linux kernel version: 2.6.30-zen0 "welcome back"
> ...

 

change 

```
CONFIG_64BIT=y

# CONFIG_X86_32 is not set

CONFIG_X86_64=y
```

to

```
# CONFIG_64BIT is not set

CONFIG_X86_32=y

# CONFIG_X86_64 is not set
```

and 

change 

```
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
```

to

```
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
```

==> would that be enough ?

many thanks in advance

----------

## pappy_mcfae

Most likely, no. With x86_64, there are less CPU options (less 64 bit CPU's), and there are different options made available depending on your architecture. To make what you want to happen happen, you might have to start with a CD and chroot to the 32 bit setup so you can properly configure and compile your 32 bit kernel. Once the 32 kernel is set up, then any further configurations/compilations can be made under your 32 bit setup. 

Good luck.

Blessed be!

Pappy

----------

## cyrillic

Instead of playing with the config file directly, try this.

```
# make ARCH=i386 menuconfig 
```

Then compile it.

```
# make ARCH=i386 CROSS_COMPILE=i686-pc-linux-gnu- 
```

ps. I have not tested if the resulting kernel will boot on 32bit hardware (or if it boots at all) ...

EDIT : It does boot in 32bit mode on my 64bit hardware, but then fails to run my 64bit userspace, so I think this indicates success.  :Rolling Eyes: 

----------

## mv

As I understand, you have a working 32 bit toolchain to which you can chroot.

The "proper" way to do what you want is to call the chroot command via "linux32"; this will cause change your uname output to 32 bit and so (within this chroot) the kernel build system will work as it should for an x86 system (e.g. the options shown with menuconfig are those corresponding to a 32 bit system and not those for an x86_64 system).

----------

