Bug 208870

Summary: Bad grub location selected
Product: [openSUSE] openSUSE 11.0 Reporter: Hugo Costelha <hugo.costelha>
Component: BootloaderAssignee: Jozef Uhliarik <juhliarik>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: jplack
Version: Factory   
Target Milestone: ---   
Hardware: 64bit   
OS: Linux   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YAST log files
The laptop attachements asked for
grub orignal related files
YaST Log files
The requested (grub) device.map

Description Hugo Costelha 2006-09-28 20:19:52 UTC
I had SUSE Linux 10.1 installed, and I was trying openSUSE 10.2, to help
improving it by bug reporting.

I had just one SATA drive installed with SUSE 10.1, so I installed an IDE
hard-drive and started openSUSE 10.2 installation from the CDs.

Initially openSUSE 10.2 sugested to use the SATA drive, so I changed it to use
the IDE drive, and proceeded with the install.

When it made the first reboot, the old (SUSE 10.1) GRUB appeared (with no
reference to openSUSE 10.2) and booted the 10.1. So, the grub install location was badly selected.
Comment 1 Hugo Costelha 2006-09-28 20:22:25 UTC
Created attachment 99877 [details]
YAST log files

The YAST log files contains a lot more stuff, since I only saved the log a couple of days after the installation was concluded.
Comment 2 Hugo Costelha 2006-10-10 19:57:42 UTC
Still exactly the same behaviour with Alfa 5.
Comment 3 Hugo Costelha 2006-11-10 22:26:11 UTC
Still the same with Beta2.

I do not know if it helps, but it seems that openSUSE thinks that the first Disk is the IDE instead of the SATA one.

One of the strange things that happens is that booting without the boot cd, and booting from the boot CD with "Boot from Disk" selction, is not the same.

When I boot directly from disk it boots from the SATA, giving me the SUSE 10.1 installed grub. Booting from the CD choosing "Boot from harddisk" boots from the IDE giving me the 10.2 installed grub.
Comment 4 Hugo Costelha 2006-11-10 22:31:30 UTC
This time I even tryed different grub locations, but it seemed that it didn't make any difference (almost like they were ignored completely).
Comment 5 Hugo Costelha 2006-11-16 14:43:31 UTC
To day I tryed installing directly from factory to a laptop, and result was really bad.

Installing on a laptop with an empty hardrive resulted in an invalid grub location. I started the installation and went for lunch, and when I cam back, the installation had stopped because the laptop wasn't able to boot from disk when it rebooted during installation.
Comment 6 Hugo Costelha 2006-11-16 16:00:39 UTC
Changin to blocker, as the default grub installation on a "new" empty computer leads to a unbootable system, meaning that openSUSE would not work, and would not even complete its installation procedure.
Comment 7 Stefan Fent 2006-11-16 18:10:15 UTC
I assume you have only one disk in your Laptop, so we're talking about two different things here:
Comment #1-4: This is known and worked on. (Will be fixed in next version)

Comment #5-6: Can you please provide the logs for this (obviously) different      machine? /var/log/YaST2/* /boot/grub/[device.map, menu.lst], /etc/grub.conf
And the laptop type, as this seems to be somehow special.
Comment 8 Hugo Costelha 2006-11-16 18:14:40 UTC
Yeah, the first cases were reported on a two disk desktop, while this last one was on a NEC versa FS900, a centrino laptop with an IDE disk.

In this later case I got openSUSE 10.2 beta2plus installed by starting the rescue system and doing

# mount /dev/hda2 /mnt
# grub-install --root-directory=/mnt /dev/hda
# umount /mnt
# reboot

This way I was able to get grub to appear on boot, and continue with the
installation.

I do not know if doind what I did changed the files you mentioned, but nevertheless, I will post them here soon.
Comment 9 Stefan Fent 2006-11-16 18:30:23 UTC
No, probably nothing is changed - which makes it even more mysterious.
Comment 10 Hugo Costelha 2006-11-16 18:37:41 UTC
Created attachment 105821 [details]
The laptop attachements asked for

Well, in the meantime, as I said, I did a few things to try to get GRUB working, including running the Repair from the install CD.

If you think a new install would help you better, just say so (in that case tell me if I should do some "grub erase" or something)
Comment 11 Hugo Costelha 2006-11-16 19:37:25 UTC
Created attachment 105848 [details]
grub orignal related files

I decided to try again just to make sure, and the result was the same wrong one, I get "no operating system" on boot during the installation, so the install does not complete.

Now I am sending the original "untouched" grub files et al.
Comment 12 Hugo Costelha 2006-11-16 19:41:45 UTC
What I said in comment #8 is really all I have to do to get the bootloader working.
Comment 13 Stefan Fent 2006-11-17 08:57:57 UTC
Ok, so you stumble across a bug in Beta2 that is fixed in beta2plus: the /etc/grub.conf was wrong, which was fixed by gub-install.

Closing this bug will be working in RC1.
Comment 14 Hugo Costelha 2006-11-23 22:58:50 UTC
Well, I do not know if this is enough to reopen the bug report, but openSUSE 10.2 RC1 still chooses a bad location for the grub.

It still thinks that the first disk is the /dev/hda, while in fact it is the /dev/sda. Is there a way to correct this detection? (if yes, then this should be reopened)
Comment 15 Hugo Costelha 2006-11-23 23:06:15 UTC
Damm, and no matter what, I cannot get openSUSE 10.2 to repair and install a correct bootloader. I used exactly the same options of my SUSE 10.1 install (which is the one in /dev/sda) and the result is not the same.

Basically I have
 ---> SUSE 10.1
 /dev/sda1 swap
 /dev/sda2 /
 /dev/sda3 /home
 ---> openSUSE 10.2
 /dev/hda1 swap
 /dev/hda2 /
 /dev/hda3 /home

I tryed to install the bootloader (from YaST) in /dev/sda2, which is the one that SUSE 10.1 uses, but it still allways boot usinf the 10.1 grub install.
Comment 16 Hugo Costelha 2006-12-08 16:56:11 UTC
Not that the final version is out, I tought it was time to update my main installation from SUSE 10.1 to openSUSE 10.2...I was wrong.

It seems that this bug was not solved yet, so now, after the installation was finished, I get a "No Operating System" when I turn on my computer.

Since I cannot boot the newly installed system, I imagined I could try to reapair it by starting from the CD, but I cannot! I even unpluged my IDE disk (remaining just the SATA one, which is the main disk), but I get "Error 21: Selected disk does not exist".

I will keep trying different things, but I sure think this should be fixed. This is completely a showstopper for someone new to Linux, something that would make him go away for good.
Comment 17 Hugo Costelha 2006-12-08 17:01:39 UTC
Just to make it clear, I am talking about my desktop, the AMD64 which has a SATA disk (the first disk device) and the IDE disk.
Comment 18 Greg Riedesel 2006-12-08 23:38:42 UTC
I had a similar problem, though it might source differently. 
https://bugzilla.novell.com/show_bug.cgi?id=227324
I also had SATA drives as my HDs. No idea if this qualifies as a duplicate of this one, though.
Comment 19 Stefan Fent 2006-12-10 13:00:41 UTC
Can you please add the contents of /var/log/YaST2/ (bzipped2) and /boot/grub/device.map/  
Comment 20 Hugo Costelha 2006-12-10 17:16:30 UTC
Created attachment 109017 [details]
YaST Log files

In the meantime, I disconnected my IDE drive, thus keeping only my SATA drive, and performed an update from the installation CD (I actually just updated the kernel). This way I was able to get the system properly installed and working fine. Then I replugged my IDE and know everything is working.

SO clearly the problem is that when my IDE driver is connected, SUSE thinks it is the first drive, while in the computer bios the SATA drive is the first one my default.
Comment 21 Hugo Costelha 2006-12-10 17:18:16 UTC
Created attachment 109018 [details]
The requested (grub) device.map

Once again I remember you that I disconnect my IDE drive for the instalation to work, so the files might be different from what original was there, when I tryed to install having both drives connected.
Comment 22 Stefan Fent 2006-12-18 18:55:25 UTC
The logs don't help much then. :-(
I guess that the BIOS IDs get mixed up somehow, but I needed logs to prove and to debug.

Do you have the possibility to install via ssh? Then you could just start the installation, wait until the proposal is done and scp /var/log/YaST2 somewhere.
(w/o having to reinstall everything) 
Comment 23 Hugo Costelha 2006-12-18 18:59:32 UTC
Could you give me a pointer has to how can I do it through ssh?

I cannot promise I will do this fast, since this wee is xmas and I am quite busy, but I will try it as soon as possible.
Comment 24 Stefan Fent 2006-12-18 20:20:39 UTC
you need an dhcp server, then just enter 'usessh=1 sshpassword=<password>' at the isolinux prompt, then after kernel and initrd are loaded, you'll get the address and the command to start on the console.
then you can just ssh -X root@<ip-address> and start yast.

Comment 25 Hugo Costelha 2007-01-03 14:47:38 UTC
I am currenlty with very short time, specially considering that other people are now using the computer also.

When the first SUSE 10.3 alpha gets out, I will try and report back.

If someone crosses this problem, as a fix you can swithc the boot order on the bios, or disconnect the IDE drive during installation.
Comment 26 Joachim Plack 2008-03-20 04:19:47 UTC
reevaluate bug for SLE11
Comment 27 Joachim Plack 2008-03-20 04:21:31 UTC
see above
Comment 28 Joachim Plack 2008-03-20 13:17:52 UTC
At a glance unclear what the remaining problem is:
- may be something around BIOS disk reordering


Should be rechecked in openSUSE factory. No blocker btw.
Comment 29 Joachim Plack 2008-07-15 11:21:54 UTC
assign to yast2-bootloader maintainer
Comment 30 Hugo Costelha 2008-07-15 12:15:50 UTC
If I am the only one which had this problem, then it is probably better to just close it, and lead your efforst elsewehere, since switching the disk order in the bios solves the problem.

I haven't tested it with openSUSE 11.0, since during the installation I already had the disks in the order (which prevented the problem in the previous versions).
Comment 31 Jozef Uhliarik 2008-07-27 16:49:49 UTC
yast2-bootloader uses yast2-storage for obtaining info about disks. The ordering is depend on bios_id (0x80 - the first, 0x81 - the seconf, etc.) I am sorry I use only ordering by bios_id from yast2-storage.