LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boots hurt my grub (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boots-hurt-my-grub-708469/)

nnjond 03-01-2009 07:17 PM

Dual boots hurt my grub
 
Hi, can any one help me ?

I've added openSuse to my pc. all seemed to go well while installing:

sda1 ubuntu,sda3 opensuse, sda5 a shared swap.

openSuse has become the default at boot. When i arrow down and hit ubuntu, i get
Error 15.

-before the familar grub scrn appears.

Should there only be one answer to this command?

find /boot/grub/stage1

(hd0'0)
(hd0,2)

vibinlakshman 03-01-2009 07:23 PM

Quote:

Originally Posted by nnjond (Post 3461817)
Hi, can any one help me ?

I've added openSuse to my pc. all seemed to go well while installing:

sda1 ubuntu,sda3 opensuse, sda5 a shared swap.

openSuse has become the default at boot. When i arrow down and hit ubuntu, i get
Error 15.

-before the familar grub scrn appears.

Should there only be one answer to this command?

find /boot/grub/stage1

(hd0'0)
(hd0,2)

There shud be only one of this , u do one thing , u just do root ( hd )[press tab after entering that 'd']
Then it will show where exactly the grub resides

nnjond 03-01-2009 07:37 PM

Thanks for your interest. I'm sorry your advice isnt clear to me.

What should i enter at the grub prompt and what should i do when i know where the grub resides?

yancek 03-01-2009 07:56 PM

Quote:

Should there only be one answer to this command?

find /boot/grub/stage1

(hd0'0)
(hd0,2)
No. There could be as many 'answers' as you have Linux Partitions using Grub. Here's the output of that command on my cptr:

Quote:

grub> find /boot/grub/stage1
(hd1,0)
(hd1,2)
(hd1,4)
(hd1,7)
(hd1,8)
(hd1,9)
(hd1,10)
(hd1,11)
(hd1,13)
The questions are:

Are you using Grub from Ubuntu to boot both Ubuntu and Opensuse?
Is it the reverse?
How many partitions do you have?
How many OS's do you have? Two?
When you installed Opensuse, did you accept the bootloader default and have Grub installed to the master boot record? If so, can you look at your Opensuse /boot/grub/menu.lst file (as root) to see if you have an entry for Ubuntu?

Before giving any specific advice, I think anyone would need to know first which distribution (Opensuse or Ubuntu) you are using to boot and what your partition structure is. As root, run the command fdisk -l, (lowercase letter L) and post it here.

james2b 03-01-2009 08:31 PM

That grub error is found here; http://www.gnu.org/software/grub/man...roubleshooting
15 : File not found
This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK
So what this means is that your Ubuntu boot files path is not correct, so you need to edit that /boot/grub/menu.lst file as root user so the correct partition and file path are there. So if your Ubuntu is on sda1, then for grub the root is; (hd0,0) The SUSE install most likely over wrote your previous Ubuntu grub on the MBR, so then that is your main one.

nnjond 03-01-2009 08:41 PM

Thanks for your interest

The 1st screen options i get are on a openSuse 11.1 splash.

i arrow down to ubuntu 8.10, hit it which leads me to an error 15 . Then i press any key which takes me to a grub menu and then back to error 15.

I have only 2 oses.

sda1 ext3 ubuntu
sda3 ext3 Suse
sda4 fat32
sda2 extended
sda5 linux swap

Havent yet understood the bootloader quetion


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x891f3e51

Device Boot Start End Blocks Id System
/dev/sda1 1 4812 38652358+ 83 Linux
/dev/sda2 19107 19457 2819407+ 5 Extended
/dev/sda3 * 4813 7362 20482875 83 Linux
/dev/sda4 7363 19106 94333680 b W95 FAT32
/dev/sda5 19107 19457 2819376 82 Linux swap / Solaris

Partition table entries are not in disk order
linux-613p:~ # fdisk -l

james2b 03-01-2009 09:50 PM

You can boot into your working SUSE and then mount the Ubuntu partition which is sda1, useing that KDE tool; kwickdisk and kdiskfree I think. Then when mounted, navigate to; /boot/grub/menu.lst open it and copy the lines for your Ubuntu onto a USB flash drive, so then you can paste that into your SUSE /boot/grub/menu.lst file when it is open as root user. So to be root in a terminal type; su - ,hit enter, type your password, then just type in this; kwrite /boot/grub/menu.lst , which open it to edit.

purevw 03-03-2009 10:36 AM

I triple boot Opensuse, Ubuntu, and Windows. I use Grub from Opensuse. I let Opensuse install the bootloader into the MBR. When I installed Ubuntu, I had it's bootloader install into the root partition of Ubuntu, where BIOS won't see it. Then I boot into Suse and use an editor to copy the pertinent sections of the Ubuntu /boot/grub/menu.lst and paste them into the Opensuse /boot/grub/menu.lst so that Ubuntu is now a boot option.
Just remember that if you upgrade the kernel in either Suse or Ubuntu, Grub will re-install and you will have to go back and edit the Suse /boot/grub/menu.lst again to reflect the kernel changes.

moshebagelfresser 03-03-2009 11:40 AM

Do it the simple way!
Get SuperGrub if you can't download it I will upload it to you. I had a similar problem I used it after repairing the fixboot and fixmbr with the Win XP setup disk.

It has an auto or manual repair, you can use the auto repair and it will fix GRUB.
Moshe

monsm 03-03-2009 11:58 AM

You might find this easier to manage with a separate boot partition. You might want to try that next time you change your partition scheme. So for e.g. something like this:

sda1 ext2 boot
sda2 ext3 ubuntu root
sda4 ext3 Suse root
sda5 fat32
sda3 extended
sda6 linux swap (I think this can be shared between several Linux OSs, not 100% sure)

For now though, the advice from the others should probably help fix the immediate problem.

Mons

nandanlbhat 03-03-2009 11:34 PM

Grub shell at boot loader
 
Hi nnjond,

Looks like SUSE wrote a fresh GRUB bootloader on the MBR (you can prevent it from doing so by configuring the bootloader options under Advanced tab for the installer). Also, it did a scan of your hard disk to determine other Linux distributions. The problem may just be that its entry for Ubuntu is not correct.

Assuming you don't have a GRUB password, you can hit the letter c on your keyboard when the list of operating systems comes up, to get dropped to the GRUB command shell.

At this prompt, you can try out all the commands listed in /boot/grub/menu.lst or /boot/grub/grub.conf, for Ubuntu. There are only three commands that are typically required. First is the location of the root device for GRUB. You would enter:

grub>root (hd0,0)

If there is no problem with this command, GRUB will give you the filesystem type of the partition you specified. Next, you would give the location of the kernel with kernel-specific options:

grub>kernel /boot/vmlinuz-2.x.xx root=/dev/sda1

Here, you can use the <TAB> key to autocomplete the path to the vmlinuz file to avoid typing error. The response will indicate if the file was found. You will get information about the kernel image type and size, or a numbered error.

Specifying the root (to the kernel) can be in multiple ways. Currently, the preference is toward partition UUIDs (found in /dev/disk/by-uuid/), though SUSE seems to prefer ids found under /dev/disk/by-id.

The last command would be for the initial RAM disk. The command would be:

grub>initrd /boot/initrd-2.x.xx

Even here you can use <TAB> to autocomplete the path to the initrd file. Now the only thing remaining is to ask grub to boot with the given command list. This is done by:

grub>boot

Give this method a try and let us know how it goes.

Nandan


All times are GMT -5. The time now is 11:24 AM.