1

I have a problem with a Linux system that won't boot. The bootloader happily loads the kernel and initrd, but then the initrd script whines and complains and moans that it can't find the root device.

How to I force the initrd script to give me a shell prompt so I can actually investigate what's going on?

I tried unpacking initrd and making the /init shell script launch bash -i. But that didn't work at all; I see the Bash prompt appear, but the keyboard doesn't work. (Bash complains something about "cannot set progress group" and "inappropriate ioctl for device".)

In case it matters: OpenSUSE 13.1, which uses the old mkinitrd system. (Apparently newer versions use Dracut.) From what I can tell, /init is a small script that executes everything in /boot (a series of numbered Bash scripts).

  • There's a script named /boot/91-shell.sh, which contains a comment which suggests that passing shell=1 on the kernel command line will give me a shell prompt; it does not.

  • There's also a comment in /boot-02-start.sh which claims that passing linuxrc=trace will give me debug output. It does, but it's useless; all I see is the endless device polling loop at the end of the script scrolling past, obliterating all previous output.

I really, really need to get in there and see what's actually happening with my own eyes to know where the problem is. (To be fair, I am trying to make the system boot in a slightly strange way, so problems are not unexpected here.)

  • 1
    I am not an OpenSUSE user but if I get a problem like this I will to add init=/bin/bash (or /usr/bin/bash) to my kernel parameters from the bootloader. It should open a bash shell with a root access – Hamza Abbad Mar 23 '16 at 16:16
  • @HamzaAbbad That's a great suggestion. Unfortunately, I get exactly the same behavior (i.e., I can see the Bash prompt, but cannot type anything.) – MathematicalOrchid Mar 23 '16 at 16:19
  • @HamzaAbbad I take it back! If I try it on a different computer, it works perfectly. It's only the machine I actually need to use where it doesn't work. So maybe initrd is missing a keyboard driver or something? – MathematicalOrchid Mar 23 '16 at 16:30
  • Yes maybe the issue is with the keyboard driver. I am an Arch user, I don't know about how openSUSE booting work, but in Arch, one must put base as the first hook in the /etc/mkinitcpio.conf file, otherwise keyboard will not work in emergecy shell. – Hamza Abbad Mar 25 '16 at 18:02
0

This is an Apple-specific issue. If I boot just about any Linux system on the MacBook Air I have to play with, the keyboard refuses to function. On any PC-based system, this works perfectly. So nothing to do with Linux not starting the right init binary; it's some kind of hardware driver issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.