aptosid.com

Upgrade Warnings - [Solved] grub-common is broken

mheyes - 10.02.2011, 15:12
Post subject: [Solved] grub-common is broken
I moved this to a new thread since it's not related to the xorg problem where it was posted. That was marked as solved, this is not.

mheyes wrote:
All is not well on this amd64. Just did DU after xorg upgrade fixed, rebooted and got error: symbol not found: `grub_env_export' , then dumped at grub rescue prompt. What next?


snvv wrote: grub-common is broken. Please wait for advice.

All other users plese put it on hold.
mheyes - 10.02.2011, 19:40
Post subject:
I have the Aptosid LiveCD up, and have setup the chroot environment. Don't have network access on it. I did copy grub-common, grub2 and grub-pc ( all v. 1.98+20100804-14_amd64 ) debs onto a flash drive. These versions should work? But I can't figure out how to copy the files from the flash drive onto the hd. If I can do this, I should be able to install with dpkg and be back up again, right?
mheyes - 10.02.2011, 19:56
Post subject:
Well, that didn't work either.
devil - 10.02.2011, 20:54
Post subject:
http://bugs.debian.org/612806

greetz
devil
mheyes - 10.02.2011, 21:38
Post subject:
I did boot from the livecd, setup a chroot env, and downgraded grub-pd, grub-common, and grub2 to those versions using dpkg. Then I did an update-grub, but when I rebooted it still tossed me to grub rescue. I copied those files from a flash drive because I don't have, right now, and easily accessible network connection for the box. What am I missing?
dibl - 11.02.2011, 02:18
Post subject: It is a good night to have my Super Grub CD!
I had not needed my Super Grub CD for a couple of years, but I needed it today.


      Code:
root@aptosidbox:/home/don# apt-cache policy grub-pc
grub-pc:
  Installed: 1.99~rc1-2
  Candidate: 1.99~rc1-2
  Version table:
 *** 1.99~rc1-2 0
        500 http://cdn.debian.net/debian/ sid/main amd64 Packages
        500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status


but, except for that little excitement, the new kernel booted fast and my desktop never looked better.

      Code:
root@aptosidbox:/home/don# infobash -v3
Host/Kernel/OS  "aptosidbox" running Linux 2.6.37-0.slh.21-aptosid-amd64 x86_64 [ aptosid 2010-03 Ἀπάτη - kde-lite - (201012262151) ]
CPU Info        8x Intel Core i7 950 @ 8192 KB cache flags( sse3 ht nx lm vmx ) clocked at [ 1600.000 MHz ]
Videocard       nVidia GF100 [GeForce GTX 480]  X.Org 1.9.4  [ 1920x1200@50.0hz ]
Network cards   Marvell 88E8056 PCI-E Gigabit
Processes 212 | Uptime 5min | Memory 741.4/5979.1MB | HDD OCZ-REVODRIVE,OCZ-REVODRIVE,KINGSTON SS100S2,WDC WD1002FAEX-0,WDC WD1002FAEX-0 Size 2136GB (2%used) | GLX Renderer GeForce GTX 480/PCI/SSE2 | GLX Version 4.1.0 NVIDIA 270.18 | Client Shell | Infobash v3.34

mheyes - 14.02.2011, 19:24
Post subject: RE: It is a good night to have my Super Grub CD!
I could have used that. I made a mess of things and decided to reinstall the system. But there is a hidden problem that should be made known.

I have an Edimax EW-7128G wireless card that is only supported in non-free. During the fresh install I'm presented with a screen telling me that I have to get non-free to support the hardware, and asks if I want to do this. Of course, I do. The trap is that doing this also brings in the broken grub-pc 1.99+ package. So after everything is installed and I reboot, I of course get the broken grub and grub-rescue prompt.

Since the broken grub-pc package is a known issue, there should be some mention of it during the install. Otherwise, and I'm sure it's happened, others will fall into this.

My .02.
muchan - 14.02.2011, 20:28
Post subject: RE: It is a good night to have my Super Grub CD!
But... this "known issue" occured after the latest aptosid release, so installer can't mention it...

And whatever package you need to install after install, you can still hold the grub-common
package with
# echo grub-common hold | dpkg --set-selections
or see http://manual.aptosid.com/en/sys-admin- ... -downgrade
mheyes - 14.02.2011, 20:50
Post subject: RE: It is a good night to have my Super Grub CD!
So, with the unbootable system, would I boot to the live cd, then set up a chroot environment, and then follow those downgrading instructions using the testing repositories to install the previous, working version of grub-common? Not to sound dense...
devil - 14.02.2011, 21:41
Post subject: RE: It is a good night to have my Super Grub CD!
i even installed the same version and it worked. all it needed was reinstall.

greetz
devil
mheyes - 14.02.2011, 21:59
Post subject: RE: It is a good night to have my Super Grub CD!
Don't know. All I get is a grub_rescue prompt, just like http://bugs.debian.org/612806 . Is the process I described the correct way to downgrade grub-common after another reinstall? Appreciate any help.

Squeeze is still at 2.6.32 and I doesn't load the k10temp module I would like to use.
muchan - 14.02.2011, 22:13
Post subject: RE: It is a good night to have my Super Grub CD!
For broken system, I think downgrading and update-grub would recover the grub.

I didn't have problem with upgraded version of grub on 2 system (i386 and amd64).
I don't know what is the condition to be broken...
mheyes - 14.02.2011, 22:33
Post subject: RE: It is a good night to have my Super Grub CD!
I'll try again in a bit. I have a second hard drive on this system, not sure if this has any bearing on the problem.
deach - 15.02.2011, 14:27
Post subject:
OK this is what I did. I don't remember which forum it came from or I'd give credit for it. I'm NOT recommending this however, it did work for me.
      Code:
mount /dev/sdXx /mnt
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
chroot /mnt

Once at the prompt I reinstall grub:

Code:
grub-install /dev/sda
and then updated grub

Code:
update-grub


The grub-install might have had to be /dev/sdaX I can't remember this happened to me over a week ago the first time.

Again, I'm not "recommending this". However...It worked on all four of my boxes.

Regards,
Deach
dibl - 15.02.2011, 15:50
Post subject:
After I had the problem as reported above, I downgrade the grub-pc version, then waited until yesterday to d-u. It upgraded grub-pc (and many other things), and now it boots fine. Also one of my netbooks which had not been updated for a couple of weeks just got a d-u, and there's no problem there.
muchan - 15.02.2011, 17:01
Post subject:
      deach wrote:
OK this is what I did. I don't remember which forum it came from or I'd give credit for it. I'm NOT recommending this however, it did work for me.


Aptosid manual has a page for recovery of grub.
http://manual.aptosid.com/en/sys-admin- ... htm#chroot
deach - 16.02.2011, 12:06
Post subject:
      muchan wrote:
      deach wrote:
OK this is what I did. I don't remember which forum it came from or I'd give credit for it. I'm NOT recommending this however, it did work for me.


Aptosid manual has a page for recovery of grub.
http://manual.aptosid.com/en/sys-admin- ... htm#chroot


Tried it, didn't work. Was even in IRC and getting help and although that got me on the right track, what I posted worked.



      Quote:
After I had the problem as reported above, I downgrade the grub-pc version, then waited until yesterday to d-u. It upgraded grub-pc (and many other things), and now it boots fine. Also one of my netbooks which had not been updated for a couple of weeks just got a d-u, and there's no problem there.


I can confirm this on another laptop I hadn't touched for almost a month and just did yesterday. D-U went off without a single hitch.

Regards,
Deach
Fred - 06.03.2011, 23:01
Post subject: What the hell do I do now?
      deach wrote:
OK this is what I did. I don't remember which forum it came from or I'd give credit for it. I'm NOT recommending this however, it did work for me.
      Code:
mount /dev/sdXx /mnt
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
chroot /mnt

Once at the prompt I reinstall grub:

Code:
grub-install /dev/sda
and then updated grub

Code:
update-grub


The grub-install might have had to be /dev/sdaX I can't remember this happened to me over a week ago the first time.

Again, I'm not "recommending this". However...It worked on all four of my boxes.

Regards,
Deach


I tried all the above, with no success. I also tried the instructions for chrooting and reinstalling grub, also with no success.

My situation is a little different from othe people's -- I have my root/home partitions encrypted using LUKS. The only partition that is unencryted is a boot partition. After the latest 'update' I now get an error message when I try to boot my machine something like 'grub_env_not found' I don't even get to the prompt to enter the passphrase to decrypt my root/home partitions.

I've tried all the suggestions re: chrooting, re-installing grub, etc. that I can find here, and I still can't boot my machine. If my partions were not encrypted, these solutions probably would have worked.

So, as I see it, I have two options:

1) Somehow manage to change my /boot partition so that the system boots as expected; I have no idea how to accomplish
this; or

2) Somehow decrypt my root/home partitions. Again, I have absolutely no idea how to do this. There is irreplaceable data on my home partition, so the idea of wiping it out and reinstalling is simply NOT an option.

I am almost physically sick over this. Any suggestions would be welcome.

Fred
muchan - 06.03.2011, 23:53
Post subject: RE: What the hell do I do now?
what you need is, probably, somehow downgrade the grub-pc and grub-common on the installed system.
First, you need to download the grub-pc and grub-common, 1.98+20100804-14 from testing or stable,
or from these pages
http://packages.debian.org/squeeze/grub-pc
http://packages.debian.org/squeeze/grub-common
save the dpkg files to USB key, etc.

{edit: actually, if you succeed to conect to net on live-mode,
then you don't need to download the dpkg file prior to live-boot...
you can just downgrade the packages with apt-get. }


Then start live-CD, chroot as in manual, and *downgrade* the package with downloaded dpkg files,
then update-grub.

(Sure, you'd need to decrypt the root drive before chroot, here I can't help much.
You know how you have encrypted, then you should know the key to mount it descrypted manually...)
Fred - 07.03.2011, 16:24
Post subject: Re: RE: What the hell do I do now?
      muchan wrote:
what you need is, probably, somehow downgrade the grub-pc and grub-common on the installed system.
First, you need to download the grub-pc and grub-common, 1.98+20100804-14 from testing or stable,
or from these pages
http://packages.debian.org/squeeze/grub-pc
http://packages.debian.org/squeeze/grub-common
save the dpkg files to USB key, etc.

{edit: actually, if you succeed to conect to net on live-mode,
then you don't need to download the dpkg file prior to live-boot...
you can just downgrade the packages with apt-get. }


Then start live-CD, chroot as in manual, and *downgrade* the package with downloaded dpkg files,
then update-grub.

(Sure, you'd need to decrypt the root drive before chroot, here I can't help much.
You know how you have encrypted, then you should know the key to mount it descrypted manually...)


After some time with the help of Google, I figured out how to decrypt the drive:

cryptsetup /dev/sda3 cryptoroot
mount /dev/mapper/cryptoroot /mnt/cryptoroot

This means that the decrypted root directory is now mounted under /mnt/cryptoroot. The live file system has the root directory mounted under /root.

My problem is, any attempt to use apt-get to install/downgrade the grub-pc package is going to point to /root, as opposed to /mnt/cryptoroot. I tried using ln -s to establish a softlink, but that didn't work.

This is turning out to be such a pain that I might just end up having to reinstall; I'm currently backing-up the home directory onto another drive. (At least I managed to salvage the data!)

If someone can suggest how to setup the drive mappings so that I can avoid a re-install, that would be most helpful.

The sad part of this whole affair isn't just the time lost due to these mistakes; what I foresee happening is that people are going to become gun-shy about doing updates. After all, you can't blame them when a simple update manages to hose their systems, rendering them unbootable.

Fred
ghstryder - 07.03.2011, 16:35
Post subject: RE: What the hell do I do now?
Hmmm, never mind, it wasn't helpful.
muchan - 07.03.2011, 16:38
Post subject: RE: Re: RE: What the hell do I do now?
      Quote:

If someone can suggest how to setup the drive mappings so that I can avoid a re-install, that would be most helpful.


In the manual, there is a section:
"Using chroot to recover an overwritten or corrupted Grub in the MBR"
http://manual.aptosid.com/en/sys-admin- ... over-grub2
Here you have the instruction to set the chroot environment.
Change the path and name of the mount point to your case, and you can
chroot to make your /mnt/cryptroot as if your / directory.
nox - 11.03.2011, 20:24
Post subject: RE: Re: RE: What the hell do I do now?
Hey folks, is the problem solved by now? I haven't upgraded my system since more than a month because of this..
gerd - 11.03.2011, 20:54
Post subject: RE: Re: RE: What the hell do I do now?
I did that some days ago and the problem was still there!
bmorency - 11.03.2011, 20:55
Post subject: Re: RE: Re: RE: What the hell do I do now?
      nox wrote:
Hey folks, is the problem solved by now? I haven't upgraded my system since more than a month because of this..


I don't know if it's fixed yet but you can just put "grub-common" on hold and upgrade the rest of the packages. That's what I did.

To put it on hold just type this in:
      Code:
echo "grub-common hold" | dpkg --set-selections


When it does get fixed just type this in:
      Code:
echo "grub-common install" | dpkg --set-selections

nox - 11.03.2011, 21:38
Post subject: RE: Re: RE: Re: RE: What the hell do I do now?
ups, works perfect!

Thank you very much!
mheyes - 12.03.2011, 20:43
Post subject: RE: Re: RE: Re: RE: What the hell do I do now?
Mine's on hold for now as well. I can see the list of bugs against grub-common here, http://bugs.debian.org/cgi-bin/pkgrepor ... =unstable, but where can I find out if this problem has been fixed?
muchan - 12.03.2011, 22:37
Post subject: RE: Re: RE: Re: RE: What the hell do I do now?
The exact bug report is this one http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612806
so, _officially_, when this bug is closed, you know it has been fixed.

From the report, it seems that this bug is reported against version 1.98+20100804-14,
but I guess the reality was that the bug was in the next versions, 1.99~rc1-1, rc1-2...
and reporter has downgraded grub-pc and grub-common to boot, then reported.
I hope the current version 1.99~rc1-3 is already fixed, but I'm not quite sure.
It does boot on my system (and on many systems) but on some may fail.

Someone who can reproduce the problem (and who knows revert it to boot again) would be
a voluntary victim to check if each new version is fixed or not...
dibl - 12.03.2011, 23:35
Post subject:
It was ver. 1.99~rc1-2 that failed to boot. The current version is:

      Code:
root@aptosidbox:/home/don# apt-cache policy grub-pc
grub-pc:
  Installed: 1.99~rc1-3
  Candidate: 1.99~rc1-3
  Version table:
 *** 1.99~rc1-3 0
        500 http://cdn.debian.net/debian/ unstable/main amd64 Packages
        500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status


This one has no problem. I have it on this desktop and 2 netbooks.
clubex - 13.03.2011, 00:53
Post subject:
apt-get gives the following bug report:
      Code:

Retrieving bug reports... Done
Parsing Found/Fixed information... Done
critical bugs of grub-pc (1.98+20100804-14 -> 1.99~rc1-3) <unfixed>
 #613409 - grub-pc: overwrites first sector of first partition
grave bugs of grub-common (1.98+20100804-14 -> 1.99~rc1-3) <unfixed>
 #614295 - grub-pc: kFreeBSD upgrade fails: cannot find a GRUB drive for /dev/ad0s1
   Merged with: 612128 615152

mheyes - 13.03.2011, 16:27
Post subject:
Didn't know about apt-listbugs, thanks. I just ran it with different results:

Parsing Found/Fixed information... Done
grave bugs of grub-pc (1.98+20100804-14 -> ) <unfixed>
#593648 - grub-pc install fails on RAID1 (unknown filesystem)
#590884 - grub-pc: upgrading with vmlinuz-2.6.32-5-amd64 kernel fails on device detection
Summary: grub-pc(2 bugs)

I'd test the 1.99-rcl-3 version but since I mucked up things before I think I should wait till it's released to testing.
nox - 16.03.2011, 18:21
Post subject:
Hey folks, I just upgraded my grub and screwed up massively. I can only access grubs rescue mode.This is what it says:

      Quote:
error: symbol not found: 'grub_env_export'.
Entering rescue mode...
grub rescue>



What can i do?

Please help.
nox - 16.03.2011, 19:20
Post subject:
ok, I followed deachs instructions an everything is fine now.

But please, please don't tag topics as "solved" if they aren't yet... It scared the crap out of me. Wink
clubex - 16.03.2011, 21:00
Post subject:
New in repository today grub-pc 1.99~rc1-4 and grub-common 1.99~rc1-4.

No problems for me when I did a du.

infobash -v3
Host/Kernel/OS "westfield" running Linux 2.6.37-3.slh.2-aptosid-amd64 x86_64 [ sidux 2008-04 Πόντος - kde-lite - (200812222256) ]
CPU Info 2x AMD Athlon II X2 240 1024 KB cache flags( sse3 ht nx lm svm ) clocked at [ 800.000 MHz ]
Videocard nVidia C61 [GeForce 7025 / nForce 630a] X.Org 1.9.4.901 [ 1680x1050@50.0hz ]
Network cards nVidia MCP61
Processes 142 | Uptime 6min | Memory 660.8/1758.8MB | HDD Hitachi HDS72168 Size 82GB (82%used) | GLX Renderer GeForce 7025 / nForce 630a/PCI/SSE2 | GLX Version 2.1.2 NVIDIA 260.19.44 | Client Shell | Infobash v3.35
muchan - 16.03.2011, 21:58
Post subject:
      nox wrote:
ok, I followed deachs instructions an everything is fine now.

But please, please don't tag topics as "solved" if they aren't yet... It scared the crap out of me. ;)


Fixed version is in sid, so it was [Solved] as "Update warning".
If you have used update-grub before d-u, then you used the version before "solved".
deach - 17.03.2011, 05:02
Post subject:
      nox wrote:
ok, I followed deachs instructions an everything is fine now.

But please, please don't tag topics as "solved" if they aren't yet... It scared the crap out of me. Wink


Glad it helped.

Deach
mheyes - 20.03.2011, 18:43
Post subject:
I upgraded to grub-pc 1.99~rc1-4 and grub-common 1.99~rc1-4 just now without problems. The End Wink
All times are GMT - 12 Hours
Powered by PNphpBB2 © 2003-2010 The Zafenio Group
Credits