Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub Update Fails with Error 6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 380
Location: England

PostPosted: Sun Jul 03, 2011 10:33 am    Post subject: Grub Update Fails with Error 6 Reply with quote

Hello,

Today I have just emerged a new version of grub, sys-boot/grub-0.97-r10. After I ran grub-install /dev/sda and got the following:
Code:

    GNU GRUB  version 0.97  (640K lower / 9216K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]
grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup  --stage2=/boot/grub/stage2 --prefix=/grub (hd0)
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  22 sectors are embedded.
succeeded
 Running "install --stage2=/boot/grub/stage2 /grub/stage1 (hd0) (hd0)1+22 p (hd0,0)/grub/stage2 /grub/menu.lst"... failed

Error 6: Mismatched or corrupt version of stage1/stage2
grub> quit


My menu.lst is:
Code:

default 0
timeout 5
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.38
root (hd0,0)
kernel /boot/kernel-2.6.38 root=/dev/sda2

title Gentoo Linux 2.6.36
root (hd0,0)
kernel /boot/kernel-2.6.36 root=/dev/sda2


title Gentoo Linux 2.6.33
root (hd0,0)
kernel /boot/kernel-2.6.33 root=/dev/sda2


title Gentoo Linux 2.6.30
root (hd0,0)
kernel /boot/kernel-2.6.30 root=/dev/sda2


title Gentoo Linux 2.6.27
root (hd0,0)
kernel /boot/kernel-2.6.27 root=/dev/sda2
# vim:ft=conf:


Given that grub has been on the drive for years without problems I have no idea what is going on here. I have tried (re)moving /boot/grub, but it does not make any difference.

Regards, Freddie.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31365
Location: 56N 3W

PostPosted: Sun Jul 03, 2011 11:36 am    Post subject: Reply with quote

Evilguru,

If you have boot sector virus protection on in your BIOS, disable it.
It works by reporting a good write to the boot sector without actually writing anything, so the old grub stage1 will still be in the MBR.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 380
Location: England

PostPosted: Sun Jul 03, 2011 12:44 pm    Post subject: Reply with quote

I can find no reference to boot sector protection in my BIOS. However, in rebooting to check this, I am unable to get past the loading stage 1.5 point to boot the system.

I was under the impression that the boot sector protection only worked for BIOS interrupts, as opposed to accessing the chipset through AHCI or the relevant IDE driver. How does grub attempt to install itself onto the MBR and can it no use the OS?

Regards, Freddie.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31365
Location: 56N 3W

PostPosted: Sun Jul 03, 2011 4:27 pm    Post subject: Reply with quote

Evilguru,

It looks like you need to use your liveCD and revert the grub update.
The operating system can write to any logical block it pleases but to write to the areas in which grub is installed, it cannot use filesystem commands as the filesystem space starts at LBA 63 and grub is installed from LBA 0 to 22, approx.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 380
Location: England

PostPosted: Sun Jul 03, 2011 4:37 pm    Post subject: Reply with quote

I went into the live CD and chrooted, installing every previous version of grub I could find. They all had the same problem with grub-install. So, I decided to unmask grub2, did a quick bit of set-up and ran grub-install. It worked, no problems.

Precisely why grub legacy was having issues I do not know. While I would like to think that it was a bad update it would not explain why all of the previous versions also failed. Either way, it is working now.

Regards, Freddie.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum