AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-914766

rgov's questions

Martin Hope
rgov
Asked: 2023-07-22 12:41:24 +0800 CST

Pi 上的 Ubuntu Server:每次启动时 cloud-init 都会重新运行吗?

  • 5

我在 Raspberry Pi 4 上安装了官方 Ubuntu Server 22.04 映像。我还在network-configSD 卡上的文件中配置了无线网络。

该文件由 cloud-init 转换为插入/etc/netplan/50-cloud-init.yaml以下序言的文件:

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}

我对这种说法持怀疑态度——如果我修改原始/boot/firmware/network-config文件,它不会导致50-cloud-init.yaml重新生成。

另一方面,cloud-init.service和cloud-config.service都仍然启用并且似乎在启动时运行。

netplan
  • 1 个回答
  • 24 Views
Martin Hope
rgov
Asked: 2023-07-15 03:51:23 +0800 CST

从 systemd 单元运行时 TigerVNC 分段错误

  • 6

如果我运行sudo systemctl tigervncserver@:2,服务器分段错误:

Xvnc TigerVNC 1.12.0 - built 2022-03-25 17:06
Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101003, X.Org


Fri Jul 14 19:45:34 2023
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on local interface(s), port 5902
 vncext:      created VNC server for screen 0
[mi] mieq: warning: overriding existing handler (nil) with 0x56355e466400 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x56355e466400 for event 3
3NI3X0 New Xtigervnc server 'myserver:2 (user2)' on port 5902 for display :2.
3NI3X0 Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/user2/.vnc/passwd :2 to connect to the VNC server.
Segmentation fault (core dumped)
X connection to :2 broken (explicit kill or server shutdown).

该服务使用ExecStart=/usr/libexec/tigervncsession-start %i,所以如果我运行/usr/libexec/tigervncsession-start :2它应该表现类似,对吧?

但在这种情况下,它不会出现故障并且运行正常,这使得诊断变得困难。

vnc
  • 1 个回答
  • 40 Views
Martin Hope
rgov
Asked: 2023-07-15 02:35:08 +0800 CST

TigerVncSession 服务无法启动,删除密码文件

  • 6

在 Ubuntu 22.04 上,我使用 TigerVNC(通过软件包tigervnc-standalone-server)提供对无头服务器的远程桌面访问。

对于一名用户,tigervncserver服务退出且没有诊断消息:

$ sudo systemctl restart tigervncserver@:2
$ sudo systemctl status tigervncserver@:2
○ tigervncserver@:2.service - Remote desktop service (VNC)
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
     Active: inactive (dead)

Jul 14 18:31:53 myserver systemd[1]: Starting Remote desktop service (VNC)...
Jul 14 18:31:53 myserver tigervncsession[14835]: pam_unix(tigervnc:session): session opened for user user2(uid=1002) by (uid=0)
Jul 14 18:31:53 myserver systemd[1]: Started Remote desktop service (VNC).
Jul 14 18:31:53 myserver tigervncsession[14835]: tigervncsession: tigervncserver exited with status=1
Jul 14 18:31:53 myserver tigervncsession[14835]: pam_unix(tigervnc:session): session closed for user user2
Jul 14 18:31:53 myserver systemd[1]: tigervncserver@:2.service: Deactivated successfully.

即使tigervncserver以状态 1 退出,整体服务也不会显示为失败。

在 中~user2/.vnc/hostname:2.log,它看起来像是要求输入密码,但由于它作为服务运行且无法接收输入而失败:

You will require a password to access your desktops.

getpassword error: Inappropriate ioctl for device
Password:

我确实有一个~user2/.vnc/passwd文件,但奇怪的是,当服务尝试启动时它被删除了:

[pid 15789] unlink("/home/user2/.vnc/passwd") = 0
[pid 15789] write(1, "\nYou will require a password to "..., 55) = 55
vnc
  • 1 个回答
  • 31 Views
Martin Hope
rgov
Asked: 2022-11-29 21:50:54 +0800 CST

网络接口不会出现,自动获取 DHCP 租约

  • 5

我有一个最小的 Ubuntu 18.04 系统。我希望我的网络接口之一eth1在启动时自动启动并从 DHCP 获取 IP 地址。

我创建了/etc/network/interfaces.d/default包含:

auto eth1
iface eth1 inet dhcp

Hoevereth1不会在启动时启动。反而:

eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

我可以运行sudo dhclient eth1,它出现并获得一个 IP。但是为什么这不会自动发生呢?

networking
  • 1 个回答
  • 23 Views
Martin Hope
rgov
Asked: 2022-04-30 06:17:12 +0800 CST

如何在 Ubuntu 20.04 上为网络接口自动启用 LAN 唤醒?

  • 0

Ubuntu 的网络堆栈在不断发展,以前关于为接口启用 LAN 唤醒的大多数信息都已过时(如Ubuntu wiki)。

现在 Ubuntu 使用 Netplan 而不是/etc/network/interfaces,如何在特定接口出现时自动启用 LAN 唤醒?

networking
  • 1 个回答
  • 405 Views
Martin Hope
rgov
Asked: 2021-10-06 18:08:32 +0800 CST

构建自定义内核元包

  • 0

我遵循了BuildYourOwnKernel指南并制作了

linux-image-unsigned-4.15.0-159-generic_4.15.0-159.167+custom_amd64.deb
linux-modules-4.15.0-159-generic_4.15.0-159.167+custom_amd64.deb
linux-modules-extra-4.15.0-159-generic_4.15.0-159.167+custom_amd64.deb
...etc...

现在我还想生产依赖于这些包的 、 、linux-generic等linux-headers-generic。linux-image-generic

作为提示,apt source linux-image-generic将我重定向到linux-meta它告诉我在 Git 上的位置:

NOTICE: 'linux-meta' packaging is maintained in the 'Git' version control system at:
git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-meta/+git/bionic
Please use:
git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-meta/+git/bionic
to retrieve the latest (possibly unreleased) updates to the package.
18.04
  • 1 个回答
  • 67 Views
Martin Hope
rgov
Asked: 2021-02-13 07:15:01 +0800 CST

由于撤回 Nvidia 驱动程序包,内核构建失败

  • 0

我正在尝试按照https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel的说明构建 Ubuntu Bionic 内核 4.15.0-122-generic 。

它运行了很长一段时间,然后尝试下载一些现在丢失的 Nvidia 软件包,可能是因为其中发现了安全漏洞。

如何继续构建内核?我不需要 Nvidia 驱动程序,我可以以某种方式禁用它们吗?

II: dkms-build downloading nvidia-418srv (nvidia-kernel-source-418-server_418.181.07-0ubuntu0~0.18.04.1_amd64.deb)
II: fetching https://launchpad.net/ubuntu/+archive/primary/+files/nvidia-kernel-source-418-server_418.181.07-0ubuntu0~0.18.04.1_amd64.deb
curl: (22) The requested URL returned error: 404 Not Found
grep: /etc/apt/sources.list.d/*.list: No such file or directory
II: fetching http://archive.ubuntu.com/ubuntu//pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_418.181.07-0ubuntu0~0.18.04.1_amd64.deb
curl: (22) The requested URL returned error: 404 Not Found
II: fetching http://archive.ubuntu.com/ubuntu//pool/main/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_418.181.07-0ubuntu0~0.18.04.1_amd64.deb
curl: (22) The requested URL returned error: 404 Not Found
II: fetching http://security.ubuntu.com/ubuntu//pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_418.181.07-0ubuntu0~0.18.04.1_amd64.deb
curl: (22) The requested URL returned error: 404 Not Found
II: fetching http://security.ubuntu.com/ubuntu//pool/main/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_418.181.07-0ubuntu0~0.18.04.1_amd64.deb
curl: (22) The requested URL returned error: 404 Not Found
EE: nvidia-kernel-source-418-server not found
debian/rules.d/2-binary-arch.mk:112: recipe for target 'install-generic' failed
make: *** [install-generic] Error 1
18.04
  • 1 个回答
  • 206 Views
Martin Hope
rgov
Asked: 2020-10-03 10:42:39 +0800 CST

从网络服务器安装自定义系统映像

  • 0

我有一个 Ubuntu 系统的可启动映像 (ISO),但它本身不是安装程序。

我希望能够指示系统通过网络复制 ISO 并将其有效地复制dd到内部存储(覆盖以前存储在那里的任何内容),然后重新启动到其本地副本。

(我不想简单地通过网络从映像启动。)

我需要设置什么来实现这一目标?需要在目标系统上安装什么,例如 GRUB?

我的用例是我正在开发一个嵌入式系统并定期重新生成这些图像。当我有新版本的软件时,我希望能够轻松地刷新板载存储。没有什么需要坚持。

我正在寻找相当交钥匙的东西。我不需要复杂的可启动恢复映像菜单。我可以作为 Docker 容器部署到本地服务器的东西会很棒。

system-installation pxe foreman
  • 3 个回答
  • 715 Views
Martin Hope
rgov
Asked: 2020-09-15 07:28:05 +0800 CST

Netplan 没有自动连接到网络

  • 2

我为 Raspberry Pi 4 安装了 Ubuntu 18.04.4,并带有一个network-config描述我的 Wi-Fi 网络的文件。此文件已自动复制到/etc/netplan/50-cloud-init.yaml.

但是,RPi 没有自动连接到网络。

当我运行sudo netplan --debug apply它时,它确实连接了(下面的日志)。

但我想了解为什么它一开始不能自动工作,所以我不需要控制台访问来启动每个设备的网络连接。

** (generate:1719): DEBUG: 18:47:11.874: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:1719): DEBUG: 18:47:11.875: starting new processing pass
** (generate:1719): DEBUG: 18:47:11.875: wlan0: adding wifi AP 'AccessPointA'
** (generate:1719): DEBUG: 18:47:11.875: wlan0: adding wifi AP 'AccessPointB'
** (generate:1719): DEBUG: 18:47:11.875: wlan0: setting default backend to 1
** (generate:1719): DEBUG: 18:47:11.875: Configuration is valid
** (generate:1719): DEBUG: 18:47:11.875: eth0: setting default backend to 1
** (generate:1719): DEBUG: 18:47:11.875: Configuration is valid
** (generate:1719): DEBUG: 18:47:11.876: Generating output files..
** (generate:1719): DEBUG: 18:47:11.877: NetworkManager: definition eth0 is not for us (backend 1)
** (generate:1719): DEBUG: 18:47:11.877: wlan0: Creating wpa_supplicant configuration file run/netplan/wpa-wlan0.conf
** (generate:1719): DEBUG: 18:47:11.877: Creating wpa_supplicant service enablement link /run/systemd/system/systemd-networkd.service.wants/[email protected]
** (generate:1719): DEBUG: 18:47:11.878: NetworkManager: definition wlan0 is not for us (backend 1)
DEBUG:netplan generated networkd configuration changed, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:eth0 not found in {}
DEBUG:wlan0 not found in {}
DEBUG:Merged config:
network:
  bonds: {}
  bridges: {}
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  vlans: {}
  wifis:
    wlan0:
      access-points:
        AccessPointA:
          password: asdf
        AccessPointB:
          password: asdf
      dhcp4: true
      optional: true

DEBUG:Skipping non-physical interface: lo
DEBUG:{}
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for eth0
DEBUG:netplan triggering .link rules for wlan0

我确实看到了/var/log/cloud-init-output.log:

network_state.py[WARNING]: Wifi configuration is only available to distros withnetplan rendering support.

此消息似乎来自cloud-init 的这一部分。

networking raspberrypi netplan cloud-init
  • 1 个回答
  • 1550 Views
Martin Hope
rgov
Asked: 2020-09-14 19:24:53 +0800 CST

Raspberry Pi 4 在启动 Ubuntu 18.04.5 时卡住,“rcu_sched 检测到停顿”

  • 3

我将 Raspberry Pi 4 ( ) 的 Ubuntu 18.04.5 映像刷ubuntu-18.04.5-preinstalled-server-arm64+raspi4.img到 SD 卡上,并通过 5V GPIO 引脚为我的 RPi4 供电。

启动时,它会到达这一点:

[    4.352613] random: fast init done
[    4.414200] mmc0: new ultra high speed DDR50 SDHC card at address aaaa
[    4.423077] mmcblk0: mmc0:aaaa SC32G 29.7 GiB
[    4.431244] mmc1: new high speed SDIO card at address 0001
[    4.437267]  mmcblk0: p1 p2

然后在打印之前有 24 秒的暂停:

[   28.006460] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[   28.012484] rcu:     1-...0: (7 ticks this GP) idle=1d6/1/0x4000000000000000 softirq=80/81 fqs=7 
[   28.021231]  (detected by 3, t=5893 jiffies, g=-379, q=2)
[   28.026710] Task dump for CPU 1:
[   28.029984] swapper/0       R  running task        0     1      0 0x0000002a
[   28.037143] Call trace:
[   28.039636]  __switch_to+0xcc/0x208
[   28.043179]  console_unlock+0x4f8/0x600
[   28.047076] rcu: rcu_sched kthread starved for 1001 jiffies! g-379 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=3
[   28.057405] rcu: RCU grace-period kthread stack dump:
[   28.062529] rcu_sched       I    0    10      2 0x00000028
[   28.068098] Call trace:
[   28.070580]  __switch_to+0xcc/0x208
[   28.074123]  __schedule+0x2c4/0x7b0
[   28.077663]  schedule+0x38/0xa8
[   28.080851]  schedule_timeout+0x1a0/0x378
[   28.084920]  rcu_gp_kthread+0x688/0xa10
[   28.088813]  kthread+0x124/0x128
[   28.092089]  ret_from_fork+0x10/0x1c

再过一分钟左右,它会打印出类似的痕迹:

[   92.006458] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[   92.012475] rcu:     1-...0: (7 ticks this GP) idle=1d6/1/0x4000000000000000 softirq=80/81 fqs=23 
[   92.021308]  (detected by 3, t=21893 jiffies, g=-379, q=2)
[   92.026874] Task dump for CPU 1:
[   92.030147] swapper/0       R  running task        0     1      0 0x0000002a
[   92.037304] Call trace:
[   92.039788]  __switch_to+0xcc/0x208
[   92.043328]  console_unlock+0x4f8/0x600
[   92.047223] rcu: rcu_sched kthread starved for 1001 jiffies! g-379 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=3
[   92.057552] rcu: RCU grace-period kthread stack dump:
[   92.062675] rcu_sched       I    0    10      2 0x00000028
[   92.068242] Call trace:
[   92.070726]  __switch_to+0xcc/0x208
[   92.074265]  __schedule+0x2c4/0x7b0
[   92.077804]  schedule+0x38/0xa8
[   92.080991]  schedule_timeout+0x1a0/0x378
[   92.085060]  rcu_gp_kthread+0x688/0xa10
[   92.088952]  kthread+0x124/0x128
[   92.092227]  ret_from_fork+0x10/0x1c

等等,大约每分钟。

我没有收到控制台登录提示,也没有我期望的与引导相关的消息。

如何进一步诊断此问题?

boot raspberrypi
  • 1 个回答
  • 837 Views
Martin Hope
rgov
Asked: 2020-03-31 20:41:43 +0800 CST

我连接到哪个 Wi-Fi 网络?

  • 2

我正在使用 Ubuntu Server 18.04(仿生)。如何从命令行判断我连接到哪个 wi-fi 网络?

理想情况下,我希望能够在不安装任何新软件包的情况下这样做。我不相信存在的许多用于管理 Wi-Fi 网络的可安装工具是否被认为是此版本 Ubuntu 的最佳实践。我还担心一些新工具决定接管我的网络接口的管理,否则它工作得很好。

networking wireless
  • 1 个回答
  • 96 Views
Martin Hope
rgov
Asked: 2019-02-27 11:52:19 +0800 CST

将 /snap/bin 添加到 systemd 使用的 PATH

  • 6

我在设置 Ubuntu Server 18.10 时通过 snap 安装了 Docker。

如果我有一个引用该docker命令的 systemd 单元文件,我会收到以下错误:

Executable "docker" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

我不确定它在哪里得到这个搜索路径。它与 /etc/environment 中的内容不匹配。

在不修改单元文件的情况下,我可以将 systemd 使用的搜索路径全局更改为 include/snap/bin吗?


在 Ubuntu 18.04 系统上,仅使用docker没有完整路径会导致错误Executable path is not absolute。理想情况下,我希望同一个服务文件同时使用 snap 的 Docker 和 apt 的 docker-ce 包。

systemd snap
  • 2 个回答
  • 36724 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve