Rpi3 boot console

Hey,

my raspberry pi 3 osmc setup stopped working, and i want to know what is the problem so i need to access the kernel boot log with uart. but i do not get any logs. i know that rpi3 has some differences in this regard, so i need to set “enable_uart=1” in config.txt and add “console=serial0,115200 console=tty1” to cmdline.txt but this is not working. i am able to see kernel boot log using raspbian image (using the above additional settings) but not with osmc image. there is possibility that osmc is broken so much that it just does not output any kernel logs, but the green led blinks for quite a while after boot so this might be an indication that the kernel is booting quite far.
so do i need to make some other steps to enable kernel boot log in osmc for raspberry pi 3 ?

The simplest way of getting access to the logs in OSMC is to access your RPi over SSH (see the wiki for how to do this) and then run sudo grab-logs -C -A which will drop a file in the /boot partition with all relevant logs included.

Alternatively you can run grab-logs -A and it will upload the logs to the OSMC pastebin and give you a URL you can post here to get help with your problem.

This is not an option for me since osmc does not boot. It is broken. I can’t ssh to it. I need to see kernel bootup logs using uart. I need to plug uart from rpi to my pc, boot it up and see what is happening so i can fix that or at least know what goes wrong to prevent it in the future. If i swap the sd card with another that has raspbian on it, i can see the bootup logs in realtime through uart cable. With osmc image i can’t. So i’m asking if there is something more i need to do to enable this log in case of osmc image ?

You will likely need to install software to enable that, for which you would need a working system. If you can’t boot at all it would be quicker to re-install.

The only other thing you could do would be to check for differences in cmdline.txt between your OSMC card and the raspbian one.

If you put the card in a pc you can save all your settings etc by making a copy of the /home/osmc/.kodi folder.

what software ? before kernel boots up there is no software other than the kernel. i could put on to sdcard only a kernel file and stiil be able to see kernel logs with uart. if it is required to recompile the kernel i can do that since i’m already using custom kernel. I have doubts that i am clearly understood :slight_smile: normally if someone is developing the embedded linux system, the simplest way of debugging kernel panics and oops is to plug into uart to get kernel bootup logs. that way i can see what is happening during boot and if something goes wrong i can see where boot process stops, and if i’m lucky see an error message. there is no special software needed, just properly configured kernel. So i’m asking if in case of osmc kernel (i believe this is different kernel that the raspbian kernel) i need to do something more to enable kernel logs. rpi3 is different than rpi2 in regard to uart. on rpi3 uart is used by the bluetooth, but there is another uart available that can be used to output kernel logs. to enable this i have to put “enable_uart=1” to config.txt and add “console=serial0,115200 console=tty1” to cmdline.txt and this works for the raspbian kernel, but not for the osmc kernel. BUT MAYBE it is working but my osmc setup is so badly broken that it even does not output any logs. So again the question is, in case of osmc kernel is there something more needed ? Is there anybody who can confirm that adding these two things to config.txt and cmdline.txt enables kernel boot logs for them ? I can check it by preparing another sd card with fresh osmc, but i would need to buy one more sd card :slight_smile: and i believe that these two are not sufficient because before my osmc setup died i was trying to get these logs and was unable to get them.

maybe @popcornmix or @DBMandrake might have an idea

mystery solved, had to remove “quiet” option from cmdline.txt … so obvious :frowning: and as for the cause of osmc death it is the sd card that is failing, i see io errors in kernel log so i need to buy new sd card after all :frowning:

With version:
3810303a48372d28853f83bacc3d34c4 osmc/OSMC_TGT_rbp2_20190623.img.gz

@mczerski your instructions was fine, for the first boot, after usd cloned, with only one partition.
At the first boot another partition is created and the two files config.txt and cmdline.txt are overwritten: there is no card corruption.
So i reapplied the configuration by changing console0 -> ttyAMA0 and then configured wifi, that is what I want to do.