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-117753

Philipp Claßen's questions

Martin Hope
Philipp Claßen
Asked: 2020-09-17 12:38:57 +0800 CST

logrotate 在以 root 身份手动运行时成功,但在由 logrotate.service 运行时失败并显示“只读文件系统”

  • 3

我从以前的 Ubuntu 18.04 安装中获取了 OpenResty 的(以前工作的)logrotate 设置。然而 logrotate.service 现在失败并出现此错误......

error: error renaming /usr/local/openresty/nginx/logs/access.log.60.zst
to /usr/local/openresty/nginx/logs/access.log.61.zst: Read-only file system

...我很难理解为什么。新机器运行的是 Ubuntu 20.04,但我不明白为什么在这种情况下会有所作为。

首先,这是配置:

$ cat /etc/logrotate.d/custom-openresty

/usr/local/openresty/nginx/logs/access.log
/usr/local/openresty/nginx/logs/error.log
{
  daily
  rotate 60
  maxsize 1G
  missingok
  notifempty
  compress
  compresscmd /usr/bin/zstd
  uncompresscmd /usr/bin/unzstd
  compressoptions -9 --long -T1
  compressext .zst
  delaycompress
  sharedscripts
  postrotate
    test ! -f /usr/local/openresty/nginx/logs/nginx.pid || kill -USR1 `cat /usr/local/openresty/nginx/logs/nginx.pid`
 endscript
}

/etc/logrotate.conf没有改变,看起来像这样:


# see "man logrotate" for details
# rotate log files weekly
weekly

# use the adm group by default, since this is the owning group
# of /var/log/syslog.
su root adm

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
#dateext

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# system-specific logs may be also be configured here.

这是我的文件的状态(我希望access.log.1在 logrotate 运行后得到):

$ ls -alhg /usr/local/openresty/nginx/logs/
total 10G
drwxr-xr-x  2 root 4.0K Sep 16 20:04 .
drwxr-xr-x 18 root 4.0K Sep 16 19:42 ..
-rw-r--r--  1 root  10G Sep 16 19:56 access.log
-rw-r--r--  1 root 5.5K Sep 16 19:56 error.log

但是,logrotate.service 失败并出现以下错误:

~$ systemctl status logrotate.service 
● logrotate.service - Rotate log files
     Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2020-09-16 20:11:32 UTC; 4min 32s ago
TriggeredBy: ● logrotate.timer
       Docs: man:logrotate(8)
             man:logrotate.conf(5)
    Process: 27403 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE)
   Main PID: 27403 (code=exited, status=1/FAILURE)

$ sudo journalctl --unit logrotate.service

Sep 16 20:11:32 fetcher-scheduler systemd[1]: Starting Rotate log files...
Sep 16 20:11:32 fetcher-scheduler logrotate[27403]: error: error renaming /usr/local/openresty/nginx/logs/access.log.60.zst to /usr/local/openresty/nginx/logs/access.log.61.zst: Read-only file system
Sep 16 20:11:32 fetcher-scheduler systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Sep 16 20:11:32 fetcher-scheduler systemd[1]: logrotate.service: Failed with result 'exit-code'.
Sep 16 20:11:32 fetcher-scheduler systemd[1]: Failed to start Rotate log files.

当我以 root 身份在调试模式下运行它(没有 systemd)时,我得到以下输出:

# logrotate -v -d /etc/logrotate.d/custom-openresty

reading config file /etc/logrotate.d/custom-openresty
compress_prog is now /usr/bin/zstd
uncompress_prog is now /usr/bin/unzstd
compress_options is now  -9 --long -T1
compress_ext is now .zst
Reading state from file: /var/lib/logrotate/status
Allocating hash table for state file, size 64 entries
Creating new state
Creating new state
...
Creating new state

Handling 1 logs

rotating pattern: /usr/local/openresty/nginx/logs/access.log
/usr/local/openresty/nginx/logs/error.log
 after 1 days (60 rotations)
empty log files are not rotated, log files >= 1073741824 are rotated earlier, old logs are removed
considering log /usr/local/openresty/nginx/logs/access.log
  Now: 2020-09-16 20:24
  Last rotated at 2020-09-16 20:11
  log needs rotating
considering log /usr/local/openresty/nginx/logs/error.log
  Now: 2020-09-16 20:24
  Last rotated at 2020-09-16 19:00
  log does not need rotating (log has been rotated at 2020-9-16 19:0, that is not day ago yet)
rotating log /usr/local/openresty/nginx/logs/access.log, log->rotateCount is 60
dateext suffix '-20200916'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /usr/local/openresty/nginx/logs/access.log.1 does not exist
renaming /usr/local/openresty/nginx/logs/access.log.60.zst to /usr/local/openresty/nginx/logs/access.log.61.zst (rotatecount 60, logstart 1, i 60), 
renaming /usr/local/openresty/nginx/logs/access.log.59.zst to /usr/local/openresty/nginx/logs/access.log.60.zst (rotatecount 60, logstart 1, i 59), 
...
/logs/access.log.3.zst (rotatecount 60, logstart 1, i 2), 
renaming /usr/local/openresty/nginx/logs/access.log.1.zst to /usr/local/openresty/nginx/logs/access.log.2.zst (rotatecount 60, logstart 1, i 1), 
renaming /usr/local/openresty/nginx/logs/access.log.0.zst to /usr/local/openresty/nginx/logs/access.log.1.zst (rotatecount 60, logstart 1, i 0), 
log /usr/local/openresty/nginx/logs/access.log.61.zst doesn't exist -- won't try to dispose of it
renaming /usr/local/openresty/nginx/logs/access.log to /usr/local/openresty/nginx/logs/access.log.1
running postrotate script
running script with arg /usr/local/openresty/nginx/logs/access.log
/usr/local/openresty/nginx/logs/error.log
: "
    test ! -f /usr/local/openresty/nginx/logs/nginx.pid || kill -USR1 `cat /usr/local/openresty/nginx/logs/nginx.pid`
"

对我来说,一切看起来都很正常。如果我运行它,它也可以工作:

# logrotate -v /etc/logrotate.d/custom-openresty
reading config file /etc/logrotate.d/custom-openresty
compress_prog is now /usr/bin/zstd
uncompress_prog is now /usr/bin/unzstd
compress_options is now  -9 --long -T1
compress_ext is now .zst
Reading state from file: /var/lib/logrotate/status
Allocating hash table for state file, size 64 entries
Creating new state
...
Creating new state

Handling 1 logs

rotating pattern: /usr/local/openresty/nginx/logs/access.log
/usr/local/openresty/nginx/logs/error.log
 after 1 days (60 rotations)
empty log files are not rotated, log files >= 1073741824 are rotated earlier, old logs are removed
considering log /usr/local/openresty/nginx/logs/access.log
  Now: 2020-09-16 20:26
  Last rotated at 2020-09-16 20:11
  log needs rotating
considering log /usr/local/openresty/nginx/logs/error.log
  Now: 2020-09-16 20:26
  Last rotated at 2020-09-16 19:00
  log does not need rotating (log has been rotated at 2020-9-16 19:0, that is not day ago yet)
rotating log /usr/local/openresty/nginx/logs/access.log, log->rotateCount is 60
dateext suffix '-20200916'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /usr/local/openresty/nginx/logs/access.log.1 does not exist
renaming /usr/local/openresty/nginx/logs/access.log.60.zst to /usr/local/openresty/nginx/logs/access.log.61.zst (rotatecount 60, logstart 1, i 60), 
old log /usr/local/openresty/nginx/logs/access.log.60.zst does not exist
...
old log /usr/local/openresty/nginx/logs/access.log.2.zst does not exist
renaming /usr/local/openresty/nginx/logs/access.log.1.zst to /usr/local/openresty/nginx/logs/access.log.2.zst (rotatecount 60, logstart 1, i 1), 
old log /usr/local/openresty/nginx/logs/access.log.1.zst does not exist
renaming /usr/local/openresty/nginx/logs/access.log.0.zst to /usr/local/openresty/nginx/logs/access.log.1.zst (rotatecount 60, logstart 1, i 0), 
old log /usr/local/openresty/nginx/logs/access.log.0.zst does not exist
log /usr/local/openresty/nginx/logs/access.log.61.zst doesn't exist -- won't try to dispose of it
renaming /usr/local/openresty/nginx/logs/access.log to /usr/local/openresty/nginx/logs/access.log.1
running postrotate script

没有错误,最终access.log.1按预期创建:

# ls -algh /usr/local/openresty/nginx/logs/
total 10G
drwxr-xr-x  2 root 4.0K Sep 16 20:26 .
drwxr-xr-x 18 root 4.0K Sep 16 19:42 ..
-rw-r--r--  1 root  10G Sep 16 19:56 access.log.1
-rw-r--r--  1 root 5.5K Sep 16 19:56 error.log

