avafinger / nanopi-r2s-ubuntu-server-minimal-image

Ubuntu 20.04 LTS Server for NanoPi R2S - Mainline Kernel 5.7.y / 5.8.y / 5.9.y / 5.10.y
56 stars 7 forks source link

reboot issues #5

Open genokolar opened 3 years ago

genokolar commented 3 years ago

when terminal run : sudo reboot

the nanopi r2s shutdown but not boot success

屏幕截图 2021-04-11 195447

tag 0.5 + kernel 5.8.1

avafinger commented 3 years ago

This is a known issue that I was unfortunately unable to solve. Perhaps with the latest u-boot mainline it could be solved. If I fix the reboot, the shutdown turns to be the issue and vice-versa.

I believe kernel 5.4 and 5.6 there is no such issue.

genokolar commented 3 years ago

I've found in the readme file. but the kernel 5.6.5 (tag 0.5 used) have the issue too. kernel 5.8.1 and Kernel 5.9.0 RC8 have the issue too. i need use 5.6.7 ? or which one?

avafinger commented 3 years ago

You can check https://github.com/avafinger/nanopi-r2s-ubuntu-server-minimal-image/releases/tag/v0.2 which is ubuntu 19.10 and then issue the following to upgrade to 20.04 LTS:

sudo sed -i 's/eoan/focal/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get dist-upgrade

And trim/remove the unwanted services that will be created/started in 20.04 LTS.

avafinger commented 3 years ago

Maybe https://github.com/avafinger/nanopi-r2s-ubuntu-server-minimal-image/releases/tag/v0.3 is a better choice.

genokolar commented 3 years ago

do you mean the kernel 5.4.28 will fine? if i use kernel5.4.28 ‘s boot + tagv0.5 ’s rootfs(replace kernel moudle) will fine?

genokolar commented 3 years ago

do you mean the kernel 5.4.28 will fine? if i use kernel5.4.28 ‘s boot + tagv0.5 ’s rootfs(replace kernel moudle) will fine?

Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.28 aarch64)

use kernel5.4.28 ‘s boot + tagv0.5 ’s rootfs first boot the “reboot” is work fine,but when link to WAN,“ sudo apt-ge upgrade ” . The problem persists

avafinger commented 3 years ago

first boot the “reboot” is work fine,but when link to WAN

I don't know why WAN would interfere in "reboot" process. Can you provide more info about LAN/WAN ? Can you log the complete "reboot" with a debug UART?

genokolar commented 3 years ago

first boot the “reboot” is work fine,but when link to WAN

I don't know why WAN would interfere in "reboot" process. Can you provide more info about LAN/WAN ? Can you log the complete "reboot" with a debug UART?

maybe not WAN,only a guess。

I can't get UART debug log.

Welcome to Ubuntu 19.10 (GNU/Linux 5.4.28 aarch64)

try tagv0.3. can't reboot

avafinger commented 3 years ago

To be able to investigate we need a complete boot log (shutdown -h now and reboot). Please get a USB TTL debug so we can have a look at the boot log.

genokolar commented 3 years ago

friendlyarm release the ubuntu20.04(kernel5.10),i will test it。

now I can't get UART debug log. i need some time try USB TTL link

genokolar commented 3 years ago
Ubuntu 20.04.2 LTS nanopi-r2s ttyS2

nanopi-r2s login: ubuntu
Password:
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.6.5 aarch64)

 * Documentation:  https://help.ubunt* Management:     https://landscape.canonical.com
 * Support:  /ubuntu.com/advantage
ubuntu@nanopi-r2s:~$ sudo reboot
[sudo] ubuntu 的密码:
[  OK  ] Removed slice system-modprobe.slice[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily apt upgrade and clean activities.
[  OK  ] Stopped Daily apt downlo[  OK  ] Stopped Periodic ext4 Onli…ata Check for All Filesystems.
[  OK  ] Stopped  once a week.
[  OK  ] Stopped Daily rotation of log files.
[  OK  ] Stopped Daily man-db regeneration.
[  OK  ] Stopped .
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped target System Time Synchronized.
[  OK  ] Stopped targ;1;39mSystem Time Set.
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Stopping Authorization Manager...
[  OK  ] Stopped target Login Prompts.
         Stopping LSB: automatic crash report generatio         Stopping LSB: starts bt...
         Stopping Regular background program processing         Stopping Make  printers available locally...
         Stopping Getty on tty1...
         Stopping Light Display Manager...
         Stopping Dispatcher dystemd-networkd...
         Stopping LSB: starts pureftpd server...
         Stopping System Logging Service...
         Stopping Serial Getty on ttyS2...
         Stopping OpenBSD Secure Shell server...
         Stopping Disk Manager...
[  OK  ] Stopped Regular background program emon.
[  OK  ] Stopped Dispatcher daemon for syste[  OK  ] Stopped Authorization Manag[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Disk Manager.
[  OK  ] Stopped OpenBSD Secure Shell server.
[  OK  ] Stopped Make remote CUPS prin
[**    ] A stop job is running for Mak         Stopping Avahi mDNS/DNS-SD Stack...     ] A stop job is running for Make remo…able locally (1min 20s / 1mi
         Stopping CUPS Scheduler...Make remo…able locally (1min 10s
[  OK  ] Stopped Avahi mDNS/DNS-SD Stack[  OK  ] Stopped CUPS Scheduler.in 30
[  OK  ] Stopped target Basic System.ke remo…lable locally (1min 9s
[  OK  ] Stopped target Paths. for Make remo…lable locally (1min 2s / 1min 30
[  OK  ] Stopped CUPS Scheduler.or Make remo…available locally (
[  OK  ] Stopped target Slices.for Make remo…available lo
[  OK  ] Removed slice User and Session Slice.vailable lo
[  OK  ] Stopped target Sockets.[  OK  ] Closed Avahi mDNS/DNS-SD Stack Actiion Socket.] A stop job is running for Make remo…available locally (45s / 1mi
[  OK  ] Closed CUPS Scheduler.for Make remo…available lo
[  OK  ] Closed D-Bus System Message Bus Socket.ilable lo
[  OK  ] Stopped target System Initializatio[  OK  ] Stopped target Local Encrypted Volumes.top job is running for Make remo…available locally (34s
[  OK  ] Stopped Dispatch Password …ts to Console Directory Watch.s
[  OK  ] Stopped Forward Password R…uests to Wall Directory Watch.s / 1mi
[  OK  ] Stopped target Swap.g for Make remo…available lo
[  OK  ] Closed Syslog Socket. for Make remo…available locally (17s / 1mi
         Deactivating swap /www/swap... remo…available lo
[  OK  ] Stopped Apply Kernel Variables.remo…available lo
[  OK  ] Stopped Load Kernel Modules.ke rem
         Stopping Update UTMP about System Boot/Shutdown...
[FAILED] Failed deactivating swap /www/swa[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems
                                          nmounting /boot...
[  OK  ] Unmounted /boot.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped File System Check on /dev/mmcblk0p1.
[  OK  ] Removed slice system-systemd\x2dfsck.slice.
[  OK  ] Stopped target Local [  OK  ] Stopped Create Static Device Nodes [  OK  ] Stopped Create System Users.
[  OK  ] Stopped Remount Root and Kernel Film.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Finished Reboot.
[  OK  ] Reached target Reboot.
[  185.084645] watchdog: watchdog0: watchdog did not stop!
[  185.227661] systemd-shutdown[1]: Could not deactivate swap /wRead-only file system
[  185.236124] systemd-shutdown[1]: Could not deactivate swap /wwap: Read-only file system
[  185.241823] systemd-shutdown[1]: Failed to finalize  swap devices, ignoring
[  185.280121] reboot: Restarting system
INFO:    PSCI Power Domain Map:
INFO:      Domain Nod -1, State ON (0x0)
INFO:      Domain Node : Level 1, parent_node 0, State ON (0x0)
INFO:     evel 0, parent_node 0, State ON (0x0)
INFO:      Domain Node : el 0, parent_node 0, State ON (0x0)
INFO:      CPU Node : MPID 0x0, parent_node 1, State ON (0x0)
INFO:      CPU Node : MPID 0x1, parent_node 1, State ON (0x0)
INFO:      CPU Node : MPID 0x2, parent_node 1, State ON (0x0)
INFO:      CPU Node : MPID 0x3, parent_node 1, State ON (0x0)
DDR version 1.13 20180428
ID:0x805 N
In
SRX
DDR4
786MHz
Bus Width=32 Col=10 Bank=4 Bank Group=2 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
ddrconfig:14
OUT
Boot1 Release Time: Feb  2 2018 15:41:39, version: 2.46
ChipType = 0x11, 306
SdmmcInit=2 0
BootCapSize=0
UserCapSize=0MB
FwPartOffset=2000SdmmcInit=0 0
BootCapSize=0
UserCapSize=29832MB
FwPartOffset=2000 , 0
StorageInit ok = 25865
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
LoadTrustBL
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xa0ff0
RunBL31 0x10000
NOTICE:  BL31: v1.3(debug):f947c7e
NOTICE:  BL31: Built : 09:28:45, May 31 2017
NOTICE:  BL31:ion: v1.3
INFO:    ARM GICv2 driver initialized
INFO:    Using opteed sec cpu_context!
INFO: cpu mask: 1
INFO:    plat_rockchip_pmu_init: pd status 0xe
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, BootinTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entrynt address = 0x200000
INFO:    SPSR = 0x3c9

U-Boot 2020.04-rc3-00140-g50be9f0e1c-dirty (Apr 19 2020 - 110)

Model: FriendlyElec NanoPi R2S
DRAM:  1022 MiB
PMIC:  RK8050 (on=0x40, off=0x01)
MMC:   rksdmmc@ff500000: 1, rksdmmc@ff520000: 0
Loading Environment from MMC... *** Warning - !read failed, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: FriendlyElec NanoPi R2S
Net:   eth0: ethernet@ff540000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
** No partition table - mmc 1 **
starting USB...
Bus usb@ff5c0USB EHCI 1.00
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff580000: Bus usb@ff600000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@ff5c0000 fs... 1 USB Device(s) found
scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb@ff580000 for devices... 1 USB Device(s) found
scanning bus usb@ff600000 for devices... 1 USB Device(s) found
       scanning usb for storage devices..: unknown device
ethernet@ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@ff540000
missing variable: pxeuuid
missing environment variable: bootfile
Retripxelinux.cfg/01-4a-c0-a9-05-7e-21
ethernet@ff540000 Waiting for PHY auto negotiation to complete.. done
Speed: 1000, full duplex
*** ERROR: `serverip' not set
riable: bootfile
Retrieving file: pxelinux.cfg/00000000
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missinment variable: bootfile
Retrieving file: pxelinux.cfg/000000
Speed: 1000, full duplex
*** ER `serverip' not set
missing environment variable: bootfile
Ret file: pxelinux.cfg/00000
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing enviootfile
Retrieving file: pxelinux.cfg/0000
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing environment vabootfile
Retrieving file: pxelinux.cfg/00
Speed: 1000, full duplex
*** ERROR: `serverip' not missing environment variable: bootfile
Retrieving file: pxelinu0
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing environment variable: bootfietrieving file: pxelinux.cfg/default-arm-rk3328-evb_rk3328
Speed: 1000, full duplex
*** ERROR:not set
missing environment variable: bootfile
Retrieving fileg/default-arm-rk3328
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
Speed: 1000, full duplex
*** ERROR: `serverip' not set
missing environment variable: bootfileving file: pxelinux.cfg/default
Speed: 1000, full duplex
*** ERROR: `serverip' not set
Confie not found
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 213
DHCP client bound to address 192.168.3.4 (302 ms)
not set
Cannot autoload with TFTPGET
Speed: 1000, full duplex
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 213
DHCP client bound to address 192.168.3.4 (78 ms)
*autoload with TFTPGET
=>