LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   kernel 3.10.0 won't run initrd (Slackware 14.0) (http://www.linuxquestions.org/questions/slackware-14/kernel-3-10-0-wont-run-initrd-slackware-14-0-a-4175468404/)

Ser Olmy 07-03-2013 09:36 PM

kernel 3.10.0 won't run initrd (Slackware 14.0)
 
I'm having a weird problem with kernel 3.10 and an initrd created by mkinitrd. When I boot the system, it hangs with the following error.
Code:

[    0.707227] failed to execute /init
can't run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.
Please press Enter to activate this console.
Please press Enter to activate this console.
Please press Enter to activate this console.

(Pressing Enter activates nothing, btw.)

After going through config options to see if I was missing something initrd-related (the .config was migrated from 3.9.9 with make oldconfig) and finding nothing obvious, on a whim I tried creating a symlink from /etc/init.d/rcS to /init inside the initrd. It worked.

Well, sorta; init does start and gets as far as the switch_root command at the bottom of the script, which spits out the help/usage page rather than actually switching the root FS. I added a debug statement to show the parameters, and they look fine.

The initrd was created by the following command:
Code:

mkinitrd -c -k 3.10.0 -f ext4 -r LABEL=root -m hv_vmbus:hv_storvsc:mbcache:crc16:ext4 -u -o /boot/initrd-3.10.0.gz
Yes, it's a VM running under Hyper-V. Don't ask. :)

Has anybody tried kernel 3.10 with an initrd? Any ideas why I'm seeing this odd behaviour?

volkerdi 07-04-2013 02:08 AM

You need to build your kernel with CONFIG_BINFMT_SCRIPT=y.

Ser Olmy 07-04-2013 09:59 AM

Thanks, that did the trick. I really should have spotted that option.

According to the help text, without this option the kernel won't run scripts directly. Unless, apparently, you create a symlink to the script, in which case it decides to run it anyway.


All times are GMT -5. The time now is 02:22 PM.