请注意,它说...

log /usr/local/openresty/nginx/logs/access.log.61.zst
doesn't exist -- won't try to dispose of it

...而不是error renaming ... Read-only file system(就像logrotate.service那样)

为什么以root身份手动运行时它可以工作,但是当它被logrotate.service执行时却失败了?

我没有对logrotate.service. 为了完整起见,这里是单元文件:

$ systemctl cat logrotate.service
# /lib/systemd/system/logrotate.service
[Unit]
Description=Rotate log files
Documentation=man:logrotate(8) man:logrotate.conf(5)
ConditionACPower=true

[Service]
Type=oneshot
ExecStart=/usr/sbin/logrotate /etc/logrotate.conf

# performance options
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7

# hardening options
#  details: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
#  no ProtectHome for userdir logs
#  no PrivateNetwork for mail deliviery
#  no ProtectKernelTunables for working SELinux with systemd older than 235
#  no MemoryDenyWriteExecute for gzip on i686
PrivateDevices=true
PrivateTmp=true
ProtectControlGroups=true
ProtectKernelModules=true
ProtectSystem=full
RestrictRealtime=true

现在我的选择已经不多了。非常感谢您对解决问题的任何帮助。

systemd logrotate 20.04
  • 2 个回答
  • 4977 Views
Martin Hope
Philipp Claßen
Asked: 2018-04-12 04:06:59 +0800 CST

libasan 包之间的区别(libasan0、libasan2、libasan3 等)

  • 7

libasan 有许多类似命名的包(gcc 和 clang 的地址清理器):

$ apt-cache search libasan | grep -v dbg | grep -v cross
libasan2 - AddressSanitizer -- a fast memory error detector
libasan3 - AddressSanitizer -- a fast memory error detector
libasan4 - AddressSanitizer -- a fast memory error detector
libasan0 - AddressSanitizer -- a fast memory error detector

(输出来自 Ubuntu 17.10。Ubuntu 18.04 也有libasan5。)

  • 这些包有什么区别?
  • 我应该安装哪一个?
gcc clang
  • 1 个回答
  • 10034 Views
Martin Hope
Philipp Claßen
Asked: 2017-05-20 00:39:41 +0800 CST

如何验证是否启用了无人值守升级?

  • 9

让我们假设您刚刚通过 SSH 登录到运行 Ubuntu 的服务器。

是否有一个简单的命令可以确定是否启用了无人值守升级并自动安装安全关键更新?

unattended-upgrades
  • 2 个回答
  • 10777 Views
Martin Hope
Philipp Claßen
Asked: 2017-05-09 03:03:23 +0800 CST

在关闭协议的开头(而不是结尾)运行脚本?

  • 0

是否可以在关机前运行脚本?这意味着系统仍然可以正常运行。

我试图将我的关机脚本放入/lib/systemd/system-shutdown/test-script. 它将被执行,但据我了解,它仅在关闭发生之前立即执行。例如,磁盘已经以只读模式挂载。这可以修复,但将脚本包装为:

#!/bin/bash
mount -oremount,rw /
... do something ...
mount -oremount,ro /

不过,我需要但不能上班的是互联网连接。执行脚本时,互联网连接似乎不再可用。

是否可以在关闭协议开始时运行脚本?

我正在使用 Ubuntu 16.04 进行测试。

16.04
  • 2 个回答
  • 254 Views
Martin Hope
Philipp Claßen
Asked: 2017-04-27 12:27:44 +0800 CST

在 docker 容器中安装 certbot 时避免用户与 tzdata 交互

  • 263

我想在带有 Ubuntu 16.04 映像的 docker 环境中安装certbot :

例如:

docker run -it ubuntu:16.04 /bin/bash

当我在容器中时,安装 certbot 的最直接方法不起作用,因为它需要用户干预:

apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y -u ppa:certbot/certbot && \
apt-get install -y certbot

问题是tzdata,它会随着这个交互式对话框而停止:

Extracting templates from packages: 100%
Preconfiguring packages ...
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

 1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
 2. America     5. Arctic     8. Europe    11. SystemV
 3. Antarctica  6. Asia       9. Indian    12. US
Geographic area: 

奇怪的是,当我tzdata在添加 ppa 之前安装时它可以工作:

apt-get update && \
apt-get install -y tzdata && \
apt-get install -y software-properties-common && \
add-apt-repository -y -u ppa:certbot/certbot && \
apt-get install -y certbot

问题:

  • 为什么tzdata在添加 ppa 之前或之后安装会有所不同?
  • 安装 certbot 时是否有更好的方法来避免交互式对话框?
apt
  • 5 个回答
  • 159569 Views
Martin Hope
Philipp Claßen
Asked: 2015-01-03 07:35:12 +0800 CST

暂停后,Steam 客户端在启动时冻结,但在重新启动后再次运行

  • 1

Steam 工作正常,但当我应用以下步骤时它挂起:

  1. 启动蒸汽
  2. 停止蒸汽
  3. 暂停我的笔记本电脑
  4. (唤醒后)启动蒸汽

现在 Steam 客户端在启动时挂起。我只看到一个没有任何内容的空白弹出窗口。我认为这应该是登录弹出窗口(“连接到 Steam 帐户”)。

唯一的解决方法是重新启动我的系统。如果我尝试killall steam && steam,它仍然会在同一点再次挂起。

这是控制台输出:

Running Steam on ubuntu 14.10 64-bit
STEAM_RUNTIME is enabled automatically
[2015-01-02 16:06:15] Startup - updater built Nov 21 2014 16:23:41
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2015-01-02 16:06:15] Checking for update on startup
[2015-01-02 16:06:15] Checking for available updates...
[2015-01-02 16:06:16] Download skipped by HTTP 304 Not Modified
[2015-01-02 16:06:16] Nothing to do
[2015-01-02 16:06:16] Verifying installation...
[2015-01-02 16:06:16] Performing checksum verification of executable files
[2015-01-02 16:06:17] Verification complete
Requested Force create but SharedObjectMutex already created
Forced create but already created for SharedObjectEvent
Forced create but already created for SharedObjectEvent

--- here it hangs. After a reboot, it would continue like that ---

Running Steam on ubuntu 14.10 64-bit
STEAM_RUNTIME has been set by the user to: /home/phil/.steam/ubuntu12_32/steam-runtime

这是输出~/.steam/error.log:

rm: cannot remove ‘/home/phil/.steam/steam’: Is a directory
rm: cannot remove ‘/home/phil/.steam/bin’: Is a directory
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "overlay-scrollbar"
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
[0102/162746:ERROR:nss_util.cc(1018)] Failed to load NSS libraries.
Installing breakpad exception handler for appid(steam)/version(1416617579)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
FillInMachineIDInfo took a total of 0 milliseconds
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Generating new string page texture 2: 48x256, total string texture memory is 49,15 KB
Generating new string page texture 3: 256x256, total string texture memory is 311,30 KB

我尝试了几种推荐的解决方法,例如:

  • killall steam && rm ~/.steam/steam/appcache
  • mv /etc/fonts/conf.d/10-scale-bitmap-fonts.conf{,.BAK}

但是,只有重新启动才能解决启动问题。

我正在使用 Ubuntu 14.10(64 位)。(我的窗口管理器是 i3。我认为这无关紧要,但我读到了有关 xmonad 的问题。)

suspend
  • 1 个回答
  • 1289 Views
Martin Hope
Philipp Claßen
Asked: 2014-08-13 11:04:48 +0800 CST

从 12.04 升级到 14.04 后 grub-install 失败(grub-pc 损坏)

  • 3

我刚刚从 Ubuntu 12.04 升级到 14.04,但是在安装过程中 grub-install 失败了:

在此处输入图像描述

在此处输入图像描述

我继续安装,希望之后能解决 grub 问题。但是,我遇到了一些困难。我还没有重新启动我的系统,因为我担心它无法重新启动。

这是我在尝试安装 grub 时总是遇到的错误:

 $ sudo grub-install /dev/mapper/isw_cjccfdbihf_Volume0p1 
 Installing for i386-pc platform.
 grub-install: error: cannot find a GRUB drive for /dev/mapper/isw_cjccfdbihf_Volume0p1.  Check your device.map.

(我也试过sudo grub-install /dev/sda了,但它也失败了,并出现了完全相同的错误消息。)

该机器似乎使用 RAID 1 设置。以下是一些信息:

$ ls -algh /dev/mapper/
total 0
drwxr-xr-x  2 root     120 Aug 12 19:41 .
drwxr-xr-x 16 root    5.2K Aug 12 20:27 ..
crw-------  1 root 10, 236 Jul 28 10:30 control
lrwxrwxrwx  1 root       7 Aug 12 19:41 isw_cjccfdbihf_Volume0p1 -> ../dm-1
lrwxrwxrwx  1 root       7 Aug 12 19:41 isw_cjccfdbihf_Volume0p2 -> ../dm-2
lrwxrwxrwx  1 root       7 Aug 12 19:41 isw_cjccfdbihf_Volume0p5 -> ../dm-3

$ sudo grub-probe -t device /boot/grub
/dev/mapper/isw_cjccfdbihf_Volume0p1

$ sudo fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003b681

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   468514815   234256384   83  Linux
/dev/sda2       468516862   488390655     9936897    5  Extended
/dev/sda5       468516864   488390655     9936896   82  Linux swap / Solaris

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003b681

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   468514815   234256384   83  Linux
/dev/sdb2       468516862   488390655     9936897    5  Extended
/dev/sdb5       468516864   488390655     9936896   82  Linux swap / Solaris

Disk /dev/mapper/isw_cjccfdbihf_Volume0p1: 239.9 GB, 239878537216 bytes
255 heads, 63 sectors/track, 29163 cylinders, total 468512768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/isw_cjccfdbihf_Volume0p1 doesn't contain a valid partition table
fdisk: unable to read /dev/mapper/isw_cjccfdbihf_Volume0p2: Inappropriate ioctl for device

特别是最后两行似乎表明了更深层次的问题。:-(

的错误信息grub-install还提到了一个device.map文件。

$ cat /boot/grub/device.map
cat: /boot/grub/device.map: No such file or directory

我试图生成它,但它也没有帮助(错误消息没有改变):

$ sudo grub-mkdevicemap
$ cat /boot/grub/device.map
 (hd0)  /dev/disk/by-id/ata-WDC_WD2500AAJS-00YZCA0_WD-WCAYU7549707
 (hd1)  /dev/disk/by-id/ata-WDC_WD2500AAJS-00YZCA0_WD-WCAYU7501473

您对我下一步应该尝试什么有什么建议吗?非常感谢任何帮助。

更新:

$ debconf-show grub-pc
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf    /passwords.dat: Permission denied
* grub-pc/install_devices: /dev/disk/by-id/dm-name-isw_cjccfdbihf_Volume0
  grub-pc/kopt_extracted: false
  grub-pc/partition_description:
* grub2/linux_cmdline:
  grub-pc/install_devices_empty: false
  grub-pc/timeout: 10
  grub-pc/install_devices_failed_upgrade: true
* grub2/linux_cmdline_default: quiet splash
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/hidden_timeout: true
  grub-pc/disk_description:
  grub-pc/mixed_legacy_and_grub2: true
  grub2/kfreebsd_cmdline_default: quiet splash
  grub2/device_map_regenerated:
* grub-pc/install_devices_failed: true
  grub-pc/chainload_from_menu.lst: true
  grub-pc/install_devices_disks_changed:
  grub2/kfreebsd_cmdline:

注意这一行:grub-pc/install_devices: /dev/disk/by-id/dm-name-isw_cjccfdbihf_Volume0

现在的内容/etc/fstab:

proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/isw_cjccfdbihf_Volume01 /               ext4    errors=remount-ro 0       1
/dev/mapper/isw_cjccfdbihf_Volume0p5 none            swap    sw              0       0

2012 年的备份文件显示交换条目略有不同(Volume05 而不是 Volume0p5),这表明名称可能已更改:

 # Note that this is an old file at the time the system was installed (Ubuntu 10.04 or 10.10)
 # (This is also the time from which the original grub configuration is from, isn't it?!)
 /dev/mapper/isw_cjccfdbihf_Volume01 /               ext4    errors=remount-ro 0       1
 /dev/mapper/isw_cjccfdbihf_Volume05 none            swap    sw              0       0

所以,也许它与“_Volume01”与“_Volume0p1”与“_Volume0”有关。/etc/fstab说“01”,ls /dev/mapper返回映射“0p1”、“0p2”和“0p5”(交换),最后debconf-show grub-pc说“Volume0”。我认为这种不一致是问题的根源。

现在我想知道:

  1. grub-pc/install_devices输出中的行应该debconf-show grub-pc是什么?
  2. 如何更改 Grub 设置,以便我可以尝试不同的值?

我还刚刚注意到 grub-pc 的安装被破坏了:

$ sudo dpkg-reconfigure grub-pc
/usr/sbin/dpkg-reconfigure: grub-pc is broken or not fully installed
14.04
  • 4 个回答
  • 18321 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