suddenly booting hangs at "Starting kernel..."

Started by gregh, January 09, 2021, 10:06:30 PM

Previous topic - Next topic

gregh

This server was running fine for year on Debian oldstable with Debian kernel and suddenly after a reboot it hangs on boot from the microSD card. See the bootlog below.

There was no kernel update since the last good reboot.

I checked the microSD mmc card with my laptop with fsck and badblocks, everything fine.

Unfortunatly I do not have another microSD Card here or another OlinuxXino for testing.

Do you have any ideas or help what is wrong or how I can debug this problem?

U-Boot 2016.11+dfsg1-4 (Mar 27 2017 - 18:39:51 +0000) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-Olinuxino Micro
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

Setting up a 1024x768 vga console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
SCSI:  SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c50000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:2...
Found U-Boot script /boot.scr
2464 bytes read in 73 ms (32.2 KiB/s)
## Executing script at 43100000
Mainline u-boot / new-style environment detected.
3836080 bytes read in 1903 ms (1.9 MiB/s)
35271 bytes read in 232 ms (148.4 KiB/s)
16947432 bytes read in 1488 ms (10.9 MiB/s)
Booting Debian 4.9.0-13-armmp-lpae from mmc 0:2...
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Ramdisk to 48fd6000, end 49fff8e8 ... OK
   Loading Device Tree to 48fca000, end 48fd59c6 ... OK

Starting kernel ...

gregh

It seems to be an issue with the sd card.
Although the file header data of vmlinuz is the same of the backup file from the day before, the md5 sum is not.

LubOlimex

So re-writing the card fixed it? Can the SD card problem be caused by any sudden power loss or power downs?
Technical support and documentation manager at Olimex

gregh

I rewrote the file and it had the correct md5sum then. It booted but had other errors while booting.
I decided to order a SATA SSD and a new microSd card. I will make a fresh install of Debian Buster on the SSD and use the microsd only for u-boot. I hope this is more robust.

I am not aware of power problems, but last week were problems in the European power grid.

gregh

There were also problems in November 2020 with a kernel update.
Probably the card was also the problem then:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973742

gregh

Now the problem suddenly appeared again. The SDCard only lasted for about one year, although only u-boot is used and only read.
Is there a more robust solution? Boot from NAND, boot from SATA?

LubOlimex

Using latest kernel you can't boot from NAND yet, NAND memories are not supported, but eMMC memories are. So you can use eMMC instead. It is also possible to boot from SATA.

When using our Olimage image use the scripts for the task:

olinuxino-sd-to-emmc

or

olinuxino-sd-to-sata

More info can be found in this document:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex