View previous topic :: View next topic |
Author |
Message |
e3k Guru


Joined: 01 Oct 2007 Posts: 515 Location: Quantum Flux
|
Posted: Sun Oct 11, 2015 9:22 pm Post subject: kernel panic after adding init=/bin/bash to grub linux line |
|
|
i am using btrfs. the system boots normaly. when i was trying to reset the password once again via grub by adding 'rw init=/bin/bash' to the grub 'linux' line a kernel panic message was welcoming me (the one with the blinking caps lock on the keyboard)
Code: |
could not find /bin/bash
...
Kernel panic - not syncing: Attempted to kill init!
...
|
could please anyone try to reproduce? or if you know the answer please tell! _________________
Flux & Contemplation - Portrait of an Artist in Isolation
|
|
Back to top |
|
 |
quilosaq Veteran

Joined: 22 Dec 2009 Posts: 1562
|
Posted: Sun Oct 11, 2015 10:06 pm Post subject: |
|
|
Try instead use 'rw init=/bin/sh'. |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Mon Oct 12, 2015 4:42 am Post subject: |
|
|
Which password do you want to change?
Ususually a sysrescue-cd is the way to go for such tasks.
if it is just booting the box, as said earlier, /bin/sh
you can do a bit but not much if you have added busybox to your initrd before. but the busybox binary is very very limited. uses ash shell. |
|
Back to top |
|
 |
e3k Guru


Joined: 01 Oct 2007 Posts: 515 Location: Quantum Flux
|
Posted: Mon Oct 12, 2015 7:03 am Post subject: |
|
|
yes i tried /bin/sh too. that could not be found either.
when i was playing with rootfstype i have got into busybox. i could mount / but i could not find the passwd command.
i already did reset the password with a gentoo admin cd after chrooting. but usually when i want to reset the root password the grub way of doing it was working also with /bin/bash. _________________
Flux & Contemplation - Portrait of an Artist in Isolation
|
|
Back to top |
|
 |
quilosaq Veteran

Joined: 22 Dec 2009 Posts: 1562
|
Posted: Mon Oct 12, 2015 2:45 pm Post subject: |
|
|
If you get down into the busybox you must:
- remount root fs in rw mode
- edit /etc/shadow file and delete the hash field (second field) in the root entry
- reboot
- login as root (whitout password)
- change the password whit password command
|
|
Back to top |
|
 |
|