Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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 have used the Ubuntu 8.10 Live CD to try to restore GRUB to MBR but I still end up with SliTaz booting from (hd0,0) and not Ubuntu 8.10.
Do I need to use Midnight Commander or similar to get my original Ubuntu/antiX GRUB back on MBR?
I do have a backup of my original Ubuntu home partition on my 2nd HDD (sdb) but I would prefer to locate the original /boot/grub/menu.lst and copy this to (hd0,0).
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
Just to be sure can you post the out come of the command fdisk - l as root and youŕe menu.lst
(hd0,0) only means the first partition of the boot HD.
Meaning if you make sdb the first boot HD during install the first partition of sdb is (hd0,0) too
Last edited by ronlau9; 05-05-2009 at 11:54 AM.
Reason: save too soon
can you boot into Ubuntu with the current grub menu ?
if so then boot into Ubuntu, backup your menu.lst just in case and then install grub to the MBR using grub-install /dev/sda
if your current grub menu won't allow you to boot into Ubuntu an easy work around is to grab the supergrub boot disk, boot your PC with it and use it to boot into Ubuntu. then do the grub-install once you are in Ubuntu,
Thanks for your reply.
The current boot menu is that of SliTaz so the standard “GRUB Restore” method, via GRUB prompt (grub>), does not change this to that of Ubuntu.
I have just downloaded SGBD and burned it to a CD.
I cannot find too much info on my particular situation at the SGBD website.
Once I have booted from the SGBD what can I expect to see? Will there be several options or what?
Is it clear how I should proceed to boot into Ubuntu?
No. If you use sda1 it will install files to the root partition and you won't have anything in the mbr and likely no change. You haven't posted your fdisk -l output or your menu.lst. Your setup isn't clear to me. What you indicate in your first post is that you have a boot, swap and home partition for Ubuntu. Where are your system files (root) or was that just a type?
A backup of your /home partitin won't help you get your menu.lst as it is not in the /home directory, unless you made a copy and saved it there??
If your Ubuntu root partition is sda1 you can go to the Grub prompt and type:
yancek,
Thanks for your response about sda.
I have amended my original post to try to clarify matters.
sda1 is my Ubuntu root partitition, where I originally booted from. My Ubuntu GRUB originally resided on the MBR.
The Ubuntu menu.lst also took care of the booting of antiX from sda5. The GRUB for antiX resides in its root partition, sda5.
I was trying to add a third OS (SliTaz), booting from its root partition,sda8, but unfortunately I replaced the Ubuntu GRUB on MBR with the one from SliTaz.
I need to find the original file for the Ubuntu GRUB and replace the current one from
SliTaz.
I have tried the method you suggest (grub> prompt method) and all it does is put the SliTaz GRUB on MBR.
The Super Grub Disk method may work but I have never used it and I have no wish to make things even worse.
Is there a way for Midnight Commander (mc) to track down my original Ubuntu GRUB and menu.lst to replace the SliTaz ones?
To those who requested fdisk -l and menu.lst outputs, I am sorry but things are SNAFU at the moment for reasons which are too complicated to explain.
Another way is to boot from the Ubuntu LiveCD and reinstall grub. That will give you your original grub but hopefully with newer distribution already added to menu.lst.
You can manually enter the "kernel" & "initrd" lines in the grub shell. Use tab completion to find the partitions & files. Then enter "boot". Once you are running Ubuntu, it will be easy to reinstall grub. Copy the stanza for SliTaz from the other menu.lst file and paste in the one for Ubuntu.
SGBD boot your PC with it and use it to boot into Ubuntu. then do the grub-install once you are in Ubuntu
farslayer,
Would you mind giving me a little more fine detail please on your suggested method?
I am armed with my SGBD and a trifle apprehensive that I am going to mess up things irretrievably if I am not VERY careful!
I appreciate your patience in this matter.
linuxlover.chaitanya,
I also tried that method and I still end up with the SliTaz GRUB to MBR.
Success at last! Apologies to linuxlover.chaitanya. In my earlier attempt using the Ubuntu Live CD I mistakenly used “setup (hd0,0)" instead of “setup (hd0)”.
For the benefit of others who may find themselves in such a situation in the future, please make a note of the following.
For other non-Ubuntu users e.g Mepis, at instruction #3 use:
type “su” and give root password (root) when requested.
1. Boot from Ubuntu Live CD.
2. Open a Terminal. (Applications > Accessories > Terminal)
Only type what is between the quote marks.
3. Type "sudo grub" which makes a GRUB prompt appear.
4. Type "find /boot/grub/stage1". You may get several responses if you have different OSs and you are multi-booting.
5. Type "root (hd0,0)". (OR, for example, “root (hd0,4)”. See 6. below)
6. Type "setup (hd0)". This will write GRUB to the MBR. If you wish to write GRUB to another OS's root partition such as sda5, then you type "(hd0,4)".
7. Type "quit".
8. Restart the system. Remove the bootable CD.
Many thanks to all who responded. I appreciate your assistance.
farslayer,
I would still like to have more details of your SGBD method please.
The following example sorta matches your situation.
Quote:
I installed GRUB, (or LiLo), to MBR but I can't find it. I have more than one hard disk in this computer. Maybe it went to the MBR of the wrong hard disk. I want to try booting from another hard disk to find out.
1. boot your SGD floppy disk, USB disk or CD-ROM
2. English Super Grub Disk
3. Boot and Tools
4. Boot Master Boot Record (MBR)
5. Boot Master Boot Record
6. Choose a hard disk from the list
So now that you are in your system you could use the grub-install command I mentioned earlier to re-install grub from the current OS to the MBR.
the SGBD is just a way to get your system back up if you botch grub. it won't change anything unless you tell it to, so read the menu options carefully before selecting.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.