View previous topic :: View next topic |
Author |
Message |
bigjohn Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/565213313fd342ed3a852.gif)
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Mon Nov 14, 2005 1:31 am Post subject: grub problem - post kernel upgrade |
|
|
any ideas are much appreciated.
I was doing a normal(ish) kernel upgrade. After an update appeared during emerge -uD world.
I normally use genkernel, but when I've come to reboot to finalise (external modules etc) the system won't boot, it's just dropping me into the grub shell (grub>). I don't understand what I need to do.
I've searched here, and thus far can only find stuff that tells me to do Quote: | root (hd0,0)
setup (hd0) |
Im not sure what thats supposed to be doing (it's doing something, but what?).
What should I be doing to get this system booting, at least too a command prompt ???
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bigjohn Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/565213313fd342ed3a852.gif)
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Mon Nov 14, 2005 2:10 am Post subject: |
|
|
Ok, so I still can't get into the system. I've managed to get up and running with a kanotix live CD, I've had a look at the /boot partition and it appears that now my /grub.conf is empty, but theres still a /grub.conf.bak - but I'm not sure how I'd remove the empty grub.conf and then rename the grub.conf.bak to be able too boot from it.
Obviously it's owned by root, but if I'm in the live cd how would I access the main system installed root account?? as trying to mend/rescue a problem this way is new to me.
Any suggestions greatly appreciated.
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
desultory Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/15563850365c4d454383627.gif)
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Mon Nov 14, 2005 3:18 am Post subject: |
|
|
If the Kanotix user environment is anything like the Knoppix user environment (I've never used Kanotix and I can't really read german), there should be an option of allowing you to at least open up a shell as root. If there isn't perhaps boot your live CD into single user mode (and hope that it doesn't prompt for a password you can't give) or get your hands on Knoppix (it will let you become root, at least all of the versions I've had) or a Gentoo install CD (you can use the installation environment as a rescue disc, maybe not as comfortable but it works).
If you can become root on the live CD and mount the partition rw you can play with it in any way you please because as far as the running system is concerned you already are root and that is what matters. Remember file permissions and ownership are not magic, they are labels that allow for access control nothing more. This is why physical security of critical systems is so important. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
davidgurvich Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/40413733143759aa4c3db2.jpg)
Joined: 23 Apr 2004 Posts: 1063
|
Posted: Mon Nov 14, 2005 5:40 am Post subject: |
|
|
You can specify a kernel in the grub command prompt.
First set the partition that you have as root (/).
root (hd?,?) ie. hd0 = first hard drive (hd0,0)=first hard drive, first partition
Then tell grub which kernel you wish to boot.
kernel (hdX,Y)/boot/your-kernel-name where hdX=hard drive, and Y=partition #
If you have a separate partition for /boot then you need to put in
kernel (hdX,Z)/your-kernel-name where Z=the partition that /boot is on.
Grub has tab completion, so if you are not sure of your-kernel-name, the partition numbers, etc
you can press tab while writing these down.
After you've done that you just write
boot
and you should start booting into your system.
You must modify the grub.conf or menu.lst in /boot/grub as well as /etc/fstab |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
SureFoot n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 25 Mar 2005 Posts: 8
|
Posted: Mon Nov 14, 2005 12:37 pm Post subject: |
|
|
Hello, i have the same problem on a distant server (i cannot put a liveCD in for the moment)
it boots, then only tells "grub>"
no error message
i try root (hd0,0)
(which is the usual way of booting on it)
and it answers:
"unrecognized device string"
Its an old install that i just upgraded to 2.6. Grub was updated to 0.96
(edit)
the root (..) command is obsolete ??
just typing kernel /bzImage root=/dev/sda3 then 'boot' was enough to make it start.
I'm a bit confused.. the grub.conf.sample still shows the root (...) command !? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bigjohn Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/565213313fd342ed3a852.gif)
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Mon Nov 14, 2005 1:30 pm Post subject: |
|
|
davidgurvich wrote: | You can specify a kernel in the grub command prompt.
First set the partition that you have as root (/).
root (hd?,?) ie. hd0 = first hard drive (hd0,0)=first hard drive, first partition
Then tell grub which kernel you wish to boot.
kernel (hdX,Y)/boot/your-kernel-name where hdX=hard drive, and Y=partition #
If you have a separate partition for /boot then you need to put in
kernel (hdX,Z)/your-kernel-name where Z=the partition that /boot is on.
Grub has tab completion, so if you are not sure of your-kernel-name, the partition numbers, etc
you can press tab while writing these down.
After you've done that you just write
boot
and you should start booting into your system.
You must modify the grub.conf or menu.lst in /boot/grub as well as /etc/fstab |
Thankyou davidgurvich - that has got me most of the way i.e. I'm into the old kernel, and have deleted all references to the new one for the moment.
Now the problem appears to be something with grub itself. I have managed to get into and out of the system using your instructions, but when I try to reboot, it is still dropping me into the grub> prompt. So I unmerged grub and re-emerged it to see if that was the problem but it's not, when I'm rebooting, I'm still ending up at the grub>.
I'm at a loss as too what I should be doing to make "it" boot normally? Could you offer any advice on that one please ??
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
chunderbunny Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1181016848413c617038f3d.jpg)
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Mon Nov 14, 2005 2:14 pm Post subject: |
|
|
One reason the grub prompt can appear is because the /boot/boot symlink is missing. Mount your /boot partition then check the output of "ls -l /boot". You should see a line which looks like this: Code: | lrwxrwxrwx 1 root root 1 2005-08-22 19:07 boot -> . | (notice the ".") If not then issue the command Code: | cd /boot
ln -s . boot |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bigjohn Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/565213313fd342ed3a852.gif)
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Mon Nov 14, 2005 4:16 pm Post subject: |
|
|
I "think" I've sorted it. I checked what chunderbunny said and couldn't the "the . " bit.
So after putting my toys back in my pram I just tried everything on a hit or miss basis, and even though I'd tried it 4 or 5 times previously the grub now seems to be running properly after issuing the /sbin/grub-install /dev/hda command.
I'm completely stumped as to why this seems to have worked this time, when it hasn't previously - but I don't care too much as the system is up and running properly (I think - ouch, it hurts!)
thankyou to all who have replied with ideas/suggestions etc - very, very much appreciated. Now life can return to normal, until next time
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
SureFoot n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 25 Mar 2005 Posts: 8
|
Posted: Tue Nov 15, 2005 8:29 am Post subject: |
|
|
so, the solution to grub prompt after an upgrade would be a systematic grub-install to override the previous install ?
It's not satisfying for me:
"/dev/sda1 does not have any corresponding BIOS drive"
it's an all-SCSI system
and grub prompt still doesnt understand the "root (hd0,0)" command ("unknown device string") - though i can issue the "kernel .. " command and boot properly. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|