Tuesday, September 29, 2020

Raspberry pi boot errors

 

Boot error discussion for Raspberry Pi 2,3 and 4, zero.

https://www.raspberrypi.org/forums/viewtopic.php?p=437084#p437084 

Scroll down, search for zero discussion below.

--copied--  Raspberry pi 2,3,4

STICKY: Is your Pi not booting? (The Boot Problems Sticky)

Sun Oct 13, 2013 5:21 pm

If you have a PI Zero that won't boot, please read the PI Zero specific third post in this thread, before continuing here.

If you have a PI 4B that won't boot, please read the PI 4B specific fourth post in this thread, before continuing here.

If you are reading this, you are presumably having trouble getting your Raspberry Pi or Pi 2, PI3(+) or PI4B to boot. This post will talk you through the potential causes of your boot problems, and will offer some solutions. If you use the PI3B+, note that it will only boot past the "rainbow screen" if you feed it the right (latest) boot files. So in case of trouble try using the latest Raspbian from the download page, or try updating your older software on an earlier PI on which it boots, with Raspbian that should work. If not ask the people behind the software for a compatible version.

If you have one of the later PI PI's (2 or 3) (but not the 4) which won't boot and it keeps stuck on the rainbow screen, while also displaying the under voltage (lightening bolt) icon, and/or the red LED flashing then you are simply using boot code that is too old. Please download the very latest version of Raspbian, or do an upgrade to it.

sudo apt update
sudo apt upgrade

Other OS's users (Ubuntu etc) might have to wait for their OS to get an upgrade.
Also note that a PI3B+ won't accept just any old charger, like older models, you really need a good reliable 2.5A power supply with thick wires, like the official one, or you might experience crashes, and memory failures. The RPI4B needs an even better supply, and may not accept anything less than a 2.5A supply (best use the official PI supply with an USB3 output).
Still the under voltage icon in the rainbow screen -only- indicates you are using the wrong boot code, it probably doesn't at that point indicate a power fail. Due to the RPI3B+ new power chip, (which includes the under voltage detector) old software no longer will find under voltage info in the same I/O registers, as its now reads that info through I2C. This also means that the red power LED is now also under CPU control, so it can flash (even without a real power fail)


