Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just followed the instructions to upgrade my kernel (in gentoo).
Now I can't boot into the system - I just get dumped into a grub bash prompt i.e. grub>
I've had a good dig round but the only thing that I found to try is to do
Quote:
grub> root (hd0,0)
grub> setup (hd0)
Now I haven't got a clue as to what that does. I've managed to get a system to use - I'm using a kanotix live CD.
I have looked at the /boot partition and can see a grub.conf but that appears to be empty. There is also a grub.conf.bak which appears to be the previous grub.conf from before the kernel upgrade. Unfortunately I can't just copy one file to the other, as the kanotix is telling me that the system is read-only
Any advice/ideas/suggestions are greatly appreciated. This is the first time I've ever tried to do a repair/mend/rescue with a live CD so it's all rather over my head.
Having an empty grub.conf would certainly cause such a problem.
There are many things to check.
1) when you upgraded the kernel, did you copy the compressed kernel image to /boot? There is already one there (probably called vmlinuz) so give the copy a name like vmlinuz<version number>.
2) copy the grub.conf.bak to grub.conf. You have most of the information you need in there, it just needs editing to name the new kernel image in /boot.
3) if gentoo used initrd.gz in /boot, make a new one for the new kernel, named as with vmlinuz<version number> above.
4) edit grub.conf to point to those two new files in /boot.
to be able to do the edit fron Kanotix, there is a way to remount a partition rw instead of ro. I don't remember the command off the top of my head. Search these boards; it's come up quite a few times before.
As far as the grub setup is concerned, grub> root (hd0,0) is correct only if gentoo is installed in the first partition of the first drive (hda1 in Linux terminology).
Posting your grub.conf and /etc/fstab might be of some help.
Well I can't copy the grub.conf.bak to the grub.conf because I don't know how to do that with a live CD distro - I can look at the files, but the kanotix says that they're read only on the main installed system i.e. the kanotix is allowing me to look but not touch, because I can't boot into the main system to be able to do the copy thing.
There must be a way of doing this with a live CD I just can't work out what it is.
Because I've only to get in the once and I can the re-run the genkernel facility to re-compile the new kernel (or failing that, revert to the old one).
But how to do that through the live CD ???
regards
John
edit - is there any known way of making the grub> prompt show me the grub.conf (baring in mind that I can't actually get into the main system and the grub prompt just keeps telling me "unknown command" when I try stuff) as I can always just hand type in the info from the grub.conf.bak if I need too???
OK. Here's how to convince Kanotix to let you write to the Gentoo partition. Since it's now mounted ro, you need to open a term window, su to root if you're not root already, and give this command:
mount -o remount, rw /dev/hda1
(or wherever gentoo is installed). That should remount the partition rw, and you can then edit files and save them.
Originally posted by bigjohn
is there any known way of making the grub> prompt show me the grub.conf (baring in mind that I can't actually get into the main system and the grub prompt just keeps telling me "unknown command" when I try stuff) as I can always just hand type in the info from the grub.conf.bak if I need too???
Reading manuals can usually be a good passtime - the grub maual reveals the following;
Originally posted by syg00 Reading manuals can usually be a good passtime - the grub maual reveals the following;
Code:
configfile /boot/grub/grub.conf.bak
Yes you are probably right syg00 - my problem has alway been with documentation - I don't understand what it's telling me more often than not i.e. I don't have the ability to take on the "technical mindset". I'm not an enthusiast, I consider myself "just" a user.
Also, on the occassions that these kind of problems occur, I'm presented with so many possibilities, invariably I choose the wrong one and mess things up further - I suppose I'm "a fitter, not a mechanic or an engineer".
Quote:
Originally posted by bigrigdriver OK. Here's how to convince Kanotix to let you write to the Gentoo partition. Since it's now mounted ro, you need to open a term window, su to root if you're not root already, and give this command:
mount -o remount, rw /dev/hda1
(or wherever gentoo is installed). That should remount the partition rw, and you can then edit files and save them.
Ok, so I've managed to get into the system and have got too the stage where I've deleted all the references to the new kernel (too prevent confusion on my part), and also any older (take that too mean unnecessary, as I also had about 3 or maybe 4 much older kernels) ones.
I'm left with the previous working version and the one before that, both of which worked fine.
I've also copied the info across, so I have a complete grub.conf - which should, in theory, work.
It doesn't. I'm still back at square 1 inasfaras the system is dropping me back into the grub> prompt - I have managed to work out how to boot the system manually from there, but right now it doesn't matter what I do, I can't make it start grub properly. I've even unmerged it and then re-emerged it, just incase I'd messed the default settings in someway - but too no avail.
Perhaps you could advise me about how to correct that???
regards
John
p.s. bigriddriver - unusual choice of username. Do you actually drive a large rig?? If so which (size/weight/length etc as I myself, have a regular chair in a 44 ton 55ft volvo unit/semi setup - brand new this week so it still smells of cab cleaner/valeting spray)???
OK, I'm pretty confident that this is about 90% sorted i.e. I've managed too sort the kernel upgrade. I've got the external modules sorted - alsa and the nvidia driver (currently posting this via the new kernel, with the nvidia splash having indicated it's working and listening to the Smiths brilliant "What difference does it make" via Amorak).
The second kernel compile, via the genkernel utility worked pretty well - the only confusion being that when it had finished doing it's thing, I was left with an empty grub.conf, but there was also a file called grub.conf~ now I have no idea what the ~ bit means, but I just copied it over to the grub.conf and that now seems to be OK
There seems to be a discrepancy in your grub.conf. You list root (hd0,0), but real_root=/dev/hda3 (which would be root (hd0,2) in grub lexicon).
Could you post the contents of /etc/fstab for comparison with grub.conf.
PS: I drive 18 wheelers; a variety of tractors (volvo, peterbilt, and freightliner mostly) with tanker trailers, augers, and dry vans. Rig length up to 68 foot, max weight without special permit 40 ton.
Originally posted by bigrigdriver There seems to be a discrepancy in your grub.conf. You list root (hd0,0), but real_root=/dev/hda3 (which would be root (hd0,2) in grub lexicon).
Could you post the contents of /etc/fstab for comparison with grub.conf.
PS: I drive 18 wheelers; a variety of tractors (volvo, peterbilt, and freightliner mostly) with tanker trailers, augers, and dry vans. Rig length up to 68 foot, max weight without special permit 40 ton.
I "think" I've got it sorted. I was reading through the "plethora" of stuff here and found one that said about a similar problem - the answer to which I'd already tried about 3 or 4 times - but I figured WTF it can only not work again.
So after a quick
Code:
/sbin/grub-install /dev/hda
I did the test reboot and you could have knocked me down with a feather when the bugger booted properly.
As far as I can see (apart from the fact that it seems to work), your suggestion of a possible discrepancy, the stuff I read about grub and various bits of gentoo stuff, grub doesn't care about where the /boot partition/directory is i.e. hd0,0 as I have a seperate /boot partition but if it had been just a /boot directory within the / partition, then it would indeed have been hd0,2 as for the real_root=/dev/hda3, that is just something that the gentoo docs say about arguements that need to be passed to the kernel so that it knows where the "real_root" is, I've also had to use that when I was booting with lilo - So much too learn and so little time (and brains) to learn it!
regards
John
p.s. Good to know that theres other linux using professional drivers out there, apart from me and one of the blokes who works in my "yard" (who was responsible for getting me into linux in the first place). We (my employer/me/colleage) "do" bulk milk as part of a (nameless for self preservation) company aka "Big Milk" (we're talking 10's of billions of litres per annum). They (the bosses) are just finishing off changing our fleet from Mercedes to Volvo (back handers if you ask me). All maximum EU kerb weights - people do easily forget that milk is heavy. Got full certification for hazchems etc, but theres not much of that work in my area so you take what you can get to pay the bills!
At least they're "big boys trucks", not vans/pickups and other rubbish that "children" try to term "truck"! Dunno if you're interested, but you could always have a look here and you might get some of an idea of the crap "we" have to put up with over here!
Thanks for the assistance my friend, good luck and drive safe!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.