LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-15-2016, 11:06 PM   #1
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,047

Rep: Reputation: 65
When do we need init=/bin/bash in kernel boot parameter?


When do we need init=/bin/bash in kernel boot parameter?
Code:
linux	/boot/vmlinuz-4.8.0 root=/dev/sda7 ro init=/bin/bash
Normally we don't see init=/bin/bash in grub.cfg.
 
Old 10-16-2016, 04:20 AM   #2
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

We append init=/bin/bash to the kernel parameters when we want it to boot to a root shell instead of a normal boot to init level 3 or 4. This is only done for thorough administrative tasks.

e.g. When you have lost your root password, or if you have lost your regular user password and you don't have root's password. In that case you boot into the root shell and use the passwd command.

https://wiki.archlinux.org/index.php/Kernel_parameters
https://wiki.archlinux.org/index.php..._root_password

So, generally it is a good idea to secure GRUB with a password so that no one gets access to the root shell by appending kernel parameters.

Last edited by aragorn2101; 10-16-2016 at 04:27 AM.
 
1 members found this post helpful.
  


Reply


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
shutting down after init=/bin/bash michapma Linux - General 5 10-28-2017 07:16 PM
/bin/bash as primary init replica9000 Linux - General 15 05-29-2015 12:32 AM
[SOLVED] New install- no root password! init=/bin/bash crashes! keithostertag Debian 4 02-20-2013 11:13 AM
What effect does the kernel parameter VGA=<MODE> have on an init 3 console ssenuta Linux - Hardware 3 07-29-2007 12:41 PM
kernel parameter is init=/bin/sh , how to start the second tty console? jiawj Slackware 2 04-22-2005 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:50 PM.

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