[gentoo-user] chroot: cannot run command `/bin/bash'

2006-07-23 Thread oskar kapala

Hi,

William Kenworthy napisał(a):


so bash needs glibc!



Sure :)


Your best bet would be to locate a glibc bin package (from the
livecd?)and untar it in / of your system, then it should work enough to
rebuild properly.  You could just copy in the missing libs as you
discover them, but thats probably going to be worse :(


I copied whole  /mnt/liveCD/lib  to my  /mnt/gentoo/lib  and chroot is
working now, but revdep-rebuilt is doing nothing. IMHO some reverse
dependencies are broken
The worst thing is that emerge glibc faild

Output is:

(...)
checking whether i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

!!! ERROR: sys-libs/glibc-2.3.6-r4 failed.
Call stack:
 ebuild.sh, line 1539:   Called dyn_compile
 ebuild.sh, line 939:   Called src_compile
 glibc-2.3.6-r4.ebuild, line 1128:   Called toolchain-glibc_src_compile
 glibc-2.3.6-r4.ebuild, line 215:   Called glibc_do_configure 'linuxthreads'
 glibc-2.3.6-r4.ebuild, line 905:   Called die

!!! failed to configure glibc
!!! If you need support, post the topmost build error, and the call
stack if relevant.


BTW: I'm new on the mailing list, such this one: so I'm not sure how
to reply to concrete post. I'm using gmail - I send an ordinary email
to [EMAIL PROTECTED] Please correct me if I'm doing sth wrong...

Thanks for help,
oskar

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `/bin/bash'

2006-07-22 Thread Matthias Bethke
Hi oskar,
on Saturday, 2006-07-22 at 13:45:01, you wrote:
> chroot: cannot run command `/bin/bash': No such file or directory
> 
> of course file is present, executable, and I'm doing it as su...

You should be fine if ou follow William's instructions. The reason for
this is the error the linker returns to execve(2):
| ENOENT The file filename or a script or ELF interpreter does not
|exist, or a shared library needed for file  or  inter-
|preter cannot be found.

cheers!
Matthias

-- 
I prefer encrypted and signed messages. KeyID: FAC37665
Fingerprint: 8C16 3F0A A6FC DF0D 19B0  8DEF 48D9 1700 FAC3 7665


pgp0WRxjmucrQ.pgp
Description: PGP signature


Re: [gentoo-user] chroot: cannot run command `/bin/bash'

2006-07-22 Thread William Kenworthy
moriah ~ # ldd /bin/bash
linux-gate.so.1 =>  (0xe000)
libncurses.so.5 => /lib/libncurses.so.5 (0xb7f28000)
libdl.so.2 => /lib/libdl.so.2 (0xb7f23000)
libc.so.6 => /lib/libc.so.6 (0xb7dec000)
/lib/ld-linux.so.2 (0xb7f84000)
moriah ~ # equery belongs /lib/libc.so.6
[ Searching for file(s) /lib/libc.so.6 in *... ]
sys-libs/glibc-2.3.6-r4 (/lib/libc.so.6 -> libc-2.3.6.so)
moriah ~ 

so bash needs glibc!

Your best bet would be to locate a glibc bin package (from the
livecd?)and untar it in / of your system, then it should work enough to
rebuild properly.  You could just copy in the missing libs as you
discover them, but thats probably going to be worse :(

BillK


On Sat, 2006-07-22 at 13:45 +0200, oskar kapala wrote:
> Hi,
> 
> I unmerged glibc, I know it's stupid, by I did it. I know how to solve
> the problem, but sth is wrong with chroot:

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] chroot: cannot run command `/bin/bash'

2006-07-22 Thread oskar kapala

Hi,

I unmerged glibc, I know it's stupid, by I did it. I know how to solve
the problem, but sth is wrong with chroot:

I boot from liveCD 2006.0 (my arch is x86) and:

mount all my filesytem into /mnt/gentoo as a new root
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash

a I get:
chroot: cannot run command `/bin/bash': No such file or directory

of course file is present, executable, and I'm doing it as su...

I found some posts connected with problem, but I still can't solve it.

I have experience with such things, becouse I unmerged pam-login and
forgot to merge shadow before reboot :)

Thanks,
oskar
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error [SOLVED]

2006-02-24 Thread Boyd Stephen Smith Jr.
On Friday 24 February 2006 06:56, Bo Andresen <[EMAIL PROTECTED]> wrote 
about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error [SOLVED]':
> Actually I guess I could just download the the amd64 livecd, mount it,
> copy its kernel to the harddrive (already did emerge coldplug) and boot
> on it. I did, however, find this very interesting so I do wish to
> compile a 64-bit kernel and see what it takes.

Well, when you are already running a 64-bit kernel and have a native gcc, 
you won't have to use the ARCH and CROSS_COMPILE magic.  It just works.

The whole process was also enlightening to me.  I've never cross-compiled a 
kernel, but now I know how to have my dual-Opteron box compile the kernel 
for my Linksys router or my friend's hppa box.

> > make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-
> > (menuconfig, all, modules_install, etc.)
>
> At first when typing make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-
> it told me it could not find these files:
>
> arch/x86_64/kernel/asm-offsets.c:12:21: asm/pda.h: No such file or
> directory arch/x86_64/kernel/asm-offsets.c:16:22: asm/ia32.h: No such
> file or directory [...]
> make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2
>
> # ls -ld include/asm
> lrwxrwxrwx  1 root root 10 Feb 24 14:27 include/asm -> asm-386
>
> I solved this by:
> # ln -sfn include/asm-x86_64 include/asm

I think this could also be solved with a 'make mrproper'.

> make install didn't work either

Weird.

> This all did solve the problems. The resulting kernel does indeed boot
> and it does make it possible to chroot into a 64 bit environment. :D
> Thanks a lot. This has been very educating.

Very good!  I'm glad we solved your problem.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error [SOLVED]

