[Sussex] grub problem - post kernel upgrade

John D. john at johnsemail.eclipse.co.uk
Mon Nov 14 20:27:17 UTC 2005


Steve Williams wrote:

> John D. wrote:
>
>> Hi list,
>>
>> During my regular "emerge -uD world", I noticed that there was a new 
>> kernel version.
>>
>> So as usual, I ran genkernel to compile it. When it came to reboot 
>> the damn system would only drop me into a grub prompt (grub>).
>>
>> The only thing that I could find was telling me to do
>> "grub> root (hd0,0)"
>> and
>> "grub> setup (hd0)"
>>
>> I don't understand what either of those commands did.
>>
>> Amongst my pile of junk I located a kanotix live CD (knoppix 
>> derivative). Booted that and can see that there is a grub.conf and a 
>> grub.conf.bak in the /boot partition. The problem seems to be that I 
>> can't just copy the old version from the .bak to the main grub.conf 
>> because when I try that I just get told that the main system is only 
>> available in read-only - I've done some searching for ideas, but both 
>> the main knoppix page and one from IBM's site that says about 
>> rescuing with knoppix tell me to mount and the chroot - but I can't 
>> chroot to get into the main system.
>>
>> Obviously, it'd be better if I could just copy the .bak to the main 
>> grub.conf (which appears to be empty), but I'd write it long hand and 
>> enter the info if I can just get into the system or see the grub.conf 
>> file via the grub> prompt.
>>
>> Does anyone know how I can get round this please??
>
>
>
> OK. What kernel were you running, and what kernel post emerge?
>
> Steve W.

Just for info Steve, I was going from the the 2.6.13-gentoo-r5 to the 
2.6.14-gentoo-r2 kernels respectively. I also recall a recent upgrade of 
genkernel itself. So I couldn't work out what or why things had gone 
pear shaped.

 From what I remember of a days "meddling", it appears that when I ran 
genkernel, it compiled OK, but rather than adding the entry to my 
grub.conf, it seems to have left it as an empty file, but at the same 
time creating a .bak version of the old grub.conf and also one called 
grub.conf~ and while I understand the principle of making the .bak 
version, the one that ended in a tilde made great whooshing noises as it 
went over my head.

It also seems that something occurred elsewhere, because it was 
suggested at LQ that I look for this line

lrwxrwxrwx  1 root root       1 Aug 20 01:26 boot -> .

Which wasn't there (checked using ls -l /boot). I was trying absolutely 
anything that even vaguely held the promise of a solution - but I 
noticed the problem was sorted after I did the /sbin/grub-install 
/dev/hda command for either the 4th or 5th time today (I was trial 
rebooting in between attempts). I just so happened that that was the 
last thing that I did before "it" appeared to be sorted out.

So I'm a happy bunny again, now that I've got the gentoo back up and 
running.

I didn't manage to suss out why Kanotix wouldn't let me do the chroot 
command to be able to make any repairs with it (knoppix based live CD - 
just a little more polished). Plus I was unsure about using the gentoo 
install cd to get too that stage, because from memory theres a lot of 
stuff normally done before you get to the chroot stage - and I'm not 
sure which bits I would need and which bits I would be able to leave out 
to get to the stage where I can do the chroot and then have tried to 
mend the /boot stuff and the grub.conf.

In fact, I'm still trying to work out what I need to input, when I use 
genkernel i.e. so that not only does it compile the kernel and add the 
entry to the grub.conf, but so it also rebuilds the external modules 
(nvidia driver and alsa) rather than having to remember how to do that 
post compile of the new kernel. I did install the modules-rebuild 
facility but haven't sussed out how that works.

regards

John D.




More information about the Sussex mailing list