web-dev-qa-db-fra.com

Comment définir la variable RESUME pour remplacer ces problèmes?

Ce double démarrage d'Ubuntu 18.10 avec Windows 10. Je pense qu'en raison de ce problème, mon Ubuntu se bloque/se bloque beaucoup récemment au moment du redémarrage/démarrage.

    pranav@inspiron-5548:~$ 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
12
Pranav

L'UUID doit être ajouté au /etc/initramfs-tools/conf.d/resume fichier.

Vous pouvez exécuter ce qui suit pour définir cela dans le fichier RESUME: (Votre UUID peut être différent.)

echo "RESUME=UUID=09e25397-4a2c-4fb0-a605-a7013eecb59c" | Sudo tee /etc/initramfs-tools/conf.d/resume

Exécutez ensuite ce qui suit pour mettre à jour les noyaux sur le système:

Sudo update-initramfs -u -k all

Redémarrez le système pour que les modifications prennent effet.


C'est aussi ce que j'ai dû faire avec ma machine. Cela se produit lorsque j'installe Ubuntu à nouveau sur le système, mais je lui permets de choisir l'installation sans choisir manuellement et repartitionner en laissant l'ancienne partition de swap. Eh bien, l'installation crée un fichier d'échange et n'utilise pas l'ancienne partition d'échange. Plus tard, je décide d'utiliser la partition de swap au lieu du fichier et je reçois ce message car le CV n'a jamais été créé par défaut ou il est configuré pour utiliser le fichier de swap à la place.

Cela ne dure que les mises à jour du noyau.

J'espère que cela t'aides!

15
Terrance

Je vais ajouter une seule mise en garde ...

Les initramfs tenteront de reprendre à partir de/dev/sda2 I: (UUID = 139d357c-829d-408d-bccc-147ec4402da8) I: définissez la variable RESUME pour remplacer cela.

Mon cas était-il ... et l'UUID indiqué dans leur (ci-dessus) est ... l'UUID du "DISQUE (SDA2 dans mon cas), PAS le PARTUUID (c'est-à-dire l'UUID de la partition où le swap est installé)

et c'est tellement contre-intuitif! comme l'avertissement me suggère au moins, que l'UUID du disque était le problème!

Mais histoire courte ... Solution:

ajoutez l'UUID du DISQUE au fichier de reprise et non les partitions PARTUUID.

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

dans mon cas j'ai ajouté

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

et si ce n'est pas clair, mon fstab pour mon échange "L'emplacement est:

/ dev/sda2: UUID = "139d357c-829d-408d-bccc-147ec4402da8" TYPE = "swap" PARTLABEL = "HDD_Swap" PARTUUID = "0067903b-aed0-48d1-8d59-956784616d48"