[Bug 439784] Re: invalid: environment block

2010-11-11 Thread Bartosz
I have the same error after upgrade Grub to GRUB2: Error: Invalid environment block I resolved this bug in following way: cd /boot/grub sudo cp grubenv grubenv_bad sudo grub-editenv grubenv create sudo grub-editenv grubenv set default=0 sudo reboot Now it works perfectly ! -- invalid:

[Bug 439784] Re: invalid: environment block

2010-11-11 Thread Bartosz
** Attachment added: Wrong /boot/grub/grubenv file which couse problem on Ubuntu 10.04 https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/439784/+attachment/1729991/+files/grubenv_bad -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification

[Bug 439784] Re: invalid: environment block

2010-11-11 Thread Bartosz
Correct /boot/grub/grubenv file on Ubuntu 10.04 after typing commands: sudo grub-editenv grubenv create sudo grub-editenv grubenv set default=0 ** Attachment added: grubenv https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/439784/+attachment/1729992/+files/grubenv -- invalid: environment

[Bug 439784] Re: invalid: environment block

2010-04-08 Thread SwaJime
Similar situation ... With karmic on a dell mini-9, got the invalid environment block / failed to boot default entries. Combining the steps shown in Zaki's post #11 above with info from http://grub.enbug.org/Grub2LiveCdInstallGuide : Boot with Karmic LiveUSB Ctrl-Alt-FN-F1 sudo -i su - root

[Bug 439784] Re: invalid: environment block

2010-04-05 Thread Gabriel M.
I got this problem just today with Karmic + all updates, so it's definitely not fixed. I'm re-opening it and attaching my hardware info with apport-collect. ** Changed in: grub2 (Ubuntu) Status: Fix Released = Confirmed -- invalid: environment block https://bugs.launchpad.net/bugs/439784

[Bug 439784] Re: invalid: environment block

2010-04-05 Thread Gabriel M.
A bit more info: - After a blank screen from an unknown cause (sleep/wakeup failed?), I had to do a hard reboot, and ended up with the same grub error: invalid environment block others were describing. After searching for 3-4 hours I stumbled upon this bug, and the following steps solved it:

[Bug 439784] Re: invalid: environment block

2010-02-21 Thread Jarkko Niemi
Ubuntu 9.10 i386 Desktop Up to date system. Single IDE drive, with Dual boot XP / Ubuntu. /dev/sda1 NTFS /dev/sda2 extended /dev/sda5 linux-swap /dev/sda3 ext4 Grub in MBR Pentium 4 2.66MHz, 1Gb RAM Intel chipset IBM Netvista model: MT-M 8303-NGT at Grub 2, editing didn't helped. With

[Bug 439784] Re: invalid: environment block

2010-01-06 Thread charlie_r
New comment/bug?? I have multiple disks on my system, partitions set and labeled thusly: sda, (hd0) SATA, with ntfs (sata) ext3 (home2) sdb, (hd1) IDE 0,0, with ntfs (windows install) sdc, (hd2) IDE 0,1, with ntfs (apps) ext3 (home) sdd, (hd3) IDE 1,0, with ext3 (ubuntu root) sde, (hd4) IDE

[Bug 439784] Re: invalid: environment block

2009-10-18 Thread Wayne McDougall
Thank you. Yes I was running the old version and since the NZ mirror was 4 days old, I got the update from the main server. Have also run grub-install and dpkg-reconfigure grub-pc Will let you know if I have any further problems. -- invalid: environment block

Re: [Bug 439784] Re: invalid: environment block

2009-10-17 Thread Felix Zielcke
Am Samstag, den 17.10.2009, 05:02 + schrieb Wayne McDougall: How do I check what version of Grub2 I have installed? I have experienced this bug on an up-to-date system, but it's possible the mirror was out of date. It is still at this moment telling me I am completely up to date.

Re: [Bug 439784] Re: invalid: environment block

2009-10-17 Thread Colin Watson
On Sat, Oct 17, 2009 at 05:02:45AM -, Wayne McDougall wrote: How do I check what version of Grub2 I have installed? I have experienced this bug on an up-to-date system, but it's possible the mirror was out of date. It is still at this moment telling me I am completely up to date. You

[Bug 439784] Re: invalid: environment block

