Disregarding #52, which seems to be a completely different thing:

I did some testing and found out that the malfornmed file only occurs when 
/etc/init.d/grub-common is executed.
I narrowed it down to the line

 grub-editenv /boot/grub/grubenv unset recordfail

If I skip execution of /etc/init.d/grub-common (by setting an exit 0 in
it's second line), I get no more malformed file errors, if I start
testing from a working state.

If I execute the causing line from a shell, I get the error the next
boot.

After some more testing, I found a working workaround:
Execute the line 4 times. (5 times works as well, I did not test more)
No more errors.

This matches the previous solution of calling grub-set-default, which
executes the grub-editenv binary 3 times. After it was called one time
from grub-common.

So I edited the /etc/init.d/grub-common file and let it execute the same 
command four times, which solves the problem for me.
I did only three reboots to test it.

I checked with strace, each of the commands has the same output.

My /boot is an extra partition, filesystem ext4,

I do really, really want to hear an explanation for this, because it
drives me crazy...


TL;DR:
- Remove workaround from #50
- Edit /etc/init.d/grub-common
- Duplicate the line 
 grub-editenv /boot/grub/grubenv unset recordfail
until it is there 4 times in a row
- Reboot

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1311247

Title:
  [Grubenv] error: malformed file, press any key to continue

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1311247/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to