Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21st May 2007, 10:31 PM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
A slightly different grub question

I'm trying to install (actually update) grub before I install CentOS on an existing FC6 partition.

First to set up the problem. I have FC6 installed on 2 partitions. One on hda5 and one on hda6. One was clean install and one was an upgrade. I decided to keep the clean install and scrub the upgrade in favor of CentOS. The problem is whenever I install a new kernel on fc6 (hda5) I have to edit grub on hda6 to reflect the change. Therefor I want to use grub from hda5.

Whenever I try to grub-install /dev/hda, I get errors...
Code:
 sudo grub-install /dev/hda
grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' fa
iled.
/sbin/grub-install: line 335:  4286 Aborted                 $grub_shell --batch $no_f
loppy --device-map=$device_map  >$log_file <<EOF
dump ${root_drive}${tmp} ${img_file}
quit
EOF

grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' fa
iled.
/sbin/grub-install: line 335:  4292 Aborted                 $grub_shell --batch $no_f
loppy --device-map=$device_map  >$log_file <<EOF
dump ${root_drive}${tmp} ${img_file}
quit
EOF

grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' fa
iled.
/sbin/grub-install: line 335:  4298 Aborted                 $grub_shell --batch $no_f
loppy --device-map=$device_map  >$log_file <<EOF
dump ${root_drive}${tmp} ${img_file}
quit
EOF

grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' fa
iled.
/sbin/grub-install: line 335:  4304 Aborted                 $grub_shell --batch $no_f
loppy --device-map=$device_map  >$log_file <<EOF
dump ${root_drive}${tmp} ${img_file}
quit
EOF

grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' fa
iled.
/sbin/grub-install: line 335:  4310 Aborted                 $grub_shell --batch $no_f
loppy --device-map=$device_map  >$log_file <<EOF
dump ${root_drive}${tmp} ${img_file}
quit
EOF

The file /boot/grub/stage1 not read correctly.
and with the --recheck option i get
Code:
sudo grub-install --recheck /dev/hda
grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' fa
iled.
/sbin/grub-install: line 497:  4362 Aborted                 $grub_shell --batch $no_f
loppy --device-map=$device_map  >$log_file <<EOF
quit
EOF

sed: can't read /boot/grub/device.map: No such file or directory
grep: /boot/grub/device.map: No such file or directory
No suitable drive was found in the generated device map.
Reverting to backed up copy.
What I'm doing is trying to install grub from a normally booted OS. Do I need to do it by way of rescue or should it be doable from a running OS?

