从 16.04 升级后,Ubuntu 18.04 在启动时显示“放弃等待挂起/恢复设备”

从 16.04 升级后,Ubuntu 18.04 在启动时显示“放弃等待挂起/恢复设备”

我刚刚将 Ubuntu 16.04 升级到 18.04,重启后显示

Gave up waiting for suspend/resume device
/: clean, 293537/3932160 files, 4067550/15719936 blocks
cryptsetup (md5_crypt): set up successfully

那么它就不会进入登录页面。

即使它挂在这里,我也可以 ssh 在计算机上,我可以访问文件夹和文件。(一个问题是终端没有插值和显示历史命令的能力)

我快速搜索了一下这个错误,发现这个问题与交换内存有关。让我在这里分享一些命令输出和一些我已经尝试过但没有奏效的方法。

$ sudo blkid | grep swap
/dev/mapper/sdb8_crypt: UUID="19a5cc43-2391-461e-9d36-ecb21d23cbe1" TYPE="swap"
/dev/mapper/sda8_crypt: UUID="a68d5301-6f0c-4069-be2b-b43d42e4697c" TYPE="swap"
$ sudo cat  /etc/initramfs-tools/conf.d/resume
#RESUME=UUID=6f0ca38b-604e-4641-8d12-c81fd8228098
#RESUME=none
RESUME=UUID=19a5cc43-2391-461e-9d36-ecb21d23cbe1
#RESUME=UUID=a68d5301-6f0c-4069-be2b-b43d42e4697c

第一行是我首先有的一行,我将其注释掉,然后添加第二、第三和第四行,并分别尝试了它们,但它们都不能很好地工作$sudo update-initramfs -u

$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_ENABLE_CRYPTODISK=y

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
$ sudo lsinitramfs /initrd.img |grep resume
bin/resume
conf/conf.d/resume
scripts/local-premount/resume
$ swapon
NAME      TYPE      SIZE USED PRIO
/dev/dm-2 partition  16G   0B   -2
/dev/dm-3 partition  16G   0B   -3
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.15.0-55-generic
cryptsetup: WARNING: resume device UUID=7bad70b9-6b90-424b-88e1-3b36e63ea23f uses a key file
W: Possible missing firmware /lib/firmware/ast_dp501_fw.bin for module ast

我尝试了以下解决方案,但都没有起作用。 交换:从分区到文件,现在出现“没有可用的匹配交换设备”我能找到的线程与此类似)

https://fitzcarraldoblog.wordpress.com/2018/06/15/lubuntu-18-04-gave-up-waiting-for-suspend-resume-device/ (我没有/swapfile
$ ls /swapfile
ls:无法访问'/swapfile':没有此文件或目录)

答案1

我认为问题在于您的磁盘已加密,并且您不能使用加密交换来休眠系统。

尝试禁用并运行RESUME=none中的恢复取消注释。然后运行并重新启动。/etc/initramfs-tools/conf.d/resumesudo update-initramfs -u -k allsudo update-grub

如果不起作用,请检查 grub 配置,grep resume /boot/grub/grub.cfg看是否以某种方式出现一些奇怪的恢复设置,尽管没有/etc/default/grub

noresume编辑:您还可以禁用继续添加内核参数/etc/default/grub

相关内容