1. 源由
上次为了做树莓派的wfb-ng测试,将闲置多年的Cubieboard2重新启用,安装和配置了NAS服务器。
运行至今大约半年多吧(24 x 7)不间断运行,昨天整理机架,然后插拔,断电整理了一下,结果发现DLNA的媒体服务器没有了。
为此,只能好好的研究下这个系统到底是什么毛病,最终定位是openSUSE系统起不来了。
2. 问题
经过串口定位,当启动消息打印到下面提示就终止后面的操作了。
[ OK ] Reached target Switch Root.
Starting Switch Root...
Welcome to openSUSE Leap 15.3!
同时发现有一个分区在linux系统上,时有时无的被自动加载。
所以,怀疑可能是文件系统有所损坏,导致的change root没有成功,最后系统就挂在小系统与真实系统之间了。
3. 重装
没有什么好的方法,且也没有对之前的系统进行备份,这里就只能重装了,详见:CB2-2CARD的openSUSE安装&NAS环境配置。
本次改善点:使用肥鲨眼镜视频记录的DVR卡做系统盘,确保卡是OK的。
3.1 分区配置
UUID=caf702cb-3688-40b9-b0cb-cf5e1dc320e4 /var ext4 noatime,nobarrier 0 0
UUID=6b9446e6-0d4c-4179-adc0-d218e3521707 /usr ext4 noatime,nobarrier 0 0
UUID=19a12cd1-e6e6-4b32-b3d7-19419aca1b63 /home ext4 noatime,nobarrier 0 0
3.2 第一次启动日志
U-Boot SPL 2021.01 (Apr 19 2021 - 09:43:27 +0000)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1
U-Boot 2021.01 (Apr 19 2021 - 09:43:27 +0000) Allwinner Technology
CPU: Allwinner A20 (SUN7I)
Model: Cubietech Cubieboard2
I2C: ready
DRAM: 1 GiB
MMC: mmc@1c0f000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@1c50000
starting USB...
Bus usb@1c14000: USB EHCI 1.00
Bus usb@1c14400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
scanning bus usb@1c14000 for devices... 1 USB Device(s) found
scanning bus usb@1c14400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices...
▒
U-Boot SPL 2021.01 (Apr 19 2021 - 09:43:27 +0000)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1
U-Boot 2021.01 (Apr 19 2021 - 09:43:27 +0000) Allwinner Technology
CPU: Allwinner A20 (SUN7I)
Model: Cubietech Cubieboard2
I2C: ready
DRAM: 1 GiB
MMC: mmc@1c0f000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@1c50000
starting USB...
Bus usb@1c14000: USB EHCI 1.00
Bus usb@1c14400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
scanning bus usb@1c14000 for devices... 1 USB Device(s) found
scanning bus usb@1c14400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:3...
44467 bytes read in 5 ms (8.5 MiB/s)
Scanning disk mmc@1c0f000.blk...
No valid Btrfs found
** Unrecognized filesystem type **
Found 7 disks
** Unable to read file ubootefi.var **
Failed to load EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
Scanning mmc 0:4...
BootOrder not defined
EFI boot manager: Cannot load any image
No valid Btrfs found
** Unrecognized filesystem type **
Scanning mmc 0:1...
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootarm.efi
933888 bytes read in 54 ms (16.5 MiB/s)
Booting /efi\boot\bootarm.efi
Welcome to GRUB!
ethernet@1c50000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@1c50000
Please press 't' to show the boot menu on this console
error: ../../grub-core/video/video.c:762:no suitable video mode found.
GNU GRUB version 2.04
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│*openSUSE Leap 15.3 │
│ Advanced options for openSUSE Leap 15.3 │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Use the ▲ and ▼ keys to select which entry is highlighted.
Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. ESC to return previous menu.
The highlighted entry will be executed automatically in 0s.
Booting `openSUSE Leap 15.3'
Loading Linux 5.3.18-59.35-lpae ...
Loading initial ramdisk ...
EFI stub: Entering in HYP mode with MMU enabled
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
EHCI failed to shut down host controller.
Welcome to openSUSE Leap 15.3 dracut-049.1+suse.209.gebcf4f33-3.41.1 (Initramfs)!
[ OK ] Started Dispatch Password …ts to Console Directory Watch.
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Reached target Local File Systems.
[ OK ] Reached target Paths.
[ OK ] Reached target Slices.
[ OK ] Reached target Swap.
[ OK ] Reached target Timers.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Reached target Sockets.
Starting Create list of st…odes for the current kernel...
Starting Journal Service...
Starting Load Kernel Modules...
Starting Setup Virtual Console...
[ OK ] Finished Create list of st… nodes for the current kernel.
Starting Create Static Device Nodes in /dev...
[ OK ] Finished Setup Virtual Console.
[ OK ] Started Journal Service.
Starting dracut cmdline hook...
Starting Create Volatile Files and Directories...
[ OK ] Finished Create Static Device Nodes in /dev.
[ OK ] Finished Load Kernel Modules.
Starting Apply Kernel Variables...
[ OK ] Finished Create Volatile Files and Directories.
[ OK ] Finished Apply Kernel Variables.
[ OK ] Finished dracut cmdline hook.
Starting dracut pre-udev hook...
[ OK ] Finished dracut pre-udev hook.
Starting Rule-based Manage…for Device Events and Files...
[ OK ] Started Rule-based Manager for Device Events and Files.
Starting dracut pre-trigger hook...
[ OK ] Finished dracut pre-trigger hook.
Starting Coldplug All udev Devices...
[ OK ] Finished Coldplug All udev Devices.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Basic System.
Starting dracut initqueue hook...
[ OK ] Finished dracut initqueue hook.
[ OK ] Found device /dev/disk/by-…a-74ae-46f0-a0c1-afa6440f57c4.
[ OK ] Reached target Initrd Root Device.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Remote File Systems.
Starting dracut pre-mount hook...
[ 19.454233] dracut-pre-mount[366]: Created symlink /etc/systemd/system/systemd-fsck-root.service → /dev/null.
[ 23.840224] dracut-pre-mount[678]: Removed /etc/systemd/system/systemd-fsck-root.service.
[ OK ] Finished dracut pre-mount hook.
Starting File System Check…74ae-46f0-a0c1-afa6440f57c4...
[ OK ] Finished File System Check…a-74ae-46f0-a0c1-afa6440f57c4.
Mounting /sysroot...
[ OK ] Mounted /sysroot.
[ OK ] Reached target Initrd Root File System.
Starting Reload Configuration from the Real Root...
Mounting /sysroot/usr...
[ OK ] Mounted /sysroot/usr.
[ OK ] Finished Reload Configuration from the Real Root.
[ OK ] Reached target Initrd File Systems.
[ OK ] Reached target Initrd Default Target.
Starting dracut pre-pivot and cleanup hook...
[ OK ] Finished dracut pre-pivot and cleanup hook.
Starting Cleaning Up and Shutting Down Daemons...
[ OK ] Stopped target Timers.
[ OK ] Stopped dracut pre-pivot and cleanup hook.
[ OK ] Stopped target Initrd Default Target.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Initrd Root Device.
[ OK ] Stopped target Paths.
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped target Remote File Systems (Pre).
[ OK ] Stopped target Slices.
[ OK ] Stopped target Sockets.
[ OK ] Stopped target System Initialization.
[ OK ] Stopped target Swap.
[ OK ] Stopped dracut pre-mount hook.
[ OK ] Stopped target Local Encrypted Volumes.
[ OK ] Stopped Dispatch Password …ts to Console Directory Watch.
[ OK ] Stopped dracut initqueue hook.
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped Load Kernel Modules.
[ OK ] Stopped Create Volatile Files and Directories.
[ OK ] Stopped target Local File Systems.
[ OK ] Stopped Coldplug All udev Devices.
[ OK ] Stopped dracut pre-trigger hook.
Stopping Rule-based Manage…for Device Events and Files...
[ OK ] Stopped Setup Virtual Console.
[ OK ] Stopped Rule-based Manager for Device Events and Files.
[ OK ] Closed udev Control Socket.
[ OK ] Closed udev Kernel Socket.
[ OK ] Stopped dracut pre-udev hook.
[ OK ] Stopped dracut cmdline hook.
Starting Cleanup udev Database...
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Stopped Create list of sta… nodes for the current kernel.
[ OK ] Finished Cleaning Up and Shutting Down Daemons.
[ OK ] Finished Cleanup udev Database.
[ OK ] Reached target Switch Root.
Starting Switch Root...
Welcome to openSUSE Leap 15.3!
[ OK ] Stopped Switch Root.
[ OK ] Created slice Slice /system/getty.
[ OK ] Created slice Slice /system/modprobe.
[ OK ] Created slice Slice /system/serial-getty.
[ OK ] Created slice User and Session Slice.
[ OK ] Started Dispatch Password …ts to Console Directory Watch.
[ OK ] Set up automount Arbitrary…s File System Automount Point.
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Stopped target Switch Root.
[ OK ] Stopped target Initrd File Systems.
[ OK ] Stopped target Initrd Root File System.
[ OK ] Reached target Remote File Systems.
[ OK ] Reached target Slices.
[ OK ] Reached target System Time Set.
[ OK ] Listening on Device-mapper event daemon FIFOs.
[ OK ] Listening on LVM2 poll daemon socket.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on udev Kernel Socket.
Activating swap /dev/disk/…a496-42c7-b4ac-80f993c4dec2...
Mounting Huge Pages File System...
Mounting POSIX Message Queue File System...
Mounting Kernel Debug File System...
Mounting Kernel Trace File System...
Starting Create list of st…odes for the current kernel...
Starting Monitoring of LVM…meventd or progress polling...
Starting Load Kernel Module configfs...
Starting Load Kernel Module drm...
Starting Load Kernel Module fuse...
[ OK ] Stopped File System Check on Root Device.
[ OK ] Stopped Journal Service.
Starting Journal Service...
Starting Load Kernel Modules...
Starting Remount Root and Kernel File Systems...
Starting Coldplug All udev Devices...
[ OK ] Activated swap /dev/disk/b…4-a496-42c7-b4ac-80f993c4dec2.
[ OK ] Mounted Huge Pages File System.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Started Journal Service.
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted Kernel Trace File System.
[ OK ] Finished Create list of st… nodes for the current kernel.
[ OK ] Finished Load Kernel Module configfs.
[ OK ] Finished Load Kernel Module drm.
[ OK ] Finished Load Kernel Module fuse.
[ OK ] Finished Load Kernel Modules.
[ OK ] Finished Remount Root and Kernel File Systems.
[ OK ] Reached target Swap.
Mounting FUSE Control File System...
Mounting Kernel Configuration File System...
Starting Rebuild Hardware Database...
Starting Apply Kernel Variables...
Starting Create System Users...
[ OK ] Mounted FUSE Control File System.
[ OK ] Mounted Kernel Configuration File System.
[ OK ] Finished Create System Users.
Starting Create Static Device Nodes in /dev...
[ OK ] Finished Apply Kernel Variables.
[ OK ] Finished Create Static Device Nodes in /dev.
[ OK ] Finished Coldplug All udev Devices.
Starting Wait for udev To …plete Device Initialization...
[ OK ] Finished Rebuild Hardware Database.
Starting Rule-based Manage…for Device Events and Files...
[ OK ] Started Rule-based Manager for Device Events and Files.
Starting Load Kernel Module configfs...
[ OK ] Finished Load Kernel Module configfs.
[ OK ] Reached target Hardware activated USB gadget.
[ OK ] Finished Monitoring of LVM… dmeventd or progress polling.
[ OK ] Reached target Local File Systems (Pre).
Mounting /boot/efi...
Mounting /home...
Mounting /var...
[ OK ] Mounted /home.
[ OK ] Mounted /var.
Starting Flush Journal to Persistent Storage...
Starting Load/Save Random Seed...
[ OK ] Mounted /boot/efi.
[ OK ] Reached target Local File Systems.
Starting Restore /run/initramfs on shutdown...
[ OK ] Finished Restore /run/initramfs on shutdown.
[ OK ] Finished Load/Save Random Seed.
[ OK ] Finished Flush Journal to Persistent Storage.
Starting Create Volatile Files and Directories...
[ OK ] Finished Create Volatile Files and Directories.
Starting Rebuild Journal Catalog...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Finished Update UTMP about System Boot/Shutdown.
[ OK ] Finished Rebuild Journal Catalog.
[ OK ] Finished Wait for udev To Complete Device Initialization.
Starting Update is Completed...
[ OK ] Finished Update is Completed.
[ OK ] Reached target System Initialization.
[ OK ] Started Watch for changes in CA certificates.
[ OK ] Started Watch for changes in issue snippets.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target Paths.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Save/Restore Sound Card State...
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started Detect if the system suffers from bsc#1089761.
[ OK ] Started irqbalance daemon.
Starting Generate issue file for login session...
Starting Apply settings from /etc/sysconfig/keyboard...
Starting User Login Management...
Starting wicked AutoIPv4 supplicant service...
Starting wicked DHCPv4 supplicant service...
Starting wicked DHCPv6 supplicant service...
[ OK ] Finished Save/Restore Sound Card State.
Starting Load extra kernel modules for sound stuff...
[ OK ] Finished Load extra kernel modules for sound stuff.
[ OK ] Finished Generate issue file for login session.
[ OK ] Reached target Sound Card.
[ OK ] Started wicked DHCPv6 supplicant service.
[ OK ] Started wicked DHCPv4 supplicant service.
[ OK ] Started wicked AutoIPv4 supplicant service.
Starting wicked network management service daemon...
[ OK ] Started User Login Management.
[ OK ] Finished Apply settings from /etc/sysconfig/keyboard.
[ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
[ OK ] Started wicked network management service daemon.
Starting wicked network nanny service...
[ OK ] Started wicked network nanny service.
Starting wicked managed network interfaces...
[ OK ] Finished wicked managed network interfaces.
[ OK ] Reached target Network.
Starting NTP client/server...
Starting OpenSSH Daemon...
Starting Permit User Sessions...
[ OK ] Finished Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Started NTP client/server.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Backup of RPM database.
[ OK ] Started Backup of /etc/sysconfig.
[ OK ] Started Check if mainboard battery is Ok.
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Daily rotation of log files.
[ OK ] Reached target Timers.
Welcome to openSUSE Leap 15.3 - Kernel 5.3.18-59.35-lpae (ttyS0).
eth0:
localhost login:
3.3 系统更新
localhost:~ # sudo apt-get update
Retrieving repository 'Main Repository' metadata .........................[done]
Building repository 'Main Repository' cache ..............................[done]
Retrieving repository 'Main Update Repository' metadata ..................[done]
Building repository 'Main Update Repository' cache .......................[done]
All repositories have been refreshed.
localhost:~ # sudo apt-get upgrade
Loading repository data...
Reading installed packages...
The following 3 packages are going to be upgraded:
openSUSE-build-key yast2-bootloader yast2-packager
The following 2 NEW packages are going to be installed:
checkmedia libmediacheck5
3 packages to upgrade, 2 new.
Overall download size: 451.2 KiB. Already cached: 0 B. After the operation,
additional 188.5 KiB will be used.
Continue? [y/n/v/...? shows all options] (y): Y
Retrieving package libmediacheck5-5.4-1.1.armv7hl
(1/5), 67.6 KiB (156.2 KiB unpacked)
Retrieving: libmediacheck5-5.4-1.1.armv7hl.rpm ...............[done (2.6 KiB/s)]
Retrieving package checkmedia-5.4-1.1.armv7hl
(2/5), 18.1 KiB ( 29.9 KiB unpacked)
Retrieving: checkmedia-5.4-1.1.armv7hl.rpm ...............................[done]
Retrieving package yast2-packager-4.3.22-3.4.1.armv7hl
(3/5), 234.0 KiB (874.2 KiB unpacked)
Retrieving: yast2-packager-4.3.22-3.4.1.armv7hl.rpm ..........[done (3.3 KiB/s)]
Retrieving package yast2-bootloader-4.3.30-3.6.1.armv7hl
(4/5), 109.6 KiB (256.4 KiB unpacked)
Retrieving: yast2-bootloader-4.3.30-3.6.1.armv7hl.rpm ....................[done]
Retrieving package openSUSE-build-key-1.0-lp153.4.11.1.noarch
(5/5), 21.9 KiB ( 15.8 KiB unpacked)
Retrieving: openSUSE-build-key-1.0-lp153.4.11.1.noarch.rpm ..[done (15.2 KiB/s)]
Checking for file conflicts: .............................................[done]
(1/5) Installing: libmediacheck5-5.4-1.1.armv7hl .........................[done]
(2/5) Installing: checkmedia-5.4-1.1.armv7hl .............................[done]
(3/5) Installing: yast2-packager-4.3.22-3.4.1.armv7hl ....................[done]
(4/5) Installing: yast2-bootloader-4.3.30-3.6.1.armv7hl ..................[done]
(5/5) Installing: openSUSE-build-key-1.0-lp153.4.11.1.noarch .............[done]
3.4 基础软件
localhost:~ # sudo apt-get install vim nano
Loading repository data...
Reading installed packages...
'vim' is already installed.
No update candidate for 'vim-8.0.1568-5.15.1.armv7hl'. The highest available version is already installed.
Resolving package dependencies...
The following 2 NEW packages are going to be installed:
nano nano-lang
2 new packages to install.
Overall download size: 792.5 KiB. Already cached: 0 B. After the operation,
additional 3.1 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): Y
Retrieving package nano-4.9.2-bp153.1.1.armv7hl
(1/2), 492.1 KiB ( 1.6 MiB unpacked)
Retrieving: nano-4.9.2-bp153.1.1.armv7hl.rpm .................[done (1.1 KiB/s)]
Retrieving package nano-lang-4.9.2-bp153.1.1.noarch
(2/2), 300.5 KiB ( 1.6 MiB unpacked)
Retrieving: nano-lang-4.9.2-bp153.1.1.noarch.rpm .........................[done]
Checking for file conflicts: .............................................[done]
(1/2) Installing: nano-4.9.2-bp153.1.1.armv7hl ...........................[done]
(2/2) Installing: nano-lang-4.9.2-bp153.1.1.noarch .......................[done]
3.5 应用软件
略。
4. 总结
经过系统重新安装,基本数据和应用环境恢复。
localhost:~ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 462M 0 462M 0% /dev/shm
tmpfs 185M 3.1M 182M 2% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
/dev/mmcblk0p3 1.4G 350M 945M 28% /
/dev/mmcblk0p5 5.9G 825M 4.7G 15% /usr
/dev/mmcblk0p6 20G 2.4G 17G 13% /home
/dev/mmcblk0p4 2.0G 94M 1.7G 6% /var
/dev/sda1 7.2G 3.2G 3.6G 47% /home/daniel/sddrive
/dev/mmcblk0p1 16M 920K 16M 6% /boot/efi
tmpfs 93M 0 93M 0% /run/user/0
localhost:~ # cat /etc/fstab
UUID=49f6d264-a496-42c7-b4ac-80f993c4dec2 swap swap defaults 0 0
UUID=d64511da-74ae-46f0-a0c1-afa6440f57c4 / ext4 noatime,nobarrier 0 0
UUID=3083-CF48 /boot/efi vfat defaults 0 0
UUID=caf702cb-3688-40b9-b0cb-cf5e1dc320e4 /var ext4 noatime,nobarrier 0 0
UUID=6b9446e6-0d4c-4179-adc0-d218e3521707 /usr ext4 noatime,nobarrier 0 0
UUID=19a12cd1-e6e6-4b32-b3d7-19419aca1b63 /home ext4 noatime,nobarrier 0 0
UUID=8920aa9a-05e4-4309-8c3c-c618d5208087 /home/daniel/sddrive auto defaults 0 0
如果有小伙盘遇到系统不稳定或者经常出现系统无法正常启动,请多关注下tf卡,因为现在市场上这块存储比较乱!