Bramley
Posts: 15
Joined: Wed Oct 02, 2013 10:08 am

bizarre booting behaviour

Sun Oct 13, 2013 7:39 pm

My RPi runs (or, rather, ran) on a fully updated NOOBS package. It has been happy logging weather data for some weeks, but after I switched back on after changing some breadboard wiring it has refused to boot properly.
I have tried renaming emergency_kernel.img to kernel.img, and unplugged all the peripherals, which gives me a partial boot and a hash-prompt rather than a dollar-prompt. Many shift-keys give the wrong display, and every so often I get a batch of messages about the USB mouse and keyboard, whether they're plugged in or not. ) The first symptom something was wrong was when a hyphen on the monitor was interpreted as an underscore.)

I am new to this sort of thing and tearing my hair out. If any kind soul can help me out I would be eternally grateful.

PS I've noticed files labelled RECOVERY on the SD card, but can't find out how to make them do anything.

User avatar
DavidXN
Posts: 54
Joined: Sat Sep 14, 2013 7:14 pm

Re: bizarre booting behaviour

Sun Oct 13, 2013 10:27 pm

Do you have an alternative SD card that you could boot from, to see if it's a problem with the SD card or the hardware itself?

Bramley
Posts: 15
Joined: Wed Oct 02, 2013 10:08 am

Re: bizarre booting behaviour

Mon Oct 14, 2013 6:33 am

Thanks for the suggestion. I will get a new card and try again.
I should say that, in the interests of brevity, I missed out saying that when the problem first occurred I booted up holding shift and reinstalled Raspbian. This meant losing all the downloads and a lot of the files that I had not backed up elsewhere, and it was while I was almost back to normal that the problems I described occurred.
Thanks again for your help.

Bramley
Posts: 15
Joined: Wed Oct 02, 2013 10:08 am

Re: bizarre booting behaviour

Mon Oct 14, 2013 10:53 am

David
Just another postscript. I had a last attempt at rebooting this morning, and noticed a message about performing <fsck> manually, before it disappeared off the top of the screen. Nothing ventured nothing gained, at the dollar prompt I typed <fsck> and after answering "y" to several questions and rebooting, everything was more-or-less back to normal.
If I had posted this info in my first panicky request for help, you would have known exactly what to do.
One good thing is that I now know is to frequently back up my files on another drive.
Thanks again for taking the time.
:lol:

User avatar
DavidXN
Posts: 54
Joined: Sat Sep 14, 2013 7:14 pm

Re: bizarre booting behaviour

Mon Oct 14, 2013 3:56 pm

Thanks for posting your solution - it's good to know it worked! fsck checks and repairs the file system, but I'm lucky enough not to have needed to know many of the technical details of it...

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11853
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: bizarre booting behaviour

Mon Oct 14, 2013 5:55 pm

Make sure you use the correct procedure to turn off a PI, not following the procedure may result in a damaged file system (that is what might have happened). If you are in the GUI, leave it to the terminal, in the terminal type
sudo shutdown -h now
Wait for the PI to shutdown, and the activity (ACK) LED to stop flashing (on the latest version of Raspbian it will end with blinking ten times to signal it is finished) then wait a few more seconds, as the PI may be ready, but the SD-card may still be doing things, and only then switch the power off!

Bramley
Posts: 15
Joined: Wed Oct 02, 2013 10:08 am

Re: bizarre booting behaviour

Mon Oct 14, 2013 6:41 pm

Many thanks for the advice, which I have noted. In my ignorance I have been using
sudo halt
which perhaps is not the done thing.
It's a steep learning curve!
Thanks again!

User avatar
LemmeFatale
Posts: 253
Joined: Fri Feb 01, 2013 8:47 pm
Location: UK

Re: bizarre booting behaviour

Mon Oct 14, 2013 8:53 pm

Bramley wrote:In my ignorance I have been using
sudo halt
which perhaps is not the done thing.
I've noticed that this one is actually advised as the method to cleanly shut down in one of the "Tip of the day" entries that occasionally pops up on the front page of the website...

Perhaps something to be removed from the pool?
Classic - Raspberry Pi Model B (512MB) with Motorola Atrix Lapdock
Lemcon-One - Raspberry Pi Model B (256MB) PiMAME TV-Box

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: bizarre booting behaviour

Mon Oct 14, 2013 9:33 pm

Regarding halt vs shutdown -

I'd suggest reading the manual. man halt and man shutdown. The two utilities seem to have intertwined behaviours...
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2848
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: bizarre booting behaviour

Mon Oct 14, 2013 9:39 pm

There's nothing wrong with

Code: Select all

sudo halt
Alex Eames RasPi.TV, RasP.iO

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4949
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: bizarre booting behaviour

Mon Oct 14, 2013 9:41 pm

LemmeFatale wrote:
Bramley wrote:In my ignorance I have been using
sudo halt
which perhaps is not the done thing.
I've noticed that this one is actually advised as the method to cleanly shut down in one of the "Tip of the day" entries that occasionally pops up on the front page of the website...

Perhaps something to be removed from the pool?
Having refreshed my memory by checking "man halt" it appears that 'halt' invokes 'shutdown' with "appropriate arguments". However whether 'shutdown's "-h" or "-H" argument is that which is "appropriate" is not stated ("-h" halts and/or powers off**, depending on the system, whereas "-H" just halts). Hmmm...
Trev.
**Of course the Pi cannot "power off" and, IIRC, elsewhere in the forum it has been stated that shutdown/halt causes a partial re-boot to occur and hence the need to wait for the final 8 or 10 flashes of the green ACT led before physically removing power.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11853
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: bizarre booting behaviour

Mon Oct 14, 2013 10:11 pm

yes, the sudo halt will also work, (suda halt and sudo shutdown -h now are synonymous, the "-h" part means that after the shutdown the software must "halt", and the "now" means that the shutdown must commence immediately ) but the most important thing is, to wait until shutdown is completed (that is, until the ACT LED stops its irregular flashing, and may end with ten clearly defined "Morse" like blinks if you have a recent update of the software) then wait another few seconds for the SD-card to finish its business, that last few seconds are just as important as waiting for the OS to shutdown, as it gives the SD card itself time to finish its business, without these few seconds you might interrupt the power to the SD-card while it is still doing work and that corrupts the file system, and if you are unlucky even the card itself.

Return to “Troubleshooting”