2009-10-16 Thread Wayne McDougall
How do I check what version of Grub2 I have installed? I have experienced this bug on an up-to-date system, but it's possible the mirror was out of date. It is still at this moment telling me I am completely up to date. Sorry for a noob question. -- invalid: environment block

[Bug 439784] Re: invalid: environment block

2009-10-15 Thread Mike Basinger
@rocko It depends on the mirror. The mirror admin will set how often they sync to the main server. -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs

[Bug 439784] Re: invalid: environment block

2009-10-14 Thread Launchpad Bug Tracker
This bug was fixed in the package grub2 - 1.97~beta4-1ubuntu1 --- grub2 (1.97~beta4-1ubuntu1) karmic; urgency=low * Resynchronise with Debian. Remaining changes: + debian/default/grub: - Adjust for default Ubuntu boot options. - Use GRUB_CMDLINE_LINUX_DEFAULT option

[Bug 439784] Re: invalid: environment block

2009-10-14 Thread Kamus
one hour ago I tried to upgrade Karmic (to date) and I get this issue too, unfortunately I can't remember if last update installs recent version of grub2. Any way, all this environment was tested under VirtualBox VM. Regards -- invalid: environment block https://bugs.launchpad.net/bugs/439784

Re: [Bug 439784] Re: invalid: environment block

2009-10-14 Thread Colin Watson
On Wed, Oct 14, 2009 at 01:55:37PM -, Kamus wrote: one hour ago I tried to upgrade Karmic (to date) and I get this issue too, I don't think you gave it a chance to build and get to the mirrors. -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug

[Bug 439784] Re: invalid: environment block

2009-10-14 Thread Rocko
How long will it take to get to the mirrors? I just ran into this issue, too. -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list

[Bug 439784] Re: invalid: environment block

2009-10-13 Thread Quincy Tse
Instead of changing grub.cfg, what I've done on my computer was to change /etc/grub.d/10_linux (the source file when generating the grub.cfg): Remove the lines that mentions recordfail: $ diff /etc/grub.d/10_linux /etc/grub.d/.10_linux.bak 59a60,61 recordfail=1 save_env

[Bug 439784] Re: invalid: environment block

2009-10-13 Thread Quincy Tse
I should also add that this change would affect all linux kernels - probably including other parallel linux installations in addition to the Karmic installation... -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of

Re: [Bug 439784] Re: invalid: environment block

2009-10-13 Thread Colin Watson
FWIW, if you change /etc/grub.d/10_linux, you don't need to make grub.cfg unwritable - /etc/grub.d/10_linux is an input to update-grub, not an output from it, and furthermore it's a conffile so changes to it are preserved on upgrade. -- invalid: environment block

[Bug 439784] Re: invalid: environment block

2009-10-13 Thread Jordan
I have not confirmed this yet by looking at any code, but the reason that grubenv is ending up zero bytes is likely that some code is writing to grubenv ( from linux, not grub itself ) by doing something like: write file grubenv.tmp; unlink file grubenv; rename grubenv.tmp , grubenv. The reason

Re: [Bug 439784] Re: invalid: environment block

2009-10-13 Thread Colin Watson
On Tue, Oct 13, 2009 at 05:29:10PM -, Jordan wrote: I have not confirmed this yet by looking at any code, but the reason that grubenv is ending up zero bytes is likely that some code is writing to grubenv ( from linux, not grub itself ) by doing something like: write file grubenv.tmp;

[Bug 439784] Re: invalid: environment block

2009-10-13 Thread Jordan
Looking at grub-editenv.c, as Colin said, it does call fsync explicitly so my theory was wrong. However, it looks like grub-editenv is still not atomic: If you run grub-editenv /boot/grub/grubenv set foo=bar the first thing it does in create_env_blk_file() is call fopen( /boot/grub/grubenv, wb )

Re: [Bug 439784] Re: invalid: environment block

2009-10-13 Thread Colin Watson
On Tue, Oct 13, 2009 at 06:59:11PM -, Jordan wrote: However, it looks like grub-editenv is still not atomic: If you run grub-editenv /boot/grub/grubenv set foo=bar the first thing it does in create_env_blk_file() is call fopen( /boot/grub/grubenv, wb ) truncating the actual file, not a

Re: [Bug 439784] Re: invalid: environment block

2009-10-13 Thread Felix Zielcke
Am Dienstag, den 13.10.2009, 18:59 + schrieb Jordan: However, it looks like grub-editenv is still not atomic: If you run grub-editenv /boot/grub/grubenv set foo=bar the first thing it does in create_env_blk_file() is call fopen( /boot/grub/grubenv, wb ) truncating the actual file, not a

[Bug 439784] Re: invalid: environment block

2009-10-13 Thread hanzomon4
I just got hit with this bug I updated this morning so I'll do the fix then update before I say that it's still a problem -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to

[Bug 439784] Re: invalid: environment block

2009-10-12 Thread Mark Shuttleworth
Colin, this affected one of my machines today, which was up to date. It's an ext4 filesystem. Is there any more work planned on this for Lucid? I don't know how rare an event it is, but it's a catastrophic failure when it happens until someone finds this bugreport, there's little else in the way

[Bug 439784] Re: invalid: environment block

2009-10-12 Thread Colin Watson
** Changed in: grub2 (Ubuntu) Status: Confirmed = Fix Committed ** Changed in: grub2 (Ubuntu) Assignee: (unassigned) = Colin Watson (cjwatson) ** Changed in: grub2 (Ubuntu) Importance: Undecided = High -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You

[Bug 439784] Re: invalid: environment block

2009-10-10 Thread Stefan Berge
I had the same problem with a 32-bit install, but after following mr Bergman´s recepy I can kill the computer by pushing the restart button, and it boots up perfectly again. So a clean shutdown is no longer needed. Thank you, mr Bergman! -- invalid: environment block

[Bug 439784] Re: invalid: environment block

2009-10-10 Thread Stefan Berge
Eh... just one more thing. I am not a real newbie, but I don´t type in Terminal more than necessary. So, I got some help with the linux commands here: http://www.tuxfiles.org/linuxhelp/fileman.html Deleting grubenv was no problem (rm grubenv after doing sudo su). Then I typed sudo gedit to open

[Bug 439784] Re: invalid: environment block

2009-10-10 Thread Felix Zielcke
Colin maybe it makes sense to use something like this in grub.cfg? Untested but that should work. if [ -s /boot/grub/grubenv ] ; then set grubenv_notzero = true fi if [ -n $grubenv_notzero ] ; then load_env [...] if [ -n $grubenv_notzero ] ; then save_env fi I couldn´t save it, I got the

[Bug 439784] Re: invalid: environment block

2009-10-10 Thread Stefan Berge
Overwriting should be OK, as I don´t plan to do any update until the final 9.10 arrives. By then, this bug will surely have been taken care of. -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which

[Bug 439784] Re: invalid: environment block

2009-10-10 Thread C10uD
please Colin submit a new fix asap because during these stormy days this bug is getting annoying, and the 2009-10-04 solution doesn't work (if it was a solution) :) greets -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a

[Bug 439784] Re: invalid: environment block

2009-10-09 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/grub2 -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com

[Bug 439784] Re: invalid: environment block

2009-10-09 Thread Noel J. Bergman
As noted below, I still see this problem: -r 1 root root3398 2009-10-08 00:45 grub.cfg -rw-r--r-- 1 root root 0 2009-10-08 00:56 grubenv Upon trying to boot, I can't. I manually mounted the partition, deleted grubenv b hand, and rebooted. Still now good. I had to remove:

[Bug 439784] Re: invalid: environment block

2009-10-08 Thread Harry
** Changed in: grub2 (Ubuntu) Status: Fix Released = Confirmed -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list

[Bug 439784] Re: invalid: environment block

2009-10-08 Thread Harry
Well this bug still affects me after every unclean shutdown (karmic ubuntu 32-bit, fully upgraded) as of today and with grub (1.97~beta3-1ubuntu8) installed. Workaround: when grub loads and the menu is seen, press e and delete the 2 rows: recordfail=1 save_env recordfail Then normal boot with

[Bug 439784] Re: invalid: environment block

