Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Has GRUB changed recently?
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
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Wed May 29, 2013 12:16 pm    Post subject: Has GRUB changed recently? Reply with quote

I was setting up NFS remotely on my PC last night. To do so I needed to enable some options in the kernel, recompile and reinstall it. My usual sequence of commands for upgrading the kernel is:
Code:
localhost ~ # cd /usr/src/linux
localhost linux # make menuconfig
/* edit options */
localhost linux # mount /boot
localhost linux # make && make modules && make modules_install && make install
localhost linux # module-rebuild rebuild


After this sequence of commands my /boot directory looks something like this:
Code:
localhost linux # ls -l /boot
total 27642
lrwxrwxrwx 1 root root      19 May 29 11:53 config -> config-3.9.2-gentoo
-rw-r--r-- 1 root root   74765 May 29 11:53 config-3.9.2-gentoo
-rw-r--r-- 1 root root   74691 May 29 11:08 config-3.9.2-gentoo.old
lrwxrwxrwx 1 root root      23 May 29 11:53 config.old -> config-3.9.2-gentoo.old
drwxr-xr-x 2 root root    1024 May 26 16:41 grub
-rw-r--r-- 1 root root 3961271 Oct  4  2012 initramfs.cpio.gz
drwx------ 2 root root   12288 May 31  2011 lost+found
lrwxrwxrwx 1 root root      23 May 29 11:53 System.map -> System.map-3.9.2-gentoo
-rw-r--r-- 1 root root 1993910 May 29 11:53 System.map-3.9.2-gentoo
-rw-r--r-- 1 root root 1986803 May 29 11:08 System.map-3.9.2-gentoo.old
lrwxrwxrwx 1 root root      27 May 29 11:53 System.map.old -> System.map-3.9.2-gentoo.old
lrwxrwxrwx 1 root root      20 May 29 11:53 vmlinuz -> vmlinuz-3.9.2-gentoo
-rw-r--r-- 1 root root 4283616 May 29 11:53 vmlinuz-3.9.2-gentoo
-rw-r--r-- 1 root root 4252736 May 29 11:08 vmlinuz-3.9.2-gentoo.old
lrwxrwxrwx 1 root root      24 May 29 11:53 vmlinuz.old -> vmlinuz-3.9.2-gentoo.old


My /boot/grub/grub.conf for the past 5 years has been:
Code:
localhost linux # cat /boot/grub/grub.conf
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 3
splashimage=(hd0,0)/boot/grub/splash.xpm.gz                                                                                                                                       
                                                                                                                                                                                   
title Gentoo Linux                                                                                                                                                                 
root (hd0,0)                                                                                                                                                                       
kernel /boot/vmlinuz root=LABEL=root video=uvesafb:ywrap,mtrr:2,1920x1080-32@70 splash=silent,fadein,fadeout,theme:natural_gentoo quiet console=tty1                               
initrd /boot/initramfs.cpio.gz

title Gentoo Linux no framebuffer
root (hd0,0)
kernel /boot/vmlinuz root=LABEL=root video=uvesafb:off
initrd /boot/initramfs.cpio.gz

title Gentoo Linux old
root (hd0,0)
kernel /boot/vmlinuz.old root=LABEL=root video=uvesafb:ywrap,mtrr:2,1920x1080-32@70 splash=silent,fadein,fadeout,theme:natural_gentoo quiet console=tty1
initrd /boot/initramfs.cpio.gz

title Gentoo Linux old no framebuffer
root (hd0,0)
kernel /boot/vmlinuz.old root=LABEL=root video=uvesafb:off
initrd /boot/initramfs.cpio.gz

# vim:ft=conf:


When I rebooted this time the system didn't come back up and when I got into work this morning GRUB was displaying "Error 15" (not "Error 15: File Not Found" as seems to turn up when Googling). After spending nearly an hour rebooting with different kernels/settings I added the following entry to grub.conf which has allowed me to boot into the new kernel:
Code:
title Gentoo Linux (noroot)
kernel (hd0,0)/vmlinuz root=LABEL=root video=uvesafb:ywrap,mtrr:2,1920x1080-32@70 splash=silent,fadein,fadeout,theme:natural_gentoo quiet console=tty1
initrd (hd0,0)/initramfs.cpio.gz


Does anyone know what may have happened to stop my usual method of upgrading the kernel from working this time?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed May 29, 2013 1:19 pm    Post subject: Reply with quote

Are you sure all your kernels are in the root directory of the boot partition or some of them are in the /boot directory of the root partition?

I would check the contain of the /boot directory without the boot partition mounted in and then check again with the boot partition mounted in the /boot/directory.. When you have a boot partition, the /boot directory should be emply when the boot partition is not mounted in.

If so, when the boot partition is mounted in the /boot directory, doing
Code:
cd /boot
ln -s . boot

can resolv the problem. So you can use (hd0,0)/boot/vmlinuz or (hd0,0)/vmlinuz.
_________________
Paul
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Wed May 29, 2013 1:36 pm    Post subject: Reply with quote

Logicien wrote:
Are you sure all your kernels are in the root directory of the boot partition or some of them are in the /boot directory of the root partition?

Yes. This was one of the first things I checked. The unmounted /boot directory on the root partition is empty. All the kernels are correctly stored on the boot partition and appear in /boot when mounted.

Logicien wrote:
If so, when the boot partition is mounted in the /boot directory, doing
Code:
cd /boot
ln -s . boot


can resolv the problem. So you can use (hd0,0)/boot/vmlinuz or (hd0,0)/vmlinuz.


This sounds like it might do the trick. I seem to remember there being a symlink like that before but it must have got deleted somehow. I'll try later as my PC makes a racket when it turns on so I don't tend to reboot that often.
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