我是 Linux 新手,很难理解这一切,所以请耐心等待。每次使用 sudo apt-get upgrade 时,我都会收到此消息
这是 Ubuntu 的全新安装,它采用了 Windows 双启动,并且系统内的其他驱动器上还有其他安装,我目前无法弄清楚如何访问……可能是另一个问题。
信息:
... Setting up linux-firmware (1.173.16) ...
update-initramfs: Generating /boot/initrd.img-5.3.0-40-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=8cc84133-bb6c-4c98-999c-28315297dacf)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.3.0-28-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=8cc84133-bb6c-4c98-999c-28315297dacf)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.3.0-26-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=8cc84133-bb6c-4c98-999c-28315297dacf)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.0.0-37-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=8cc84133-bb6c-4c98-999c-28315297dacf)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.0.0-23-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=8cc84133-bb6c-4c98-999c-28315297dacf)
I: Set the RESUME variable to override this.
我从其他问题中了解到,这与挂起后恢复有关?我从未将 PC 置于挂起模式,因此我不确定为什么会创建这些文件(?)。
我该怎么做才能解决这个问题?提前感谢任何建议。
答案1
运行以下命令查看您的 UUID:
sudo blkid | grep -i swap
通过以下方式创建/etc/initramfs-tools/conf.d/resume
文件:
sudo -H gedit /etc/initramfs-tools/conf.d/resume
将之前获取的 UUID 粘贴到那里/dev/sda5
。
例如:
$ sudo blkid | grep -i swap
[sudo] password for user:
/dev/sdb5: UUID="1053a199-0b8f-44ae-9356-c04f5864b138" TYPE="swap" PARTUUID="4e24c763-05"
UUID 为TYPE="swap"
:
user@lenovo:~$ cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=1053a199-0b8f-44ae-9356-c04f5864b138
/etc/default/grub
还可以包含从交换分区恢复的选项:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/sda5"
sudo update-grub
sudo update-initramfs -c -k $(uname -r)