Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I messed up my MBR and I'm trying to re-install grub. It's a Ubuntu 6.06 install. I can run from the Live-CD and I've run "grub-install". I reboot and get into the menu, but the system freezes while "mounting root file system". If I select the failsafe mode, it also stops in "kernel panic". I've also tried the next sequence of steps:
Code:
# grub
# root (hd0,1) <-- this is the partition where my linux is
# setup (hd0)
works, but with the same result as mentioned above...
What do you think I could do?? Wouldn't like to re-install (but can do if necessary).
Download SmartBootManager from here and make yourself a bootable disk. You should be able to boot into Ubuntu with it but, be warned, sometimes it doesn't work. If it does get you there, go into a terminal and run the commands you've already tried. By the way, there should be a 'quit' next to get you out of grub and back into the terminal prompt. Don't use grub-install - it's unreliable.
A double-check. You probably know this already, but grub's numbering is different from Linux. Your (hd0,1) equates to hda2. Is this what you want?
Having said all that, from what you describe grub-install probably did fix your mbr and the kernel panic could be due to some other problem. What happened when you 'messed up' grub. Could some other damage have been done?
I'll take a look at SmartBootManager later. (The webpage does not seem to be working now, or at least not the links inside the page)
Yes, it's (hd0,1) (i.e. hda2) what I want.
Emm... I wondered how would it be to install Solaris and couldn't help trying. It installed well, it seemed nice, but it never told me it was writting on my mbr! After the reboot I found myself with the Solaris boot manager, which was unable to run Linux properly.
You're right about the web-page. I didn't notice that today. Hope it gets fixed soon. I don't know whether you can download SmartBootManager from anywhere else, and what I am about to suggest may not help much because I don't know whether the magazine is easily found in France - it's an English-language UK publication. I'm referring to Linux Format and the iso for SmartBootManager is usually on the cover DVD. I say usually because I don't know whether it's always on it and it's an expensive magazine to buy especially and then find it's not there. But if you know someone who's got a copy....
I don't want to be pessimistic but a freeze while it tries to mount a filesystem, or a kernel panic, suggests more damage than just an overwritten MBR. Could Solaris have written to your Ubuntu root partition? Do you have a separate Ubuntu /boot partition which could have been damaged? Could your swap partition have been reformatted by Solaris to something Ubuntu doesn't recognise?
I'm just throwing out some ideas here? Whatever, best of luck.
Solaris boot manager, which was unable to run Linux properly.
You mean, solaris boot manager could boot into linux but, you were greeted with the "kernel panic" ?
If I remember it right, GRUB can boot solaris. You might wanna reinstall GRUB.
After you enter rescue mode, does it mount your linux installation and are you able to read the filesystem. I mean, is the file system clean without any errors ? Can you check the contents of /var/log/messages ?
Is it possible to use a rescue system (eg Knoppix) so that you can look at your /boot/grub/menu.lst. The steps you carried out should have reinstated GRUB into your MBR, but maybe your /grub/menu.lst has changed!
BTW, since GRUB can boot any OS, I suggest in future answering no to any attempt to overwrite GRUB and then manually changing it to suit.
No. Solaris asks you which partition you want to boot from. If I selected partition 1, it worked ok (Windows). Partition 4 was Solaris and also worked fine. Problem was partition 2 (hda2), with Linux. It just hanged.
I tought to reinstall grub and then configure it to boot solaris, so I used the Live-CD and run grub-install. The menu.lst menu has not changed. It has the same entries and are displayer properly.
Looking backwards, maybe it would have been simpler to install grub not into the mbr but into /dev/hda2 and then the Solaris booter would have just "chained".
Filesystem seems ok. And I'm not sure, but I think Ubuntu uses initrd (just 2 weeks with Ubuntu, it works so great that I haven't hacked it too much, so far). Anyway, as I said, menu.lst has not changed, so it should be running the kernel with the right parameters, I guess.
Anyway, I'll probably retrieve some files and re-install (doesn't not take so long, about 2 hours includying apt-getting the applications I use ).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.