Multiboot bootloader

HI,
I installed Gnome 3 on a free partition of my netbook but I lost the boot to my suse kde…(MBR)
I launched a live CD on USB but cannot restore Grub; the only way is to reinstall the KDE…

Then it boots but does not show Gnome 3 …!!

Why the installer does not take into account both OS?:expressionless:

Gnome 3 isn’t an OS, it’s a desktop environment, so do you have one suse with both kde and gnome, or suse installed twice, one on gnome one on kde?

You can have gnome and kde in the same installation of opensuse, but should turn off automatic login then you can choose whether to login to gnome or kde at the login screen

I think your subsequent installation isn’t aware of your previous installation and thus GRUB did not prepare an item for you to choose during boot. Your easiest way out is to edit this file /boot/grub/menu.lst CORRECTLY, and your multi-boot will work. This file name & path applies only when you use SuSE’s GRUB 1.x, if you got GRUB 2.x then it is tricky, editing /boot/grub/grub.cfg will only temporarily work, and auto-update or some other system commands will regenerate their own version of this file which is slightly different format apart from the GRUB 1.x menu.lst

I am assuming also that your /boot folder files are all there, but that is too lucky to be some times, because depending on how you did subsequent installation & depending on weather you shared a mounted /boot partition for more than 1 linux installation, your /boot files may be lost. In that case, only grub-install or slightly more complicated grub shell commands will fix it.

What you need inside /boot/grub/menu.lst will entirely depend on your disk layout, and blindly guessing here won’t do, a good guide to you is to refer to a working copy from that linux installation that will still boot, and duplicate it and then modify and test it.

If you had provided clear details of your layout, I may be able to help you. Pse post these outputs from the working (still bootable) Linux installation:

sudo fdisk -l

&


sudo cat /boot/grub/menu.lst

& for EACH installation:

ls /boot

root privilege necessary to have permission to these stuff.
to list the file names of boot files (name depends on your kernel version) in the partition that you are unable to boot, you need to know how to mount that partition in say /mnt 1st then

ls /mnt/boot

It takes a bit of system knowledge to fix multiboot grub. Starting point is you need to point the correct elements to boot:

  1. partition - e.g. /dev/sda1 or UUID=xxxxx-yyyy-zzzzz
  2. kernel file - e.g. vmlinuz-2.6.37.1-1.2-desktop
  3. init ramdisk file - e.g. initrd-2.6.37.1-1.2-desktop

The following is my menu.lst file for a single-boot SuSE 11.4 that have 3 grub menu items one for the standard one for the recovery mode, last for floppy boot. To support your multi-boot, you need to at least add one more menu item:


# Modified by YaST2. Last modification on Mon Apr 11 08:51:04 SGT 2011                                                       
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader                                                                 
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader                                          
                                                                                                                             
default 0                                                                                                                    
timeout 8                                                                                                                    
##YaST - generic_mbr                                                                                                         
gfxmenu (hd0,1)/boot/message                                                                                                 
##YaST - activate                                                                                                            
                                                                                                                             
###Don't change this comment - YaST2 identifier: Original name: linux###                                                     
title Desktop -- openSUSE 11.4 - 2.6.37.1-1.2                                                                                
    root (hd0,1)                                                                                                             
    kernel /boot/vmlinuz-2.6.37.1-1.2-desktop root=/dev/sda2 resume=/dev/sda1 splash=silent quiet  showopts vga=0x314        
    initrd /boot/initrd-2.6.37.1-1.2-desktop                                                                                 
                                                                                                                             
###Don't change this comment - YaST2 identifier: Original name: failsafe###                                                  
title Failsafe -- openSUSE 11.4 - 2.6.37.1-1.2                                                                               
    root (hd0,1)                                                                                                             
    kernel /boot/vmlinuz-2.6.37.1-1.2-desktop root=/dev/sda2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x314                                                                 
    initrd /boot/initrd-2.6.37.1-1.2-desktop                                                                                 
                                                                                                                             
###Don't change this comment - YaST2 identifier: Original name: floppy###                                                    
title Floppy                                                                                                                 
    rootnoverify (fd0)                                                                                                       
    chainloader +1 

Just add a config file entry for the gnome3 install. Mine looks like this:

###Don't change this comment - YaST2 identifier: Original name: 11.4###
title Gnome3
root (hd0,4)
configfile /boot/grub/menu.lst

Obviously tou need to change the root (hd?,?) to match your install

HI,
Thanks for the detailed explanation. Here we go:

linux-h5jv:/home/philippe # fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 têtes, 63 secteurs/piste, 19457 cylindres, total 312581808 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Identifiant de disque : 0x4c5a4c5a

Périphérique Amorce  Début        Fin      Blocs     Id  Système
/dev/sda2   *          63   312576704   156288321    f  W95 étendue (LBA)
/dev/sda5        10474380    12691349     1108485   82  Linux swap / Solaris
/dev/sda6        12693504    54636543    20971520   83  Linux
/dev/sda7        54638592   312561663   128961536   83  Linux
/dev/sda8            2048     2105343     1051648   82  Linux swap / Solaris
/dev/sda9         2107392    10473471     4183040   83  Linux

The suse Gnome 3 is supposed to be on sda9

linux-h5jv:/home/philippe # cat /boot/grub/menu.lst
# Modified by YaST2. Last modification on jeu. avril 14 00:32:27 AST 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,5)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.4
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part6 resume=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part8 splash=silent quiet showopts vga=0x314
    initrd /boot/initrd-2.6.37.1-1.2-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.4
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part6 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset  x11failsafe vga=0x314
    initrd /boot/initrd-2.6.37.1-1.2-default

###Don't change this comment - YaST2 identifier: Original name: other###
title gnome 3
    rootnoverify (hd0,8)
    chainloader +1

For suse KDE (default boot):

linux-h5jv:/home/philippe # ls /boot
backup_mbr   config-2.6.37.1-1.2-default  initrd-2.6.37.1-1.2-default  symtypes-2.6.37.1-1.2-default.gz  vmlinux-2.6.37.1-1.2-default.gz
boot         grub                         memtest.bin                  symvers-2.6.37.1-1.2-default.gz   vmlinuz
boot.readme  initrd                       message                      System.map-2.6.37.1-1.2-default   vmlinuz-2.6.37.1-1.2-default

For suse gnome3:

linux-h5jv:/home/philippe # ls /mnt/gnome/boot
backup_mbr   config-2.6.37.1-1.2-default  initrd-2.6.37.1-1.2-default      System.map-2.6.37.1-1.2-default  vmlinuz-2.6.37.1-1.2-default
boot         grub                         message                          vmlinux-2.6.37.1-1.2-default.gz
boot.readme  initrd                       symvers-2.6.37.1-1.2-default.gz  vmlinuz

up! up! up!

That must mean something
It sounds positive anyway.

OK you have supplied all the info we asked, I saw them posted, but it takes a bit of guessing here still unless you also show us some additional output from:


ls -l /dev/disk/by-id/

This additional info became necessary since your

menu.lst

shows your SuSE 11.4 was addressed by root=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part6 instead of /dev/sda6. I can make assumption logically that they are the same for now, if you found out that they are not the same, then you need to change accordingly.

Assuming root=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part6 is /dev/sda6 and also that /dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part8 is /dev/sda8

Then I think all you need to do is have your menu.lst file changed following entirely as follows:

linux-h5jv:/home/philippe # cat /boot/grub/menu.lst
# Modified by YaST2. Last modification on jeu. avril 14 00:32:27 AST 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,5)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.4
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part6 resume=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part8 splash=silent quiet showopts vga=0x314
    initrd /boot/initrd-2.6.37.1-1.2-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.4
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WXD1A60S3045-part6 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset  x11failsafe vga=0x314
    initrd /boot/initrd-2.6.37.1-1.2-default

###Don't change this comment - YaST2 identifier: Original name: other###
title gnome 3
    root (hd0,8)
     kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/sda9 splash=silent quiet showopts vga=0x314
     initrd /boot/initrd-2.6.37.1-1.2-default


That changed last menu item should let you boot up to genome in /dev/sda9 partition.

I did not change the 1st 2 menu items.

If this worked, then you can modify it further to include some resume partition specifications, and duplicate another FAILSAFE menu item for genome. However these are attempts only piratical after you got the 3rd menu item working first.

BACKUP your menu.lst file before you edit. Then you are safe.

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak 

Thing to note is I found that your post menu.lst actually chained you to boot in another instant of GRUB. That means you will get 2 separated GRUB menus and can be confusing. What I proposed was just using the currently working 1st booted copy of GRUB. You will be better off using just one, and can add as many items in menu as necessary. When one Linux installation totally unaware of another, they each install own GRUB, and may ZAP away each other in subsequent auto-update or system maintenance works. When that happened, you suddenly lost a bootable Linux. MBR, stage1 stage2 etc can get ZAPPED. Best to back them up.

sudo dd if=/dev/sda of=/media/USB/my-MBR.bak count=1

It is an example to backup MBR in a USB thumb drive mounted at /media/USB/

When you got ZAPPED, you can put back your backup MBR:

sudo dd of=/dev/sda if=/media/USB/my-MBR.bak count=1

:wink:

I still don’t understand why you need to install this way though, if all you want is to have Gnome & KDE environments they can be together installed side by side on the same partition, and same instant of Linux, instead of separate. Unless you install different application, different kernel and have different set of users, etc, or you prefer to have 2 installation just for extra robust, in case one copy of Linux got messed up. When you use YAST to install software you can actually add genome to originally KDE copy of suse or add KDE to originally genome desktop. You can select at login menu to have KDE or genome of any other desktop managers like ice or xfce or enlightenment… there are many, if you want them all :wink:

Hi,
Thanks for the clear explanation! It works fine! I better keep to separate distros as the KDE is used for professional purpose!

Great job!