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
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1116778
Accepted
Pranav
Pranav
Asked: 2019-02-09 12:40:41 +0800 CST2019-02-09 12:40:41 +0800 CST 2019-02-09 12:40:41 +0800 CST

如何设置 RESUME 变量来覆盖这些问题?

  • 772

我有一个带有 Windows 10 的 Ubuntu 18.10 双启动。我认为由于下面的错误,我的 Ubuntu 最近在重新启动/启动时崩溃/挂起很多。

$ sudo apt-get --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-4.18.0-15 linux-headers-4.18.0-15-generic linux-image-4.18.0-15-generic linux-modules-4.18.0-15-generic
  linux-modules-extra-4.18.0-15-generic
The following packages will be upgraded:
  linux-generic linux-headers-generic linux-image-generic
3 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 66.0 MB of archives.
After this operation, 329 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-modules-4.18.0-15-generic amd64 4.18.0-15.16 [13.4 MB]
Get:2 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-image-4.18.0-15-generic amd64 4.18.0-15.16 [8,154 kB]                     
Get:3 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-modules-extra-4.18.0-15-generic amd64 4.18.0-15.16 [32.7 MB]              
Get:4 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-generic amd64 4.18.0.15.16 [1,868 B]                                      
Get:5 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-image-generic amd64 4.18.0.15.16 [2,480 B]                                
Get:6 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-headers-4.18.0-15 all 4.18.0-15.16 [10.5 MB]                              
Get:7 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-headers-4.18.0-15-generic amd64 4.18.0-15.16 [1,195 kB]                   
Get:8 http://archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-headers-generic amd64 4.18.0.15.16 [2,440 B]                              
Fetched 66.0 MB in 2min 25s (456 kB/s)                                                                                                           
Selecting previously unselected package linux-modules-4.18.0-15-generic.
(Reading database ... 197143 files and directories currently installed.)
Preparing to unpack .../0-linux-modules-4.18.0-15-generic_4.18.0-15.16_amd64.deb ...
Unpacking linux-modules-4.18.0-15-generic (4.18.0-15.16) ...
Selecting previously unselected package linux-image-4.18.0-15-generic.
Preparing to unpack .../1-linux-image-4.18.0-15-generic_4.18.0-15.16_amd64.deb ...
Unpacking linux-image-4.18.0-15-generic (4.18.0-15.16) ...
Selecting previously unselected package linux-modules-extra-4.18.0-15-generic.
Preparing to unpack .../2-linux-modules-extra-4.18.0-15-generic_4.18.0-15.16_amd64.deb ...
Unpacking linux-modules-extra-4.18.0-15-generic (4.18.0-15.16) ...
Preparing to unpack .../3-linux-generic_4.18.0.15.16_amd64.deb ...
Unpacking linux-generic (4.18.0.15.16) over (4.18.0.14.15) ...
Preparing to unpack .../4-linux-image-generic_4.18.0.15.16_amd64.deb ...
Unpacking linux-image-generic (4.18.0.15.16) over (4.18.0.14.15) ...
Selecting previously unselected package linux-headers-4.18.0-15.
Preparing to unpack .../5-linux-headers-4.18.0-15_4.18.0-15.16_all.deb ...
Unpacking linux-headers-4.18.0-15 (4.18.0-15.16) ...
Selecting previously unselected package linux-headers-4.18.0-15-generic.
Preparing to unpack .../6-linux-headers-4.18.0-15-generic_4.18.0-15.16_amd64.deb ...
Unpacking linux-headers-4.18.0-15-generic (4.18.0-15.16) ...
Preparing to unpack .../7-linux-headers-generic_4.18.0.15.16_amd64.deb ...
Unpacking linux-headers-generic (4.18.0.15.16) over (4.18.0.14.15) ...
Setting up linux-headers-4.18.0-15 (4.18.0-15.16) ...
Setting up linux-modules-4.18.0-15-generic (4.18.0-15.16) ...
Setting up linux-headers-4.18.0-15-generic (4.18.0-15.16) ...
Setting up linux-image-4.18.0-15-generic (4.18.0-15.16) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.18.0-14-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.18.0-14-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-4.18.0-15-generic
I: /initrd.img is now a symlink to boot/initrd.img-4.18.0-15-generic
Setting up linux-modules-extra-4.18.0-15-generic (4.18.0-15.16) ...
Setting up linux-headers-generic (4.18.0.15.16) ...
Setting up linux-image-generic (4.18.0.15.16) ...
Setting up linux-generic (4.18.0.15.16) ...
Processing triggers for linux-image-4.18.0-15-generic (4.18.0-15.16) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.18.0-15-generic
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=09e25397-4a2c-4fb0-a605-a7013eecb59c)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.18.0-15-generic
Found initrd image: /boot/initrd.img-4.18.0-15-generic
Found linux image: /boot/vmlinuz-4.18.0-14-generic
Found initrd image: /boot/initrd.img-4.18.0-14-generic
Found linux image: /boot/vmlinuz-4.18.0-13-generic
Found initrd image: /boot/initrd.img-4.18.0-13-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done
dual-boot crash 18.10
  • 3 3 个回答
  • 62933 Views

3 个回答

  • Voted
  1. Best Answer
    Terrance
    2019-02-09T14:16:55+08:002019-02-09T14:16:55+08:00

    需要将交换 UUID 添加到/etc/initramfs-tools/conf.d/resume文件中。

    以下命令可以显示您的交换 UUID 是什么:

    blkid | awk -F\" '/swap/ {print $2}'
    

    您可以运行以下命令在 RESUME 文件中进行设置(如果该文件夹中不存在它将被创建):

    printf "RESUME=UUID=$(blkid | awk -F\" '/swap/ {print $2}')\n" | sudo tee /etc/initramfs-tools/conf.d/resume
    

    然后运行以下命令来更新系统上的内核:

    sudo update-initramfs -u -k all
    

    重新启动系统以使更改生效。

    这确实持续到内核更新。

    希望这可以帮助!

    • 54
  2. markackerman8-gmail.com
    2019-11-16T10:33:39+08:002019-11-16T10:33:39+08:00

    我将只添加一个警告。

    The initramfs will attempt to resume from /dev/sda2
    I: (UUID=139d357c-829d-408d-bccc-147ec4402da8)
    I: Set the RESUME variable to override this.
    

    以上是我的情况,UUID 表示存在磁盘的(sda2在我的情况下)UUID,而不是PARTUUID(即安装交换的分区的 UUID)。

    这太违反直觉了,正如警告所暗示的那样,至少对我来说,磁盘的 UUID 是问题所在!

    但长话短说,这是我的解决方案:

    将磁盘的 UUID 添加到恢复文件,而不是分区的 PARTUUID。

    sudo gedit /etc/initramfs-tools/conf.d/resume
    

    就我而言,我补充说:

    RESUME=UUID=139d357c-829d-408d-bccc-147ec4402da8
    

    如果不清楚,我fstab的交换位置是:

    /dev/sda2: UUID="139d357c-829d-408d-bccc-147ec4402da8" TYPE="swap"
    PARTLABEL="HDD_Swap" PARTUUID="0067903b-aed0-48d1-8d59-956784616d48"
    
    • 5
  3. H_G_G
    2021-01-30T01:40:44+08:002021-01-30T01:40:44+08:00

    我在 ubuntu 服务器 20.04 上使用 LVM(也用于交换),安装更新后我收到了上述消息:

    Processing triggers for initramfs-tools (0.136ubuntu6.3) ... 
    update-initramfs: Generating /boot/initrd.img->5.4.0-65->generic 
    I: The initramfs will attempt to resume from /dev/dm-2 
    I: (/dev/mapper/ubuntu--vg-ubusrv--lv--swap) 
    I: Set the RESUME variable to override this. 
    

    我添加RESUME=/dev/mapper/ubuntu--vg-ubusrv--lv--swap到resume./etc/initramfs-tools/conf.d

    更新initramfs工作没有显示任何“我”

    • 1

相关问题

  • 如何在 ubuntu 中挂载加密的 windows 分区?[关闭]

  • 如何使用 Debian 进行双引导?

  • 如何使用 Ubuntu 和 Windows XP 安装双启动配置?[关闭]

  • 如何让双启动 USB 驱动器在 Vista 中工作 [关闭]

  • 如何从双启动计算机访问加密的主文件夹?

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