2009-10-05 Thread neuromancer
Solution given by Lepikk worked for me. Just for completeness, I've used a cd-rom of Ubuntu Karmic Beta1 and from the option I've choosed restore damaged installation or something like that. Than I've followed the wizard and when asked I've launched a console shell with /dev/sda1 (wich is my

[Bug 439784] Re: invalid: environment block

2009-10-04 Thread Astenorh
Check if you have the lines by pressing e when booting recordfail=1 save_env recordfail if so you can delete them by pressing Ctrl-D and then boot by Ctrl-X -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of

[Bug 439784] Re: invalid: environment block

2009-10-04 Thread Astenorh
What does recordfail does? -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com

[Bug 439784] Re: invalid: environment block

2009-10-04 Thread Launchpad Bug Tracker
This bug was fixed in the package grub2 - 1.97~beta3-1ubuntu7 --- grub2 (1.97~beta3-1ubuntu7) karmic; urgency=low * debian/grub-common.init: /boot/grub/grubenv sometimes seems to end up zero-sized for some reason. If it is, just delete it (LP: #439784). -- Colin Watson

[Bug 439784] Re: invalid: environment block

2009-10-03 Thread Carlos Costa
Hi Colin :) I don't know if you already had committed your fix, however this bug still happens. I just tried to be back from hibernation, but I can't. To solve I erased grubenv file following the comment #11 and everything works normally. -- invalid: environment block

[Bug 439784] Re: invalid: environment block

2009-10-02 Thread Alexander Hunziker
Is there a way to recover from this when it hit me without reinstalling the system? -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list

[Bug 439784] Re: invalid: environment block

2009-10-02 Thread Zaki Manian
Yes the comments above give you a workable way to recover your system. You need to be able load a live linux operating system that can write your your filesystem. I used a live-usb drive. You can use the ubuntu install cd for this purpose. After booting into the live cd based environment, you

[Bug 439784] Re: invalid: environment block

2009-10-01 Thread Antti Leppik
I had the same problem. Deleting grubenv had no efect. Solved it temporarily using following commands in recovery shell # cd /boot/grub # rm grubenv # grub-editenv grubenv create # grub-editenv grubenv set default=0 # grub-editenv grubenv list default=0 -- invalid: environment block

[Bug 439784] Re: invalid: environment block

2009-10-01 Thread Glen Turner
Note that this happens more often on Karmic Koala (alpha), with it's use of ext4 for /boot seeming to lead to more instances of 0-length files upon system issues (in my case, the kernel crashed). I was just about to add some more information to support this, but I see Colin has fixed it. Thank you

[Bug 439784] Re: invalid: environment block

2009-10-01 Thread Glen Turner
I just had a look at the fix, and I suggest a better fix would be to allow load_env to continue with just a warning if it fails reading the file. It's not like scripts don't have to handle unset environment variables in any case. That would allow for more exotic forms of filesystem corruption. --

Re: [Bug 439784] Re: invalid: environment block

2009-10-01 Thread Colin Watson
On Thu, Oct 01, 2009 at 10:14:51AM -, Glen Turner wrote: I just had a look at the fix, Not sure how you managed that, since it's only on my laptop hard disk right now! -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a

[Bug 439784] Re: invalid: environment block

2009-10-01 Thread Glen Turner
What I meant is that I trialled your idea by hacking my init scripts as you suggest. You might want to test your idea further when I modify the script to just delete it the boot sequence still fails complaining about a read failure on grubenv. You need to say /usr/bin/grub-editenv

Re: [Bug 439784] Re: invalid: environment block

2009-10-01 Thread Colin Watson
I'd like to know why an explicit create is necessary for you, as 'grub-editenv /boot/grub/grubenv unset recordfail' will create the environment block implicitly, as verified from the code and demonstrated here: $ rm -f grubenv $ grub-editenv grubenv unset recordfail $ ls -l grubenv

Re: [Bug 439784] Re: invalid: environment block

2009-10-01 Thread Colin Watson
Incidentally, there is a very good reason why loadenv doesn't create the environment block itself - GRUB's filesystem modules don't have write support, and adding that would expose us to a whole range of exciting new possible bugs. For this reason, we create the file when we're in a real operating

[Bug 439784] Re: invalid: environment block

2009-09-30 Thread jamey0824
** Attachment added: Dependencies.txt http://launchpadlibrarian.net/32767078/Dependencies.txt -- invalid: environment block https://bugs.launchpad.net/bugs/439784 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs