Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu freezes after boot " starting kernel " raspberry pi 3

I'm having a major issue with ubuntu 16.04 on raspberry pi3 . After installing and ssh to it if I rebooted. It start and then stops and never progress after "Starting Kernel" message printed to the screen. Any Idea why and how to fix it ?

enter image description here

Mike

like image 662
user519274 Avatar asked Dec 27 '16 22:12

user519274


4 Answers

Thanks user519274 for the tip, here's what I did for reference:

Remove the sd card from the raspberry and put it in another computer

cd system-boot
mv initrd.img initrd.img.ori
mv initrd.img.bak initrd.img
mv bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b.dtb.ori
mv bcm2710-rpi-3-b.dtb.bak bcm2710-rpi-3-b.dtb
mv boot.scr boot.scr.ori
mv boot.scr.bak boot.scr
mv vmlinuz vmlinuz.ori
mv vmlinuz.bak vmlinuz

Put the sd card back in the raspberry, it should start up and uname -r should display 1034

Make sure you don't sudo apt upgrade or else you'll have the same issue again

like image 77
jeangali Avatar answered Sep 21 '22 05:09

jeangali


To complete the answer of jeangali, kernel upgrade is possible after removing the ppa (ppa:ubuntu-raspi2/ppa-rpi3) and use the canonical version for rpi2 that work for my rpi3 with the last kernel.

So, I copy-paste jeangali answer and add my other modifications : I was also stuck with the "starting kernel" message, just after boot. 1/ I removed the sd card from the raspberry and put it in another computer :

cd system-boot
mv initrd.img initrd.img.ori
mv initrd.img.bak initrd.img
mv bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b.dtb.ori
mv bcm2710-rpi-3-b.dtb.bak bcm2710-rpi-3-b.dtb
mv boot.scr boot.scr.ori
mv boot.scr.bak boot.scr
mv vmlinuz vmlinuz.ori
mv vmlinuz.bak vmlinuz

2/ Put the sd card back in the raspberry, it should start up and uname -r should display 1034 3/ Comment the ppa:ubuntu-raspi2/ppa-rpi3 in /etc/apt/sources.list. And reload package list.

vi /etc/apt/sources.list
sudo apt-get update

4/ Re-install kernel (from the offical Canonical rpi2)

sudo apt-get install --reinstall flash-kernel linux-firmware-raspi2

5/ Edit the firmware config to use new device tree address

sudo vi /boot/firmware/config.txt

In this file, find the device tree address section and edit it to look like this:

# set extended DT area
# device_tree_address=0x100
# device_tree_end=0x8000
device_tree_address=0x02008000

6/ Reboot:

sudo reboot

7/ Now it should work. This also would mean that the special ppa for raspberry pi 3 is not anymore necessary. Currently my rpi3 work with kernel 1042. (with Lubuntu 16.04)

like image 33
Sébastien Rochette Avatar answered Sep 18 '22 05:09

Sébastien Rochette


I found a fix not sure if its permanent. Pull the sd card and connect to you computer, then remove .bak from any file and either remove or add add .bak to the original file then reboot

like image 29
user519274 Avatar answered Sep 18 '22 05:09

user519274


It seems like it is the kernel version problem that some of other users have been affected by. I have found the solution on the canonical site

Basically downgrade kernel to version 4.4.0-1034 which does not have the issue that ver. 4.4.0-1038 has

like image 20
Matt Avatar answered Sep 21 '22 05:09

Matt