Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: Failed to execute init ... No init found
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
deadeyes
Tux's lil' helper
Tux's lil' helper


Joined: 25 May 2007
Posts: 83

PostPosted: Sun May 02, 2010 9:58 pm    Post subject: SOLVED: Failed to execute init ... No init found Reply with quote

Hi all,

I am trying to create a new installation of gentoo linux from a running system which I am currently running from.
As I cannot afford to have no usable desktop for a week (installing, emerging, configuring) I want to build a new gentoo from my existing environment.
I am currently running i486 but want to use amd64 for the new environment.

I heard that this is possible. However you need a amd64 bit kernel to be able to chroot into the new environment and compile the packages.

So this is what I did:
1: create new fs (LVM volume)
2: mount it
3: extract portage and stage3
4: rebooted with an amd64 minimal cd
5: compiled the kernel (in this way it will be for 64 bit; I copied the config from the existing environment and did make oldconfig; with another name in the Makefile; it complained about initramfs dir not found: copied the directory from the i486 environment)
6: copied the kernel to my existing /boot and copied the /lib/modules/kernel-version to my existing /lib/modules
7: Rebooted and tried using the new kernel

Now however what I try it seems not working. I always get :
Code:
Failed to execute init
No init found

This results in a kernel panic.

When I look in the initramfs directory I see there is a "init" file.
Also, when resetting the machine and using the old kernel again all works well.

Do note that I am using LVM. So my root partition is also LVM. This works great for my existing environment.

I am wondering if I need to recompile other stuff but from what I heard 32bit binaries can run under 64 bit kernel.

If anyone has suggestions/ideas/knows what I am doing wrong, please let me know. I will appreciate your help alot!

EDIT: I seem not to be able to see more of the kernel messages as they are going to fast. Is there any way to slow this down?


Last edited by deadeyes on Tue May 04, 2010 12:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
mr.sande
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2010
Posts: 82
Location: Norway

PostPosted: Sun May 02, 2010 11:06 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-6263943.html?sid=6f7a6a0285d475f12bb1779da842767e

Seems there can be some hiccups. Whould it be possible to chroot the new amd64 environment from the amd64 liveCD and do a 'emerge -e world'?
Back to top
View user's profile Send private message
deadeyes
Tux's lil' helper
Tux's lil' helper


Joined: 25 May 2007
Posts: 83

PostPosted: Mon May 03, 2010 6:38 am    Post subject: Reply with quote

mr.sande wrote:
https://forums.gentoo.org/viewtopic-p-6263943.html?sid=6f7a6a0285d475f12bb1779da842767e

Seems there can be some hiccups. Whould it be possible to chroot the new amd64 environment from the amd64 liveCD and do a 'emerge -e world'?


I used the x86_64 stage3 on the new environment. I want to use the i486 bit environment with an 64 bit kernel.
So I do not understand what emerge -e world would help in this case.
Back to top
View user's profile Send private message
mr.sande
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2010
Posts: 82
Location: Norway

PostPosted: Mon May 03, 2010 10:34 am    Post subject: Reply with quote

I misinterpreted what you meant, you stated that you wanted to build a new amd64 environment.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon May 03, 2010 4:28 pm    Post subject: Reply with quote

Sounds like you have a 64 bit kernel trying to find/run a 32 bit init.
Back to top
View user's profile Send private message
deadeyes
Tux's lil' helper
Tux's lil' helper


Joined: 25 May 2007
Posts: 83

PostPosted: Tue May 04, 2010 12:38 pm    Post subject: Reply with quote

mr.sande wrote:
I misinterpreted what you meant, you stated that you wanted to build a new amd64 environment.

Indeed :) but I wanted to build it from my current i486 binary environment.

DONAHUE wrote:
Sounds like you have a 64 bit kernel trying to find/run a 32 bit init.

Indeed :) well that was just what I wanted to do.
I builded a 64 bit kernel and wanted to run my i486 binaries with it so I can do a chroot and compile x86_64 at the same time :)
So indeed it should run the 32 bit init.

Information I had:
- 64 bit kernel
- working 32 bit initramfs
- 64 bit kernel could not execute /init or /bin/sh (which is 32bit)

Solution:
After some searching on the web it is clear that 32bit support should be enabled:
http://www.gentoo-wiki.info/HOWTO_AMD_64#Kernel_Support_for_32-bit_Applications

So these kernel settings should be enabled:
IA32 Emulation
IA32 a.out support

So search the kernel config for ia32.
Enable those.
Copy the new kernel to /boot and copy /lib/modules/kernel-* to the existing environment.
Reboot and change the grub entry to point to the new kernel.
Your existing initramfs should keep working.

What went wrong:
- When I compiled the 64bit kernel from a live cd I copied the config from my x86 to my new partition.
I did not enable ia32 support in the kernel

And it worked
:D
Back to top
View user's profile Send private message
mr.sande
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2010
Posts: 82
Location: Norway

PostPosted: Tue May 04, 2010 1:53 pm    Post subject: Reply with quote

Happy to see it work :) Maybe a good time to mark the topic [solved].
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Wed May 05, 2010 2:08 am    Post subject: Reply with quote

You definitely need IA32 emulation for running 32-bit ELF binaries. I doubt your system even has any a.out binaries.
Back to top
View user's profile Send private message
deadeyes
Tux's lil' helper
Tux's lil' helper


Joined: 25 May 2007
Posts: 83

PostPosted: Thu May 06, 2010 8:50 am    Post subject: Reply with quote

mr.sande wrote:
Happy to see it work :) Maybe a good time to mark the topic [solved].


That is why I put SOLVED in the beginning of the thread title.
However I wonder if there is a thread tool to mark it as solved. I can't find it but I might overlook it.

Indeed I also think I would not have a.out. However that was what is in the guide so I took it over.
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