bugGNU GRUB - Bugs: bug #30576, grub-install doesn't work on IBM...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #30576: grub-install doesn't work on IBM PowerPC systems.

Submitter:  Len Sorensen <lsorense>
Submitted:  Wed 28 Jul 2010 04:54:21 PM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  Every Time
Planned Release:  None

Wed 01 Feb 2012 04:06:51 PM UTC, comment #1: 

Yes, it was a patch from IBM actually.

Vladimir Serbinenko <phcoder>
Group administrator
Wed 28 Jul 2010 04:54:21 PM UTC, original submission:  

grub-install currently does not know how to install on an IBM PowerPC system, even though grub2 is already capable of working on such a machine.

The requirements to boot on an IBM powerpc is:

You must have a boot partition of type 0x41 (PReP boot partition).  Partition table can be msdos (not sure what else is supported, perhaps EFI style GPT).  The boot partition does NOT contain any filesystem.  It is read into RAM by the firmware raw and executed.

The firmware does not create devaliases by itself.  Grub currently only works with aliases for disks, so the user has to create aliases using the nvalias command for grub to be able to see any disks.  This could probably be improved.

The grub image created by grub-mkimage must be written to the boot partition.  'dd if=/boot/grub/grub of=/dev/sda1' works great.

Since the boot partition that loads grub does not have a filesystem, it is not a valid prefix to use for loading other grub modules.  Grub assumes it is so grub-mkimage has to be told the correct prefix when generating the image.

A working example setup is:
nvalias hd created in firmware for disk.
/dev/sda1 PReP boot partition (8MB, which was the smallest I could make in the partition tool).
/dev/sda2 Linux root partition with ext4

Ideally 'grub-install /dev/sda1' copies grub files to /boot/grub/ and generates /boot/grub/grub image with ext2 and part_msdos modules embedded, as well as setting the prefix to '(hd0,msdos1)/grub' and sets the boot-device in nvram to 'hd' and then writes /boot/grub/grub to /dev/sda1 using dd (or similar).

Currently grub-install aborts if /boot/grub is not a separate partition.  This is not required on the IBM powerpc.  It also does not set the prefix, which is required, and it tries to set the boot-device to the disk with partition and grub filename.  The IBM firmware can't read filesystems and hence can't boot a file.  It only boots raw boot partitions.

My current setup actually uses two disks with md raid1 (which now works with patches done in the last few days), and by dd'ing grub to sda1 and sdb1 I have grub on both disks, and grub has no problem reading the other files from (md/0)/boot/grub on my ext4 root filesystem on raid.  The only thing missing now (with the latest patches on the mailing list applies) is for grub-install to learn how to actually do the install itself.  Not having to create the devaliases would be a bonus of course, but not essential.

Len Sorensen <lsorense>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by lsorense (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-01 phcoder StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code