我刚刚安装tree
通过
sudo apt-get install tree
我的终端突然决定更新grub
。上周我安装了tree
,也发生了类似的事情。然而,当我那天晚上晚些时候重新启动电脑时,它启动到一个显示窗口
Grub _
并没有改变。
最终我重新安装了我的操作系统(我使用的是 WattOS,上周二刚刚将其安装在一台新电脑上,所以这并不是世界末日 - 只需 5 个小时即可重新设置所有内容)。
Grub 安装时出现了一些错误,我依稀记得上次看到过这些错误(包含在我的帖子的底部,以便于阅读)。
我用谷歌搜索了一下:
- 为什么tree要更新grub?
- 为什么 grub 升级/更新?
但我没有任何运气。我怀疑我可能遗漏了一些东西。
谁能解释一下:
- 为什么会发生这种情况
- 这是否意味着有什么问题
- 如果我应该/可以做任何事情来解决它。
我不想重新安装所有东西(出于显而易见的原因!)
谢谢。
安装时遇到的错误tree
:
sudo apt-get install tree
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
gimp-data libamd2 libbabl-0.1-0 libcamd2 libccolamd2 libcholmod3 libgegl-0.4-0 libgegl-common libgexiv2-2 libgimp2.0 libhpmud0 libimagequant0
libmetis5 libqt5designer5 libqt5help5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libsane-hpaio libumfpack5 printer-driver-hpcups
printer-driver-postscript-hp python3-dbus.mainloop.pyqt5 python3-notify2 python3- olefile python3-pexpect python3-pil python3-ptyprocess
python3-pyqt5 python3-pyqt5.sip python3-renderpm python3-reportlab python3-reportlab- accel vlc-plugin-samba xsane xsane-common
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
tree
0 upgraded, 1 newly installed, 0 to remove and 174 not upgraded.
1 not fully installed or removed.
Need to get 49.6 kB of archives.
After this operation, 118 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 tree amd64 1.8.0-1+b1 [49.6 kB]
Fetched 49.6 kB in 0s (110 kB/s)
Selecting previously unselected package tree.
(Reading database ... 123032 files and directories currently installed.)
Preparing to unpack .../tree_1.8.0-1+b1_amd64.deb ...
Unpacking tree (1.8.0-1+b1) ...
Setting up grub-pc (2.06-3~deb11u6) ...
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
Generating grub configuration file ...
Found background: /usr/share/wattOS/splash.png
Found background image: /usr/share/wattOS/splash.png
Found linux image: /boot/vmlinuz-5.10.0-19-amd64
Found initrd image: /boot/initrd.img-5.10.0-19-amd64
Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Debian GNU/Linux 11 (bullseye) on /dev/mmcblk0p2 done Setting up tree (1.8.0-1+b1) ...
Processing triggers for man-db (2.9.4-2) ...
更新
我不小心重启了,我的电脑又死机了。然后我重新安装了 WattOS 作为我硬盘上唯一的操作系统,一切正常。我刚看到@eyoung100的回答,我就跑了
sudo apt upgrade
运行没有错误。
然后我跑了
sudo apt autoremove
进行到一半时,我看到了与上次相同的屏幕:
The grub-pc package is being upgraded. This menu allows you to select which devices you'd like grub-install to be automatically run for, if any.
Running grub-install automatically is recommended in most situations, to prevent the installed GRUB core image from getting out of sync with
GRUB modules or grub.cfg.
If you're unsure which drive is designated as boot drive by your BIOS, it is often a good idea to install GRUB to all of them.
Note: it is possible to install GRUB to partition boot records as well, and some appropriate partitions are offered here. However, this forces GRUB to use the blocklist mechanism, which makes it less reliable, and therefore is not recommended.
我没有选择“确定”,因为上次给了我错误。
当我然后在另一个终端尝试时
sudo apt upgrade
它的回应是
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 39623 (apt)
这并不奇怪。
我尝试使用 ctrl-c 和 ctrl-x 关闭该 shell,但都没有帮助。我可以关上窗户,但我很担心。
要求提供更多信息
- 的结果
sudo dmidecode -s bios-version
是
8GET38WW (1.15 )
- 的结果
sudo dmidecode -t 0 | grep UEFI
没什么。(我想这意味着它不受支持)。
- 的结果
cpuid | less
是
bash: cpuid: command not found
我只能说这是一台联想Thinkpad L520,是翻新的,而且我没有更换CPU。(不知道前任主人怎么样)。
- 的结果
sudo parted --list
是
Model: ATA ADATA SU630 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 231GB 231GB primary ext4 boot
2 231GB 240GB 9449MB primary linux-swap(v1)
我看不到任何关于fstype
或 的信息gpt
。
正如我所说,我尝试将其安装到已擦除的磁盘上。
感谢您的时间!