Nextcloud box Raspberry pi 停留在旧内核上

Nextcloud box Raspberry pi 停留在旧内核上

我有下一个云盒。它使用 Ubuntu(核心?)图像和我在 Raspberry pi 2 上安装的 nextcloud snap。我的问题是我没有看到 pi 升级到较新的内核。为了更好地解释这种情况,以下是来自终端的一些结果:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial
$ uname -r
4.4.0-1017-raspi2
$ snap list
Name       Version      Rev   Developer  Notes
core       16-2         1267  canonical  -
nextcloud  11.0.2snap2  1190  nextcloud  -

如果一个人去Ubuntu 转入主线在“xenial linux-raspi2”部分页面上,您可以看到有很多较新的内核发布。

但是如果我运行:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory 
'/etc/apt/apt.conf.d/' as it has an invalid filename extension
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory 
'/etc/apt/apt.conf.d/' as it has an invalid filename extension

忽略的文件是在更新默认映像并发生冲突后出现的,我不确定如何解决。我决定使用更新包中的新文件(我认为)。我读过文件并认为没问题。我可以手动删除,但决定留在那里。我不知道 nextcloud box 附带的 Ubuntu 映像有什么不同,导致无法升级。

有什么方法可以检查哪个选项阻止 Ubuntu 获取较新的内核并修复它?这些是 Canonical 正式发布的内核,因此应该有办法更新它们。

更新:

在尝试修复问题时,我发现了有关linux-raspi2软件包的问题。更具体地说,当我通过 ssh 进入 nextcloudbox(即 raspberry pi2)时,我输入了以下内容:

$ apt-cache policy linux-image*1017-raspi2
linux-image-4.4.0-1017-raspi2:
  Installed: 4.4.0-1017.23
  Candidate: 4.4.0-1017.23
  Version table:
 *** 4.4.0-1017.23 500
        500 http://ports.ubuntu.com xenial-updates/universe armhf Packages
        500 http://ports.ubuntu.com xenial-security/universe armhf Packages
        100 /var/lib/dpkg/status
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory 
'/etc/apt/apt.conf.d/' as it has an invalid filename extension
$ apt-cache policy linux-raspi2
linux-raspi2:
  Installed: (none)
  Candidate: 4.4.0.1046.45
  Version table:
     4.4.0.1046.45 500
        500 http://ports.ubuntu.com xenial-updates/universe armhf Packages
        500 http://ports.ubuntu.com xenial-security/universe armhf Packages
     4.4.0.1009.9 500
        500 http://ports.ubuntu.com xenial/universe armhf Packages
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory 
'/etc/apt/apt.conf.d/' as it has an invalid filename extension

当我尝试安装 linux-raspi2 包时,随后的过程确实下载了更新的内核。然而,当我告诉 raspberry pi 重新启动时,我失去了与它的联系。这意味着我既无法通过 ssh 进入它,也无法再连接到我的路由器(我以 adming 身份登录路由器,但找不到它)。我最终用购买时附带的镜像替换了 SD 卡上的镜像(备份万岁!!)。再次设置后,我仍然遇到最初描述的问题。内核停留在旧版本。

我不确定更新出了什么问题。这是linux-image-4.4.0-1017-raspi2来自/var/lib/dpkg/status

Package: linux-image-4.4.0-1017-raspi2
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 102353
Maintainer: Ubuntu Kernel Team <[email protected]>
Architecture: armhf
Source: linux-raspi2
Version: 4.4.0-1017.23
Provides: fuse-module, ivtv-modules, kvm-api-4, linux-image, linux-
image-3.0, redhat-cluster-modules
Depends: initramfs-tools (>= 0.36ubuntu6) | linux-initramfs-tool, kmod
Pre-Depends: dpkg (>= 1.10.24)
Recommends: flash-kernel
Suggests: fdutils, linux-raspi2-tools, linux-headers-4.4.0-1017-raspi2
Conflicts: hotplug (<< 0.0.20040105-1)
Description: Linux kernel image for version 4.4.0 on ARM (hard float) SMP
 This package contains the Linux kernel image for version 4.4.0 on
 ARM (hard float) SMP.
 .
 Also includes the corresponding System.map file, the modules built by 
 the
 packager, and scripts that try to ensure that the system is not left in an
 unbootable state after an update.
 .
 Supports Generic processors.
 .
 Geared toward desktop and server systems.
 .
 You likely do not want to install this package directly. Instead, 
 install
 the linux-raspi2 meta-package, which will ensure that upgrades work
 correctly, and that supporting packages are also installed.

所以我所做的(sudo apt install linux-raspi2)不应该让 rpi2 变砖(对吧?)。但事实确实如此。有什么线索吗?

答案1

解决方案是放弃官方图像并使用nextcloudpi项目。它基于 Raspbian 而不是 Ubuntu,因此它不能解决 Ubuntu 范围内的问题,但至少您可以获得 Raspberry pi 正在运行的内核的安全更新。

相关内容