Suse11 broke previous Linux install

I’ve been running a dual boot XP Pro and Ubuntu for a couple years now. Mostly using XP but trying to learn Linux in my spare time. Over the weekend I installed OpenSuse 11.0 on another partition of the same disk. Now I cant get to the Ubuntu install. I have a new boot menu with an option for all three OS’s but can only access XP and Suse. Selecting the Ubuntu option takes me to a secondary menu, (actually the boot menu I’d used up until the recent Suse install), but nothing is accessible from the secondary menu.

I have two hard drives. One, an IDE drive used for storage and games the other a SATA drive with several partitions where I have the 3 OS’s installed.
For whatever reason the new install is naming the drives like this: /dev/disk/by-id/scsi-SATA_ST3250410AS_6RY4PG5S-part5
whereas it used to name them like this:/dev/sda5

Can somebody help me repair this please? Thank you.

Hi. I’m not sure if I can help you tonight because I’ll go to bed soon, but many others surely can. Please post your /boot/grub/menu.lst from both Ubuntu and openSUSE and the output of “fdisk -l” (it’s a small L) from openSUSE? Good luck!

It didn’t break your Ubuntu install. It used the default of all distro installs (and Windows), which is to assume control of the boot process (which typically includes the MBR) unless instructed otherwise.

Boot into openSUSE, and do the following from the terminal as root, posting the output back here.

fdisk -lu
cat /boot/grub/device.map
cat /boot/grub/menu.lst
cat /etc/grub.conf

Please elaborate and be specific on what you mean by “nothing is accessible from the secondary menu.”

Also, do you know how to mount the Ubuntu root partition in openSUSE (this assumes that you do not have Ubuntu’s /boot directory on its own separate partition)? If Ubuntu is for example /dev/sda5, you can do (as root):

mount -t ext3 /dev/sda5 /mnt

Then copy/paste the Ubuntu boot menu back here, thus:

cat /mnt/boot/grub/menu.lst

Finally, about the partition naming. With the adoption of SATA with its portability for users, distros have been moving to using persistent partition names rather than the name by sequence (i.e., sda, sdb, etc.) so that should the underlying partition names change, the boot and mounting setup will not get broken. The names are actually just symlinks that point to the by-sequence names. There are 4 persistent naming alternatives. openSUSE now uses dev-by-id which is constructed from the disk serial number + partition number. Ubuntu now uses UUID. Fedora now uses volume-label. All these distros support using the other naming conventions; these are just the defaults.

Finally, about the partition naming. With the adoption of SATA with its portability for users, distros have been moving to using persistent partition names rather than the name by sequence (i.e., sda, sdb, etc.) so that should the underlying partition names change, the boot and mounting setup will not get broken.

Ok, I was always wondering why they introduced this confusing stuff. Now it makes much more sense to me. Thanks a lot.

Good to hear it’s not broken. I know it’s still there but just unable to get at it. I had mounted the root drive although a bit differently than your suggestion. So far:

Boot into openSUSE, and do the following from the terminal as root, posting the output back here.


fdisk -lu

linux-6v98:/ # fdisk -lu

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xe03fe03f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   204796619   102398278+   7  HPFS/NTFS
/dev/sda2       204796620   488392064   141797722+   f  W95 Ext'd (LBA)
/dev/sda5   *   409593303   488375999    39391348+  83  Linux
/dev/sda6       488376063   488392064        8001   82  Linux swap / Solaris
/dev/sda7       204796746   209005649     2104452   82  Linux swap / Solaris
/dev/sda8       209005713   250951364    20972826   83  Linux
/dev/sda9       250951428   303387524    26218048+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x1d02f6ab

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   238083299   119041618+   7  HPFS/NTFS
/dev/sdb2       238083300   476166599   119041650    7  HPFS/NTFS
/dev/sdb3       476166600   714249899   119041650    7  HPFS/NTFS
/dev/sdb4       714249900   976768064   131259082+   7  HPFS/NTFS

cat /boot/grub/device.map


linux-6v98:/ # cat /boot/grub/device.map
(hd0)	/dev/sda
(hd1)	/dev/sdb


cat /boot/grub/menu.lst
linux-6v98:/ # cat /boot/grub/menu.lst
# Modified by YaST2. Last modification on Sat Dec  6 21:40:37 CST 2008
default 0
timeout 8
gfxmenu (hd0,7)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.18-0.2
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.25.18-0.2-default root=/dev/disk/by-id/scsi-SATA_ST3250410AS_6RY4PG5S-part8 resume=/dev/sda7 splash=silent showopts elevator=as vga=0x31a
    initrd /boot/initrd-2.6.25.18-0.2-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.0 - 2.6.25.18-0.2
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.25.18-0.2-default root=/dev/disk/by-id/scsi-SATA_ST3250410AS_6RY4PG5S-part8 showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.25.18-0.2-default

###Don't change this comment - YaST2 identifier: Original name:  Ubuntu 8.10, kernel 2.6.27.2-custom (/dev/sda5)###
title Ubuntu 8.10, kernel 2.6.27.2-custom (/dev/sda5)
    root (hd0,4)
    configfile /boot/grub/menu.lst
    configfile /boot/grub/menu.lst

###Don't change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
    rootnoverify (hd0,7)
    chainloader (hd0,0)+1

###Don't change this comment - YaST2 identifier: Original name: windows 2###
title windows 2
    rootnoverify (hd0,7)
    chainloader (hd1,0)+1

###Don't change this comment - YaST2 identifier: Original name: windows 3###
title windows 3
    rootnoverify (hd0,7)
    chainloader (hd1,1)+1

###Don't change this comment - YaST2 identifier: Original name: windows 4###
title windows 4
    rootnoverify (hd0,7)
    chainloader (hd1,2)+1

###Don't change this comment - YaST2 identifier: Original name: windows 5###
title windows 5
    rootnoverify (hd0,7)
    chainloader (hd1,3)+1

cat /etc/grub.conf


linux-6v98:/ # cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 (hd0) (hd0,7)
quit

Then copy/paste the Ubuntu boot menu back here, thus:


cat /mnt/boot/grub/menu.lst
linux-6v98:/ # cat /media/ubunturoot/boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		12

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password '--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,5)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu 8.10, kernel 2.6.27.2-custom
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.27.2-custom root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro quiet splash 
initrd		/boot/initrd.img-2.6.27.2-custom
quiet

title		Ubuntu 8.10, kernel 2.6.27.2-custom (recovery mode)
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.27.2-custom root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro  single
initrd		/boot/initrd.img-2.6.27.2-custom

title		Ubuntu 8.10, kernel 2.6.27-9-generic
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.27-9-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro quiet splash 
initrd		/boot/initrd.img-2.6.27-9-generic
quiet

title		Ubuntu 8.10, kernel 2.6.27-9-generic (recovery mode)
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.27-9-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro  single
initrd		/boot/initrd.img-2.6.27-9-generic

title		Ubuntu 8.10, kernel 2.6.27-7-generic
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro quiet splash 
initrd		/boot/initrd.img-2.6.27-7-generic
quiet

title		Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro  single
initrd		/boot/initrd.img-2.6.27-7-generic

title		Ubuntu 8.10, kernel 2.6.24-16-generic
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro quiet splash 
initrd		/boot/initrd.img-2.6.24-16-generic
quiet

title		Ubuntu 8.10, kernel 2.6.24-16-generic (recovery mode)
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro  single
initrd		/boot/initrd.img-2.6.24-16-generic

title		Ubuntu 8.10, kernel 2.6.22-14-generic
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro quiet splash 
initrd		/boot/initrd.img-2.6.22-14-generic
quiet

title		Ubuntu 8.10, kernel 2.6.22-14-generic (recovery mode)
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=e6031857-8c29-4fe0-bced-40a409be9523 ro  single
initrd		/boot/initrd.img-2.6.22-14-generic

title		Ubuntu 8.10, memtest86+
root		(hd0,5)
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title		Microsoft Windows XP Professional
root		(hd0,0)
savedefault
makeactive
chainloader	+1

Secondary Menu:
Choosing Windows gives:Error 15 File not found
Press any Key to continue

Choosing Ubuntu gives: Error 17 Cannot mount Selected Partition. Press any Key to continue.

Is this an easy fix or should I uninstall Suse and reinstall Ubuntu in hopes that it will be repaired? Will this erase my Ubuntu files? I’m really puzzled here. Thanks

No, should not be difficult to fix at all. Later today I’ll review the files you posted and post back instructions.

By the way, notice in the Ubuntu menu.lst that it has been switched to using UUID to find partitions, rather than device-name. So looks like your Ubuntu was updated to a 2.6.2x kernel. Consequently, please do one more task for me - post back here the contents of your Ubuntu /etc/fstab. Just mount the Ubuntu root as before and do “cat /etc/fstab” in a terminal. Some distro updates have been changing fstab to the new naming convention at upgrade, others are only doing so on new installs. Will be helpful to see what your fstab looks like now.

