public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Boyd Stephen Smith Jr." <bss03@volumehost.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec format error [SOLVED]
Date: Fri, 24 Feb 2006 15:07:56 -0600	[thread overview]
Message-ID: <200602241507.56050.bss03@volumehost.com> (raw)
In-Reply-To: <200602241356.14586.bo.andresen@gmail.com>

On Friday 24 February 2006 06:56, Bo Andresen <bo.andresen@gmail.com> 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.
bss03@volumehost.com
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list



      reply	other threads:[~2006-02-24 21:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22 23:03 [gentoo-user] chroot: cannot run command `bin/bash': Exec format error Bo Andresen
2006-02-22 23:14 ` John Jolet
2006-02-22 23:28   ` [gentoo-user] " Mick
2006-02-22 23:41     ` Bo Andresen
2006-02-22 23:18 ` [gentoo-user] " Boris Fersing
2006-02-22 23:42 ` Boyd Stephen Smith Jr.
2006-02-22 23:51   ` Bo Andresen
2006-02-23 21:31   ` Bo Andresen
2006-02-23 21:40     ` Boyd Stephen Smith Jr.
2006-02-23 21:56       ` Bo Andresen
2006-02-23 22:33         ` Boyd Stephen Smith Jr.
2006-02-23 23:25           ` Bo Andresen
2006-02-23 23:52             ` Boyd Stephen Smith Jr.
2006-02-24  0:12               ` Bo Andresen
2006-02-24  0:16                 ` Bo Andresen
2006-02-24  0:32                   ` Boyd Stephen Smith Jr.
2006-02-24  0:56                     ` Boyd Stephen Smith Jr.
2006-02-24  1:07                       ` Bo Andresen
2006-02-24  5:18                         ` Boyd Stephen Smith Jr.
2006-02-24 12:56                           ` [gentoo-user] chroot: cannot run command `bin/bash': Exec format error [SOLVED] Bo Andresen
2006-02-24 21:07                             ` Boyd Stephen Smith Jr. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200602241507.56050.bss03@volumehost.com \
    --to=bss03@volumehost.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox