How do I run other Linux MBRs

Hi,

To run my other linux distros on another drive I have been manually entering the kernel and initrid info for each distro on the opensuse yast boot loader. For windows 7 it just runs the mbr on the drive windows 7 is on.

However I can not get it to do that on the other linux drive. The problem for me is that on every kernel upgrade I have to manually change the info. I would rather have grub on the sdd linux disk take care of it on the upgrades. Is there a way to do this or am I stuck doing it manually. No biggie just wondering. Thanks :slight_smile:

The drive that holds the other linux versions is sdd. Opensuse is on sdc.

Find Grub Version 2.2b - Written for openSUSE Forums


 - reading MBR on disk /dev/sda                    ... --> Grub found in MBR
 - searching partition /dev/sda1   (NTFS)          ... --> Windows7/Vista Loader found in /dev/sda1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can add the following entry to /boot/grub/menu.lst :

###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
    rootnoverify (hd1,0)
    makeactive
    chainloader +1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 - searching partition /dev/sda2   (NTFS)          ...
 - reading MBR on disk /dev/sdb                    ...
 - searching partition /dev/sdb1   (NTFS)          ...
 - searching partition /dev/sdb2   (NTFS)          ...
 - searching partition /dev/sdb3   (NTFS)          ...
 - reading MBR on disk /dev/sdc                    ...
 - reading bootsector  /dev/sdc1   (Extended)      ... --> Grub found in /dev/sdc1
 - searching partition /dev/sdc2   (NTFS)          ...
 - skiping partition   /dev/sdc5   (swap)         
 - reading bootsector  /dev/sdc6   (LINUX)         ... --> Grub found in /dev/sdc6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 --> kernel vmlinuz-2.6.34.7-0.5-desktop                        found in /dev/sdc6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 - reading bootsector  /dev/sdc7   (LINUX)         ...
 - reading MBR on disk /dev/sdd                    ... --> Grub found in MBR
 - reading bootsector  /dev/sdd1   (LINUX)         ... --> Grub found in /dev/sdd1
 - reading bootsector  /dev/sdd2   (LINUX)         ...
 - skiping partition   /dev/sdd3   (swap)         
 - reading bootsector  /dev/sdd4   (LINUX)         ...
 - reading MBR on disk /dev/sde                    ...
 - searching partition /dev/sde1   (NTFS)          ...
 - searching partition /dev/sde2   (NTFS)          ...
 - reading bootsector  /dev/sde3   (LINUX)         ...

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe60a46e4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       13524   108631498+   7  HPFS/NTFS
/dev/sda2           13525       60801   379752502+   7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bdcde

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       37002   297218533+   7  HPFS/NTFS
/dev/sdb2           37003       38787    14338012+   7  HPFS/NTFS
/dev/sdb3           38788      121601   665203455    7  HPFS/NTFS

Disk /dev/sdc: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x49f0a8b0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       19145   153782150+   5  Extended
/dev/sdc2           19146       77825   471347100    7  HPFS/NTFS
/dev/sdc5               1         536     4305357   82  Linux swap / Solaris
/dev/sdc6             537        4369    30788541   83  Linux
/dev/sdc7            4370       19145   118688188+  83  Linux

Disk /dev/sdd: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x49f0a8b0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1        4476    35946496   83  Linux
/dev/sdd2            4476        8921    35708928   83  Linux
/dev/sdd3            8921        9260     2721792   82  Linux swap / Solaris
/dev/sdd4            9261       24321   120977482+  83  Linux

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x679bd568

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1       95790   769433143+   7  HPFS/NTFS
/dev/sde2           95791      108360   100968525    7  HPFS/NTFS
/dev/sde3          108361      121601   106358332+  83  Linux

On 2011-01-02 04:36, Glasairmell wrote:
> However I can not get it to do that on the other linux drive. The
> problem for me is that on every kernel upgrade I have to manually change
> the info.

Each different linux install should have its own grub installation in its
partition.

One grub is the main one, and this loads the rest of the grubs:

title Other Linux – (via configfile in /dev/sda3)
root (hd0,2)
configfile /boot/grub/menu.lst

If you are using a generic MBR, you can have a grub on each primary
partition, and select any one of those as the main one:

title Other Linux – via chainload - changes active boot to /dev/sda3
rootnoverify (hd0,2)
makeactive
chainloader +1

And the other linux has the reverse definitions.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

You can chainload a disk too rather than a partition by using:

title  Grub in MBR of disk 3 (sdd)
root (hd3)
chainloader +1

It works at least while chainloading the bootdisk MBR from another Grub installed in a partition’s bootsector.

Thank you for the replies. When I get back in town I will retry the chain loader. It was not working. I will take a look at the settings per your posts.