#1 Le 20/05/2018, à 11:00
- Mininux MiniCraft
initramfs, hibernation et swapfile après update 18.04
Bonjour !
J'ai un problème avec l'hibernation.
Hier j'ai mis à jour Ubuntu 17.10 vers Ubuntu 18.04. Tout s'est bien passé, enfin presque. Depuis la mise à jour, dès que je génère un initramfs avec "sudo update-initramfs -u -k all", j'obtiens :
$ sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.15.0-20-generic
W: initramfs-tools configurations set RESUME=UUID=a7d7e695-feed-4fe7-b8c8-0db871b097aa
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/zram1
I: Set the RESUME variable to override this.
J'utilise un fichier swap, se situant en /swapfile. J'ai vu sur d'autres sites qu'il fallait éditer /etc/fstab, mais je n'y voit aucun problème :
/etc/fstab
-----------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda7 during installation
UUID=efe1ea0d-2e48-47a0-a6bf-71fe75cb4483 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
UUID=9E77-0FDE /boot/efi vfat umask=0077 0 1
#swapfile
/swapfile none swap defaults 0 0
J'ai donc essayé d'obtenir l'UUID de /swapfile avec "swap-label /swapfile" (blkid ne me donnait pas l'UUID du swap). Je mets l'UUID obtenu dans /etc/initramfs-tools/conf.f/resume :
/etc/initramfs-tools/conf.f/resume
-----------------------------------------
RESUME=UUID=a7d7e695-feed-4fe7-b8c8-0db871b097aa
Mais toujours la même erreur.
J'ai finalement tenté de modifier "GRUB_CMD_LINUX" dans /etc/default/grub et éxecuté update-grub :
/etc/default/grub
-----------------------------------------
#GRUB_BACKGROUND="/boot/grub/themes/Breeze/background.png"
GRUB_CMDLINE_LINUX="resume=/dev/sda7 resume_offset=14313472"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_DEFAULT="0"
GRUB_DISTRIBUTOR="`/usr/bin/lsb_release -d -s 2>/dev/null`"
GRUB_GFXMODE="auto"
GRUB_THEME="/boot/grub/themes/Breeze/theme.txt"
GRUB_TIMEOUT="10"
J'ai obtenu le "resume_offset" avec
sudo filefrag -v /swapfile
J'ai tenté d'hiberner pour voir si ça fonctionne, mais ubuntu ne s'est même pas arrêté !
Faut-il vraiment que je passe par une partition swap pour que ça fonctionne ?
Merci d'avance pour votre aide !
Il n'y a PAS de limite à Linux.
Windows EST limité : seul Microsoft décide de ce que l'on peut faire dessus
Hors ligne