Bug#852513: grub-efi-amd64: during configuration: "No space left on device"

Steve McIntyre steve at einval.com
Mon Jan 30 16:10:29 UTC 2017


Hi!

On Wed, Jan 25, 2017 at 12:46:55PM +0900, Norbert Preining wrote:
>Ok, here is the analysis:
>
>> > 	Could not delete variable: No space left on device
>
>The problem is with efibootmgr that cannot add new entries.
>
>It turns out that there were incredible many entries in
>	/sys/fs/pstore
>related to some dumps. I have removed all of them.
>
>Also, the strace of efibootmgr gives:
>	open("/sys/firmware/efi/efivars/Boot0002-8be4df61-93ca-11d2-aa0d-00e098032b8c", O_WRONLY|O_CREAT, 0644) = 3
>	ioctl(3, FS_IOC_GETFLAGS, 0x7ffc3470bba4) = 0
>	write(3, "\7\0\0\0\1\0\0\0h\0r\0E\0F\0I\0n\0d\0 \0B\0o\0o\0t\0"..., 154) = -1 ENOSPC (No space left on device)
>so I deleted also some very strange things "...dump..." (or so) in
>that directory.
>
>After a reboot efibootmgr now can add entries it seems and the installation
>runs smoothly.
>
>grub should/must detect whether the installation via efibootmgr
>failed, otherwise it is completely useless.

Nod. Many thanks for the invetigation work here. Quite a few other people
have started reporting similar behaviour, but it's not been clear from
any of their reports where the trouble lay. There's two problems here,
and I'll look into both:

 * grub-install should be noticing the error reported by efibootmgr
   rather than saying "Installation finished. No error reported" -
   that's clearly bogus.

 * we need to deal with errors better here when efibootmgr says ENOSPC.
   It looks like /sys/fs/pstore filling up may be causing a lot of
   these issues. There's an open item in systemd saying:

     - import and delete pstore filesystem content at startup

   which would help. While that's not implemented, at the very least
   I'm thinking about error checking in grub-install. Simply
   suggesting the user looks in /sys/fs/pstore and maybe delete things
   would be better than the current "can't boot" issue.

-- 
Steve McIntyre, Cambridge, UK.                                steve at einval.com
"Managing a volunteer open source project is a lot like herding
 kittens, except the kittens randomly appear and disappear because they
 have day jobs." -- Matt Mackall



More information about the Pkg-grub-devel mailing list