I added init=/bin/bash
in grub.conf file, so my linux system is always entering bash when booted.
Is there a way to change the grub.conf file so that I can boot Linux again.
Asked
Active
Viewed 1,546 times
-1

user3840170
- 26,597
- 4
- 30
- 62

Barinder Grewal
- 49
- 1
- 1
- 6
3 Answers
0
TLDR; e
, remove init=
. ctrl+x
One of the options is to temporary change grub entry to fix booting problem, edit grub.conf and update-grub.
- Keep
shift
pressed during boot (if you don't see grub menu) - Press
e
to edit menu item - Edit to remove
init=...
phrase - Press
ctrl+x
to boot - Now you can edit
grub.conf
- Run
update-grub
- reboot

lovelinux
- 29
- 5
-1
After making changes to grub file run :
sudo update-grub
This will update your grub

Akhil Thayyil
- 9,263
- 6
- 34
- 48
-
How do I open grub.conf from bash ? – Barinder Grewal Nov 04 '15 at 09:15
-1
TLDR; mount -o remount,rw /dev/sda
It's possible that after booting with init=/bin/bash
your filesystem is in readonly state. That means you cannot modify any config files.
Try to remount it as read-write
(my disk is at /dev/sda
). If you don't know the name, use lsblk
mount -o remount,rw /dev/sda
update-grub
will not work if /boot
is not mounted
mount /boot
Now you can edit grub.conf
and run update-grub

lovelinux
- 29
- 5