If you have a PI 3B+ that, after some days or weeks of working, suddenly has stopped booting, then please check if there is still 3V3 on the system. There have been a few reports of the 3V3 supply suddenly stopping working, often after shorting the 3V3 to GND. To check for the absence of 3V3 measure on the 3V3 GPIO pin, (pin 1, see https://www.raspberrypi.org/documentati ... /README.md, the left most pin on the bottom row, indicated with an orange dot) with the red lead of your meter and with the minus lead touching the metal shield of either the USB ports, the Ethernet port, or even the HDMI port, as all of these are connected to GND. Set your meter to DC Volt. Make sure the probe you are measuring with does not slip, and simultaneously touches any of the other GPIO pins, as that might instantly destroy your PI, especially shorting the 3V3 pin to the 5V pin will prove to be fatal. Unfortunately without 3V3, your PI is broken, and is not user repairable.

This sticky is long, as it covers all known boot problems in detail. If you do not have much time, you should try reading the second post in this thread, by drgeoff. He has written a concise version of the essentials.

Important Note
In order to get your Pi to boot successfully, you need a correctly written SD card. Meaning (when you use NOOBS) that you have to drag the contents of the unzipped NOOBS folder into the root of the card, NOT those files inside a NOOBS_v1_5_0 folder on the card, as it won't boot that way, which is the main mistake people make. This will be covered in detail later in the post. If you are having trouble writing your SD card, please be sure to check out our NOOBS Set-up page.

Also, when using NOOBS, make sure that you always do a full format, with the Format Size Adjustment option ON ! with the official SD-card formatting too first!
you can get it for free here: https://www.sdcard.org/downloads/formatter_4/
Note that in version 5, or later, of this program you just need to click on the "overwrite on" choice button, "format size adjust" from version 5 onward is now always the default. Just don't use "quick formatting".


If you need to format a card that is SDXC (64GB or larger) read this:
https://www.raspberrypi.org/documentati ... matting.md

If you have trouble resetting (formatting) your SD-card (resulting in no boot activity) you could try forgoing the NOOBS method, and instead directly image the card, with the Raspberry Pi Imager https://raspberrypi.org/downloads DD, WinDiskimager, Etcher or another imaging program.

Always use it with the very latest version of Raspbian, which is the best choice for a first boot, and the default OS. Download it from here: https://www.raspberrypi.org/downloads/raspbian/.

The good thing about using an image writer is that you don't need to format the card at all, as writing an image overwrites anything on the card! this removes the formatting problem. recommended if your card just won't boot, but make sure you have no power problems!

Another recent option is "PIbakery" a Windows/Mac and soon also a Linux image writing tool that can be used to painlessly create a custom installation of Raspbian, see this blog post about it: https://www.raspberrypi.org/blog/pibakery/

Before we address the reasons why your Pi may not be booting, there are some important facts you should know.

Factory-tested
Every Raspberry Pi has been tested and shown to be working before it leaves the factory, so you can be confident that your Pi has booted successfully at least once! Manufacturing problems do happen, and it is technically possible that your Pi might be DOA. The chances of this being the case, though, are extremely slim. Raspberry PI`s do not usually stop working for no reason: in the majority of cases, not booting points to an issue with the SD card, not to a defective Pi. It is also important to note that the Pi might be booting, but there may be another reason why you are not getting video output.

No Video without Booting
In contrast to other computing systems you might be used to using, the Raspberry Pi does not have any built-in software (firmware). Notably, it doesn't have any form of Basic Input/Output System (BIOS). All the software needed to run the Pi must be loaded from the SD card. On a PC, the BIOS allows it to generate a video signal immediately, even when you have no operating system installed, and no storage device is connected. The Pi works differently. Without access to its storage device it cannot load any software at all, and then it does absolutely nothing! Your job is to provide it with a completely up-to-date and correctly imaged SD card. Using an SD card containing an obsolete version of the operating system can cause some functions not to work, or worse.

Check the ACT LED to determine if the Pi is booting
The ACT LED is essential in determining if the Pi can actually read from the card. for non RPI4's It indicates that it can read from the card by blinking, If the ACT LED doesn't blink quickly in an irregular pattern for at least twenty seconds, this indicates that the Pi cannot read from the SD card, and that booting is not taking place. By the way, It doesn't matter if the ACT LED initially starts on or off. It is only the blinking of the ACT LED that is significant. A dim ACT LED also has no significance beyond the fact that you are using a B. From the model B+ onwards, the LED is driven differently, and it wont be dim.
The RPI 4 is an exception to the above. Read the fourth post about the RPI4 when you have one of these.

With a PI that is not booting (for example when the SD-Card is not inserted) the default behavior is:

Model 1 (A and B) green LED is initially OFF (flickering ON means the model 1 is booting)
Model 2 (A and B) green LED is initially ON (flickering OFF means the model 2 is booting)
Model 3 (A and B) green LED is initially OFF (flickering ON means the model 3 is booting)
Model zero (or Zero W) only has green ACT led which is initially OFF (flickering ON when booting)
Model 4 (B) green LED blinks regular when the PI doesn't detect the SD-card, and irregular when it boots, if the LED stays inactive (with power on) perhaps you need to repair the BOOT EEPROM code.
The recommended method to recovery the BOOT EEPROM to the factory default settings is to use the Raspberry Pi Imager.
https://www.raspberrypi.org/downloads/

Select Choose OS -> Misc utility images -> Pi4 EEPROM boot recovery

See the BOOT EEPROM documentation for the manual method.
https://www.raspberrypi.org/documentati ... teeprom.md

With no SD card inserted, note how the ACT LED behaves (hint, it won't blink!, except with a PI4B). Now insert a programmed card and power up, and that behavior should change. If it does not, this indicates that Pi cannot see the necessary files on the SD card.
For a demonstration, watch this video of a model B: the ACT LED is the one on the left-hand side. Note that on the model 2 the ACT LED will start ON on power up, instead as off like the model 1.

With working firmware, Meaning the PI can read files from the card, the ACT LED will flicker intermittently for 20-30 seconds. The LED is actually driven by the software read from the card using a dedicated GPIO pin turning it on whenever the card is read. It can also blink in a regular "Morse" pattern, which usually indicates an error condition. See the Additional Information section at the end of this post for details.

Note that the Zero is a special case, it has just one LED, which is an ACT LED that goes only ON during card read activity, but without activity is off. This means that the LED will only turn on if the zero can read its boot files!

If the Pi seems to boot, but there is no video output, one way to tell it has booted is if the PI's Ethernet system is activated: if you have a Ethernet cable connected, the Ethernet LED's on the Pi should light up. If they do, it's a sure sign that booting has succeeded, there must be a different reason why there is no video output.

Check that your power supply and its USB cable is working and fit-for-purpose
This is sufficiently important that the B+ and Pi 2 PI3 and PI4 (but not the zero models) now contain a detector that signals bad power. On the model A and B the PWR LED was simply connected to power, but on later models of the Pi it is controlled by a "brownout detector" which will switch the LED off whenever the Pi receives insufficient power. The condition can also be read from software; the software can also override the brownout detector, and control the PWR LED directly. New software will now show a "rainbow square" in the GUI when a brownout event is detected. Brownouts are caused by an insufficient power supply and/or by a weak microUSB cable (one which is too long, with internal wires which are too thin). It is very important to ensure your power supply is fit-for-purpose, as brownouts can lead to SD card corruptions and boot problems. In any case, if the PWR LED ever goes out, or blinks, you have a power problem you need to solve. Note no RPI contains a battery, and so you should not use a charger, as even the best chargers are not designed to deliver a steady 5V under load, you will need a real power supply which is fit for use, note that newer models need more current than older models, the best solution is to buy an official RPI power supply, from the buying page on the blog. If the PWR LED goes out (or you get a low power warning icon) then your power supply fails to deliver good power, or you are using a power cable that is too long and/or too thin. There is one other reason for the appearance of the under-volt icon, an that is when you are stuck on the "rainbow screen" because you are trying to use old software for a RPI3B+ that is unfit for it.

Even when the Pi boots successfully, you might not necessarily get a video signal that your monitor recognizes immediately
The Raspbian OS is designed to output a HDMI signal, but if it doesn't detect a HDMI device connected to the Pi, it will default to generating a composite signal on the RCA port (or 4-pins 3.5mm A/V jack on later models). Depending on the monitor you are using, you may have to switch it on before you boot the Pi, and ensure that HDMI input is selected.

Booting to NOOBS works a bit differently: it will always output an HDMI signal, even if you have nothing connected to the HDMI port, unless you press one of the numerical keys, 3 (PAL) or 4 (NTSC), to switch to a composite video output mode.

If you are using a composite A/V cable with your A+, B+ or Pi 2, with a 4-pole 3.5mm (TRRS) plug, make sure you have one that is correctly wired inside; the Pictorial Buying Guide can give you more information on this topic. Using a HDMI to VGA adapter can also cause problems.

What to do to make sure your PI is defective, if you suspect it is?
If any model of PI cannot boot, its SoC (System on a Chip), the main chip made by Broadcom, cannot execute any code, and should go into a halt state. So the SoC should stay cold! If the SoC is not cold, but heats up rapidly then there is some defect in the chip, most probably caused by a latch-up or ESD (electro static discharge) problem. often the cause is exposure of a higher voltage on a GPIO pin than that is allowed. Specifically the GPIO's of a RPI are not 5V tolerant! and a voltage larger than about 4V can damage a PI.

except for that If you have a PI B, B+ or 2B, There is just one way to make sure the PI is broken! You must have an identical model that does boot, and only when you exchange just the working and non-working PI's, and leave everything else the same, including sd-card, power supply, USB devices, and cables, -everything-, you do that, and then the "bad" PI still won't boot, then and only then you know it is the PI itself.

The fault could be a bent pin in the cardholder that doesn't make contact, or creates a short! But it also could be a (halfway) blown polyfuse, so leaving it alone for a few days might still help. Note that the RPI0's and RPI4 don't have a polyfuse!

Remember all PI's (even the Zero) were tested at the factory. At the moment I wrote this (two months after its launch) of the returned as "not working" Zero's none of them had any defect!

If you have a PI model A, A+ or Zero there is a special trick which can be used to check if such a PI is "dead":
Take your PI, with nothing in any slot or socket (yes, no SD-card is needed or wanted to do this test!). Take a (special) USB-A to USB-A cable (or a more normal micro-USB to USB-A for the zero) & connect it to your PC, plugging the other end of the cable into the Pi's USB port. If the PI is alive, your Windows PC will go ding for the presence of new hardware & you should see "BCM2708 Boot" in Device Manager. Or on linux, with a "ID 0a5c:2763 Broadcom Corp" message from dmesg. If you see that, so far so good, you know the PI is not dead.

Note, if you cannot find a cable with USB-A plugs on both ends you may use your USB-A to micro-USB cable with an adapter that adapts the micro-USB port to a normal USB-A port. Another trick would be to cut two USB cables (any cable with an USB-A plug) in half and use the two USB-A halves, and wire the four wires with the same color of both cables to each other. Note that such a cable should NEVER be used to connect two computers together! Doing so might damage both computers! Use it solely to check if your model A(+) PI is functional.

Now you can go on to investigate other boot issues, or return the dead PI.


Reasons why you PI might not Boot...

Here is a list of known causes why the Pi might (appear) not to be booting.
Power Supply Unit (PSU)
Without a power supply which is stable and fit-for-purpose, the Pi will not be able to read from the SD card, and it will fail to boot. These some known power supply issues which may cause boot problems:

* Unsuitable PSU: it should be able to deliver sufficient power to meet the requirements of each model.
* Unsuitable micro-USB cable: some cables too long, and use very thin copper wire which is not fit-for-purpose. You should use a short, thick, good-quality cable.
* Except for the zero's and RPI4 which have no polyfuse, you may have blown the PI's polyfuse: (AKA re-settable fuse, see: https://en.wikipedia.org/wiki/Resettable_fuse) it will automatically recover if you give it some time, (meaning turning off the power and wait) though it may take a few days. If the fuse has blown no power will reach the PI, meaning the power LED will be off!
Also the waiting time cannot be shortened in any way (for example by cooling your PI) and if you try to power up without waiting long enough the fuse will probably re-blow!
* On early models of the Pi (A and B), the fact that the red power LED is illuminated does not indicate your power is OK, but simply that your Pi is receiving some power. For those models, the only fail-safe way to check for power problems is to measure the voltage the Pi is receiving. Check if a voltage between 4.75V and 5.25V is present between Test Point 1 (TP1) and Test Point 2 (TP2). TP1 is +5V, and is located near the bottom left corner of the Pi (as viewed when holding the Pi with the HDMI port at the bottom) and TP2 is located between the GPIO header and the RCA connector.
* Later models of the Pi (from the B+ onward) have a new under-voltage detector. This turns the power LED off when the input voltage drops below 4.65V. In this case, you can be reasonably sure that, if your power LED is illuminated, your power supply is sufficient. The only exception is if you are using USB devices which cannot handle a drop to 4.65V. Try unplugging all USB devices during boot to see if this helps: USB ports on later models of the Pi are hot-plug-able, so you can plug USB devices in after booting without crashing the software.
* If the PI has a broken 3V3 supply (caused by shorting the 3V3 to GND or 5V), then the PI will not boot, even if the 5V supply is OK.

* Video

* If you use composite video with an A+ or B+, you need the correct (TRRS A/V) cable.
The A+, B+ and Pi 2 use an A/V connector, which can accept a 3-pole (TRS 3.5mm jack) plug for stereo output, or a TRRS combined audio/video cable for RCA stereo audio output (red and white connectors) and RCA composite video output (yellow connector). This cable must be wired correctly; the Pictorial Buying Guide can give you more information on this topic.
* If you are using NOOBS, you must ensure that you activate the correct video mode after it has booted. After NOOBS boots, it waits about ten seconds for a keypress to change the mode of the video output; it starts by generating an HDMI signal, but some HDMI monitors may not be able to display this, and composite video users will only see a black screen. So, in the first ten seconds after booting, repeatedly press any of the keys 1 to 4 to switch between ideal HDMI, safe HDMI, PAL composite or NTSC composite respectively. Do not press enter, as this will fix the current (bad) video mode in config.txt, which may not be what you want at all. If you do not have a keyboard to enter a digit then you can still change the display mode used by NOOBS by editing the recovery.cmdline file in the root NOOBS directory prior to first boot and appending the following argument: [code]display=<display mode number>[/code] (e.g. display=1 for ideal HDMI or display=3 for PAL composite). You can find more information on this in the NOOBS troubleshooting section on GitHub.
* NOOBS edits a copy of config.txt for the OS it installs, but it doesn't look at config.txt itself for video format information. If you want to edit the copy of config.txt it will install you can edit it from NOOBS. After NOOBS installs an OS, booting that OS will activate its video drivers: these drivers may behave differently those of NOOBS itself, but the OS will also use the config.txt that NOOBS may have changed when you accept the current video settings.
* Normally an OS like Raspbian will detect the capabilities of a monitor and choose a compatible video mode. However, that doesn't always work, so Raspbian might choose a "safe" resolution instead. But if you are unlucky you might find that your monitor doesn't recognize the generated video signal, just like when doing a regular install you then might need to tweak config.txt to force the OS to generate a video signal suitable for your monitor.
* It is also possible that the monitor is not engaging the HDMI hotplug signal, and the Pi cannot detect a connected HDMI (or DVI-D) device. In this case, you need to force its detection manually by adding (or enabling) the line [code]hdmi_force_hotplug=1[/code] in config.txt. The easy way to do these things is to re-boot with shift pressed, which should start NOOBS again. NOOBS has a built-in editor that can be used to edit config.txt .

* SD Card

* You must ensure that you are using an SD card image that has the right version of the core files (comparable to a BIOS) and the right kernel. This means you need an image that is up-to-date for your machine. There have been several hardware upgrades in the past which required a software upgrade. The transitions between different RAM PoP chips required an upgrade, as did the transition from B to B+, and to the Pi 2. For a Pi 2, this means your card has to have the latest NOOBS or Raspbian image, dating from the second week of February 2015 at the very earliest. Make sure any other OS or image is Pi 2-compatible. One sign that you are trying to boot code that is incompatible with a Pi 2 is that, after showing the "rainbow screen" (GPU test), the Pi doesn't blank the screen and start booting the OS. If you have a card with Raspbian that boots correctly on your old Pi, but doesn't boot on the Pi 2, the following procedure should result in a card that also works on a Pi 2:
[code]apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install raspberrypi-ui-mods[/code]
In general, it is best practice to ensure that your card is loaded with the latest version of your chosen operating system, which can be found on our downloads page.
* Ensure the Card was correctly formatted before use. Although NOOBS makes loading an SD card straightforward, you can still run into problems, especially if the card has been used before and isn't really empty. It is important to clear the card fully of any content, including superfluous old partitions. A quick format is not usually enough to do this. Format the card using the SD card format tool; if you are using Windows, set the FORMAT TYPE option to Full (overwrite) and set the FORMAT SIZE ADJUSTMENT option to ON. For a Mac, use the Full Overwrite option. Do not leave the Volume Label (Windows) or Card Name (Mac) option blank, as NOOBS sometimes has trouble with empty card name labels. We suggest naming the card something simple like 4NOOBS (or anything else you like). Please remember to format the SD card with a FAT32 Primary partition. Some tools default to creating a logical partition, which doesn't work. If you are using a 64GB card, make sure it is formatted as FAT, not as exFAT! You may need to use an alternative formatting program after using the official one, to convert (re-format) the resulting exFAT file system to FAT. see: https://www.raspberrypi.org/documentati ... matting.md. You can use the free FAT32 Format program for that.
One person reported that his first successful boot occurred after formatting his (64GB) card with the free ¨Rufus¨ imager used as FAT 32 formatter. But Rufus is not available for a Mac.
* Make sure you load the necessary files onto the card correctly. We recommend using the NOOBS installer; you can also install the image of your choice using dd, if you are experienced with it. However, even though a NOOBS card is quite simple to create, some people are still copying the .ZIP file itself to the SD card, instead of copying its contents. This will not work. If the contents of your card do not look those in this picture after installing (n.b. we are using Windows), then your card probably will not work as the Pi expects that at least some of the files it needs to boot from are directly on the root of the card (i.e. at the lowest directory level), and not in a subdirectory or in a .ZIP file
See the NOOBs picture at the end of this post.
* Make sure your SD card is fit-for-purpose, and not a fake. Some SD cards are unsuitable, and if your card fails it may be a good idea to try a different one. Also note that some well known brands of SD card are copied by unscrupulous vendors: there are a lot of fakes around, and some of these may not contain the memory they are sold as having. You can use a tool like H2testw to find out if your card is fake or not (note that the site hosting this program is in German).
* Check that the card makes proper contact with the card holder. The card may not actually make good contact with the card holder, especially if you tried to force it in earlier. The card holder or its pins may have been damaged. Check for broken plastic, or bent pins. The pins should all stick out equally above the surface of the plastic of the card holder. Sometimes putting some gentle pressure on the card helps. Many of these problems have been fixed by the introduction of the better micro-SD card connector of the model B+ and Pi 2.
* Make sure your card writer is suitable. Some card readers, especially built-in ones, have trouble writing and formatting the SD card correctly. If you have an external SD card reader, we would advise you to try using it instead.
* Be aware that SD cards have a finite lifespan. If you have not tried a different new card, you still cannot assume that the Pi is defective, as cards can and will suddenly stop working. Buy another card, from a reliable source, and try that one.
* If you have any concerns about buying and loading your own SD car, we would advise you to buy the official NOOBS SD card, as this should enable you to avoid a lot of the issues covered above.

Additional Information
If you have worked through the primary check list above, and your Pi is still not booting, the more advanced information below should help you to address the issues.

Boot sequence details
Booting on a Pi is multi-phased: the majority of the boot process is executed by a small dedicated processing unit (CPU) inside the VideoCore GPU and consist of several stages. The Broadcom SoC contains a very small permanent memory which obtains the code to boot the device. First, it uses simple USB code to try to read a file pushed to it through the USB hardware. If this is unsuccessful, the code aborts, and uses its MMC hardware to attempt to read a file from a MMC compatible device. On the Pi, this is the SD card; the file should be on a FAT16 or FAT32-compatible filing system, and is called bootcode.bin. At this point, the ARM CPU is still in reset, so the contents of bootcode.bin are executed by the dedicated processor of the GPU: this code has more smarts, and can read the next file called start.elf, which in turn reads and interprets config.txt. It configures things like memory and Video/HDMI modes, console frame buffers, tests the GPU (resulting in the "rainbow screen"), and then handles the loading and configuring of the Linux Kernel (addresses, device tree, uart/console baud rates and suchlike). Only after this is the ARM CPU started, to execute the kernel code.

Error ACT LED patterns (for RPI up-to but not including RPI4
While booting, the ACT LED should blink in an irregular pattern, indicating that it is reading from the card. If it starts blinking in a regular, Morse code-like pattern, then it is signalling an error.

If it blinks just once, it could be that you have a Raspberry Pi with SDRAM from Micron. If the processor has a logo showing an M with an orbit around it, then using the latest software should solve your problem. Also make sure you are using a 4GB SD card, as a 2GB won't work in this particular case.

These are the other patterns that the ACT LED might show during a failed boot, together with their meanings (the below blink codes are NOT valid for a RPI4, read the RPI4 section for ACT LED flash messages!):

* 3 flashes: start.elf not found
* 4 flashes: start.elf not launch-able (corrupt) See below: (not valid for RPI4! On an RPI4 four flashes means no boot code found!)
* 7 flashes: kernel.img not found
* 8 flashes: SDRAM not recognized. You need newer bootcode.bin/start.elf firmware, or your SDRAM is damaged

If you have an older model of the Pi, you should note that firmware before 20th October 2012 required loader.bin, and the meaning of the flashes was slightly different:

* 3 flashes: loader.bin not found
* 4 flashes: loader.bin not launch-able (corrupt) (not valid for RPI4! On an RPI4 four flashes means no boot code found!)
* 5 flashes: start.elf not found
* 6 flashes: start.elf not launch-able
* 7 flashes: kernel.img not found

potential reason for 4 flashes.

P.S. On a RPI4 the boot EEPROM produces four flashes when it doesn't see a valid image.
Note that 4 flashes could be an indication of a more or less broken SD-card connector. If Databit 1 is connected, but one of the other three Databits doesn't make contact, so the SD-card only works in 1-bit (SPI) mode, then this will lead to the four flashes error! Check if all pins of your card holder make good contact with the card!

Try the most basic set-up
If you are having a hard time getting the Pi to boot, try stripping it down to its most basic set-up. Disconnect any extraneous USB devices, and try booting with only the video and the power cable connected. If you have to press keys to switch video mode, you will need to connect some kind of keyboard, but try it with the most basic, no frills USB-keyboard. This can help ease the boot process in some circumstances.

Shutdown procedure
Always remember to shut your Pi down correctly, to prevent SD card corruptions. Some people find that, after a first successful boot, their second attempt fails: this is usually due to a prior improper shutdown.

If you have successfully booted your Pi for the first time, make sure to perform a proper shutdown. Whenever the Pi boots, but particularly the first time, the software has to write a great deal of information to the SD card. If this is not properly finished before you power off, your operating system may become corrupted and you have to re-flash you card. To avoid this, make sure that you shut your Pi down with [code]sudo shutdown -h now[/code] If sudo asks for your password, enter it (it will be "raspberry", but it won't show up on the screen while you type it in) and wait for the ACT lead to finish blinking (the latest versions of Raspbian display a regular pattern of ten blinks to indicate a completed shutdown), then wait a few seconds more for the card to finish its tasks. It is only at this point that you should power off. Remember that not following this procedure may lead to corruption of the cards contents.

Alternative installation methods
If you are having trouble installing with the NOOBS installer, here are some alternatives:

* You can use the "install silently over a network" method described in this post: this installs Raspbian without the need for a keyboard or display.

* Another installer is BerryBoot: unlike the network installer, it can install many different operating systems, but you do need a keyboard and screen. It also installs a boot selector, so you can choose which OS to boot, and it is able assist in installing an OS to boot from on other media than the SD card, e.g. a USB flash drive.

* If you have video detection problems you cannot solve, then a third option is to write Raspbian directly to a card using one of the various image installers available for Linux, Mac OS X, or Windows. This may be advantageous if you have trouble getting video when using NOOBS.

If you have checked all the points above, but you still cannot get your Pi to boot, and you want to post a question about it, please mention having checked all the points in the Boot Problems Sticky. If you don't, peoples reaction will be to send you here!

[Latest revision, March 9, 2020]
Attachments
NOOBS.png
NOOBS.png (43.16 KiB) Viewed 1498863 times
User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13234
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: NOT BOOTING (no video)? read this carefully! Updated for

Mon Aug 25, 2014 10:59 am

This concise summary information is written specifically for people in haste

Posted somewhere by drgeoff , reused here as it nicely sums up the answers for most of the "why doesn't my B+ PI boot" questions.

Good news and bad news. The problem is probably you not the RPi. :)

1. A RPi without a (micro-)SD card is just an expensive LED.

2. Ensure any boot software you want to use on a B+ is later than mid June 2014. I don't know about Kali Linux but the current Raspbian and NOOBS downloads from the Downloads page on this site do work. (If you get a booting RPi but all the USB ports plus Ethernet don't work then 100:1 the firmware on the card is too old.) If using the PI2B, use an image that came out after the 2B came out in February 2, 2015.

3. If writing an image (eg using 'DD') ensure the destination is the entire card and not a partition on it. For some reason, I've noticed that Mac users tend to make this error more than others. There should be no "1" or other number at the end of the destination name. http://www.raspberrypi.org/documentatio ... ges/mac.md

4. When putting NOOBS on any card other than a brand new one just out of the package, it is advisable (and sometimes mandatory) that it is first formatted using the SD Card Association's Formatting tool. Follow the instructions at http://www.raspberrypi.org/documentatio ... n/noobs.md Extract the files from the zip to the top level of the formatted card. (You should not see a single folder on the card containing all the files.)

5. If the card is 64 Gbyte or larger, it will be SDXC and almost certainly come formatted as exFAT. No problem if 'DD'ing an image (and your card reader can handle SDXC). But NOOBS (currently at least) cannot work with that. It needs to be converted to FAT32. Use the utility at http://tokiwa.qee.jp/EN/Fat32Formatter/ before putting the NOOBS files on it.

6. When booting the green LED should flash quite a lot for about 20 seconds and then be mostly off (or on, when its a B+ or later PI) with an occasional blip.

7. The red power LED should be on all the time. If it goes out or blinks, your PSU (or cable if separate) is inadequate.

8. With the change to a micro-SD card and the different card holder on a B+, there should be no more need to try clothes pegs and other methods of ensuring good contact. :)

(9. Although you are a beginner, the Troubleshooting section of the forum is more appropriate for questions like this, (than the beginners section)).
 
--copied--  Raspberry pi zero
 
This is information is written specifically for the PI Zero

These remarks were written by Dougie (and later corrected by me):

1. If you want to use NOOBS you must use NOOBS 1.5 (or later) for the PiZero, and 2.4 or later for the PIZero W with WiFi.
2. If you try to use an old SDCard you have to use the instructions at ModMyPi page http://thepihut.com/blogs/raspberry-pi- ... berry-pi-2 to update partition #1 & partition #5 to get an old NOOBS card to be bootable.
3. If you use an old Raspbian card you MUST run rpi-update first to get the PiZero ready firmware.


My own remarks:
It seems the Zero does not have a power LED, only an activity LED, which only turns on when it can actually read from the SD-Card!. If you also own another PI it is recommended to create and test the SD-card on the other PI for convenience, but you should adhere to the points made by Dougie.

Disconnect everything from your Pi, even the microSD card. Then connect just power. If the main chip gets hot then your Pi is dead or dying. If it stays cold it is probably Ok.

I also found this information which can be used to check if the zero is "dead":
Take your Zero, with nothing in any slot or socket (yes, no SD-card is needed or wanted to do this test!). Take a normal micro-USB to USB-A cable (the most common type) & connect it to your PC, plugging the micro-USB into the Pi's USB, (not the PWR_IN). If the Zero is alive, your Windows PC will make a "ding" sound for the presence of new hardware & you should see "BCM2708 Boot" in Device Manager.

Or on linux, it will show a "ID 0a5c:2763 Broadcom Corp" message from dmesg.

If you see that, so far so good, you know the Zero's not dead.

Now you can go on to investigate SD issues, or return the dead Zero.

Note the above method also works with the A and A+ PI's, but not with a B, B+ or 2B.

if you were sent to this post directly, now start reading the full boot problem sticky post above, to get some insight in the boot processes of a PI.
User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13234
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: STICKY: Is your Pi not booting? (The Boot Problems Sticky)

Tue Jun 25, 2019 9:39 pm

This information is written especially for the RPI 4B.

Firstly, the new RPI4 will ONLY boot the version of raspbian that was released at its time of launch (or later) Rasbian Buster, it won't boot any older versions! For example official RPI operating systems (for example Ubuntu, and Retropie) may not work immediately after the launch of the RPI4, but might take many months to get updated for the RPI4. Instead of Retropie you can use Lakka.

Shortly after launch there appeared to be an issue with some 32GB cards that expressed itself with that the boot aborts. The four raspberry's appear followed by a short burst of text, then the system halts. The base of the issue seems to be the card reader of the PC used, but later firmware seems to have solved the issue: viewtopic.php?f=28&t=248968 in the mean time, if you have this exact problem, I would suggest using a 16GB card, try using another card reader, or upgrade the boot code

Unlike previous Raspberry PI's the RPI4B boots with the use of code from a built in EEPROM, that means it can use more complex boot code with more flexibility, and the ability to add new features (like Network and USB booting).

consequently when the new bootcode doesn't detect a valid start.elf file on the SD-card it will blink the activity LED, four times with an interval between the four blinks, (bootcode.bin is no longer used, and is ignored when it exists on the SD-card).

Its very-very unlikely the EEPROM content is corrupted, (all RPI's are tested in the factory) but to check if this the case, unplug everything from the Raspberry Pi 4, including the SD card, and then turn the power back on.
If the green LED blinks with a repeating four blink pattern then the bootloader is running correctly, and indicating that start.elf has not been found.

Not blinking four times with nothing but the power connected (and no SD-card) implies that the bootloader is not working correctly and should be reinstalled using recovery.bin. see https://www.raspberrypi.org/documentati ... teeprom.md
if after recovery your PI still doesn't blink the ACT LED, then you can assume you somehow managed to blow up your PI, The common pitfalls sticky in beginners, (post #27) describes things that can lead to the destruction of your RPI, for example changing breadboard wiring without turning the RPI off first.

So unlike other RPI's blinking the ACT LED (in a regular pattern) now doesn't mean the SD-card is detected and is booting, instead it means the EEPROM code cannot find the SD-card (start.elf).

LED warning flash codes

If a Pi fails to boot for some reason, or has to shut down, in many cases an LED will be flashed a specific number of times to indicate what happened. The LED will blink for a number of long flashes (0 or more), then short flashes, to indicate the exact status. In most cases, the pattern will repeat after a 2 second gap.

Code: Select all

Long flashes	Short flashes	Status
0		3		Generic failure to boot
0		4		start*.elf not found
0		7		Kernel image not found
0		8		SDRAM failure
0		9		Insufficient SDRAM
0		10		In HALT state
2		1		Partition not FAT
2		2		Failed to read from partition
2		3		Extended partition not FAT
2		4		File signature/hash mismatch - Pi 4
4		4		Unsupported board type
4		5		Fatal firmware error
4		6		Power failure type A
4		7		Power failure type B
so:
  • if the ACT LED blinks in a regular four blink pattern, it cannot find bootcode (start.elf)
  • if the ACT LED blinks in an irregular pattern then booting has started.
  • If the ACT LED doesn't blink, then the EEPROM code might be corrupted, try again without anything connected to make sure.
Unlike other RPI, on a RPI4 the power LED is fully under the control of a GPIO expander, and when booting Raspbian resets this IO expander so causing the PWR LED to blink off on reboot. On booting the bootloader enables it again. But if the PWR LED goes off (blinks) at any other time it means have an unfit power supply/power cable. in short, the PWR LED should be always on except for a very short time just before a reboot happens.

If you want to use a 4kp60 monitor you must use HDMI0, so If you don't get a picture out of your 4Kp60 HDMI monitor you might want to try it with the primary HDMI port, which is the one located near the USB-C power port. The other (right) HDMI port will not generate a picture beyond the rainbow GPU test screen, when you use a 4kp60 monitor.

Also, for first use start with software that is known to work, that is the latest version of Raspbian (Buster) freshly downloaded from here: https://www.raspberrypi.org/downloads/raspbian/ and imaged with Etcher.
Other older Raspbian images are probably incompatible, and other OS's (Ubuntu's) are probably not yet updated for the RPI4. that will come later.

Booting from USB is worked on, (new Boot EEPROM code update) and older methods may not work.
In fact the boot code is still being worked on, and bugs might exist, so if you have trouble booting try to remove all USB devices. Reports are in that some wireless USB keyboards prevent booting.

Booting headless
If you are working headless then please note that per default the RPI4 no longer creates a video output display, as a RPI4 no longer switches to Composite when it doesn't detect a HDMI device, so a /dev/fbN frame buffer node is not created.

So with default settings and no monitor attached, VNC will NOT work, as the booted RPI4 will not have a video output system that can be used by VNC.

Adding hdmi_force_hotplug=1 to /boot/config.txt solves the problem. The Pi4 running headless, will now be able to be accessed via VNC.

Latest changes made on June 5, 2020.
 

--30--

Monday, September 21, 2020

Odroid XU4 Energy Monitor

 

https://github.com/hardkernel/EnergyMonitor 

Need to install qt4 qwt dev and git

Install packages and clone the source code.

# sudo apt-get install qt4-default libqwt-dev
# git clone https://github.com/hardkernel/EnergyMonitor.git

Make!

# qmake-qt4
# make -j8

 

--30--

NFS install on ubuntu

 

Good install description for Ubuntu nfs

https://www.tecmint.com/install-nfs-server-on-ubuntu/

 

--30--

Tuesday, September 1, 2020

Reconfigure upgrade on Ubuntu

 

auto upgrade can be configured on or off by reconfiguring the package

 sudo dpkg-reconfigure unattended-upgrades

 https://i.stack.imgur.com/N8LXx.png

 

 Specify NO and save, the python program will be reconfigured off.

https://askubuntu.com/questions/851444/configuring-unattended-upgrades-which-option-to-select 


--30--