2006-02-24 Thread Bo Andresen
On Friday 24 February 2006 06:18, Boyd Stephen Smith Jr. wrote:
> > via linux # make ARCH=x86_64 CC="gcc -m64"
> >   CHK include/linux/version.h
> >   UPD include/linux/version.h
> >   SPLIT   include/linux/autoconf.h -> include/config/*
> >   CC  arch/x86_64/kernel/asm-offsets.s
> > cc1: error: code model `kernel' not supported in the 32 bit mode
> > cc1: sorry, unimplemented: 64-bit mode not compiled in
>
> Blah.  I don't really know how to get around this.  I generally stay away
> from configuring my own gcc and I don't know what, if any, USE flag
> controls when 64-bit mode is compiled in.  That works in my
> i686-pc-linux-gnu-gcc, but maybe that's 'cause it is a "cross"-compiler on
> my system.

As you saw in my previous post the gcc version is 3.3.5. Wanting to know 
whether it was due to the version of gcc I ran the same commands on my laptop 
(after copying .config to it). It has gcc version 3.4.5 and it gave exactly 
the same result as shown above.

> It may be easier at this point to just find a live cd / live dvd that will
> bring you up in a 64-bit kernel.  It won't matter much whether it is
> gentoo or some other distro [1], as long as it brings up the network and
> your drives, because all you'll be doing is chrooting and finishing the
> gentoo install.

Actually I guess I could just download the the amd64 livecd, mount it, copy 
its kernel to the harddrive (already did emerge coldplug) and boot on it. I 
did, however, find this very interesting so I do wish to compile a 64-bit 
kernel and see what it takes.

> If you still want to continue down the "cross"-compile and install a kernel
> route (what we've been trying to do so far).  I suggest you emerge
> crossdev in your 32-bit environment, then do crossdev -s1 -t x86_64 to
> compile a cross-compiling bin-utils and gcc (C only) [2].  Then, you
> should be able to "cross"-compile your kernel with.

I've just done that. It seems to  be working.

> make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-
> (menuconfig, all, modules_install, etc.)

At first when typing make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu- it 
told me it could not find these files:

arch/x86_64/kernel/asm-offsets.c:12:21: asm/pda.h: No such file or directory
arch/x86_64/kernel/asm-offsets.c:16:22: asm/ia32.h: No such file or directory
[...]
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

# ls -ld include/asm
lrwxrwxrwx  1 root root 10 Feb 24 14:27 include/asm -> asm-386

I solved this by:
# ln -sfn include/asm-x86_64 include/asm

Perhaps it would have been solved by reemerging gentoo-sources but this worked 
too. make install didn't work either but installing it manually is just 
copying 3 files..

This all did solve the problems. The resulting kernel does indeed boot and it 
does make it possible to chroot into a 64 bit environment. :D Thanks a lot. 
This has been very educating.

> Crossdev will take basically no time to install, but compiling gcc make
> take a while, even without any language front-ends other than C.

Well, it didn't take that long.. At least less than 15 minutes - didn't really 
time it.
 
-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Boyd Stephen Smith Jr.
On Thursday 23 February 2006 19:07, Bo Andresen <[EMAIL PROTECTED]> 
wrote about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error':
> On Friday 24 February 2006 01:56, Boyd Stephen Smith Jr. wrote:
> > So, why don't you give it a go with:
> > make ARCH=x86_64 CC="gcc -m64" menuconfig
> > make ARCH=x86_64 CC="gcc -m64"
> > make ARCH=x86_64 CC="gcc -m64" modules_install
> > make ARCH=x86_64 CC="gcc -m64" install
> >
> > and let me know how it goes.
>
> via linux # make ARCH=x86_64 CC="gcc -m64"
>   CHK include/linux/version.h
>   UPD include/linux/version.h
>   SPLIT   include/linux/autoconf.h -> include/config/*
>   CC  arch/x86_64/kernel/asm-offsets.s
> cc1: error: code model `kernel' not supported in the 32 bit mode
> cc1: sorry, unimplemented: 64-bit mode not compiled in

Blah.  I don't really know how to get around this.  I generally stay away 
from configuring my own gcc and I don't know what, if any, USE flag 
controls when 64-bit mode is compiled in.  That works in my 
i686-pc-linux-gnu-gcc, but maybe that's 'cause it is a "cross"-compiler on 
my system.

It may be easier at this point to just find a live cd / live dvd that will 
bring you up in a 64-bit kernel.  It won't matter much whether it is 
gentoo or some other distro [1], as long as it brings up the network and 
your drives, because all you'll be doing is chrooting and finishing the 
gentoo install.

If you still want to continue down the "cross"-compile and install a kernel 
route (what we've been trying to do so far).  I suggest you emerge 
crossdev in your 32-bit environment, then do crossdev -s1 -t x86_64 to 
compile a cross-compiling bin-utils and gcc (C only) [2].  Then, you 
should be able to "cross"-compile your kernel with.

make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-
(menuconfig, all, modules_install, etc.)

Crossdev will take basically no time to install, but compiling gcc make 
take a while, even without any language front-ends other than C.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy

[1] I only mention this because the gentoo amd64 live cds were nothing but 
problems on my system and it was much easier to bring up (k)ubuntu, as 
long as all I needed was 64-bit mode.

[2] Cross dev have 4 stages: (0) bin-utils, (1) gcc, (C only) (2) 
linux-headers, (3) libc, and (4) gcc (C/C++) and two "extra" targets 
(ex-gcc) gcc (all languages) and (ex-gdb) gdb.  You'll only need the first 
two to compile the kernel, since it provides it's own headers, can't link 
to any library (including libc), and isn't written in any language other 
than C.
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Bo Andresen
On Friday 24 February 2006 01:56, Boyd Stephen Smith Jr. wrote:
> So, why don't you give it a go with:
> make ARCH=x86_64 CC="gcc -m64" menuconfig
> make ARCH=x86_64 CC="gcc -m64"
> make ARCH=x86_64 CC="gcc -m64" modules_install
> make ARCH=x86_64 CC="gcc -m64" install
>
> and let me know how it goes.

linux # make ARCH=x86_64 CC="gcc -m64" clean
  CLEAN   .tmp_versions

# make ARCH=x86_64 CC="gcc -m64" menuconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/mconf
  HOSTCC  scripts/lxdialog/checklist.o
  HOSTCC  scripts/lxdialog/inputbox.o
  HOSTCC  scripts/lxdialog/lxdialog.o
  HOSTCC  scripts/lxdialog/menubox.o
  HOSTCC  scripts/lxdialog/msgbox.o
  HOSTCC  scripts/lxdialog/textbox.o
  HOSTCC  scripts/lxdialog/util.o
  HOSTCC  scripts/lxdialog/yesno.o
  HOSTLD  scripts/lxdialog/lxdialog
scripts/kconfig/mconf arch/x86_64/Kconfig
#
# using defaults found in .config
#


*** End of Linux kernel configuration.
*** Execute 'make' to build the kernel or try 'make help'.

via linux # make ARCH=x86_64 CC="gcc -m64"
  CHK include/linux/version.h
  UPD include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC  arch/x86_64/kernel/asm-offsets.s
cc1: error: code model `kernel' not supported in the 32 bit mode
cc1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

# gcc --version
gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, 
pie-8.7.7.1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Boyd Stephen Smith Jr.
On Thursday 23 February 2006 18:32, "Boyd Stephen Smith Jr." 
<[EMAIL PROTECTED]> wrote about 'Re: [gentoo-user] chroot: cannot run 
command `bin/bash': Exec format error':
> Try:
> make ARCH=x86_64 CFLAGS=-m64

Nah, don't.  It won't help, the kernel's Makefile doesn't pay attention to 
CFLAGS, it sets up it's own based on your .config.

While I didn't get the same error as you, I see definite "I'm trying to 
compile 64-bit assembly into 32-bit binaries"-style errors when compiling 
with:
make ARCH=x86_64 CROSS_COMPILE=i686-pc-linux-gnu-
make ARCH=x86_64 CROSS_COMPILE=i686-pc-linux-gnu- CFLAGS="-m32"
make ARCH=x86_64 CROSS_COMPILE=i686-pc-linux-gnu- CFLAGS="-m64"
and
make ARCH=x86_64 CROSS_COMPILE=i686-pc-linux-gnu- CC="gcc -m32"

However, I /was/ able to convince the kernel to build with
make ARCH=x86_64 CROSS_COMPILE=i686-pc-linux-gnu- CC="gcc -m64"
although I didn't see if that would boot.

So, why don't you give it a go with:
make ARCH=x86_64 CC="gcc -m64" menuconfig
make ARCH=x86_64 CC="gcc -m64"
make ARCH=x86_64 CC="gcc -m64" modules_install
make ARCH=x86_64 CC="gcc -m64" install

and let me know how it goes.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Boyd Stephen Smith Jr.
On Thursday 23 February 2006 18:16, Bo Andresen <[EMAIL PROTECTED]> 
wrote about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error':
> On Friday 24 February 2006 01:12, Bo Andresen wrote:
> > On Friday 24 February 2006 00:52, Boyd Stephen Smith Jr. wrote:
> > > When you 'make ARCH=x86_64 menuconfig', can you find the IA32
> > > configuration options?
> >
> > Indeed I can. Thanks. :)
>
> Unfortunately, however, it doesn't compile.. :(
>
> # make ARCH=x86_64
>   CHK include/linux/version.h
>   SPLIT   include/linux/autoconf.h -> include/config/*
>   CC  arch/x86_64/kernel/asm-offsets.s
> cc1: error: code model `kernel' not supported in the 32 bit mode
> make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2
>
> Going to bed now. Will look at it tomorrow.

Oy, oy, oy.  No wonder my friends would rather fsck with the amd64 live cd 
(that panics on boot unless the BIOS settings are /really/ special) than 
start off in 32-bit land.

Anyway, I think what you probably need to do is append -m64 to your CFLAGS.

Try:
make ARCH=x86_64 CFLAGS=-m64
I'll go fiddle a bit, too.  I'm already running a 64-bit userland, but I 
have an i686 "cross"-compiler installed, maybe I can iron out think kinks 
in the process for ya.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Bo Andresen
On Friday 24 February 2006 01:12, Bo Andresen wrote:
> On Friday 24 February 2006 00:52, Boyd Stephen Smith Jr. wrote:
> > So, it's starting from your i686 config, and trying to use it to assign
> > as many symbols as possible to the new x86_64 kernel.  Some of the
> > symbols just won't exist.
> >
> > When you 'make ARCH=x86_64 menuconfig', can you find the IA32
> > configuration options?
>
> Indeed I can. Thanks. :)

Unfortunately, however, it doesn't compile.. :(

# make ARCH=x86_64
  CHK include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC  arch/x86_64/kernel/asm-offsets.s
cc1: error: code model `kernel' not supported in the 32 bit mode
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

Going to bed now. Will look at it tomorrow.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Bo Andresen
On Friday 24 February 2006 00:52, Boyd Stephen Smith Jr. wrote:
> So, it's starting from your i686 config, and trying to use it to assign as
> many symbols as possible to the new x86_64 kernel.  Some of the symbols
> just won't exist.
>
> When you 'make ARCH=x86_64 menuconfig', can you find the IA32 configuration
> options?

Indeed I can. Thanks. :)

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Boyd Stephen Smith Jr.
On Thursday 23 February 2006 17:25, Bo Andresen <[EMAIL PROTECTED]> 
wrote about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error':
> On Thursday 23 February 2006 23:33, Boyd Stephen Smith Jr. wrote:
> > On Thursday 23 February 2006 15:56, Bo Andresen
> > <[EMAIL PROTECTED]>
> >
> > > > A 64-bit kernel will run 32-bit binaries fine... Um, there may be
> > > > a needed kernel option though...
> >
> > I think these are relevant:
> > $ zgrep -i ia32 /proc/config.gz
> > CONFIG_IA32_EMULATION=y
> > CONFIG_IA32_AOUT=y
>
> I cannot find those options.

[See below]

> ~ # uname -m
> i686

So, that's definitely not a 64-bit kernel.

> > So, you may want to configure, make, and install your kernel like:
> > make ARCH=x86_64 menuconfig
> > make ARCH=x86_64
> > make ARCH=x86_64 install
> >
> > (You don't need a CROSS_COMPILE prefix since gcc should work fine.)
>
> Should I ignore all these warnings?

I think yes.  The first 2 dozen or so are definitely x86 specific and not 
applicable to x86_64.  I'm going to bet the others are too.  Notice this 
line:

> # using defaults found in .config

So, it's starting from your i686 config, and trying to use it to assign as 
many symbols as possible to the new x86_64 kernel.  Some of the symbols 
just won't exist.

When you 'make ARCH=x86_64 menuconfig', can you find the IA32 configuration 
options?

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Bo Andresen
On Thursday 23 February 2006 23:33, Boyd Stephen Smith Jr. wrote:
> On Thursday 23 February 2006 15:56, Bo Andresen <[EMAIL PROTECTED]>
> > > A 64-bit kernel will run 32-bit binaries fine... Um, there may be a
> > > needed kernel option though... CONFIG_IA32_EMUL? Anyone?
> >
> > I cannot seem to find any such kernel config option.
>
> I think these are relevant:
> $ zgrep -i ia32 /proc/config.gz
> CONFIG_IA32_EMULATION=y
> CONFIG_IA32_AOUT=y

I cannot find those options.

~ # zcat /proc/config.gz | grep -i '32\|k8'
CONFIG_X86_32=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_MK8=y
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_PCNET32 is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m

I notice CONFIG_X86_32=y but cannot figure out where to change that in make 
menuconfig. Typing /X86_32 just gives this as a search result:

Symbol: X86_32 [=y]

> > Is there a way to verify that I really
> > am running a 64 kernel?
>
> I believe this tells you:
> $ uname -m
> x86_64

~ # uname -m
i686

> So, you may want to configure, make, and install your kernel like:
> make ARCH=x86_64 menuconfig
> make ARCH=x86_64
> make ARCH=x86_64 install
>
> (You don't need a CROSS_COMPILE prefix since gcc should work fine.)

Should I ignore all these warnings?

# make ARCH=x86_64 menuconfig
scripts/kconfig/mconf arch/x86_64/Kconfig
#
# using defaults found in .config
#
.config:90:warning: trying to assign nonexistent symbol X86_ELAN
.config:91:warning: trying to assign nonexistent symbol X86_VOYAGER
.config:93:warning: trying to assign nonexistent symbol X86_SUMMIT
.config:94:warning: trying to assign nonexistent symbol X86_BIGSMP
.config:96:warning: trying to assign nonexistent symbol X86_GENERICARCH
.config:97:warning: trying to assign nonexistent symbol X86_ES7000
.config:98:warning: trying to assign nonexistent symbol M386
.config:99:warning: trying to assign nonexistent symbol M486
.config:100:warning: trying to assign nonexistent symbol M586
.config:101:warning: trying to assign nonexistent symbol M586TSC
.config:102:warning: trying to assign nonexistent symbol M586MMX
.config:103:warning: trying to assign nonexistent symbol M686
.config:104:warning: trying to assign nonexistent symbol MPENTIUMII
.config:105:warning: trying to assign nonexistent symbol MPENTIUMIII
.config:106:warning: trying to assign nonexistent symbol MPENTIUMM
.config:107:warning: trying to assign nonexistent symbol MPENTIUM4
.config:108:warning: trying to assign nonexistent symbol MK6
.config:109:warning: trying to assign nonexistent symbol MK7
.config:111:warning: trying to assign nonexistent symbol MCRUSOE
.config:112:warning: trying to assign nonexistent symbol MEFFICEON
.config:113:warning: trying to assign nonexistent symbol MWINCHIPC6
.config:114:warning: trying to assign nonexistent symbol MWINCHIP2
.config:115:warning: trying to assign nonexistent symbol MWINCHIP3D
.config:116:warning: trying to assign nonexistent symbol MGEODEGX1
.config:117:warning: trying to assign nonexistent symbol MCYRIXIII
.config:118:warning: trying to assign nonexistent symbol MVIAC3_2
.config:119:warning: trying to assign nonexistent symbol X86_GENERIC
.config:121:warning: trying to assign nonexistent symbol X86_XADD
.config:125:warning: trying to assign nonexistent symbol X86_WP_WORKS_OK
.config:126:warning: trying to assign nonexistent symbol X86_INVLPG
.config:127:warning: trying to assign nonexistent symbol X86_BSWAP
.config:128:warning: trying to assign nonexistent symbol X86_POPAD_OK
.config:129:warning: trying to assign nonexistent symbol X86_CMPXCHG64
.config:131:warning: trying to assign nonexistent symbol X86_INTEL_USERCOPY
.config:132:warning: trying to assign nonexistent symbol X86_USE_PPRO_CHECKSUM
.config:140:warning: trying to assign nonexistent symbol X86_UP_APIC
.config:141:warning: trying to assign nonexistent symbol X86_UP_IOAPIC
.config:145:warning: trying to assign nonexistent symbol X86_MCE_NONFATAL
.config:146:warning: trying to assign nonexistent symbol X86_MCE_P4THERMAL
.config:147:warning: trying to assign nonexistent symbol TOSHIBA
.config:148:warning: trying to assign nonexistent symbol I8K
.config:149:warning: trying to assign nonexistent symbol X86_REBOOTFIXUPS
.config:160:warning: trying to assign nonexistent symbol NOHIGHMEM
.config:161:warning: trying to assign nonexistent symbol HIGHMEM4G
.config:174:warning: trying to assign nonexistent symbol REGPARM
.config:220:warning: trying to assign nonexistent symbol APM
.config:231:warning: trying to assign nonexistent symbol PCI_GOBIOS
.config:232:warning: trying to assign nonexistent symbol PCI_GOMMCONFIG
.config:233:warning: trying to assign nonexistent symbol PCI_GODIRECT
.config:234:warning: trying to assign nonexistent symbol PCI_GOANY
.config:1405:warning: trying to assign nonexistent symbol X86_FIND_SMP_CONFIG
.config:1406:warning: trying to assign nonexistent symbol X86_MPPARSE

Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Boyd Stephen Smith Jr.
On Thursday 23 February 2006 15:56, Bo Andresen <[EMAIL PROTECTED]> 
wrote about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error':
> > > Will a 64 bit kernel be able to run a 32 bit bash?
> >
> > A 64-bit kernel will run 32-bit binaries fine... Um, there may be a
> > needed kernel option though... CONFIG_IA32_EMUL? Anyone?
>
> I cannot seem to find any such kernel config option.

I think these are relevant:
$ zgrep -i ia32 /proc/config.gz
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y

> > > In order to get a 64
> > > bit kernel a have to set CFLAGS=-march=k8
> >
> > Your CFLAGS in make.conf don't affect your kernel, normally.
>
> Didn't really think so either. It's just that I still get  the Exec
> format error when I try to chroot. Is there a way to very that I really
> am running a 64 kernel?

I believe this tells you:
$ uname -m
x86_64

> > > and set the processor type to
> > > K8 in the kernel configuration, right?
> >
> > Just setting the proper processor type should build your kernel as
> > 64-bit.
>
> Did do that.

The only thing I can't think of at this point is something from the gentoo 
cross compile howto from vapier that may or may not apply:

"If you want to cross compile a kernel, do this:
 make ARCH=hppa CROSS_COMPILE=hppa2.0-unknown-linux-gnu-"

So, you may want to configure, make, and install your kernel like:
make ARCH=x86_64 menuconfig
make ARCH=x86_64
make ARCH=x86_64 install

(You don't need a CROSS_COMPILE prefix since gcc should work fine.)

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Bo Andresen
On Thursday 23 February 2006 22:40, Boyd Stephen Smith Jr. wrote:
> On Thursday 23 February 2006 15:31, Bo Andresen <[EMAIL PROTECTED]>
> wrote about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec
>
> format error':
> > On Thursday 23 February 2006 00:42, Boyd Stephen Smith Jr. wrote:
> > > > livecd gentoo # chroot /mnt/gentoo bin/bash
> > > > chroot: cannot run command `bin/bash': Exec format error
[SNIP]
> > Will a 64 bit kernel be able to run a 32 bit bash?
>
> A 64-bit kernel will run 32-bit binaries fine... Um, there may be a needed
> kernel option though... CONFIG_IA32_EMUL? Anyone?

I cannot seem to find any such kernel config option.

> > In order to get a 64
> > bit kernel a have to set CFLAGS=-march=k8
>
> Your CFLAGS in make.conf don't affect your kernel, normally.

Didn't really think so either. It's just that I still get  the Exec format 
error when I try to chroot. Is there a way to very that I really am running a 
64 kernel?

> I don't use 
> genkernel maybe it does some crazy magic like that.

I don't either.

> > and set the processor type to
> > K8 in the kernel configuration, right?
>
> Just setting the proper processor type should build your kernel as 64-bit.

Did do that.

Thanks for your replies..

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Boyd Stephen Smith Jr.
On Thursday 23 February 2006 15:31, Bo Andresen <[EMAIL PROTECTED]> 
wrote about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error':
> On Thursday 23 February 2006 00:42, Boyd Stephen Smith Jr. wrote:
> > > livecd gentoo # chroot /mnt/gentoo bin/bash
> > > chroot: cannot run command `bin/bash': Exec format error
> >
> > Your 32-but kernel can't run the 64-bit bash.  You'll have to use a
> > 64-bit kernel (or as 32-bit stage3, and then gradually recompile)
>
> Will a 64 bit kernel be able to run a 32 bit bash?

A 64-bit kernel will run 32-bit binaries fine... Um, there may be a needed 
kernel option though... CONFIG_IA32_EMUL? Anyone?

> In order to get a 64 
> bit kernel a have to set CFLAGS=-march=k8

Your CFLAGS in make.conf don't affect your kernel, normally.  I don't use 
genkernel maybe it does some crazy magic like that.

> and set the processor type to 
> K8 in the kernel configuration, right?

Just setting the proper processor type should build your kernel as 64-bit.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-23 Thread Bo Andresen
On Thursday 23 February 2006 00:42, Boyd Stephen Smith Jr. wrote:
> > livecd gentoo # chroot /mnt/gentoo bin/bash
> > chroot: cannot run command `bin/bash': Exec format error
>
> Your 32-but kernel can't run the 64-bit bash.  You'll have to use a 64-bit
> kernel (or as 32-bit stage3, and then gradually recompile)

Will a 64 bit kernel be able to run a 32 bit bash? In order to get a 64 bit 
kernel a have to set CFLAGS=-march=k8 and set the processor type to K8 in the 
kernel configuration, right?

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-22 Thread Bo Andresen
On Thursday 23 February 2006 00:42, Boyd Stephen Smith Jr. wrote:
> Your 32-but kernel can't run the 64-bit bash.  You'll have to use a 64-bit
> kernel (or as 32-bit stage3, and then gradually recompile)

Thanks for explaining that.

> If you have a little bit of free space, do a 32-bit install to a separate
> LV.  No need to really do a full install, just enough so you can compile a
> 64-bit kernel and install and configure your bootloader to load the 64-bit
> kernel.
>
> That should be as easy as lvcreate, format, mount, extract 32-bit stage3,
> cp over /etc/resolv.conf, chroot, emerge -sources,
> cd /usr/src/, zcat /proc/config.gz > .config, make oldconfig,
> make, emerge grub, mount /boot, grub-install, make install, umount boot,
> shutdown -r now.

Is that all it takes? I'll definitely try that then. Thanks again.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-22 Thread Boyd Stephen Smith Jr.
On Wednesday 22 February 2006 17:03, Bo Andresen <[EMAIL PROTECTED]> 
wrote about '[gentoo-user] chroot: cannot run command `bin/bash': Exec 
format error':
> I have just purchased a new computer with a AMD Semphron 2800+ 64 bit
> processor. I am installing it following the gentoo handbook of the amd64
> architecture - only I am using the x86 minimal livecd (2005-r1) and the
> stage3-amd64-2005.1-r1.tar.bz2 tarball. Shouldn that be a problem?

Definitely a problem.

> livecd gentoo # chroot /mnt/gentoo bin/bash
> chroot: cannot run command `bin/bash': Exec format error

Your 32-but kernel can't run the 64-bit bash.  You'll have to use a 64-bit 
kernel (or as 32-bit stage3, and then gradually recompile)

> I did use LVM2 for partitioning but other than that I have followed the
> handbook very throughly. I hope someone has a solution.  Please feel
> free to ask for any information that may be helpful.

If you have a little bit of free space, do a 32-bit install to a separate 
LV.  No need to really do a full install, just enough so you can compile a 
64-bit kernel and install and configure your bootloader to load the 64-bit 
kernel.

That should be as easy as lvcreate, format, mount, extract 32-bit stage3, 
cp over /etc/resolv.conf, chroot, emerge -sources, 
cd /usr/src/, zcat /proc/config.gz > .config, make oldconfig, 
make, emerge grub, mount /boot, grub-install, make install, umount boot, 
shutdown -r now.

(Maybe a few steps I'm missing, and I don't mess with (e)lilo.)

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-22 Thread Boris Fersing
2006/2/23, Bo Andresen <[EMAIL PROTECTED]>:
> Hi
>
Hi,

> I have just purchased a new computer with a AMD Semphron 2800+ 64 bit
> processor. I am installing it following the gentoo handbook of the amd64
> architecture - only I am using the x86 minimal livecd (2005-r1) and the
> stage3-amd64-2005.1-r1.tar.bz2 tarball. Shouldn that be a problem?
>
> When I get to step 6a (chrooting)
> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=6#doc_chap1
> I get the following error:
>
> livecd gentoo # chroot /mnt/gentoo bin/bash
> chroot: cannot run command `bin/bash': Exec format error

You'll have to boot on a 64bits liveCD if you want to chroot into a
64bits environment.

Regards,

Boris.
> --
> Bo Andresen
> --
> gentoo-user@gentoo.org mailing list
>
>
>


--
Quiconque me parle de Dieu en veut à ma bourse ou à ma liberté.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-22 Thread John Jolet



On 2/22/06 5:03 PM, "Bo Andresen" <[EMAIL PROTECTED]> wrote:

> Hi
> 
> I have just purchased a new computer with a AMD Semphron 2800+ 64 bit
> processor. I am installing it following the gentoo handbook of the amd64
> architecture - only I am using the x86 minimal livecd (2005-r1) and the
> stage3-amd64-2005.1-r1.tar.bz2 tarball. Shouldn that be a problem?
> 
> When I get to step 6a (chrooting)
> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=6#doc_cha
> p1 
> I get the following error:
> 
> livecd gentoo # chroot /mnt/gentoo bin/bash
> chroot: cannot run command `bin/bash': Exec format error
I've seen that when chrooting into 64-bit environment from a 32-bit kernel.
You cannot boot from the x86 minimal and use an amd64 stage file.  You need
the amd64 boot cd.
> 
> I did use LVM2 for partitioning but other than that I have followed the
> handbook very throughly. I hope someone has a solution.  Please feel free to
> ask for any information that may be helpful.


-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] chroot: cannot run command `bin/bash': Exec format error

2006-02-22 Thread Bo Andresen
Hi

I have just purchased a new computer with a AMD Semphron 2800+ 64 bit 
processor. I am installing it following the gentoo handbook of the amd64 
architecture - only I am using the x86 minimal livecd (2005-r1) and the 
stage3-amd64-2005.1-r1.tar.bz2 tarball. Shouldn that be a problem?

When I get to step 6a (chrooting) 
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=6#doc_chap1
 
I get the following error:

livecd gentoo # chroot /mnt/gentoo bin/bash
chroot: cannot run command `bin/bash': Exec format error

I did use LVM2 for partitioning but other than that I have followed the 
handbook very throughly. I hope someone has a solution.  Please feel free to 
ask for any information that may be helpful.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list