Grub and Kernel parameter init=/bin/bash

General support questions
sumncguy
Posts: 18
Joined: 2014/06/18 17:43:05

Re: Grun and Kernel parameter init=/bin/bash

Post by sumncguy » 2015/10/23 15:45:52

I just had a thought. In fact, I fire up a new VM this weekend. Do nothing to the server other than modify the kernel parameters and see what happens.

sumncguy
Posts: 18
Joined: 2014/06/18 17:43:05

Re: Grub and Kernel parameter init=/bin/bash

Post by sumncguy » 2015/10/26 17:49:20

From the http://centos.mirrors.wvstateu.edu/6.7/isos/x86_64/ mirror I downloaded
CentOS-6.7-x86_64-bin-DVD1.iso

I created a new VM with all defaults using VMWare Workstation.
I accepted all defaults when the OS was loading.
I allowed the OS to boot.
I opened a terminal window and entered "reboot"
I interrupted the boot loader.
When presented with the boot loader menu, I entere "a"
I then moved to the end of the Kernel boot line and added the parameter "init=/bin/bash" without quotes and hit enter.
I was brought to the prompt shown in the graphic.
The results are also shown in the graphic ...not mention of Ubuntu. \
Attachments
NewLoadSameSit.JPG
NewLoadSameSit.JPG (60.66 KiB) Viewed 3567 times

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Grub and Kernel parameter init=/bin/bash

Post by gerald_clark » 2015/10/26 18:56:45

/com/ubuntu/upstart

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Grub and Kernel parameter init=/bin/bash

Post by AlanBartlett » 2015/10/26 20:59:22

sumncguy wrote:From the http://centos.mirrors.wvstateu.edu/6.7/isos/x86_64/ mirror I downloaded
The results are also shown in the graphic ...not mention of Ubuntu.
Yes there is. Look at the image you have posted, line number eight (8) reads --

init: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Grub and Kernel parameter init=/bin/bash

Post by avij » 2015/10/26 21:47:30

You two are barking at the wrong tree. There really is an "init: Failed to connect to socket /com/ubuntu/upstart: Connection refused" message when CentOS 6 is booted with init=/bin/bash and init 3 is invoked. $DEITY knows why.

If normal reboot commands don't work, echo b > /proc/sysrq-trigger should do the trick.

sumncguy
Posts: 18
Joined: 2014/06/18 17:43:05

Re: Grub and Kernel parameter init=/bin/bash

Post by sumncguy » 2015/10/27 19:31:55

Geez finally .. thank you avij ...

sumncguy
Posts: 18
Joined: 2014/06/18 17:43:05

Re: Grub and Kernel parameter init=/bin/bash

Post by sumncguy » 2015/10/27 19:41:41

... and Im back to say that avij .. you, at least from my point of view, can hold the title of wizard. I have been trying to get this problem solved for maybe a week and everyone was basically saying I was crazy. Makes a new guy kind of doubt himself.

Can you explain in new guys system admin speak why there is a reference to Ubuntu and why none of the 5 "standard" methods of reboot/shutdown doesnt work ?

Thanks again for answering and solving my problem. .

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Grub and Kernel parameter init=/bin/bash

Post by gerald_clark » 2015/10/27 19:51:49

I suspect your VM doesn't to a proper BIOS emulation.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Grub and Kernel parameter init=/bin/bash

Post by avij » 2015/10/27 20:12:04

Upstart has its origins at Ubuntu/Canonical and some labels still contain the literal "ubuntu" in them, much like there are a few references to "rhel" in CentOS. Merely changing those labels would likely break something that depends on them named "ubuntu". So they're likely to stay as is.

When a system is booted normally, upstart's init is used as the init process. When you use something else as the init process, such as /bin/bash, upstart's init won't be used. However, the shutdown, reboot, init etc. commands that are installed rely on being able to tell upstart's init that it's now time to shutdown, reboot, change to some other runlevel etc. When they're unable to contact upstart's init, odd things may happen as you've seen.

Post Reply