Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
muchan
Post subject:   PostPosted: 15.02.2011, 17:01
Moderator


Joined: 2010-09-11
Posts: 468

      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
 
 View user's profile Send private message  
Reply with quote Back to top
deachOffline
Post subject:   PostPosted: 16.02.2011, 12:06



Joined: 2010-09-18
Posts: 31

Status: Offline
      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
 
 View user's profile Send private message  
Reply with quote Back to top
FredOffline
Post subject: What the hell do I do now?  PostPosted: 06.03.2011, 23:01



Joined: 2011-03-06
Posts: 2

Status: Offline
      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
 
 View user's profile Send private message  
Reply with quote Back to top
muchan
Post subject: RE: What the hell do I do now?  PostPosted: 06.03.2011, 23:53
Moderator


Joined: 2010-09-11
Posts: 468

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...)
 
 View user's profile Send private message  
Reply with quote Back to top
FredOffline
Post subject: Re: RE: What the hell do I do now?  PostPosted: 07.03.2011, 16:24



Joined: 2011-03-06
Posts: 2

Status: Offline
      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
 
 View user's profile Send private message  
Reply with quote Back to top
ghstryderOnline!
Post subject: RE: What the hell do I do now?  PostPosted: 07.03.2011, 16:35



Joined: 2010-09-12
Posts: 95
Location: Detroit
Status: Online!
Hmmm, never mind, it wasn't helpful.


Last edited by ghstryder on 07.03.2011, 16:43; edited 2 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
muchan
Post subject: RE: Re: RE: What the hell do I do now?  PostPosted: 07.03.2011, 16:38
Moderator


Joined: 2010-09-11
Posts: 468

      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.
 
 View user's profile Send private message  
Reply with quote Back to top
noxOffline
Post subject: RE: Re: RE: What the hell do I do now?  PostPosted: 11.03.2011, 20:24



Joined: 2010-09-14
Posts: 45

Status: Offline
Hey folks, is the problem solved by now? I haven't upgraded my system since more than a month because of this..
 
 View user's profile Send private message  
Reply with quote Back to top
gerdOffline
Post subject: RE: Re: RE: What the hell do I do now?  PostPosted: 11.03.2011, 20:54



Joined: 2010-09-13
Posts: 94

Status: Offline
I did that some days ago and the problem was still there!
 
 View user's profile Send private message  
Reply with quote Back to top
bmorencyOffline
Post subject: Re: RE: Re: RE: What the hell do I do now?  PostPosted: 11.03.2011, 20:55



Joined: 2010-10-22
Posts: 71

Status: Offline
      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
 
 View user's profile Send private message  
Reply with quote Back to top
noxOffline
Post subject: RE: Re: RE: Re: RE: What the hell do I do now?  PostPosted: 11.03.2011, 21:38



Joined: 2010-09-14
Posts: 45

Status: Offline
ups, works perfect!

Thank you very much!
 
 View user's profile Send private message  
Reply with quote Back to top
mheyesOffline
Post subject: RE: Re: RE: Re: RE: What the hell do I do now?  PostPosted: 12.03.2011, 20:43



Joined: 2011-02-10
Posts: 41

Status: Offline
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?
 
 View user's profile Send private message  
Reply with quote Back to top
muchan
Post subject: RE: Re: RE: Re: RE: What the hell do I do now?  PostPosted: 12.03.2011, 22:37
Moderator


Joined: 2010-09-11
Posts: 468

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...
 
 View user's profile Send private message  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 12.03.2011, 23:35



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
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.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
clubexOffline
Post subject:   PostPosted: 13.03.2011, 00:53



Joined: 2010-09-11
Posts: 98

Status: Offline
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
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio