9 Replies Latest reply on Dec 12, 2013 4:14 PM by donb

    login broke

    donb

      My new Pi let me login several times when I first powered up but now (without changing any thing) it seems all the drivers etc. are loading but at login it will not accept the default login I used the day before, What has happened and what is the fix please?

        • Re: login broke
          John Beetem

          One possibility is that your file system has been corrupted.  When turning off RasPi, be sure to use a shutdown command so that the file system synchronizes, i.e., files in memory are copied out to your SD card.  A GUI desktop should have a shutdown command somewhere.  From the GNU/Linux command line, enter "shutdown -h now".

           

          If your file system is corrupted, it's probably easiest just to reload the image.

          1 of 1 people found this helpful
            • Re: login broke
              donb

              Thanks John.

              I bought the SD card preprogramed. Is there a way to load just the file that checks the password given the fact that I can't get logged on?

                • Re: login broke
                  John Beetem

                  Don Baugh wrote:

                   

                  Thanks John.

                  I bought the SD card preprogramed. Is there a way to load just the file that checks the password given the fact that I can't get logged on?

                  There may be, but I don't know how.  Since you can't log in, I would think the only way you can access the SD card is using an SDcard reader from a (preferably GNU/Linux) PC.  But then, once you have that access you need to find and replace the corrupted file(s) from somewhere.  As I said, it's probably easier to just reload a new image.

                   

                  I welcome comments from GNU/Linux gurus who know much more about it.

                    • Re: login broke
                      donb

                      Thanks again again for the input. I will need some help from some GNU/Linux gurus

                       

                      Don

                       

                      From: johnbeetem

                      Sent: Friday, December 06, 2013 2:39 PM

                      To: Don Baugh

                      Subject: - login broke

                       

                                  

                       

                            login broke

                            created by John Beetem in Raspberry Pi - View the full discussion

                        • Re: login broke
                          iagorubio

                          If you can mount the card on a card reader and you are able to see the /boot partition there - it's FAT32 - you may be able to make the raspberry boot up in single user mode by redirecting the init script to a shell.

                           

                          That would grant you root access without a password so you would be able to change or restore that default password for the user.

                           

                          TO do it you must put the raspberry sdcard on a reader.

                           

                          It should open the FAT32 boot partition where you should see a file called cmdline.txt

                           

                          Add a line with "init=/bin/sh" . If you have a programmers editor with Unix line endings better. Not sure if windows line endings may break boot.

                           

                          Put back the sdcard on the raspberry and boot.

                           

                          It should boot straight to a root shell - you will be uid 0 so root - where you can issue the passwd command to change the password.

                           

                          As example for the user "username":

                           

                          $ passwd username

                          Changing password for user username.

                          New UNIX password:

                          Retype new UNIX password:

                          passwd: all authentication tokens updated successfully.

                           

                          On the "New UNIX password: " just write the new password, don't worry of you don't see anything being typed, it's normal. Put the same password on the "Retype new UNIX password: " prompt.

                           

                          After that shut down the pi - use the command "halt -p" -  put back the card in the SD reader, remove the init=/bin/sh line and put it back in the pi to boot normally.

                           

                          You should be able to log in with the new password.

                            • Re: login broke
                              donb

                              Thanks Iago for your response. I know it to lots of your time to answer in such detail.

                              I have only windows on a tower with an SD card slot. I mounted it there and 2 folders and 8 files came up but no cmdline.txt file was among them using windows explorer. I also looked into the 2 folders and did not find cmdline.txt there either. I have a 64 bit operating system so am I reading everything on the SD card that I should be reading?

                              I have no programmers editor with UNIX.

                              I can get into command line (Dos) thru Windows and there is a debugger that comes with Windows but I have never used it and don't know if it will do what you are suggesting.

                              I am still at a stand still, not knowing what to do next.

                              thanks again Don

                                • Re: login broke
                                  dweb98

                                  Hey Don Baugh,

                                  Don Bishop here... I have been reading the posts here. And I think that the first one is the simplest fix. You can easily Re-Format your SD Card and Install Noobs, RaspBMC or which ever Raspberry Pi OS that you wish. I just finished updating my Review of the XBMC Pi Bundle from Element 14. With some info and links on how to do this. Check it out and I think you will be able to fix your Pi's OS, fairly easily with your Windows Machine...  http://www.element14.com/community/roadTestReviews/1577

                                  Don Bishop

                                  • Re: login broke
                                    iagorubio

                                    Happy to help Don.

                                     

                                    May I ask where you got that sdcard from ?

                                     

                                    I may be able to look at the filesystem layout and locate the cmdline.txt for you.

                                     

                                    About the programming editor don't worry, if you end up needing one you can donwload good ones for free as Notepad++ - Notepad++ Home - that will not change your file's format. The problem with windows Notepad is it changes the file's format to match Windows line endings. With Notepad++ you will not have that problem.

                                     

                                    If you fear to lose your bought sdcard, you can buy another one and try Don Baugh review's method to get it working and boot your pi. They are really cheap, at least the 2GB small ones.

                                     

                                    Anyway if your sdcard don't show up files like "kernel.img" and "boocode.bin" it's most likely it have been corrupted.

                                     

                                    Have you shut down your pi by unplugin it ? That may cause the corruption.

                                      • Re: login broke
                                        donb

                                        I thank all for the comments and help!

                                        I have the problem solved. The SD card became unbootable after to much handling I suppose so I replaced it and all is fine in my RPi world now.

                                         

                                        Thanks again I consider the matter closed