Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]emerge GRUB update?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Zvezdichko
n00b
n00b


Joined: 25 Apr 2008
Posts: 23

PostPosted: Sat May 17, 2008 10:45 am    Post subject: [SOLVED]emerge GRUB update? Reply with quote

Hello,
Today my upgrade of the whole system included a new version of GRUB. After emerge finished its job it gave me the following message:

* Messages for package sys-boot/grub-0.97-r5:

* *** IMPORTANT NOTE: you must run grub and install
* the new version's stage1 to your MBR. Until you do,
* stage1 and stage2 will still be the old version, but
* later stages will be the new version, which could
* cause problems such as an unbootable system.


I googled the internet and found some stuff, but nothing that can help me. My mbr is at /dev/sda and ls at /boot/grub shows:

-rw-r--r-- 1 root root 197 May 17 13:06 default
-rw-r--r-- 1 root root 30 May 17 13:06 device.map
-rw-r--r-- 1 root root 8064 May 17 13:06 e2fs_stage1_5
-rw-r--r-- 1 root root 7904 May 17 13:06 fat_stage1_5
-rw-r--r-- 1 root root 7168 May 17 13:06 ffs_stage1_5
-rw-r--r-- 1 root root 15 Apr 25 14:01 glidevice.map
-rw-r--r-- 1 root root 337 Apr 25 17:52 grub.conf
-rw-r--r-- 1 root root 7200 May 17 13:06 iso9660_stage1_5
-rw-r--r-- 1 root root 8608 May 17 13:06 jfs_stage1_5
lrwxrwxrwx 1 root root 9 Apr 25 14:01 menu.lst -> grub.conf
-rw-r--r-- 1 root root 7328 May 17 13:06 minix_stage1_5
-rw-r--r-- 1 root root 9760 May 17 13:06 reiserfs_stage1_5
-rw-r--r-- 1 root root 33856 May 17 13:06 splash.xpm.gz
-rw-r--r-- 1 root root 512 May 17 13:06 stage1
-rw-r--r-- 1 root root 105436 May 17 13:06 stage2
-rw-r--r-- 1 root root 105340 Feb 28 04:07 stage2.old
-rw-r--r-- 1 root root 105436 May 17 13:06 stage2_eltorito
-rw-r--r-- 1 root root 7488 May 17 13:06 ufs2_stage1_5
-rw-r--r-- 1 root root 6752 May 17 13:06 vstafs_stage1_5
-rw-r--r-- 1 root root 9384 May 17 13:06 xfs_stage1_5

That shows that stage 1 was updated...

My question is ... how to make GRUB to recognize the new stage?
Will grub-install hd0 (my device) prevent any problems?? This is what I found during search.


Last edited by Zvezdichko on Sat May 17, 2008 11:06 am; edited 1 time in total
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Sat May 17, 2008 10:51 am    Post subject: Reply with quote

Follow the same instructions from the installation manual, that you used when you first installed grub. (most likely using grub-install)
Back to top
View user's profile Send private message
Zvezdichko
n00b
n00b


Joined: 25 Apr 2008
Posts: 23

PostPosted: Sat May 17, 2008 10:55 am    Post subject: Reply with quote

Yeah, that's what I also found during search, but anyway, better ask in the forum than sorry :lol:
I typed the command and:

zvezdichko grub # grub-install hd0
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/sda
zvezdichko grub #
Back to top
View user's profile Send private message
Zvezdichko
n00b
n00b


Joined: 25 Apr 2008
Posts: 23

PostPosted: Sat May 17, 2008 11:07 am    Post subject: Reply with quote

after I re-ran grub-install and rebooted the system works fine. thank you. better safe than sorry always works!
Back to top
View user's profile Send private message
Uncle_Psychosis
Guru
Guru


Joined: 31 Jan 2004
Posts: 387

PostPosted: Sat Jul 12, 2008 11:17 am    Post subject: Reply with quote

I want to do the same thing...thing is, I cant remember what I did to install grub in the first place (ie which drive its on, I have lots!) .

Is there a way to check?

nvm, I found another thread that explained it. For future use:

1. mount /boot
2. Check where your kernel is located. If you don't know check in /boot/grub/grub.conf. Mine was (hd0,1).
3. run grub:

Code:
#grub
> root (hd0,1)
> setup (hd0)
>quit


Sam
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Sun Jul 13, 2008 12:27 pm    Post subject: Re: [SOLVED]emerge GRUB update? Reply with quote

Hi,
Zvezdichko wrote:
...
I googled the internet and found some stuff, but nothing that can help me. My mbr is at /dev/sda and ls at /boot/grub shows:

-rw-r--r-- 1 root root 197 May 17 13:06 default
-rw-r--r-- 1 root root 30 May 17 13:06 device.map
-rw-r--r-- 1 root root 8064 May 17 13:06 e2fs_stage1_5
-rw-r--r-- 1 root root 7904 May 17 13:06 fat_stage1_5
-rw-r--r-- 1 root root 7168 May 17 13:06 ffs_stage1_5
-rw-r--r-- 1 root root 15 Apr 25 14:01 glidevice.map
-rw-r--r-- 1 root root 337 Apr 25 17:52 grub.conf
-rw-r--r-- 1 root root 7200 May 17 13:06 iso9660_stage1_5
-rw-r--r-- 1 root root 8608 May 17 13:06 jfs_stage1_5
lrwxrwxrwx 1 root root 9 Apr 25 14:01 menu.lst -> grub.conf
-rw-r--r-- 1 root root 7328 May 17 13:06 minix_stage1_5
-rw-r--r-- 1 root root 9760 May 17 13:06 reiserfs_stage1_5
-rw-r--r-- 1 root root 33856 May 17 13:06 splash.xpm.gz
-rw-r--r-- 1 root root 512 May 17 13:06 stage1
-rw-r--r-- 1 root root 105436 May 17 13:06 stage2
-rw-r--r-- 1 root root 105340 Feb 28 04:07 stage2.old
-rw-r--r-- 1 root root 105436 May 17 13:06 stage2_eltorito
-rw-r--r-- 1 root root 7488 May 17 13:06 ufs2_stage1_5
-rw-r--r-- 1 root root 6752 May 17 13:06 vstafs_stage1_5
-rw-r--r-- 1 root root 9384 May 17 13:06 xfs_stage1_5

So, you lost the splashimage as well?
Because I don't have any splash image during boot anymore, what happened?

Thanks
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Jul 13, 2008 2:24 pm    Post subject: Re: [SOLVED]emerge GRUB update? Reply with quote

mamac wrote:
So, you lost the splashimage as well?
Because I don't have any splash image during boot anymore, what happened?

It looks like you upgraded to grub-0.97-r6
https://bugs.gentoo.org/show_bug.cgi?id=230984
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Sun Jul 13, 2008 4:28 pm    Post subject: Reply with quote

Fixed the bug on 3 Gentoos, thank you cyrillic!
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
doro1211
Guru
Guru


Joined: 06 Jun 2004
Posts: 312

PostPosted: Sun Jul 13, 2008 7:24 pm    Post subject: Reply with quote

Yeah, I just realized I lost the splash image myself. Interestingly, I just did an emerge grub -k (using the binary I had already built) and the splashimage was installed. This is odd, because I didn't get a newer, updated grub, I just re-unpacked the one I had already built before... but it worked.

When it started, I got no menu, and I got weird screen artifacts on boot that went away during the init process. Fortunately, I had seen this problem before and recognized that it was due to a missing splash image or bad splash image path/location.

Very odd bug, but easy enough to fix.

When you run grub manually, just remember that whatever you specify as root should be where the boot partition resides, not where your actual root (/) is. This is just the root for grub, not for the Linux system. (In your grub.conf file, paths to kernels should be relative to THAT root... so if you have /dev/hda1 as your boot partition and /dev/hda3 as your root partition, you'd do:

root (hd0,0) (grub partitions are 0 indexed, so they are one less numerically than fdisk/linux partition numbers)
setup (hd0) (this will install grub on the MBR of hda)
Note the spaces between the grub commands and the parentheses. These are critical and it will not work without them.

Your /boot/grub/grub.conf should have a kernel entry. This is relative to the root as specified when you installed grub. So if you have the above setup, your kernel (in the grub.conf file) should be:
/kernel-2.6.24-gentoo-r8 root=/dev/hda3 (or whatever your kernel name is).

Note that when you boot into Linux (if you mount /boot), the path to the kernel will be /boot/kernel-2.6.24-gentoo-r8.

If you do /boot/kernel... that will usually work too because there is a symlink in /boot that points back to itself, so /boot = /boot/boot = /boot/boot/boot = /boot/boot/boot/boot, etc.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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