Linux initrd environment setup - Failed to execute /init
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm looking for help in getting a basic initrd environment up and running. My goal is to enhance my knowledge on how to create a basic Linux environment. Ideally, I would like to move into Embedded Linux systems later on and this seems the best starting point.
I've yet to find a good basic how-to on this subject, as such I've mostly ended up following a number of half finished or incomplete tutorials on the subject.
Below are links to the how-to's for your reference on what I've done so far.
- http://web.archive.org/web/20120601223451/http://blog.nasirabed.com/2012/01/minimal-linux-filesystem.html
- http://revcode.wordpress.com/2012/02/25/booting-a-minimal-busybox-based-linux-distro/
At the moment, when I boot the environment I get a GRUB prompt, I've tried adding a grub.cfg file to it, but it just gets ignored when the system boots and goes straight to the grub prompt.
To boot the initrd environment presently, I have to provide it with the following commands:
set root=(hd0,msdos1)
linux /boot/bzImage
initrd /boot/rootfs.cpio.gz
boot
This boots the mini OS, but gives an error about not being able to locate an init file (which is part of my rootfs.cpio.gz file in the root of its structure)
.
How I can go about fixing the problems with this initrd environment?
linux initrd
add a comment |Â
up vote
2
down vote
favorite
I'm looking for help in getting a basic initrd environment up and running. My goal is to enhance my knowledge on how to create a basic Linux environment. Ideally, I would like to move into Embedded Linux systems later on and this seems the best starting point.
I've yet to find a good basic how-to on this subject, as such I've mostly ended up following a number of half finished or incomplete tutorials on the subject.
Below are links to the how-to's for your reference on what I've done so far.
- http://web.archive.org/web/20120601223451/http://blog.nasirabed.com/2012/01/minimal-linux-filesystem.html
- http://revcode.wordpress.com/2012/02/25/booting-a-minimal-busybox-based-linux-distro/
At the moment, when I boot the environment I get a GRUB prompt, I've tried adding a grub.cfg file to it, but it just gets ignored when the system boots and goes straight to the grub prompt.
To boot the initrd environment presently, I have to provide it with the following commands:
set root=(hd0,msdos1)
linux /boot/bzImage
initrd /boot/rootfs.cpio.gz
boot
This boots the mini OS, but gives an error about not being able to locate an init file (which is part of my rootfs.cpio.gz file in the root of its structure)
.
How I can go about fixing the problems with this initrd environment?
linux initrd
Been forever since I did one ('00-'01) but a LFS system will walk you through creating and setting up your own init system - linuxfromscratch.org/lfs
â ivanivan
Sep 8 at 14:35
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm looking for help in getting a basic initrd environment up and running. My goal is to enhance my knowledge on how to create a basic Linux environment. Ideally, I would like to move into Embedded Linux systems later on and this seems the best starting point.
I've yet to find a good basic how-to on this subject, as such I've mostly ended up following a number of half finished or incomplete tutorials on the subject.
Below are links to the how-to's for your reference on what I've done so far.
- http://web.archive.org/web/20120601223451/http://blog.nasirabed.com/2012/01/minimal-linux-filesystem.html
- http://revcode.wordpress.com/2012/02/25/booting-a-minimal-busybox-based-linux-distro/
At the moment, when I boot the environment I get a GRUB prompt, I've tried adding a grub.cfg file to it, but it just gets ignored when the system boots and goes straight to the grub prompt.
To boot the initrd environment presently, I have to provide it with the following commands:
set root=(hd0,msdos1)
linux /boot/bzImage
initrd /boot/rootfs.cpio.gz
boot
This boots the mini OS, but gives an error about not being able to locate an init file (which is part of my rootfs.cpio.gz file in the root of its structure)
.
How I can go about fixing the problems with this initrd environment?
linux initrd
I'm looking for help in getting a basic initrd environment up and running. My goal is to enhance my knowledge on how to create a basic Linux environment. Ideally, I would like to move into Embedded Linux systems later on and this seems the best starting point.
I've yet to find a good basic how-to on this subject, as such I've mostly ended up following a number of half finished or incomplete tutorials on the subject.
Below are links to the how-to's for your reference on what I've done so far.
- http://web.archive.org/web/20120601223451/http://blog.nasirabed.com/2012/01/minimal-linux-filesystem.html
- http://revcode.wordpress.com/2012/02/25/booting-a-minimal-busybox-based-linux-distro/
At the moment, when I boot the environment I get a GRUB prompt, I've tried adding a grub.cfg file to it, but it just gets ignored when the system boots and goes straight to the grub prompt.
To boot the initrd environment presently, I have to provide it with the following commands:
set root=(hd0,msdos1)
linux /boot/bzImage
initrd /boot/rootfs.cpio.gz
boot
This boots the mini OS, but gives an error about not being able to locate an init file (which is part of my rootfs.cpio.gz file in the root of its structure)
.
How I can go about fixing the problems with this initrd environment?
linux initrd
linux initrd
edited Sep 8 at 12:47
Jeff Schaller
33.1k849111
33.1k849111
asked Jan 2 '15 at 15:44
Kristiaan
133
133
Been forever since I did one ('00-'01) but a LFS system will walk you through creating and setting up your own init system - linuxfromscratch.org/lfs
â ivanivan
Sep 8 at 14:35
add a comment |Â
Been forever since I did one ('00-'01) but a LFS system will walk you through creating and setting up your own init system - linuxfromscratch.org/lfs
â ivanivan
Sep 8 at 14:35
Been forever since I did one ('00-'01) but a LFS system will walk you through creating and setting up your own init system - linuxfromscratch.org/lfs
â ivanivan
Sep 8 at 14:35
Been forever since I did one ('00-'01) but a LFS system will walk you through creating and setting up your own init system - linuxfromscratch.org/lfs
â ivanivan
Sep 8 at 14:35
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
When linux kernel boots into the initramfs filsystem, it doesn't run /sbin/init
, but /init
. The solution is to symlink the /sbin/init to /init.
UPDATE:
I tried to recreate your problems and I discovered that you probably compiled 64-bit busybox and 32-bit linux kernel. Therefore, the linux kernel doesn't know how to execute the /init
program because it's 64-bit. Recompile linux with 64 bit option enabled and replace the old version with it. Also, you'll need to symlink the /init to /sbin/init as I told you before
And technically this is specific to initramfs. The older, pure "initrd" system runs/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)
â sourcejedi
Apr 14 '16 at 19:08
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
When linux kernel boots into the initramfs filsystem, it doesn't run /sbin/init
, but /init
. The solution is to symlink the /sbin/init to /init.
UPDATE:
I tried to recreate your problems and I discovered that you probably compiled 64-bit busybox and 32-bit linux kernel. Therefore, the linux kernel doesn't know how to execute the /init
program because it's 64-bit. Recompile linux with 64 bit option enabled and replace the old version with it. Also, you'll need to symlink the /init to /sbin/init as I told you before
And technically this is specific to initramfs. The older, pure "initrd" system runs/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)
â sourcejedi
Apr 14 '16 at 19:08
add a comment |Â
up vote
2
down vote
accepted
When linux kernel boots into the initramfs filsystem, it doesn't run /sbin/init
, but /init
. The solution is to symlink the /sbin/init to /init.
UPDATE:
I tried to recreate your problems and I discovered that you probably compiled 64-bit busybox and 32-bit linux kernel. Therefore, the linux kernel doesn't know how to execute the /init
program because it's 64-bit. Recompile linux with 64 bit option enabled and replace the old version with it. Also, you'll need to symlink the /init to /sbin/init as I told you before
And technically this is specific to initramfs. The older, pure "initrd" system runs/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)
â sourcejedi
Apr 14 '16 at 19:08
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
When linux kernel boots into the initramfs filsystem, it doesn't run /sbin/init
, but /init
. The solution is to symlink the /sbin/init to /init.
UPDATE:
I tried to recreate your problems and I discovered that you probably compiled 64-bit busybox and 32-bit linux kernel. Therefore, the linux kernel doesn't know how to execute the /init
program because it's 64-bit. Recompile linux with 64 bit option enabled and replace the old version with it. Also, you'll need to symlink the /init to /sbin/init as I told you before
When linux kernel boots into the initramfs filsystem, it doesn't run /sbin/init
, but /init
. The solution is to symlink the /sbin/init to /init.
UPDATE:
I tried to recreate your problems and I discovered that you probably compiled 64-bit busybox and 32-bit linux kernel. Therefore, the linux kernel doesn't know how to execute the /init
program because it's 64-bit. Recompile linux with 64 bit option enabled and replace the old version with it. Also, you'll need to symlink the /init to /sbin/init as I told you before
edited Apr 16 '16 at 9:17
answered Apr 14 '16 at 16:52
kristjank
73117
73117
And technically this is specific to initramfs. The older, pure "initrd" system runs/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)
â sourcejedi
Apr 14 '16 at 19:08
add a comment |Â
And technically this is specific to initramfs. The older, pure "initrd" system runs/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)
â sourcejedi
Apr 14 '16 at 19:08
And technically this is specific to initramfs. The older, pure "initrd" system runs
/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)â sourcejedi
Apr 14 '16 at 19:08
And technically this is specific to initramfs. The older, pure "initrd" system runs
/linuxrc
. Which shows how old I am, your answer sounded wrong to me :)â sourcejedi
Apr 14 '16 at 19:08
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f177064%2flinux-initrd-environment-setup-failed-to-execute-init%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Been forever since I did one ('00-'01) but a LFS system will walk you through creating and setting up your own init system - linuxfromscratch.org/lfs
â ivanivan
Sep 8 at 14:35