By the way, notice in the Ubuntu menu.lst that it has been switched to using UUID to find partitions, rather than device-name

I see this but I don’t understand why it read it correctly before but now it can’t. The Ubuntu kernel version, while newer, didn’t change when I installed Suse. Thanks for your help.
Here is the Ubuntu fstab file.

craig@linux-6v98:~> cat /mnt/etc/fstab



# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda6
UUID=e6031857-8c29-4fe0-bced-40a409be9523 /               ext3    defaults,errors=remount-ro,relatime 0       1
# /dev/sda1
UUID=F61437AE1437712B /media/sda1     ntfs    defaults,umask=007,gid=46 0       1
# /dev/sda7
UUID=f589e508-4132-499b-9d76-e4785711bf6c none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0

The primary problem is weirdness in the Ubuntu /boot/grub/menu.lst file.

The first main problem is that it appears you have done at least 4 kernel upgrades, each of which have added another pair of boot stanzas for the new kernel version. So you have a total of 10 boot stanza pairs (for regular boot and for recovery mode), when in all probability only 1 pair will actually work (others may, but only if you kept backup copies of those kernels, and those kernels would not match up with other updated code which is kept in sync with the latest installed kernel). There is a setting in the file which controls how many of these stanzas should be retained; that setting is disabled. There is also a setting which controls which boot stanza is the default; currently that is set to the Windows stanza.

The second main problem is that in all the stanzas the Ubuntu root partition is being specified as (hd0,5) - which is sda6; this is also controlled by a single control setting. But that is wrong, it should be (hd0,4), i.e., sda5.

I think the following will straighten it all out: First, mount the Ubuntu root partition in openSUSE as you did earlier, in a terminal window after switching to root:

mount -t ext3 /dev/sda5 /mnt

Then open the grub file with a text editor as root. Press Alt-F2 and a run dialog box will pop up. In KDE type:

kdesu kwrite /mnt/boot/grub/menu.lst

or if in Gnome, then it’s:

gnomesu gedit /mnt/boot/grub/menu.lst

Make all of the following changes:

  1. Change “default 12” to “default 0”
  2. Change “# groot=(hd0,5)” to “# groot=(hd0,4)”
  3. In each of the boot stanzas, change “root (hd0,5)” to “root (hd0,4)”.
  4. Change the Windows stanza to the following:

rootnoverify (hd0,4)
chainloader (hd0,0)+1

Save the file. Reboot. From the openSUSE menu select Ubuntu. Once back in Ubuntu, open a terminal window and do:

uname -r

That will tell you which kernel is actually installed and active. Then do:

sudo gedit /boot/grub/menu.lst

And remove the boot stanzas you no longer want/need. It may be all but the first two. Reboot and test. Also test booting Windows from the Ubuntu menu; it should work identically as it does from openSUSE. Now boot back into openSUSE, open a terminal, switch to root, and do:

sfdisk -A1 /dev/sda

Because you have 2 sda partitions marked “active”. That’s wrong. This will make only sda1 active, which Windows needs in order to boot. Then open the openSUSE /boot/grub/menu.lst in a text editor as root (as you previously did for the Ubuntu version of the file). Then remove the “windows 2” thru “windows 4” stanzas, only “windows 1” works and is needed. Finally, there is a duplicate line under the Ubuntu stanza, remove it. Save the file. Done.

A last thought: Look at the partition table as displayed by fdisk, the logical partitions (sda5-9) within the extended primary (sda2). The partition numbers are not in the sequence as the physical partitions actually reside on the disk. The order is sda7,8,9,5,6. Now, that is not necessarily a problem in itself. However, there is a gap of unassigned space between sda9 and sda5 - some 54GB worth. If you want to use that space, in YaST Partitioner you can add an sda10 logical there to use for whatever. I strongly advise against creating a partition there with Windows; that is very risky.

Good luck.

I just saw your post with the fstab, we were posting at the same time. The UUID in the fstab is the same as in menu.lst; good. Note however the comment line ref’g sda6; Ubuntu is on sda5. If the root partition mount fails during Ubuntu boot, in fstab I would comment out the UUID line, create a new line copied from it, and edit that line to use /dev/sda5 instead.

Thanks so much for the help. Everything is working as it should now. I thought I was starting to get the hang of this. Obviously I have a way to go. :slight_smile:

You’re very welcome. :slight_smile: