Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-02-2010, 04:36 AM   #1
LQ Newbie
Registered: Nov 2010
Posts: 10

Rep: Reputation: 0
Running an executable from initramfs

I need to run an executable from initramfs which after executing should restart the system.How is it possible?.I tried using exec within the init of initramfs but it shows kernel panic(I guess exec after executing the binary it tries to exit and exiting with pid 1 is giving the panic)
Old 12-02-2010, 05:29 AM   #2
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Could you try to overwrite 'init' script by 'reboot' binary file? Hope it work.

Old 12-03-2010, 12:31 AM   #3
LQ Newbie
Registered: Nov 2010
Posts: 10

Original Poster
Rep: Reputation: 0

I tried overwriting the init with my own binary.In the binary I forked a child process which was used to run the reboot command (using execve) and I was succesful in rebooting.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Max executable size in initramfs miglietto Linux - Embedded & Single-board computer 0 01-12-2009 10:28 AM
Running cryptsetup in initramfs with blackbox segmentation fault 3rdtreenz Linux - Kernel 1 01-03-2009 04:11 AM
Running a Java executable class from another executable class LUB997 Programming 22 07-24-2005 05:57 AM
Running an executable. wesleyarchbell Linux - Software 4 05-03-2005 04:50 AM
running an executable wogga Linux - Software 8 06-12-2004 05:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration