Bug 386800

Summary: Installing bootloader on Macbook 3,1
Product: [openSUSE] openSUSE 11.0 Reporter: paul hendrick <paul.hendrick>
Component: BootloaderAssignee: Torsten Duwe <duwe>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P2 - High CC: mpepping, rl.simpson, sshaw
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs.tgz
yast2 + grub install logs

Description paul hendrick 2008-05-05 17:13:57 UTC
Installing on a macbook fails 100% of the time, using the 64Bit iso.
Failure occurs when the installer attempts to install the Grub bootloader, claiming that package verification for kernel-default failed.
Viewing the exact error shows that the root device (dev/sda5) could not be found
error generated by /usr/lib/perl5/vendor_perl/5.10.0/Bootloader/Tools.pm line 280, this is then followed by a grub shell error, where the setup fails when trying to install the bootloader to the disk.

Looking at line 280 from the Tools.pm file, I see:
my $sb = "/sys/block";
opendir(BLOCK_DEVICES,"$sb") || die("ReadPartitions(): Failed to open dir $sb");

running mount shows that /sys is mounted, as is /proc.

Those errors aren't 100% exact, as I didn't note them down, but I'll attempt an install again if they'd be a help.


further info:
Checking the install medium passes, and installing in a vm works flawlessly.
Comment 1 Stephen Shaw 2008-05-08 19:09:29 UTC
the trick I've found here is that it will always fail the first time.  After the install if you boot again with a live cd for example and manually run

grub
install...
setup...

or whatever it is, it will actually work.  I have grub running on my macbook pro dual booted with OSX (leopard)
Comment 3 Martijn Pepping 2008-06-29 09:55:02 UTC
opt-in; grub install fails on my macbook3.1 as well.

part. map.:

200MB efs macbook-bios
136GB hfs os x
200MB /boot (hd0,2)  <<<< active, grub
30GB  lvm (/root, /home)

During installation of OS11.0 grub on (hd0,2): "Error 22: No such partition"


booted rescue-mode:
mount /dev/sda4 /mnt
mount /dev/sda3 /mnt/boot
mount -t proc none /mnt/proc
mount -o bind /dev/ /mnt/dev
chroot /mnt /bin/bash

checked /boot/grub/menu.lst ... grub install failed again on an Error 22 'no such partition'

Fedora Core9 grub install flawless on the same partitioning schema.



  
Comment 4 Alexander Osthof 2008-07-14 13:31:29 UTC
Reassigning to new maintainer of perl-Bootloader.
Comment 5 Josef Reidinger 2008-07-22 13:46:21 UTC
please provide logs - http://en.opensuse.org/YaST/Bugs#Standard_logs
Comment 6 Josef Reidinger 2008-09-12 12:57:36 UTC
no response, without logs I cannot determine where is problem
Comment 7 Martijn Pepping 2008-09-24 18:30:37 UTC
u/l y2log.tgz
Comment 8 Martijn Pepping 2008-09-24 18:31:30 UTC
Created attachment 241475 [details]
y2logs.tgz
Comment 9 Martijn Pepping 2008-09-24 18:33:43 UTC
(In reply to comment #1 from Stephen Shaw)
> the trick I've found here is that it will always fail the first time.  After
> the install if you boot again with a live cd for example and manually run
> 
> grub
> install...
> setup...
> 
> or whatever it is, it will actually work.  I have grub running on my macbook
> pro dual booted with OSX (leopard)

That doesn't work for the 'normal' macbook. 
Comment 10 Martijn Pepping 2008-09-24 18:39:58 UTC
(Sorry for being spammy on this one ;)

This is how I've tested this.

- booted os11.0dvd (i386)
- partition setup:
    /dev/sda3    /
    /dev/sda4    swap
    /dev/sda5    /home
- grub stage2 install fails on:
  grub> setup --stage2=/boot/grub/stage2 (hd0,2) (hd0,2)
        Error 22: No such partition


Doing a 'tail -f' on /var/tmp/yast2/*, the above error occurs right after the message: 
    evaluate remote call to 'Bootload_API::initializeBootLoader'.


rgrds, martij
Comment 11 Josef Reidinger 2008-09-26 08:45:18 UTC
OK, logs doesn't contain anything from bootloader, so I need manually some information from files. 
at first please attach output of ls -l /sys/block
and also please attach fdisk -l
you can run it from console in inst-sys (ctrl+alt+Fnumber)
Comment 12 Martijn Pepping 2008-09-27 19:47:43 UTC
Created attachment 242104 [details]
yast2 + grub install logs

In the attached tarball you'll find three .tgz files:

- y2logs.tgz : again, yast2 logs from during the install. 
- yast-logs.tgz : manually collected logs and related configuration, also contains the 'ls -l /sys/block' and 'fdisk -l' outputs.
- rescue.tgz : logs and system info booting in rescue mode, after install.

Rgrds, Martijn
Comment 13 Josef Reidinger 2008-09-30 07:09:15 UTC
Thanks for complete logs. I reassign it to grub maintainer as It look like everything is OK from bootloader configuration and can be problem in grub. 
/sda have BIOS id 0x80 so it is correctly detected as first boot disk
fs on sda is ext3 and grub command looks like "setup --stage2=/boot/grub/stage2 (hd0,2) (hd0,2)" so this is correct.

duwe - if something is badly configured please return it to me.
Comment 14 Torsten Duwe 2008-10-06 15:28:44 UTC
I suspect GPT and MBR are out of sync, not much we can do from our side(?)
11.1 should do better -- try again with 11.1 or earliest its beta3.
Comment 15 RL Simpson 2008-10-06 17:53:22 UTC
I am using rEFIt as are the other users reporting this bug.  rEFIt syncs the GPT and MBR.  I can confirm that the problem lies elsewhere.
Comment 16 Martijn Pepping 2008-10-06 18:59:51 UTC
(In reply to comment #14 from Torsten Duwe)
> I suspect GPT and MBR are out of sync, not much we can do from our side(?)

That doesn't explain why grub-install on {fedora,ubuntu} installs just fine. 

> 11.1 should do better -- try again with 11.1 or earliest its beta3.
> 

Alright. I'll just wait for 11.1b3 or dive into it myself.


(In reply to comment #15 from RL Simpson)
> I am using rEFIt as are the other users reporting this bug.  rEFIt syncs the
> GPT and MBR.  I can confirm that the problem lies elsewhere.
> 

I second that. :)

Rgrds, Martijn

Comment 17 Torsten Duwe 2008-11-07 13:42:26 UTC
Should be fixed in beta5