This is currently a Windows/FC dual boot. Windows is hda1. Do I need to grub-install /dev/hda1 or is hda sufficient?
If I go ahead withy the CentOS install and let it install grub to hda is there going to be a problem with FC (I think I've read that here in the past).

(I have tried both sudo and su -)
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted
Reply With Quote
  #2  
Old 21st May 2007, 10:40 PM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello Mark:
First, you want to use the rescue disc or your install disc and re-install grub that way.
Before you do that can you answer ...

Can you now successfully boot both Windows and FC with your current grub?

Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #3  
Old 21st May 2007, 10:46 PM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
Now how did I know it would be you? .
Yes I can boot Windows (don't know why I would ) and "both" FC6 partitions.

I suspected it might be a rescue thing, but I would have thought man grub-install (or info) would have mentioned that.
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted
Reply With Quote
  #4  
Old 21st May 2007, 10:48 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Hi

does the command grub still work

su -
grub

root (hdx,x)
setup (hd0)
quit
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5

Last edited by leigh123linux; 21st May 2007 at 10:50 PM.
Reply With Quote
  #5  
Old 21st May 2007, 11:00 PM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello :
Mark, what I have done in the past with something similar [and I hope Bob pops by as I am sure he has a very similar set-up to what you want] and he may be able to give the defacto cure.

I always use the grub version of FC and have it installed on the mbr [/dev/hda in your case]
Then when I have installed other OS's on the same drive, on the free space I let the installer create a small /boot 50mb is fine, then a / and /home etc. and share the swap
Then I let the new OS install it's boot loader to the /boot .
Then I just add the entry to the existing master grub and use the chainloader +1, which passes off the boot to the resident boot loader of the new OS.
Hope this makes some sense ??
Anyway, doing this means you never have to mess around with manually editing any grub entries other than the first setup

I will post my my current grub in a few moments as I am not on FC, however I don't have any drives at the moment with multiple OS's on them.
However, the principle is the same and it may assist in what I am trying to describe ?


Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #6  
Old 21st May 2007, 11:03 PM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
Hi Leigh:
Code:
root@spongie:~# grub
grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' failed.
Aborted
You may be on to something (unless my recent grub-install attempts broke something).
In case it matters, I should clarify.
Windows is on hda1. FC6 upgrade is on hda6 (not currently being used) I am running FC6 clean install from hda5, but grub was originally installed from the FC6 upgrade on hda6.
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted
Reply With Quote
  #7  
Old 21st May 2007, 11:21 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by u-noneinc-s
Hi Leigh:
Code:
root@spongie:~# grub
grub: asmstub.c:214: grub_stage2: Assertion `simstack_alloc_base != ((void *) -1)' failed.
Aborted
You may be on to something (unless my recent grub-install attempts broke something).
In case it matters, I should clarify.
Windows is on hda1. FC6 upgrade is on hda6 (not currently being used) I am running FC6 clean install from hda5, but grub was originally installed from the FC6 upgrade on hda6.

I don't think the rescue cd will help with this , grub seems like it could be corrupt!!
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
Reply With Quote
  #8  
Old 21st May 2007, 11:36 PM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
Quote:
Originally Posted by leigh123@linux
I don't think the rescue cd will help with this , grub seems like it could be corrupt!!
I hope you're wrong (though it is rare). Before I posted this question, I booted the CentOS disc and went through the process up to the boot loader when I realized I should probably "fix" my grub before I install CentOS (because of the fc6/hda5 kernel upgrades not being made available at boot because of using FC6/hda6 grub as the loader). I successfully exited CentOS install and rebooted to FC6, and immediately tried to grub-install /dev/hda.
Now I'm afraid to reboot at all.

Argh!!! I'm open to suggestions.

Thanks to both of you for the prompt replies

EDIT: Actually if worse comes to worse, I guess I could always insert the install disk and choose the upgrade option which theoretically should repair grub (and unfortunately remove all my kernels).
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted

Last edited by u-noneinc-s; 21st May 2007 at 11:44 PM. Reason: Additional info
Reply With Quote
  #9  
Old 21st May 2007, 11:15 PM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello:
Mark, here is my current grub.conf
PHP Code:
# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-version.img
#boot=/dev/sda1
default=0
timeout
=10
splashimage
=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core 
(2.6.20-1.2948.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.20-1.2948.fc6 ro root=LABEL=/1 nodmraid reiserfs i686 rhgb quiet
        initrd 
/initrd-2.6.20-1.2948.fc6.img
title Fedora Core 
(2.6.20-1.2944.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.20-1.2944.fc6 ro root=LABEL=/1 nodmraid reiserfs i686 rhgb quiet
        initrd 
/initrd-2.6.20-1.2944.fc6.img
title Fedora Core 
(2.6.20-1.2933.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.20-1.2933.fc6 ro root=LABEL=/1 nodmraid reiserfs i686 rhgb quiet
        initrd 
/initrd-2.6.20-1.2933.fc6.img
title Fedora Core 
(2.6.20-1.2925.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.20-1.2925.fc6 ro root=LABEL=/1 nodmraid reiserfs pci=nommconf idle=poll i686 rhgb quiet
        initrd 
/initrd-2.6.20-1.2925.fc6.img
title Fedora Core 
(2.6.19-1.2911.6.5.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.19-1.2911.6.5.fc6 ro root=LABEL=/1 nodmraid reiserfs i686 rhgb quiet
        initrd 
/initrd-2.6.19-1.2911.6.5.fc6.img
title Fedora Core 
(2.6.19-1.2911.6.4.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.19-1.2911.6.4.fc6 ro root=LABEL=/1 nodmraid reiserfs i686 rhgb quiet
        initrd 
/initrd-2.6.19-1.2911.6.4.fc6.img
title Fedora Core 
(2.6.19-1.2911.fc6)
        
root (hd0,0)
        
kernel /vmlinuz-2.6.19-1.2911.fc6 ro root=LABEL=/1 nodmraid reiserfs i686 rhgb quiet
        initrd 
/initrd-2.6.19-1.2911.fc6.img

## Test Release of F7 Installation
title Fedora Core 7 Test2
        root 
(hd3,0)
        
rootnoverify (hd3,0)
        
chainloader +1

## Fedora Core 64 bit Installation
title Fedora Core 6 X64
        root 
(hd2,0)
        
rootnoverify (hd2,0)
        
chainloader +1

## Windows XP Installation
title Windows XP Pro
        root 
(hd1,0)
        
chainloader +1
        map 
(hd0) (hd1)
        
map (hd1) (hd0)
        
makeactive

## Debian Etch Installation
title Debian Etch
        root 
(hd4,0)
        
rootnoverify (hd4,0)
        
chainloader +
My "master" grub is installed on the mbr of the FC632bit drive and all the remaining OS's excluding Win have their own boot loaders installed on a /boot partition
Any kernel update to any of the OS's are automatically taken care of without the need to edit my "master" grub.


Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #10  
Old 21st May 2007, 11:28 PM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
Not sure I understand (I think I do if this is your "master" grub). If you want to boot title Fedora Core 7 Test2 you'd choose it from your master grub then that would take you to the F7 grub screen?
If I got that right, I'm still confused on the /boot (50 MB) from your previous post. Is that a seperate boot partition or just a boot dir on the partition you are installing to? (/boot dir seems to me to be standard whether you choose to install grub or not)
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted
Reply With Quote
  #11  
Old 21st May 2007, 11:43 PM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello Mark:
In my case, my "master" grub [just my term] is from FC6 32 bit (hence all the kernels listed)
It is the only boot loader on a mbr (except win)
The /boot (50 MB) is on the empty partition that you are installing your new OS to.
And yes, if I select F72 or Etch etc. it passes off the boot process to the boot loader from each of those installations.

Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #12  
Old 22nd May 2007, 12:33 AM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello Mark:
If you boot from your installation disc and enter the linux rescue mode and chroot /mnt/sysimage
then you can have a look at the kernels installed to make sure you mounted the correct installation [just in case]
then you should be able to re-install grub without losing any kernel images.
At least, that is how it has worked here.

Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #13  
Old 22nd May 2007, 12:52 AM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
I was thinking that, but in this case, does the grub get installed from the CD or from the mounted OS (ie, if I mount /hda5 and do grub-install /dev/hda isn't it going to install the corrupted grub from hda5)? I thought I had lost all my confusion about grub, but it seems to have suddenly returned.

I was also thinking about DLing the grub package and reinstalling it with
Code:
rpm -Uvh --replacefiles --replacepkgs
. but I have no idea if that would even come close to working.

I'm also not too concerned about the kernels since the newest one seems to be fine. One old (stock) and one new. I keep too many anyway.

I'll have to think about it but it seems like I'm going to have to do something sooner or later.

This CentOS install was just to be a test but it turned out to be another learning experience (which is good).

Someone is giving me an AMD Duron PC in a couple weeks and CentOS was going on that.
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted
Reply With Quote
  #14  
Old 22nd May 2007, 12:57 AM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by u-noneinc-s
I was thinking that, but in this case, does the grub get installed from the CD or from the mounted OS (ie, if I mount /hda5 and do grub-install /dev/hda isn't it going to install the corrupted grub from hda5)? I thought I had lost all my confusion about grub, but it seems to have suddenly returned.

I was also thinking about DLing the grub package and reinstalling it with
Code:
rpm -Uvh --replacefiles --replacepkgs
. but I have no idea if that would even come close to working.

I'm also not too concerned about the kernels since the newest one seems to be fine. One old (stock) and one new. I keep too many anyway.

I'll have to think about it but it seems like I'm going to have to do something sooner or later.

This CentOS install was just to be a test but it turned out to be another learning experience (which is good).

Someone is giving me an AMD Duron PC in a couple weeks and CentOS was going on that.
When you chroot you will use the OS grub.

you could try

su -
rpm -q grub
rpm -e --nodeps grub********
yum install grub
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
Reply With Quote
  #15  
Old 22nd May 2007, 01:13 AM
u-noneinc-s's Avatar
u-noneinc-s Offline
Registered User
 
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862
Thanks again to both of you.

Leigh, If I understand correctly, I should have no problem rebooting then since my grub originally came from the "now defunct" (but still valid) fc6 hda6 partition? On the other hand, since the fc6 hda5 grub may be corrupted, I may not be able to boot that partition?

I guess a better question would be. Is grub going to load but the partition with the corrupted grub not boot? Or is grub not going to load at all til I fix it? Or is it 6 of one and a half a dozen of the other (could go either way)?

Anyway, seems like there are several options. Still thinking about them
__________________
Mark N.

Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p

411874 Get Counted
Reply With Quote
Reply

Tags
grub, question, slightly

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Current GMT-time: 21:18 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat