Re: [Fwd: Re: [opensuse] Boot magic]



Hans de Faber schreef:
Hans de Faber schreef:
-------- Original Message --------
Subject: Re: [opensuse] Boot magic
Date: Tue, 25 Aug 2009 11:52:37 +0200
From: Hans de Faber <hans.defaber@xxxxxxxxx>
Reply-To: hans.defaber@xxxxxxxxx
To: Josef Reidinger <jreidinger@xxxxxxx>
References: <4A928B52.1070003@xxxxxxxxx> <4A92B414.5040007@xxxxxxx>
<4A92BDE0.7030307@xxxxxxxxx> <4A92DE52.40406@xxxxxxx>
<4A92EB45.6050003@xxxxxxxxx> <4A938EE7.4010502@xxxxxxx>

Josef Reidinger schreef:
On 08/24/2009 09:34 PM, Hans de Faber wrote:
josef reidinger schreef:
Hans de Faber napsal(a):
Josef Reidinger schreef:
On 08/24/2009 02:45 PM, Hans de Faber wrote:
Hi listmates,

Since I installed some milestones I can no longer boot the partition I want.
I wanted to the view the progression in OpenSuse and I had a free partition so
lets have a look.
My separate boot-partition is part2 the free partition was partition 3.
I installed on part3 milestone 6 with its own boot directory in the rootdir.

Now my system boots always from part 3 and I can't change that.
So I start reading http://en.opensuse.org/Bugs/grub

I discovered that I have a generic MBR
The doc above tells me:
any generic MBR will load a stage1 from the first block of a primary partition
marked as "active" or "bootable", as long as there is exactly one such primary
partition.

Parted shows me:

Number Start End Size Type File system Flags
1 32.3kB 26.8GB 26.8GB primary ntfs , , , , , , , , , type=07, ,
2 26.8GB 27.1GB 206MB primary ext3 boot, , , , , , , , ,
type=83, ,
3 27.1GB 53.9GB 26.8GB primary ext3 , , , , , , , , , type=83, ,
That partition 2 has the bootflag.

Thats nice and correct, next step is menu.lst on part2.
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate
This tells me the gfxmenu comes from hd0,1 thats also correct.

But then things go wrong, I get the menu of part3 hd0,2.

Questions:

1 how is this possible ?
2 How can I set the boot back to partition 2

All idea's are welcome, hans
Important question is what you have in MBR, as you can have there grub
MBR which load menu from sda3.
I develop possibility to check it.
Just run
update-bootloader --examinembr /dev/sda
and you get what is in your MBR.
NOTE: this is undocumented function, but I try fix it if problem occur
(it is same functionality which uses yasy2-bootloader to detect previous
MBR).

Thats a hint in the right direction but it doen't work

update-bootloader --examinembr /dev/sda
Unknown option: examinembr
Usage:
update-bootloader [operation] [options]

operation is one of --add, --remove or --refresh.

valid options are --help, --man, --image <file>, --initrd <file>,
--xen-kernel <file>, --xen, --default, --previous, --name <string>,
--force, --force-default.

Maybe misses yast also this functionality! Its the first time I have this
problem. This perl update_bootloader module is very recent.


I am sure, that yast doesn't miss this functionality as we replace it
and by dependencies ensure it work. What version of perl-Bootloader do
you have? (rpm -q perl-Bootloader).
If you want just send me your first 512 bytes of disc and I analyse it.
(dd if=/dev/sda of=<somefile> bs=512 count=1)
$ rpm -q perl-Bootloader
perl-Bootloader-0.4.81.1-0.1.1

For MBR see attachement
OK, your MBR looks like generic. What is strange is why you have in
milestone 6 pbl(perl-Bootloader) 0.4.81.1 which is opensuse 11.1 pbl. In
milestone 6 should be pbl 0.5.*. So boot sequence go to sda2...and there
maybe load bad menu.lst. This will require more testing.
So what you can do now is edit menu on sda3 (e.g. by yast2 bootloader)
and add chainload section to sda2, which add entry to new menu that jump
to sda2 disc. another chance is menuconfig section which directly load
menu.lst from target partition (just ensure, that your path is relative
to partition).
For dubuging please post menu.lst from sda2 (just mount it under some
temporary directory) and fstab from sda3.

I always use standard(up to date) opensuse 11.1 everthing in this message
refers tho 11.1.
I only use the milestone 6 grub environment against my will.
Milestone 6 is only installed to have a quick look to discover if 11.2
recognizes my nvidia 9400gt videocard, but thats a problem for the future.

All wat you suggest in your reply is possible chainload grub on hd0,2 or hd0,1
an boot everything wats on my disk.

What I not want is that I use the grub stage1 and nextstages from hd0,2
I want to use the boot environment starting with stage 1 from boot partition
hd0,1. Everything points to hd0,1 but I get hd0,2.

In milestone 6 the command update-bootloade gives also the error "Unknown
option: examinembr"

It is easy to throw away milestone 6 and restore the bootpartition from backup
but it was always possible to play around with grub and booting and now and
everything works as suspected. But the system boots (stage1) not as suspected.
I want to know why.

This is the hd0,2 menu.lst which comes up
*************************************
# Modified by YaST2. Last modification on Sat Aug 22 06:06:46 UTC 2009
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
# part3 menu.lst
#
default 1
timeout 5
gfxmenu (hd0,2)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.2 Milestone 6 - 2.6.31-rc6-3 on part3
root (hd0,2)
kernel /boot/vmlinuz-2.6.31-rc6-3-desktop
root=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part3
resume=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part7 splash=0 quiet
showopts vga=0x31a
initrd /boot/initrd-2.6.31-rc6-3-desktop


###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.1
root (hd0,1)
kernel /boot/vmlinuz
root=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part12
resume=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part7 splash=0 quiet
showopts vga=0x31a
initrd /boot/initrd


###Don't change this comment - YaST2 identifier: Original name: openSUSE 11.1
(/dev/sdb2)###
title openSUSE 11.1 grub (/dev/sdb2)
rootnoverify (hd0,1)
chainloader +1

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

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE
root (hd0,2)
kernel /boot/vmlinuz-2.6.31-rc6-3-desktop
root=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part3 showopts apm=off
noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1
x11failsafe vga=0x31a
initrd /boot/initrd-2.6.31-rc6-3-desktop

****************************************
Everthing in this menu.lst does not relate to the problem.
Everything in this menu.lst works as it should.
The question is why do I get this menu.lst on hd0,2
Everything points to the hd0,1 menu.lst

I told you that everything works fine in the above menu.lst.
I checked everything again.
The line title openSUSE 11.1 grub (/dev/sdb2)
Does work wrong:
Grub replies with:
rootnoverify (hd0,1)
chainloader +1
loading stage2
and gives me also the menu.lst on hd0,2

I feel a little bit lost, I give you also the other menu.lst

Menu.lst on hd0,1
*********************************
# Modified by YaST2. Last modification on Fri Aug 21 13:57:19 CEST 2009
default 0
timeout 5
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate


###Don't change this comment - YaST2 identifier: Original name: linux###
title part2 openSUSE 11.1 ( /dev/sda12 )
root (hd0,1)
kernel /boot/vmlinuz
root=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part12
resume=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part7 splash=0
showopts vga=0x31a
initrd /boot/initrd


###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.2 milestone( /dev/sda3 )
root (hd0,2)
kernel /boot/vmlinuz
root=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part3
resume=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part7 splash=0
showopts vga=0x31a
initrd /boot/initrd


###Don't change this comment - YaST2 identifier: Original name: SUSE LINUX
(/dev/sdax)###
title SUSE LINUX ( /dev/sda3 GRUB)
rootnoverify (hd0,2)
chainloader +1


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


###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.1
root (hd0,1)
kernel /boot/vmlinuz
root=/dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJDWQC04984-part12 showopts
ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off
processor.max_cstate=1 x11failsafe vga=0x31a
initrd /boot/initrd

*********************************


I went down to grub commandline and typed the next commands:

grub: rootnoverfy (hd0,1)
grub: chainloader +1
grub: boot
This gives me again the hd0,2 menu.lst
Then

grub: rootnoverfy (hd0,2)
grub: chainloader +1
grub: boot
Invalid or unsupported executable format

Thats another error, I think incompatibility between the booted stage1 and 2
and the grub on hd0,2

How is it posible than that it takes the menu.lst from hd0,2 and boots.
It should not boot.
This is the real boot magic.
You know ? I don't, Hans
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx