Auteur Sujet: Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"  (Lu 13887 fois)

0 Membres et 1 Invité sur ce sujet

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #12 le: 30 décembre 2019 à 21:59:38 »
Voila :


J'ai essayé avec le -v en début de ligne et en fin de ligne sans succès.

# efibootmgr --disk /dev/sda --part 1 --create --gpt --label "ubuntu" --loader "\EFI\ubuntu\shmix64.efi" -v
Could not prepare Boot variable: Invalid argument


J'ai testé plusieurs alternatives dans la ligne de commande, mais c'est toujours la même réponse.

C'est bien ça qui bloque la configuration par APT de "grub-efi-amd64-signed"

Là si le serveur, c'est un non redémarrage assuré.

alain_p

  • Abonné Free fibre
  • *
  • Messages: 16 272
  • Delta S 10G-EPON sur Les Ulis (91)
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #13 le: 30 décembre 2019 à 22:32:25 »
Oui, j'espérais que le -v le rendrait bavard et qu'il montrerait quel argument est invalide, mais non.

J'ai trouvé ce thread, où l'un des intervenants dit que vu le nombre de thread sur le forum Ubuntu avec ce genre de problème, il pourrait bien y avoir un bug dans une mise à récente de grub...

Mais pas de solution indiquée. Faudra-t-il attendre une nouvelle mise à jour de grub qui corrige le problème ?

https://ubuntuforums.org/showthread.php?t=2432759

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #15 le: 05 janvier 2020 à 14:15:22 »
On m'a soufflé (merci Jean-christophe) que sur https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1753518 il y a une solution de contournement en #11

Cela a fonctionné en partie :
$ sudo su -
# cd /boot/efi/EFI
root@carte-fh:/boot/efi/EFI# ls -l
total 12
drwx------ 2 root root 4096 nov.  10  2018 BOOT
drwx------ 3 root root 4096 nov.  10  2018 Dell
drwx------ 2 root root 4096 nov.  10  2018 ubuntu
root@carte-fh:/boot/efi/EFI# mv ubuntu ubuntu-old
root@carte-fh:/boot/efi/EFI# apt install -f
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Paramétrage de grub-efi-amd64-signed (1.93.15+2.02-2ubuntu8.14) ...
Traitement des actions différées (« triggers ») pour shim-signed (1.37~18.04.3+1
5+1533136590.3beb971-0ubuntu1) ...
W: APT had planned for dpkg to do more than it reported back (0 vs 4).
   Affected packages: grub-efi-amd64-signed:amd64
root@carte-fh:/boot/efi/EFI# ls
BOOT  Dell  ubuntu-old
root@carte-fh:/boot/efi/EFI# mv ubuntu-old ubuntu
root@carte-fh:/boot/efi/EFI# update-grub2
Sourcing file `/etc/default/grub'
Création du fichier de configuration GRUB…
Image Linux trouvée : /boot/vmlinuz-5.0.0-37-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.0.0-37-generic
Image Linux trouvée : /boot/vmlinuz-5.0.0-36-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.0.0-36-generic
fait
root@carte-fh:/boot/efi/EFI# exit
déconnexion
$ efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0004,0000,0002,0003,0005
Boot0000* Windows Boot Manager HD(1,GPT,0bb8261c-af59-11e2-ad71-d829a5f6482d,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0002* EFI Network 1 PcieRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/MAC(90b11c522ca3,0)/IPv4(0.0.0.00.0.0.0,0,0)
Boot0003* EFI Network 2 PcieRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x1)/MAC(90b11c522ca4,0)/IPv4(0.0.0.00.0.0.0,0,0)
Boot0004* Windows Boot Manager HD(1,GPT,b221b9be-a399-11d5-a392-d4ae5290fd14,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0005* EFI Fixed Disk Boot Device 1 PcieRoot(0x0)/Pci(0x1f,0x2)/Sata(0,0,0)/HD(1,GPT,c188b9a0-7588-4e8c-a27b-c87039655832,0x800,0x100000)

Cela permet donc de ne plus avoir le paquet grub-efi-amd64-signed en mode partiellement configuré.

Par contre pas d'entrée UEFI pour Ubuntu (il manque l'entrée N°1 qui est celle par défault) et efibootmgr me met toujours Invalid argument.
Je sais que si le serveur reboot, il ne redémarrera pas.

# efibootmgr --disk /dev/sda --part 1 --create --gpt --label "ubuntu" --loader "\EFI\ubuntu\shmix64.efi"
Could not prepare Boot variable: Invalid argument

Voici un strace de la commande : efibootmgr --disk /dev/sda --part 1 --create --gpt --label "ubuntu" --loader "\EFI\ubuntu\shmix64.efi"
# strace efibootmgr --disk /dev/sda --part 1 --create --gpt --label "ubuntu" --loader "\EFI\ubuntu\shmix64.efi"
execve("/bin/efibootmgr", ["efibootmgr", "--disk", "/dev/sda", "--part", "1", "--create", "--gpt", "--label", "ubuntu", "--loader", "\\EFI\\ubuntu\\shmix64.efi"], 0x7ffd8791ba40 /* 19 vars */) = 0
brk(NULL)                               = 0x560e09ce1000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=32193, ...}) = 0
mmap(NULL, 32193, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffb05707000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libefivar.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=146504, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb05705000
mmap(NULL, 2242368, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffb052c4000
mprotect(0x7ffb052de000, 2093056, PROT_NONE) = 0
mmap(0x7ffb054dd000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7ffb054dd000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libefiboot.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\36\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=51120, ...}) = 0
mmap(NULL, 2146336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffb050b7000
mprotect(0x7ffb050c3000, 2093056, PROT_NONE) = 0
mmap(0x7ffb052c2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7ffb052c2000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2030544, ...}) = 0
mmap(NULL, 4131552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffb04cc6000
mprotect(0x7ffb04ead000, 2097152, PROT_NONE) = 0
mmap(0x7ffb050ad000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7ffb050ad000
mmap(0x7ffb050b3000, 15072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffb050b3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14560, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffb04ac2000
mprotect(0x7ffb04ac5000, 2093056, PROT_NONE) = 0
mmap(0x7ffb04cc4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ffb04cc4000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb05703000
arch_prctl(ARCH_SET_FS, 0x7ffb05703b80) = 0
mprotect(0x7ffb050ad000, 16384, PROT_READ) = 0
mprotect(0x7ffb04cc4000, 4096, PROT_READ) = 0
mprotect(0x7ffb054dd000, 4096, PROT_READ) = 0
mprotect(0x7ffb052c2000, 4096, PROT_READ) = 0
mprotect(0x560e07ea5000, 4096, PROT_READ) = 0
mprotect(0x7ffb0570f000, 4096, PROT_READ) = 0
munmap(0x7ffb05707000, 32193)           = 0
access("/sys/firmware/efi/efivars/", F_OK) = 0
statfs("/sys/firmware/efi/efivars/", {f_type=EFIVARFS_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOSUID|ST_NODEV|ST_NOEXEC|ST_RELATIME}) = 0
brk(NULL)                               = 0x560e09ce1000
brk(0x560e09d02000)                     = 0x560e09d02000
openat(AT_FDCWD, "/sys/firmware/efi/efivars/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
getdents(3, /* 42 entries */, 32768)    = 2920
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_RDONLY) = 3
read(3, "\7\0\0\0", 4)                  = 4
read(3, "\1\0\0\0t\0W\0i\0n\0d\0o\0w\0s\0 \0B\0o\0o\0t\0 \0"..., 4096) = 300
read(3, "", 3796)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0002-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_RDONLY) = 3
read(3, "\7\0\0\0", 4)                  = 4
read(3, "\1\0\0\200\\\0E\0F\0I\0 \0N\0e\0t\0w\0o\0r\0k\0 \0001\0"..., 4096) = 126
read(3, "", 3970)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0003-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_RDONLY) = 3
read(3, "\7\0\0\0", 4)                  = 4
read(3, "\1\0\0\200\\\0E\0F\0I\0 \0N\0e\0t\0w\0o\0r\0k\0 \0002\0"..., 4096) = 126
read(3, "", 3970)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_RDONLY) = 3
read(3, "\7\0\0\0", 4)                  = 4
read(3, "\1\0\0\0t\0W\0i\0n\0d\0o\0w\0s\0 \0B\0o\0o\0t\0 \0"..., 4096) = 300
read(3, "", 3796)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0005-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_RDONLY) = 3
read(3, "\7\0\0\0", 4)                  = 4
read(3, "\1\0\0\200J\0E\0F\0I\0 \0F\0i\0x\0e\0d\0 \0D\0i\0s\0"..., 4096) = 138
read(3, "", 3958)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/sda", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
readlink("/sys/dev/block/8:0", "../../devices/pci0000:00/0000:00"..., 4096) = 78
openat(AT_FDCWD, "/dev/sda", O_RDONLY)  = 4
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 512, SEEK_SET)                 = 512
read(4, "EFI PART\0\0\1\0\\\0\0\0\351\26\350\241\0\0\0\0\1\0\0\0\0\0\0\0"..., 512) = 512
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 1024, SEEK_SET)                = 1024
read(4, "(s*\301\37\370\322\21\272K\0\240\311>\311;\240\271\210\301\210u\214N\242{\310p9eX2"..., 16384) = 16384
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 250059349504, SEEK_SET)        = 250059349504
read(4, "EFI PART\0\0\1\0\\\0\0\0\251\344\305~\0\0\0\0oY\34\35\0\0\0\0"..., 512) = 512
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 250059333120, SEEK_SET)        = 250059333120
read(4, "(s*\301\37\370\322\21\272K\0\240\311>\311;\240\271\210\301\210u\214N\242{\310p9eX2"..., 16384) = 16384
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(4)                                = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/sda", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
readlink("/sys/dev/block/8:0", "../../devices/pci0000:00/0000:00"..., 4096) = 78
openat(AT_FDCWD, "/dev/sda", O_RDONLY)  = 4
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 512, SEEK_SET)                 = 512
read(4, "EFI PART\0\0\1\0\\\0\0\0\351\26\350\241\0\0\0\0\1\0\0\0\0\0\0\0"..., 512) = 512
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 1024, SEEK_SET)                = 1024
read(4, "(s*\301\37\370\322\21\272K\0\240\311>\311;\240\271\210\301\210u\214N\242{\310p9eX2"..., 16384) = 16384
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 250059349504, SEEK_SET)        = 250059349504
read(4, "EFI PART\0\0\1\0\\\0\0\0\251\344\305~\0\0\0\0oY\34\35\0\0\0\0"..., 512) = 512
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 250059333120, SEEK_SET)        = 250059333120
read(4, "(s*\301\37\370\322\21\272K\0\240\311>\311;\240\271\210\301\210u\214N\242{\310p9eX2"..., 16384) = 16384
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(4)                                = 0
close(3)                                = 0
openat(AT_FDCWD, "/dev/sda", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
readlink("/sys/dev/block/8:0", "../../devices/pci0000:00/0000:00"..., 4096) = 78
openat(AT_FDCWD, "/dev/sda", O_RDONLY)  = 4
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 512, SEEK_SET)                 = 512
read(4, "EFI PART\0\0\1\0\\\0\0\0\351\26\350\241\0\0\0\0\1\0\0\0\0\0\0\0"..., 512) = 512
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 1024, SEEK_SET)                = 1024
read(4, "(s*\301\37\370\322\21\272K\0\240\311>\311;\240\271\210\301\210u\214N\242{\310p9eX2"..., 16384) = 16384
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 0), ...}) = 0
uname({sysname="Linux", nodename="carte-fh", ...}) = 0
ioctl(4, BLKGETSIZE64, [250059350016])  = 0
ioctl(4, BLKSSZGET, [512])              = 0
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 250059349504, SEEK_SET)        = 250059349504
read(4, "EFI PART\0\0\1\0\\\0\0\0\251\344\305~\0\0\0\0oY\34\35\0\0\0\0"..., 512) = 512
ioctl(4, BLKSSZGET, [512])              = 0
brk(0x560e09d23000)                     = 0x560e09d23000
lseek(4, 250059333120, SEEK_SET)        = 250059333120
read(4, "(s*\301\37\370\322\21\272K\0\240\311>\311;\240\271\210\301\210u\214N\242{\310p9eX2"..., 16384) = 16384
ioctl(4, BLKSSZGET, [512])              = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(4)                                = 0
close(3)                                = 0
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_WRONLY|O_CREAT|O_EXCL, 0644) = 3
ioctl(3, FS_IOC_GETFLAGS, 0x7ffe061c6604) = 0
write(3, "\7\0\0\0\1\0\0\0b\0u\0b\0u\0n\0t\0u\0\0\0\4\1*\0\1\0\0\0"..., 122) = -1 EINVAL (Invalid argument)
ioctl(3, FS_IOC_GETFLAGS, 0x7ffe061c6604) = 0
unlink("/sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c") = 0
close(3)                                = 0
write(2, "Could not prepare Boot variable", 31Could not prepare Boot variable) = 31
write(2, ": Invalid argument\n", 19: Invalid argument
)    = 19
exit_group(5)                           = ?
+++ exited with 5 +++

thenico

  • Expert.
  • Abonné OVH
  • *
  • Messages: 1 009
  • FTTH >500 Mb/s (13)
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #16 le: 05 janvier 2020 à 15:16:16 »
Essaie de supprimer /sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c
Sinon, tu peut essayer de copier EFI\ubuntu\shmix64.efi dans EFI\BOOT\BOOTX64.EFI puis tu active le boot sur le Fixed disk Boot Device 1 avec efibootmgr -o 5

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #17 le: 05 janvier 2020 à 16:08:49 »
/sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c n'existe pas :

# ls -l /sys/firmware/efi/efivars/
total 0
-rw-r--r-- 1 root root 1156 déc.   3 06:29 2151678336-417acee0-6fa9-4a82-99d7-f9b1dd271e48
-rw-r--r-- 1 root root   36 déc.   3 06:29 2151678337-417acee0-6fa9-4a82-99d7-f9b1dd271e48
-rw-r--r-- 1 root root   13 déc.   3 06:29 334-71db7b7e-4165-48fa-ac9d-f9af4cefc534
-rw-r--r-- 1 root root  304 déc.   3 06:29 Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  130 déc.   3 06:29 Boot0002-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  130 déc.   3 06:29 Boot0003-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  304 déc.   3 06:29 Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  142 déc.   3 06:29 Boot0005-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root    6 déc.   3 06:29 BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root    8 déc.   3 06:29 BootOptionSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root   14 déc.   6 06:43 BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root   53 déc.   3 06:29 ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  603 déc.   3 06:29 ConInDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root   58 déc.   3 06:29 ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  642 déc.   3 06:29 ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  304 déc.   3 06:29 DbocBoot0000-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  142 déc.   3 06:29 DbocBoot0001-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  142 déc.   3 06:29 DbocBoot0002-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  304 déc.   3 06:29 DbocBoot0003-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  142 déc.   3 06:29 DbocBoot0004-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  137 déc.   3 06:29 DbocBoot0005-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  122 déc.   3 06:29 DbocBoot0006-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  122 déc.   3 06:29 DbocBoot0007-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root  142 déc.   3 06:29 DbocBoot0008-1ba4c901-eb4a-493f-aeef-90a6136da384
-rw-r--r-- 1 root root    5 déc.   3 06:29 DefaultIplBootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root   16 déc.   3 06:29 DefaultUefiBootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  150 déc.   3 06:29 ErrOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  642 déc.   3 06:29 ErrOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  221 déc.   3 06:29 HDDP-fab7e9e1-39dd-4f2b-8408-e20e906cb6de
-rw-r--r-- 1 root root    8 déc.   3 06:29 Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root   23 déc.   3 06:29 LangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root    5 déc.   3 06:29 MemoryOverwriteRequestControl-e20939be-32d4-41be-a150-897f85d49829
-rw-r--r-- 1 root root    8 déc.   3 06:29 MTC-eb704011-1402-11d3-8e77-00a0c969723b
-rw-r--r-- 1 root root  222 déc.   3 06:29 NETWORK_SETTINGS_VAR-6568a5f5-1144-401c-b693-34353e9afdd5
-rw-r--r-- 1 root root   12 déc.   3 06:29 PerfDataMemAddr-76b6bdfa-2acd-4462-9e3f-cb58c969d937
-rw-r--r-- 1 root root   10 déc.   3 06:29 PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root   60 déc.   3 06:29 PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root    8 déc.   3 06:29 RTC-378d7b65-8da9-4773-b6e4-a47826a833e1
-rw-r--r-- 1 root root    6 déc.   3 06:29 Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root root  104 déc.   3 06:29 USER_SETTINGS_VAR-56f0edc4-25ae-4236-aca3-0bcd410aa2ae

Thornhill

  • Abonné SFR fibre FttH
  • *
  • Messages: 3 976
  • Saint-Médard-en-Jalles (33)
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #18 le: 05 janvier 2020 à 16:27:50 »
openat(AT_FDCWD, "/sys/firmware/efi/efivars/Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_WRONLY|O_CREAT|O_EXCL, 0644) = 3
ioctl(3, FS_IOC_GETFLAGS, 0x7ffe061c6604) = 0
write(3, "\7\0\0\0\1\0\0\0b\0u\0b\0u\0n\0t\0u\0\0\0\4\1*\0\1\0\0\0"..., 122) = -1 EINVAL (Invalid argument)

Il créé le fichier mais n'arrive pas à écrire dedans.
Soit problème alignement, soit filesystem efivars pas monté ou plein ou en read-only ?


EINVAL
fd is attached to an object which is unsuitable for writing; or the file was opened with the O_DIRECT flag, and either the address specified in buf, the value specified in count, or the current file offset is not suitably aligned.


Voir aussi comment faire du ménage dans efivars si plein, et option efi_no_storage_paranoia :
https://github.com/rhboot/efibootmgr/issues/83#
https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Requirements_for_UEFI_variable_support


UEFI variables support in Linux kernel
Linux kernel exposes UEFI variables data to userspace via efivarfs (EFI VARiable FileSystem) interface (CONFIG_EFIVAR_FS) - mounted using efivarfs kernel module at /sys/firmware/efi/efivars - it has no maximum per-variable size limitation and supports UEFI Secure Boot variables. Introduced in kernel 3.8.

If any userspace tool is unable to modify UEFI variable data, check for existence of /sys/firmware/efi/efivars/dump-* files. If they exist, delete them, reboot and retry again.

If the above step does not fix the issue, try booting with efi_no_storage_paranoia kernel parameter to disable kernel UEFI variable storage space check that may prevent writing/modification of UEFI variables.
Warning: efi_no_storage_paranoia should only be used when needed and should not be left as a normal boot option. The effect of this kernel command line parameter turns off a safeguard that was put in place to help avoid the bricking of machines when the NVRAM gets too full. See FS#34641 for more information.

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #19 le: 05 janvier 2020 à 17:14:53 »
Comment savoir le problème qui affecte /sys/firmware/efi/efivars/ ?

C'est un espace de la NVRAM qui est exposé là sur /sys/firmware/efi/efivars/ ou un espace de la partition ESP ? (partition EFI System, d'une taille généralement de 500 Mo si on laisse Ubuntu la créer, qui est habituellement sur /dev/sda1)
Si c'est un espace de la partition ESP, pourquoi l'exposer aussi sur /boot/efi ?

On est donc plus sur un pb lié au serveur, que lié à l'OS (j'aurais le même bug avec un autre Linux, le fait que cela se soit produit lors de la mise à jour de début décembre n'est pas lié à la mise à jour proposée)

Je pense que /sys/firmware/efi/efivars/ est bien monté, car j'arrive à lire le contenu des fichiers présents.

Comment savoir si il est plein ? (la partition ESP elle est utilisée à 2%)
On peut l'afficher dans la commande df ?

J'ai calculé la taille des fichiers listés via ls -l mais en comparant un autre serveur Dell de même génération équipé lui aussi d'Ubuntu 18.04 LTS en OS, je vois que le serveur problématique a plutôt moins de données.

# df
Sys. de fichiers blocs de 1K   Utilisé Disponible Uti% Monté sur
udev                12268452         0   12268452   0% /dev
tmpfs                2460772      1168    2459604   1% /run
/dev/sda2           28705788   5304864   21919708  20% /
tmpfs               12303848         0   12303848   0% /dev/shm
tmpfs                   5120         0       5120   0% /run/lock
tmpfs               12303848         0   12303848   0% /sys/fs/cgroup
tmpfs                9843080        24    9843056   1% /tmp
tmpfs                9843080      1140    9841940   1% /var/log/apache2
/dev/sda1             523248      6164     517084   2% /boot/efi
/dev/sdb1          961301832 795888124  116559284  88% /ssd
/dev/sda4          185868260  66199284  110204352  38% /home
tmpfs                2460768         0    2460768   0% /run/user/1000

teph

  • Abonné Sosh fibre
  • *
  • Messages: 106
  • Quimper 29
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #20 le: 05 janvier 2020 à 17:37:33 »
on peut avoir la taille des fichiers avec du -sh sinon

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #21 le: 05 janvier 2020 à 17:40:12 »
Cela fonctionne pour /sys/firmware/efi/efivars chez toi ?

Moi non : (testé sur 3 machines UEFI)

# du -sh /sys/firmware/efi/efivars
0 /sys/firmware/efi/efivars

Thornhill

  • Abonné SFR fibre FttH
  • *
  • Messages: 3 976
  • Saint-Médard-en-Jalles (33)
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #22 le: 05 janvier 2020 à 18:16:50 »
Arrives-tu à créer un fichier non vide à l'intérieur ?

vivien

  • Administrateur
  • *
  • Messages: 47 217
    • Twitter LaFibre.info
Ubuntu server 18.04: Bug aprés mise à jour de "grub-efi-amd64-signed"
« Réponse #23 le: 05 janvier 2020 à 18:21:28 »
Même sur un autre système, je n'arrive pas a créer un fichier :

# echo > /sys/firmware/efi/efivars/tmp.tmp
bash: /sys/firmware/efi/efivars/tmp.tmp: Argument invalide

Tu arrives a créer un fichier dans /sys/firmware/efi/efivars/ ?