0

I edited my /home/pi/.bashrc file, and i reboot it, but the raspberry pi stuck at smbd.service with the welcome screen.

9
  • 2
    what could you have possibly put in /home/pi/.bashrc that is at all related to anything in the boot process - please share what you did to that file Jun 23, 2021 at 6:17
  • Actually there I put my custom python application command like " sudo ./filename".
    – vishnu
    Jun 23, 2021 at 6:22
  • remove it, see if that helps, if it doesn't, it's probably something else you did Jun 23, 2021 at 6:24
  • But I can't, because when I powering my raspberry, they stuck at welcome screen. And also I tryout some terminal exit methods, that's not working.
    – vishnu
    Jun 23, 2021 at 6:25
  • add init=/bin/sh to cmdline.txt - if even this doesn't work, then you've done something else to the pi that you haven't mentioned - restore from your most recent working backup, then be careful with what you do Jun 23, 2021 at 6:28

2 Answers 2

1

First do what @Milliways wrote in his answer.

You are then in a command line shell where you type the following commands:

mv /home/pi/.bashrc /home/pi/bashrc.broken
mv /root/.bashrc /root/bashrc.broken

Then remove the init=/bin/sh at the end of cmdline.txt and reboot.

2
  • Actually my window in auto login CLI mode, so when I power on the raspberry pi,The welcome screen stuck at smbd.service and then I press F2 the custom application error is displaying continuously,I can't able to exit from this error and modify anything.
    – vishnu
    Jun 24, 2021 at 12:15
  • 1
    Then you didn't append init=/bin/sh at the end of cmdline.txt. as Milliways instructed. Jun 24, 2021 at 23:22
0

Your best option is to restore from your backup.

If your Pi won't boot you can repair by rebooting to a root shell.

  1. Append init=/bin/sh at the end of cmdline.txt (which can be done on any computer) and reboot.
  2. After booting you will be at the prompt in a root shell.
  3. Your root file system is mounted as readonly now, so remount it as read/write mount -n -o remount,rw /
1
  • That's not working, Now I gonna start from scratch.
    – vishnu
    Jun 23, 2021 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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