Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changes in /boot unseen by grub
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tyno
n00b
n00b


Joined: 20 Nov 2004
Posts: 57

PostPosted: Sun Jul 03, 2005 11:33 pm    Post subject: Changes in /boot unseen by grub Reply with quote

I redid my partitions and updated grub.conf but now when I reboot, grub doesn't seem to see the changes and I have to manually edit the boot lines every time. Here's my grub.conf:
Quote:
default 1
timeout 30
#splashimage=(hda0,1)/grub/splash.xpm.gz

title=Gentoo Linux (2.6.11-gentoo-r9 kernel)
root (hd0,1)
kernel (hd0,1)/bzImage-2.6.11-gentoo-r9 root=/dev/hda1

title=Gentoo Linux (2.4 series kernel)
root (hd0,1)
kernel (hd0,1)/linux-2.4.26-gentoo-r8 root=/dev/hda1

but every time I reboot, I have to manually change the entries from (hd0,4) (which was previously correct, but now is nonexistent) to (hd0,1). If I reboot and mount /boot, I can still see my changes, but grub can't. I've run grub with "root (hd0,1)" and "setup (hd0)", but grub just won't see the changes, instead loading what would have been on the old partition, had I not deleted it.

Any suggestions?
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Mon Jul 04, 2005 12:50 am    Post subject: Reply with quote

Did you move the /boot partition e.g. from hda1 to hda2 or somesuch? If so, you need to reinstall grub into the MBR because it store the partition location along with the bootloader code.
Code:

# grub
root (hd0,1)
setup (hd0)
quite

_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
tyno
n00b
n00b


Joined: 20 Nov 2004
Posts: 57

PostPosted: Mon Jul 04, 2005 3:10 am    Post subject: Reply with quote

Yes, and I already did that, which is why it is bothering me.
Back to top
View user's profile Send private message
lokelo
Tux's lil' helper
Tux's lil' helper


Joined: 16 Dec 2002
Posts: 101
Location: Maryland, USA

PostPosted: Fri Aug 19, 2005 3:12 am    Post subject: Reply with quote

I'm having a similar problem,
I upgraded my kernel, and added a second entry to my grub.conf and i only have one entry in my boot menu when I reboot my computer. I changed the timeout from 2 to 30 seconds and it still loads the "original" grub.conf file when my computer starts.

I re ran grub-install /dev/hda with the same results
my computer only has one hard drive installed. Any ideas?
Back to top
View user's profile Send private message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Fri Aug 19, 2005 3:33 am    Post subject: Reply with quote

Are you sure you're making those changes on the boot partition rather than a copy of grub that ended up on root somehow?
Back to top
View user's profile Send private message
lokelo
Tux's lil' helper
Tux's lil' helper


Joined: 16 Dec 2002
Posts: 101
Location: Maryland, USA

PostPosted: Fri Aug 19, 2005 3:36 am    Post subject: Reply with quote

I'm certain that i'm editing the file
/boot/grub/grub.conf

I'm also sure that i've mounted /boot before hand.

here's a copy of my fstab and grub.conf

Code:

# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs>                  <mountpoint>    <type>          <opts>                  <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1               /boot           ext3            noauto          0 2
/dev/hda3               /               reiserfs        noatime                 0 1
/dev/hda2               none            swap            sw                      0 0
#/dev/cdroms/cdrom0     /mnt/cdrom      iso9660         noauto,ro               0 0
#/dev/fd0               /mnt/floppy     auto            noauto                  0 0

# NOTE: The next line is critical for boot!
none                    /proc           proc            defaults                0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults                0 0


Code:
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.12-r9
root (hd0,0)
kernel /kernel-2.6.12-gentoo-r9 root=/dev/hda3

title=Gentoo Linux 2.6.12-r6
root (hd0,0)
kernel /kernel-2.6.12-gentoo-r6 root=/dev/hda3
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Fri Aug 19, 2005 4:22 am    Post subject: Reply with quote

Do not mount your boot partition and then check to see if any files are in /boot

My guess is that although you mounted your boot partition before running GRUB, when you re-installed GRUB, root was set to the / partition, not the boot partition.
Code:
grub
root (hd0,0)
setup (hd0)
quit

And your entries in /boot/grub/grub.conf should point to (hd0,0) also.
Back to top
View user's profile Send private message
Mental
n00b
n00b


Joined: 04 Oct 2004
Posts: 45
Location: Estonia

PostPosted: Fri Aug 19, 2005 9:20 am    Post subject: Reply with quote

Such a problem once took me days just to realize that /boot was not mounted. So i was instead editing the /boot directory of the / partition, rather than the / of the /boot partition.
Back to top
View user's profile Send private message
lokelo
Tux's lil' helper
Tux's lil' helper


Joined: 16 Dec 2002
Posts: 101
Location: Maryland, USA

PostPosted: Fri Aug 19, 2005 10:27 am    Post subject: Reply with quote

There are no files in /boot when boot is not mounted.

I've also ran
Code:

grub
root (hd0,0)
setup (hd0)
quit

several times and always get the same results.
I've also re emerged grub.
I'm going to try to unmerge grub, and clear all the files out of /boot/grub and remerge grub and see if that helps matters at all.
Back to top
View user's profile Send private message
lokelo
Tux's lil' helper
Tux's lil' helper


Joined: 16 Dec 2002
Posts: 101
Location: Maryland, USA

PostPosted: Fri Aug 19, 2005 11:27 am    Post subject: Reply with quote

mounting boot, Unmerging grub, rm -Rf /boot/grub and then emerge grub and finally grub-install /dev/hda fixed my setup.
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Fri Aug 19, 2005 11:44 am    Post subject: Reply with quote

Mental wrote:
Such a problem once took me days just to realize that /boot was not mounted. So i was instead editing the /boot directory of the / partition, rather than the / of the /boot partition.

One way to avoid that kind of problem is to have /boot mounted read-only all the time. Since it's mounted ro, the files in it are still protected against accidental changes/deletion, but trying to write on it results in an immediate error, rather than silently filling the /boot mount point on the root fs. So you see a "Read only file system" error, and you immediately know you forgot to remount it rw, instead of trying to find out why the system isn't using your new kernel configuration...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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