range Pi 用户手册 深圳市迅龙软件有限公司版权所有
www.orangepi.cn 43 www.xunlong.tv
3.9. How to modify the linux log level (loglevel)
1) The loglevel of the linux system is set to 1 by default. When using the serial port to
view the startup information, the kernel output log is as follows, basically all shielded
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Orange Pi 2.1.0 Bionic ttyS0
orangepi login:
2) When there is a problem with the linux system startup, you can use the following
method to modify the value of loglevel, so as to print more log information to the serial
port to display, which is convenient for debugging. If the Linux system fails to start and
cannot enter the system, you can insert the TF card into the Ubuntu PC through a card
reader, and then directly modify the configuration of the linux system in the TF card after
mounting the TF card in the Ubuntu PC. Insert the TF card into the development board to
start
root@orangepi:~# sed -i "s/verbosity=1/verbosity=7/" /boot/orangepiEnv.txt
root@orangepi:~# sed -i "s/console=both/console=serial/" /boot/orangepiEnv.txt
3) The above commands are actually to set the variables in /boot/orangepiEnv.txt. After
setting, you can open /boot/orangepiEnv.txt to check
root@orangepi:~# cat /boot/orangepiEnv.txt
verbosity=7
bootlogo=false
console=serial
4) Then restart the development board, the output information of the kernel will be
printed to the serial port for output
[ OK ] Started Dispatcher daemon for systemd-networkd.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...