PDA

View Full Version : [ubuntu] OpenSUSE 11.2 entry not working GRUB2



vikrang
February 14th, 2010, 11:50 AM
Dear friends,

I had posted a doubt earlier has to how to use GRUB of OpenSUSE to load Ubuntu 9.10...Unfortunately, i did not get a reply and so I have re -installed Karmic which detects the already installed SUSE 11.2...It is in (hd0,5) or sda 6...On selecting this , i get Kernel Panic error (not syncing).

Output of fdisk -l

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 10198 40957717+ 7 HPFS/NTFS
/dev/sda3 10199 11458 10120950 7 HPFS/NTFS
/dev/sda4 * 11459 18170 53914140 f W95 Ext'd (LBA)
/dev/sda5 * 15491 17097 12908196 83 Linux
/dev/sda6 17098 18170 8618841 83 Linux
/dev/sda7 11459 13586 17093097 83 Linux

I have 3 windows partition and SUSE on sda 6 on grub it is (hd0,5). I think with reference to this there is a wrong entry wrt pointing the kernel and initrd location in the grub.cfg file.

The kernel and init files are in sda6 in /boot/grub/

Output of cfg....What could be wrong...i can see that the first line mentions file system wrongly as "insmod ext2" when SUSE 11.2 in fact uses ext4.Could this be the problem?
The file names are correct....

Output of grub.cfg



#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 4ddeaab0-b74d-42ba-a804-94f2b148fe84
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 4ddeaab0-b74d-42ba-a804-94f2b148fe84
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=4ddeaab0-b74d-42ba-a804-94f2b148fe84 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1200ae8000ae6b05
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Desktop -- openSUSE 11.2 - 2.6.31.8-0.1 (on /dev/sda5)" {
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 288e18dd-040e-4ed1-8f86-dcba3177b03c
linux /boot/vmlinuz-2.6.31.8-0.1-desktop root=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part6 devfs=mount,dall resume=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 splash=silent quiet showopts vga=0x31A
initrd /boot/initrd-2.6.31.8-0.1-desktop
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

darkod
February 14th, 2010, 12:11 PM
The command insmod ext2 is also used for ext3 and ext4, no error there.
In grub2 /dev/sda6 is (hd0,6), disks start counting from 0, partitions from 1 (not like in grub1 from 0).
But what do you have on /dev/sda5? Is that like a /boot partition or something? It seems both /dev/sda6 and /dev/sda5 are mentioned in the boot entry for SUSE.
Also, you have the * boot tag on /dev/sda1 and /dev/sda4 (/dev/sda5). I thought you can only have one boot tag and it has to be on the windows partition when dual booting. You should be able to remove the boot tag in Gparted (either from the hdd ubuntu or the live desktop). I'm not sure whether that can be the problem.

kansasnoob
February 14th, 2010, 02:15 PM
Would you please post the output of the Boot Info Script as described here:

http://bootinfoscript.sourceforge.net/

It eliminates a lot of guesswork.

vikrang
February 14th, 2010, 03:05 PM
Please find below the output of the Script as outputted in RESULTS.txt

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #7 for /boot/grub.
sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sda3: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sda4: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Welcome to openSUSE 11.2
"Emerald" - Kernel ().
Boot files/dirs: /boot/grub/menu.lst /etc/fstab

sda6: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda7: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd0f4738c

Partition Boot Start End Size Id System

/dev/sda1 * 63 81,915,434 81,915,372 7 HPFS/NTFS
/dev/sda2 81,915,435 163,830,869 81,915,435 7 HPFS/NTFS
/dev/sda3 163,830,870 184,072,769 20,241,900 7 HPFS/NTFS
/dev/sda4 * 184,072,770 291,901,049 107,828,280 f W95 Ext d (LBA)
/dev/sda5 * 248,846,913 274,663,304 25,816,392 83 Linux
/dev/sda6 274,663,368 291,901,049 17,237,682 83 Linux
/dev/sda7 184,072,896 218,259,089 34,186,194 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 1200AE8000AE6B05 ntfs
/dev/sda2 0E7AD24B6A9D0103 ntfs WINDOWS 2
/dev/sda3 05ED89137E3BB27B ntfs WINDOWS 3
/dev/sda5 288e18dd-040e-4ed1-8f86-dcba3177b03c ext4
/dev/sda6 e045eaba-4c1a-477d-b389-c61793a0539a ext4
/dev/sda7 4ddeaab0-b74d-42ba-a804-94f2b148fe84 ext4

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda7 / ext4 (rw,errors=remount-ro)
/dev/sda1 /media/1200AE8000AE6B05 fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)


================================ sda1/boot.ini: ================================

[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

=================== sda1: Location of files loaded by Grub: ===================


??GB: boot/grub/core.img

=========================== sda5/boot/grub/menu.lst: ===========================

# Modified by YaST2. Last modification on Sun Feb 14 06:26:21 IST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

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

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

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.2 - 2.6.31.8-0.1
root (hd0,5)
kernel /boot/vmlinuz-2.6.31.8-0.1-desktop root=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part6 devfs=mount,dall resume=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 splash=silent quiet showopts vga=0x31A
initrd /boot/initrd-2.6.31.8-0.1-desktop

title Ubuntu 9.10
root (hd0,5)
kernel /boot/grub/core.img root=/dev/sda8
initrd /boot/grub/initrd.img-2.6.31-14-generic

=============================== sda5/etc/fstab: ===============================

/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part7 /home ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.U TF-8 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part2 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.U TF-8 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part3 /windows/E ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.U TF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
LABEL=ubuntu /local ext4 defaults 1 2

=================== sda5: Location of files loaded by Grub: ===================


127.5GB: boot/grub/menu.lst
127.5GB: boot/grub/stage2
131.7GB: boot/initrd
131.7GB: boot/initrd-2.6.31.8-0.1-debug
129.3GB: boot/initrd-2.6.31.8-0.1-desktop
131.7GB: boot/vmlinuz
131.7GB: boot/vmlinuz-2.6.31.8-0.1-debug
128.5GB: boot/vmlinuz-2.6.31.8-0.1-desktop

=========================== sda7/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 4ddeaab0-b74d-42ba-a804-94f2b148fe84
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 4ddeaab0-b74d-42ba-a804-94f2b148fe84
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=4ddeaab0-b74d-42ba-a804-94f2b148fe84 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1200ae8000ae6b05
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Desktop -- openSUSE 11.2 - 2.6.31.8-0.1 (on /dev/sda5)" {
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 288e18dd-040e-4ed1-8f86-dcba3177b03c
linux /boot/vmlinuz-2.6.31.8-0.1-desktop root=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part6 devfs=mount,dall resume=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 splash=silent quiet showopts vga=0x31A
initrd /boot/initrd-2.6.31.8-0.1-desktop
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

=============================== sda7/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda7 during installation
UUID=4ddeaab0-b74d-42ba-a804-94f2b148fe84 / ext4 errors=remount-ro 0 1
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

=================== sda7: Location of files loaded by Grub: ===================


96.3GB: boot/grub/core.img
95.0GB: boot/grub/grub.cfg
95.0GB: boot/initrd.img-2.6.31-14-generic
96.6GB: boot/vmlinuz-2.6.31-14-generic
95.0GB: initrd.img
96.6GB: vmlinuz

darkod
February 14th, 2010, 03:31 PM
I don't know about kansasnoob, but I'm completely lost here. Can we get some answers from you?
What is on /dev/sda5, /dev/sda6 and /dev/sda7?
/dev/sda7 seems to be the ubuntu root, but what do you think it is?
For /dev/sda5 and /dev/sda6 I really can't decide.

From your results file:

1. Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM /boot/grub/core.img

core.img has no place there but lets ignore that for the moment.

2. From ubuntu:

# / was on /dev/sda7 during installation

3. But from suse:

/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part7 /home ext4 acl,user_xattr 1 2

4. And also:

sda5: ____

File system: ext4

So....
Was /dev/sda7 your /home partition in suse that you overwrote with the ubuntu root?
Was /dev/sda5 your swap in suse and why is it now reported as ext4 type?

Also, another important point: I don't know how you installed suse and ubuntu but when installing more linux distros you are aware that you need only one grub right? So first sit down and make a plan how you will organize things, and decide from which distro to use grub and in Advanced settings during the other installation don't install a bootloader.

If you don't have any important data in both suse and ubuntu, I would suggest using Gparted from the ubuntu live desktop to delete all linux partitions.
Then install ubuntu and grub2. Use the manual partitioning if you want separate /home but first make a research if you plan to share it with suse, whether it will work shared with another distro.
Then install suse and tell it NOT to install a bootloader. After that you will still have only windows and ubuntu in your grub menu but if you boot ubuntu and do update-grub it should find and add suse.

kansasnoob
February 14th, 2010, 05:46 PM
Well first of all lets parse through what I see. The Boot Info Script shows:

XP is on sda1
SUSE is on sda5
Karmic is on sda7

Yet you said:


I have 3 windows partition and SUSE on sda 6

And SUSE's menu.lst shows it being on (hd0,5) which is sda6?????????????

Also, as Darko pointed out, you have /boot/grub/core.img in XP which may even keep XP from booting.

Another oddity is having a boot flag set on the extended partition. Odd indeed.

But lets slow down and gather more info before making any huge changes (I haven't even tried to parse UUID's yet).

I'm assuming you can boot Ubuntu but not XP or SUSE. Is this correct?

You're going to have to be a bit patient because this is going to require some Q & A!

I'd also like to see the output of:


sudo parted /dev/sda print

It's looking like the reinstall of Ubuntu, which was not needed, reassigned partition numbers.

vikrang
February 14th, 2010, 06:27 PM
Yes ..Thanks guys...Even I am totally lost!! Sorry I think I misguided you..I feel it is my own doing in some ways

It started like this...

1. I had XP on partition 1.
2. There is 1 primary partition which had 3 extended partitions
Total 4*40GB = 160 GB(Total Size)
3. I had installed Open SUSE 11.2 using 40 GB ...I had deleted one partition , reformatted as ext 4 and used it..SUSE used a part of the partition for SWAP and balance for files.
4. SUSE installed GRUB and I had XP as a menu entry
5.I wanted Ubuntu purely bcoz of its support and good software base..So I installed Ubuntu 9.10 alongside these 2 OS
.
Things were fine till this point


I wasnt happy with Ubuntu's Black and White Boot window

I did some research in the Ubuntu blogs

1. I went to /etc/default and tried to re-configure the GRUB2 Loader...I tried to re -create a new menu entry file ...As was described in one of the blogs , i copied portions pertaining to XP and SUSE and Ubuntu from grub.cfg and created a file and made it executable by using "chmod +x" command. I omitted all the entries pertaining to recovery..

I also made the exec files pertaining to the recovery entries un - executable as was mentioned in the guide

I also tried to change the font color and introduce a splash screen to the B/W menu

I updated GRUB

On reboot, to my surprise Open SUSE loader only booted with XP and SUSE

I again tried to add Ubuntu 9.10 manually to SUSE loader ...

That is the reason for the wrong Core.img entries marked in Red by darkod

Then again Installed UBuntu hoping GRUB2 would take over and recognize SUSE on its own,

It was installed on partition (sda7).. I manually deleted the old Ubuntu partition , freed some space and freed up 17 GB for 9.10..

Regarding the multiple boot partitions also , I guess I would have wrongly ticked off a particular box during install.

Regarding the "sda" nomenclature, i must admit that I am a total Linux newbie and I guess it was typed erroneously..

Thanks for your precious time...I do not want to confuse you further ..I will just delete the SUSe partition and install it afresh...

I guess Little Knowledge is too dangerous from this drastic experiment..Think I have to read some more to get an insight into the Linux System....

kansasnoob
February 14th, 2010, 06:55 PM
Yes ..Thanks guys...Even I am totally lost!! Sorry I think I misguided you..I feel it is my own doing in some ways

It started like this...

1. I had XP on partition 1.
2. There is 1 primary partition which had 3 extended partitions
Total 4*40GB = 160 GB(Total Size)
3. I had installed Open SUSE 11.2 using 40 GB ...I had deleted one partition , reformatted as ext 4 and used it..SUSE used a part of the partition for SWAP and balance for files.
4. SUSE installed GRUB and I had XP as a menu entry
5.I wanted Ubuntu purely bcoz of its support and good software base..So I installed Ubuntu 9.10 alongside these 2 OS
.
Things were fine till this point


I wasnt happy with Ubuntu's Black and White Boot window

I did some research in the Ubuntu blogs

1. I went to /etc/default and tried to re-configure the GRUB2 Loader...I tried to re -create a new menu entry file ...As was described in one of the blogs , i copied portions pertaining to XP and SUSE and Ubuntu from grub.cfg and created a file and made it executable by using "chmod +x" command. I omitted all the entries pertaining to recovery..

I also made the exec files pertaining to the recovery entries un - executable as was mentioned in the guide

I also tried to change the font color and introduce a splash screen to the B/W menu

I updated GRUB

On reboot, to my surprise Open SUSE loader only booted with XP and SUSE

I again tried to add Ubuntu 9.10 manually to SUSE loader ...

That is the reason for the wrong Core.img entries marked in Red by darkod

Then again Installed UBuntu hoping GRUB2 would take over and recognize SUSE on its own,

It was installed on partition (sda7).. I manually deleted the old Ubuntu partition , freed some space and freed up 17 GB for 9.10..

Regarding the multiple boot partitions also , I guess I would have wrongly ticked off a particular box during install.

Regarding the "sda" nomenclature, i must admit that I am a total Linux newbie and I guess it was typed erroneously..

Thanks for your precious time...I do not want to confuse you further ..I will just delete the SUSe partition and install it afresh...

I guess Little Knowledge is too dangerous from this drastic experiment..Think I have to read some more to get an insight into the Linux System....

You did not answer this one important question:


I'm assuming you can boot Ubuntu but not XP or SUSE. Is this correct?

So answer that and also do you have an earlier Ubuntu Live CD (anything prior to Karmic)?

vikrang
February 14th, 2010, 07:00 PM
I can boot both XP and 9.10 now

kansasnoob
February 14th, 2010, 08:06 PM
Well it's good you can still boot XP!

But you kind of scare me. Like I asked:

I'm assuming you can boot Ubuntu but not XP or SUSE. Is this correct?
So answer that and also do you have an earlier Ubuntu Live CD (anything prior to Karmic)?

And you answered just half of the questions!

If I ask for info or give instructions we need to be 100% in synch!

Since I know you can boot both Ubuntu and XP the next thing I want you to try is restoring SUSE's legacy grub just to see if it will boot, but it must be done from a Live CD!

Then you must also know how to restore Ubuntu's grub2. Both are simple but if for instance you try to restore SUSE's grub from your installed Ubuntu you're going to create another problem.

I think you've created enough problems, eh?

So what do I mean when I say, "use the Live CD"?

kansasnoob
February 14th, 2010, 08:14 PM
You know there is one simple thing we could try. While booted into Karmic (not the Live CD) go to terminal and run:


sudo apt-get install --reinstall libdebian-installer4


sudo os-prober


sudo update-grub

I doubt that will work but it could.

darkod
February 14th, 2010, 08:27 PM
You might be able to sort this out, but I still think if these are both new installs (as it seems) and you have no important data on them, just delete all linux partitions (/dev/sda5, /dev/sda6 and /dev/sda7). Leave the extended /dev/sda4. Even better, expand /dev/sda4 to include the unallocated space at the end of the disk, it seems you have 5GB unallocated. They are wasted right now.

Then start the ubuntu install and use manual partitioning creating swap partition and / partition as big as you want as logical partitions inside the extended /dev/sda4. No need for separate /home unless you specifically need it (you can't share it with suse because it's different distro anyway. you can but it's not recommended). Let ubuntu install grub2 to the MBR of /dev/sda.

Then start the suse install, it can use the same swap partition and create its / partition from the remaining space in /dev/sda4. In Advanced options/settings, tell it NOT to install a bootloader.

Boot ubuntu and do update-grub. It should work fine.

meierfra.
February 15th, 2010, 05:53 AM
want you to try is restoring SUSE's legacy grub just to see if it will boot,
Don't do this. You Suse fstab is messed up, so this will not work.
Just give me some time to write up instructions.


So what do I mean when I say, "use the Live CD"?

No idea. No need for a LiveCD: One can reinstall Suse grub by chrooting into Suse from Ubuntu and then reinstall Kubuntu's grub by chrooting into Kubuntu from Suse.

meierfra.
February 15th, 2010, 06:23 AM
This is how I understand the situation:

Before you reinstall Kubuntu:

/dev/sda5 swap
/dev/sda6 Suse
/dev/sda7 Suse Home
/dev/sda8 Kubuntu

after your reinstalled Kubuntu

/dev/sda5 Suse
/dev/sda6 Suse Home
/dev/sda7 Kubuntu

Since Suse uses partition numbers to identify partitions, the entries in menu.lst and fstab are no longer correct. Grub 2 uses the entries from menu.lst for Suse in grub.cfg. So also those entries are messed up. Try this



sudo mount /dev/sda5 /mnt
cd /mnt/etc
cp fstab fstab.bu
kdesudo kate fstab


Change the file to


#dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part6 /home ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.U TF-8 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part2 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.U TF-8 0 0
/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part3 /windows/E ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.U TF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
#LABEL=ubuntu /local ext4 defaults 1 2


Save the file.



cd /mnt/boot/grub
sudo cp menu.lst menu.lst.bu
kdesudo kate menu.lst

Change the suse entry to


###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.2 - 2.6.31.8-0.1
root (hd0,4)
kernel /boot/vmlinuz-2.6.31.8-0.1-desktop root=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5 devfs=mount,dall splash=silent quiet showopts vga=0x31A
initrd /boot/initrd-2.6.31.8-0.1-desktop

(note that I removed "resume=/dev/disk/by-id/ata-ST9160821AS_5MA5ZZ7E-part5"
Save the file
Then run


sudo update-grub

Reboot and see whether you can boot into Suse.


PS: You should create a swap partition. You can use the 5GB at the end of the hard drive for that. But maybe actually Darkod's suggestion is better than mine.
A fresh start might be a good idea.

vikrang
February 15th, 2010, 07:50 AM
Thanks to all of you... I think this has been a real head breaker ......I have decided to start over on a clean slate....

(Del Linux partitions incl Ubuntu) ,

First install Ubuntu from a Live CD ....Install it at the end of the Free space so that there is continous space available for Win partition..I can slice it off if necessary..Make it the primary Linux OS and if necessary install Others from Virtual Box or VmWare and try to experiment...

Been real lucky not to mess up with XP partition as I would have been ripped apart by my wife.....

Still very much in the learning stages and I want to experiment a lot, but probably from a safe environment which doesnt affect the stability.

Are there any utilities like MbrFix in Ubuntu which will rewrite MBR in case of problems?

darkod
February 15th, 2010, 11:21 AM
Thanks to all of you... I think this has been a real head breaker ......I have decided to start over on a clean slate....

(Del Linux partitions incl Ubuntu) ,

First install Ubuntu from a Live CD ....Install it at the end of the Free space so that there is continous space available for Win partition..I can slice it off if necessary..Make it the primary Linux OS and if necessary install Others from Virtual Box or VmWare and try to experiment...

Been real lucky not to mess up with XP partition as I would have been ripped apart by my wife.....

Still very much in the learning stages and I want to experiment a lot, but probably from a safe environment which doesnt affect the stability.

Are there any utilities like MbrFix in Ubuntu which will rewrite MBR in case of problems?

If the grub boot process in somehow messed up and you need your windows urgently, boot the ubuntu live desktop (or the hdd ubuntu if you can boot it) and execute:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

The above assumes the hdd you want to overwrite the MBR is /dev/sda, if not adjust accordingly. Ignore any warning the commands will give. That will write generic mbr on that hdd which will boot your windows provided the windows boot process is not messed up.
If you ever need to do that, don't forget, this does NOT delete ubuntu (or any other linux). It will still be there but your computer will boot windows straight away, no grub menu. Using the ubuntu live desktop you could reinstall grub back and get ubuntu back, no need to reinstall the whole ubuntu.

vikrang
February 16th, 2010, 09:34 AM
Thanks a ton Darko.....This is really very useful...prior to this I was always booting XP CD and running fixmbr / fixboot/ bootcfg /rebuild and the frustrating part would be that the recovery console would take a long time to boot up.

Using this , lot of time and effort would be saved...

Also , a very basic Qn, Does deleting partitions too often reduce Hard Disk Life....I know that there is a difference between Quick Format and Low level format, where in the latter the entire sectors are re-written and this affects HDD life....

Linux / Gparted does a quick format ( erase) ...So I dont think that would be a problem right? So If I want I can delete and re-create partitions "n" numer of times?

darkod
February 16th, 2010, 11:08 AM
Thanks a ton Darko.....This is really very useful...prior to this I was always booting XP CD and running fixmbr / fixboot/ bootcfg /rebuild and the frustrating part would be that the recovery console would take a long time to boot up.

Using this , lot of time and effort would be saved...

Also , a very basic Qn, Does deleting partitions too often reduce Hard Disk Life....I know that there is a difference between Quick Format and Low level format, where in the latter the entire sectors are re-written and this affects HDD life....

Linux / Gparted does a quick format ( erase) ...So I dont think that would be a problem right? So If I want I can delete and re-create partitions "n" numer of times?

As far as I know, deleting partitions and formatting the "quick" way only deletes it from the partition table that every hdd has. In fact, because of that, even after quick format the data is still there and you can recover it unless it has already been overwritten by saving stuff on the newly created partition.
You probably won't be deleting partitions on a daily basis, depending what are you planning to do. :)

vikrang
February 17th, 2010, 08:13 AM
Thanx Mate...Just curious to know....of course after this debacle partitioning is a no - no ;)