Skip to contentSkip to conversation

grub2 on power6 box.

DISCUSSION Lennart Sorensen 3 participants 18 messages Jul 22, 2010 – Aug 9, 2010

lore
Share & tools
lore
#0 lore raw

I am trying to use grub2 to boot an IBM p520 power6 box. I know yaboot can do the job, but it doesn't deal with software raid, ext4, LVM or anything else useful.

I have managed to get as far as booting to a grub prompt from disk. Unfortunately it doesn't appear to be seeing any disks at that point.

The way I got it this far was to create an 8MB (smallest cfdisk would make) PReP boot partition, and then run grub-mkimage -n -o /tmp/grub -O powerpc-ieee1275 *.mod in the ieee1275 grub directory. I then dd'd /tmp/grub to /dev/sda1 (the PReP boot partition).

At boot, the firmware loads the partition and runs it and after a few seconds I get a grub prompt.

I know I don't need all the modules, but starting with all of them seemed simpler.

So is this supposed to work, or is there still some ofpath handling or other things that have to be fixed before grub2 can detect disks on this machine? If so, I will try to do it, but some hints would be handy. It certainly looks very close to working.

Thanks.

Signature · 1 line
Len Sorensen
#1 lore raw
Quoted 4 lines · Lennart Sorensen

I am trying to use grub2 to boot an IBM p520 power6 box. I know yaboot can do the job, but it doesn't deal with software raid, ext4, LVM or anything else useful.

Quoted 9 lines

I have managed to get as far as booting to a grub prompt from disk. Unfortunately it doesn't appear to be seeing any disks at that point.

The way I got it this far was to create an 8MB (smallest cfdisk would make) PReP boot partition, and then run grub-mkimage -n -o /tmp/grub -O powerpc-ieee1275 *.mod in the ieee1275 grub directory. I then dd'd /tmp/grub to /dev/sda1 (the PReP boot partition).

You need to add -p "<your /boot/grub in grub notation>". Also avoid the raid and lvm-related modules you don't need. OFW exposes ghost devices so assembling raids which involves looking at all devices is slow

Quoted 14 lines

At boot, the firmware loads the partition and runs it and after a few seconds I get a grub prompt.

I know I don't need all the modules, but starting with all of them seemed simpler.

So is this supposed to work, or is there still some ofpath handling or other things that have to be fixed before grub2 can detect disks on this machine? If so, I will try to do it, but some hints would be handy. It certainly looks very close to working.

Thanks.

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
Quoted 14 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 4 lines · Lennart Sorensen

I am trying to use grub2 to boot an IBM p520 power6 box. I know yaboot can do the job, but it doesn't deal with software raid, ext4, LVM or anything else useful.

Quoted 9 lines

I have managed to get as far as booting to a grub prompt from disk. Unfortunately it doesn't appear to be seeing any disks at that point.

The way I got it this far was to create an 8MB (smallest cfdisk would make) PReP boot partition, and then run grub-mkimage -n -o /tmp/grub -O powerpc-ieee1275 *.mod in the ieee1275 grub directory. I then dd'd /tmp/grub to /dev/sda1 (the PReP boot partition).

Quoted 3 lines

You need to add -p "<your /boot/grub in grub notation>". Also avoid the raid and lvm-related modules you don't need. OFW exposes ghost devices so assembling raids which involves looking at all devices is slow

I will try that (although I think I did).

I can't even get it to do ls on any disk or anything. It really seems to be behaving as if it doesn't detect any disks.

Signature · 1 line
Len Sorensen
#3 lore raw
Quoted 15 lines · Lennart Sorensen
Quoted 14 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 13 lines · Lennart Sorensen

I am trying to use grub2 to boot an IBM p520 power6 box. I know yaboot can do the job, but it doesn't deal with software raid, ext4, LVM or anything else useful.

I have managed to get as far as booting to a grub prompt from disk. Unfortunately it doesn't appear to be seeing any disks at that point.

The way I got it this far was to create an 8MB (smallest cfdisk would make) PReP boot partition, and then run grub-mkimage -n -o /tmp/grub -O powerpc-ieee1275 *.mod in the ieee1275 grub directory. I then dd'd /tmp/grub to /dev/sda1 (the PReP boot partition).

Quoted 8 lines
Quoted 3 lines

You need to add -p "<your /boot/grub in grub notation>". Also avoid the raid and lvm-related modules you don't need. OFW exposes ghost devices so assembling raids which involves looking at all devices is slow

I will try that (although I think I did).

I can't even get it to do ls on any disk or anything. It really seems to be behaving as if it doesn't detect any disks.

So I fixed ofpathname (it was not working because it did find /sys -name $device, which mathes multiple things on modern kernels). I changed the find to find /sys -type d -name $device and now that works. So now I can run grub-install, but of course that just creates a /boot/grub/grub file with the main grub and a filesystem module attached. It doesn't actually boot.

It set the boot_device=/pci@800000020000200/pci1014,02BD@1/sas/disk@20000:4,\grub

/dev/sda4 is a fat16 partition mounted as /boot/grub. Unfortunately I am not convinced the IBM boxes know how to read filesystems or boot files. It seems it only wants to read raw from a PReP boot partition. So when I dd /boot/grub/grub to /dev/sda1 (an 8MB PReP boot partition) the system does start grub, but of course since grub was only the core plus the fat module, it just says:

Welcome to GRUB!

error: no device is set.
Entering rescue mode...
grub rescue>

So what do I do then to get it to know what device to use?

Signature · 1 line
Len Sorensen
#4 lore raw
Quoted 46 lines · Lennart Sorensen
Quoted 18 lines · Lennart Sorensen
Quoted 16 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 14 lines · Lennart Sorensen

I am trying to use grub2 to boot an IBM p520 power6 box. I know yaboot can do the job, but it doesn't deal with software raid, ext4, LVM or anything else useful.

I have managed to get as far as booting to a grub prompt from disk. Unfortunately it doesn't appear to be seeing any disks at that point.

The way I got it this far was to create an 8MB (smallest cfdisk would make) PReP boot partition, and then run grub-mkimage -n -o /tmp/grub -O powerpc-ieee1275 *.mod in the ieee1275 grub directory. I then dd'd /tmp/grub to /dev/sda1 (the PReP boot partition).

Quoted 9 lines
Quoted 4 lines

You need to add -p "<your /boot/grub in grub notation>". Also avoid the raid and lvm-related modules you don't need. OFW exposes ghost devices so assembling raids which involves looking at all devices is slow

I will try that (although I think I did).

I can't even get it to do ls on any disk or anything. It really seems to be behaving as if it doesn't detect any disks.

So I fixed ofpathname (it was not working because it did find /sys -name $device, which mathes multiple things on modern kernels). I changed the find to find /sys -type d -name $device and now that works. So now I can run grub-install, but of course that just creates a /boot/grub/grub file with the main grub and a filesystem module attached. It doesn't actually boot.

It set the boot_device=/pci@800000020000200/pci1014,02BD@1/sas/disk@20000:4,\grub

/dev/sda4 is a fat16 partition mounted as /boot/grub. Unfortunately I am not convinced the IBM boxes know how to read filesystems or boot files. It seems it only wants to read raw from a PReP boot partition. So when I dd /boot/grub/grub to /dev/sda1 (an 8MB PReP boot partition) the system does start grub, but of course since grub was only the core plus the fat module, it just says:

Quoted 9 lines

Welcome to GRUB!

error: no device is set.
Entering rescue mode...
grub rescue>

So what do I do then to get it to know what device to use?

Right now grub2 lists only aliased devices. You can either alias your disk or directly use:

prefix=(/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000,4)/
I have some code on ls issue but the problem is to reliably determine if 2 nodes are really the same device

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#5 lore raw
Quoted 2 lines · Vladimir 'φ-coder/phcoder' Serbinenko

Right now grub2 lists only aliased devices. You can either alias your disk or directly use:

Unfortunately I think IBM doesn't generate aliases at all. I have no idea how to set one (I can't find any documentation on what commands are available on IBM's openfirmware).

Quoted 2 lines

prefix=(/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000,4)/
I have some code on ls issue but the problem is to reliably determine if 2 nodes are really the same device

So that syntax should work?

I tried doing something like:
ls (/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000,4)/

It didn't like it.

ls (/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000:4)/

didn't work either as far as I recall.

I will keep trying though.

Signature · 1 line
Len Sorensen
#6 lore raw
Quoted 16 lines · Lennart Sorensen
Quoted 2 lines · Vladimir 'φ-coder/phcoder' Serbinenko

Right now grub2 lists only aliased devices. You can either alias your disk or directly use:

Unfortunately I think IBM doesn't generate aliases at all. I have no idea how to set one (I can't find any documentation on what commands are available on IBM's openfirmware).

Quoted 2 lines

prefix=(/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000,4)/
I have some code on ls issue but the problem is to reliably determine if 2 nodes are really the same device

So that syntax should work?

I tried doing something like:
ls (/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000,4)/

Quoted 7 lines

It didn't like it.

ls (/pci@800000020000200/pci1014\,02BD@1/sas/disk@20000:4)/

didn't work either as far as I recall.

I will keep trying though.

OK, so after setting the devalias I tried booting grub from the PReP boot partition I dd'd it to. Now I get:

grub> ls (
Possible devices are:

md0 md1 hd
grub> ls (
Possible devices are:

md0 md1 hd
grub> ls (hd,
Possible partitions are:

Partition hd,msdos1: Unknown filesystem
Partition hd,msdos2: Filesystem type ext2 - Label "ROOT" - Last modification time

2010-07-23 16:19:51 Friday, UUID 43073e86-01fb-4371-8598-863fbd0beddf                                                                                                                                                                                                          
        Partition hd,msdos3: Unknown filesystem                                                                                                                                                                                                                                
        Partition hd,msdos4: Filesystem type fat, UUID 4183-cb50                                                                                                                                                                                                               

grub> ls (hd,msdos
Possible partitions are:

Partition hd,msdos1: Unknown filesystem
Partition hd,msdos2: Filesystem type ext2 - Label "ROOT" - Last modification time

2010-07-23 16:19:51 Friday, UUID 43073e86-01fb-4371-8598-863fbd0beddf                                                                                                                                                                                                          
        Partition hd,msdos3: Unknown filesystem                                                                                                                                                                                                                                
        Partition hd,msdos4: Filesystem type fat, UUID 4183-cb50                                                                                                                                                                                                               

grub> ls (hd,msdos

Now we are getting somewhere. So it seems even with a fat12 partition, the open firmware on the IBM box still won't boot from a file.

Unfortunately on reboot, my devalias is gone. How do I make it remember it?

Signature · 1 line
Len Sorensen
#7 lore raw
Quoted 4 lines · Lennart Sorensen

Now we are getting somewhere. So it seems even with a fat12 partition, the open firmware on the IBM box still won't boot from a file.

Unfortunately on reboot, my devalias is gone. How do I make it remember it?

Turns out using nvalias instead of devalias makes it permanent.

So I now boot to grub directly with an nvalias hd /pci.... set and boot-device set to hd (which means boot the PReP boot partition).

I now have to set root manually to (md0) and then load /boot/grub/grub.cfg as a configfile. Then I can boot. The fat partition is now needed at all. The grub image has mdraid, raid and ext modules included in it and then dd'd to the PReP partition.

So how do I convince grub where to look for the config, or should I create a small config file that sets the root and loads a config file and embed that in the image perhaps?

Signature · 1 line
Len Sorensen
#8 lore raw
Quoted 5 lines · Lennart Sorensen

Turns out using nvalias instead of devalias makes it permanent.

So I now boot to grub directly with an nvalias hd /pci.... set and boot-device set to hd (which means boot the PReP boot partition).

Quoted 8 lines

I now have to set root manually to (md0) and then load /boot/grub/grub.cfg as a configfile. Then I can boot. The fat partition is now needed at all. The grub image has mdraid, raid and ext modules included in it and then dd'd to the PReP partition.

So how do I convince grub where to look for the config, or should I create a small config file that sets the root and loads a config file and embed that in the image perhaps?

OK, I am now booting from the disk directly. Here are the steps I took. Perhaps someone can help make grub-install actually work out of the box on the IBM pSeries based on this.

I created a permanent devalias called hd using:
nvalias hd

I set boot-device to hd

The resulting nvram --print-config stuff is:
devalias valias hd /pci@800000020000200/pci1014,02BD@1/sas/disk@20000 use-nvramrc?=true
boot-device=hd

I have an msdos partition table on my two disks with:
8MB partition1 type 0x41 (PReP boot partition) 140GB partition2 type 0xfd (linux raid autodetect) 6GB partition3 type 0xfd (linux raid autodetect)

This is then turned into md0 (for the 140GB partitions) and md1 (for the 6GB partitions). md1 is swap, md0 is root filesystem.

Fixing ofpathname in powerpc-ibm-utils (debian package name) to use find /sys -type d -name $device makes it able to find the right OF pathnames, but grub is unable to use those at this time, hence the manual devalias above. If grub ever did support the actual path, then the devalias won't be needed and the ofpathname fix would be required.

I ran grub-install /dev/sda1 after hacking the script to not complain about /boot/grub not being a seperate partition (that applies to Macs and such, not the IBM). I noted what modules it generated /boot/grub/grub with. It got the list right (ext2, mdraid, raid in my case) except it missed that the partition table format is part_msdos. I added part_msdos and ram grub-mkimage again manually with the same arguments. I also added -p '(md0)/boot/grub' to embed the correct path to /boot/grub into the image. This was very important. I then dd'd /boot/grub/grub to /dev/sda1 and /dev/sdb1 (the PReP partitions) and set the partitions bootable (not that I think it matters if they are bootable).

After all that, the IBM pSeries p520 power6 now boots directly from disk.

So how would one explain to grub-install that it needs part_msdos when the partition tables that the md devices are running on are of type msdos? How would one make it automatically add the correct prefix (since it needs either (hd,msdos#)/boot/grub or (md0)/boot/grub or similar added instead of the default)? And of course finally it would have to dd to the target device, rather than just create a file and try to make the firmware boot that file. The boot device also has to be the full disk on the IBM, not a disk,partition,file combination.

But hey, at least it can work with a bit of manual work.

Thanks for the hints everyone.

Signature · 1 line
Len Sorensen
#9 lore raw
Quoted 9 lines · Lennart Sorensen

So how would one explain to grub-install that it needs part_msdos when the partition tables that the md devices are running on are of type msdos? How would one make it automatically add the correct prefix (since it needs either (hd,msdos#)/boot/grub or (md0)/boot/grub or similar added instead of the default)? And of course finally it would have to dd to the target device, rather than just create a file and try to make the firmware boot that file. The boot device also has to be the full disk on the IBM, not a disk,partition,file combination.

Normally it should be all autodetected. Could you file a bug report for this? Could you tell the commands to reproduce it? I have a PPC box but it has only one disk but a mdraid on partitions should do it.

Quoted 5 lines

But hey, at least it can work with a bit of manual work.

Thanks for the hints everyone.

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#10 lore raw
Quoted 10 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 9 lines · Lennart Sorensen

So how would one explain to grub-install that it needs part_msdos when the partition tables that the md devices are running on are of type msdos? How would one make it automatically add the correct prefix (since it needs either (hd,msdos#)/boot/grub or (md0)/boot/grub or similar added instead of the default)? And of course finally it would have to dd to the target device, rather than just create a file and try to make the firmware boot that file. The boot device also has to be the full disk on the IBM, not a disk,partition,file combination.

Quoted 3 lines

Normally it should be all autodetected. Could you file a bug report for this? Could you tell the commands to reproduce it? I have a PPC box but it has only one disk but a mdraid on partitions should do it.

Well the problem appears to be that grub-install does this:

# Then the partition map module. In order to support partition-less media,

# this command is allowed to fail (--target=fs already grants us that the
# filesystem will be accessible).
partmap_module=
for x in `$grub_probe --target=partmap --device ${grub_device} 2> /dev/null`; do
   partmap_module="$partmap_module part_$x";
done

Unfortunately there is nothing that defines ${grub_device} in the script. If it used the target install device, it would in fact get the right result.

Now of course another issue is that the script aborts if /boot/grub is not a seperate mount point. Well on the IBM powerpc there is no reason to make it a seperate mount point since you can't boot from a partition with a filesystem anyhow.

I am not sure how one would go about getting grub-install to figure out the grub name for the filesystem holding /boot/grub so that it can pass the prefix, since it could be (md0)/boot/grub or (md/0)/boot/grub

So where is the bug track system?

Signature · 1 line
Len Sorensen
#11 lore raw
Quoted 28 lines · Lennart Sorensen
Quoted 12 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 10 lines · Lennart Sorensen

So how would one explain to grub-install that it needs part_msdos when the partition tables that the md devices are running on are of type msdos? How would one make it automatically add the correct prefix (since it needs either (hd,msdos#)/boot/grub or (md0)/boot/grub or similar added instead of the default)? And of course finally it would have to dd to the target device, rather than just create a file and try to make the firmware boot that file. The boot device also has to be the full disk on the IBM, not a disk,partition,file combination.

Quoted 4 lines

Normally it should be all autodetected. Could you file a bug report for this? Could you tell the commands to reproduce it? I have a PPC box but it has only one disk but a mdraid on partitions should do it.

Well the problem appears to be that grub-install does this:

# Then the partition map module. In order to support partition-less media,

# this command is allowed to fail (--target=fs already grants us that the
# filesystem will be accessible).
partmap_module=
for x in `$grub_probe --target=partmap --device ${grub_device} 2> /dev/null`; do
   partmap_module="$partmap_module part_$x";
done
Quoted 4 lines

Unfortunately there is nothing that defines ${grub_device} in the script. If it used the target install device, it would in fact get the right result.

Thanks, fixed.

Quoted 5 lines

Now of course another issue is that the script aborts if /boot/grub is not a seperate mount point. Well on the IBM powerpc there is no reason to make it a seperate mount point since you can't boot from a partition with a filesystem anyhow.

Quoted 7 lines

I am not sure how one would go about getting grub-install to figure out the grub name for the filesystem holding /boot/grub so that it can pass the prefix, since it could be (md0)/boot/grub or (md/0)/boot/grub

So where is the bug track system?

https://savannah.gnu.org/bugs/?group=grub

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#12 lore raw
Quoted 5 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 4 lines

Unfortunately there is nothing that defines ${grub_device} in the script. If it used the target install device, it would in fact get the right result.

Thanks, fixed.

Great.

Quoted 5 lines
Quoted 5 lines

Now of course another issue is that the script aborts if /boot/grub is not a seperate mount point. Well on the IBM powerpc there is no reason to make it a seperate mount point since you can't boot from a partition with a filesystem anyhow.

Quoted 8 lines
Quoted 7 lines

I am not sure how one would go about getting grub-install to figure out the grub name for the filesystem holding /boot/grub so that it can pass the prefix, since it could be (md0)/boot/grub or (md/0)/boot/grub

So where is the bug track system?

https://savannah.gnu.org/bugs/?group=grub

I guess I can create a bug about grub-install on IBM powerpc machines along with details of how to make it actually boot.

Signature · 1 line
Len Sorensen
#13 lore raw
In reply to Lennart Sorensen
Quoted 25 lines · Lennart Sorensen
Quoted 10 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 9 lines · Lennart Sorensen

So how would one explain to grub-install that it needs part_msdos when the partition tables that the md devices are running on are of type msdos? How would one make it automatically add the correct prefix (since it needs either (hd,msdos#)/boot/grub or (md0)/boot/grub or similar added instead of the default)? And of course finally it would have to dd to the target device, rather than just create a file and try to make the firmware boot that file. The boot device also has to be the full disk on the IBM, not a disk,partition,file combination.

Quoted 3 lines

Normally it should be all autodetected. Could you file a bug report for this? Could you tell the commands to reproduce it? I have a PPC box but it has only one disk but a mdraid on partitions should do it.

Well the problem appears to be that grub-install does this:

# Then the partition map module. In order to support partition-less media,

# this command is allowed to fail (--target=fs already grants us that the
# filesystem will be accessible).
partmap_module=
for x in `$grub_probe --target=partmap --device ${grub_device} 2> /dev/null`; do
   partmap_module="$partmap_module part_$x";
done
Quoted 8 lines

Unfortunately there is nothing that defines ${grub_device} in the script. If it used the target install device, it would in fact get the right result.

Now of course another issue is that the script aborts if /boot/grub is not a seperate mount point. Well on the IBM powerpc there is no reason to make it a seperate mount point since you can't boot from a partition with a filesystem anyhow.

OF can understand FAT12 filesystem. So the procedure is to mount a FAT12 partition in /boot/grub and then run grub-install (I have done this before and I boot trough the FAT12
partition). You could do something like:

boot hd:1,grub

Quoted 6 lines

I am not sure how one would go about getting grub-install to figure out the grub name for the filesystem holding /boot/grub so that it can pass the prefix, since it could be (md0)/boot/grub or (md/0)/boot/grub

So where is the bug track system?

#14 lore raw
Quoted 5 lines · Manoel Rebelo Abraches

OF can understand FAT12 filesystem. So the procedure is to mount a FAT12 partition in /boot/grub and then run grub-install (I have done this before and I boot trough the FAT12
partition). You could do something like:

boot hd:1,grub

Doesn't work on an IBM pSeries. So it seems _some_ OF designs support FAT12. IBMs does not or at least not with that syntax.

FAT12 didn't help. It simply won't do it. Putting grub raw on a PReP boot partition does work though.

Signature · 1 line
Len Sorensen
#15 lore raw
In reply to Lennart Sorensen
Quoted 32 lines · Lennart Sorensen
Quoted 15 lines · Lennart Sorensen
Quoted 14 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 13 lines · Lennart Sorensen

I am trying to use grub2 to boot an IBM p520 power6 box. I know yaboot can do the job, but it doesn't deal with software raid, ext4, LVM or anything else useful.

I have managed to get as far as booting to a grub prompt from disk. Unfortunately it doesn't appear to be seeing any disks at that point.

The way I got it this far was to create an 8MB (smallest cfdisk would make) PReP boot partition, and then run grub-mkimage -n -o /tmp/grub -O powerpc-ieee1275 *.mod in the ieee1275 grub directory. I then dd'd /tmp/grub to /dev/sda1 (the PReP boot partition).

Quoted 8 lines
Quoted 3 lines

You need to add -p "<your /boot/grub in grub notation>". Also avoid the raid and lvm-related modules you don't need. OFW exposes ghost devices so assembling raids which involves looking at all devices is slow

I will try that (although I think I did).

I can't even get it to do ls on any disk or anything. It really seems to be behaving as if it doesn't detect any disks.

So I fixed ofpathname (it was not working because it did find /sys -name $device, which mathes multiple things on modern kernels). I changed the find to find /sys -type d -name $device and now that works. So now I can run grub-install, but of course that just creates a /boot/grub/grub file with the main grub and a filesystem module attached. It doesn't actually boot.

Quoted 6 lines

It set the boot_device=/pci@800000020000200/pci1014,02BD@1/sas/disk@20000:4,\grub

/dev/sda4 is a fat16 partition mounted as /boot/grub. Unfortunately I am not convinced the IBM boxes know how to read filesystems or boot files. It seems it only wants to read raw from a PReP boot partition.

OF can read FAT12 filesystem.
you could format it with fat 12 and then mount it at /boot/grub. then you can use grub-install and grub-mkconfig to create a grub.cfg
I think the easiest way is to set a devalias in OF to point to you
device:
devalias hd /pci@800000020000200/pci1014,02BD@1/sas/disk@20000 then it should appear when you use the 'ls' command.
you could also set boot-device to
hd:<parnumber>,grub
since OF can read FAT12 filesystem it will be able to find grub there.

Quoted 12 lines

So when I dd /boot/grub/grub to /dev/sda1 (an 8MB PReP boot partition) the system does start grub, but of course since grub was only the core plus the fat module, it just says:

Welcome to GRUB!

error: no device is set.
Entering rescue mode...
grub rescue>

So what do I do then to get it to know what device to use?

Signature · 5 lines
Best Regards,

Manoel Rebelo Abranches
Software engineer
IBM - Linux Technology Center - Brazil
#16 lore raw
Quoted 1 line · Manoel Rebelo Abraches

OF can read FAT12 filesystem.

FAT12, but not FAT16? How convinient. Must try that.

Quoted 9 lines

you could format it with fat 12 and then mount it at /boot/grub. then you can use grub-install and grub-mkconfig to create a grub.cfg
I think the easiest way is to set a devalias in OF to point to you
device:
devalias hd /pci@800000020000200/pci1014,02BD@1/sas/disk@20000 then it should appear when you use the 'ls' command.
you could also set boot-device to
hd:<parnumber>,grub
since OF can read FAT12 filesystem it will be able to find grub there.

Hmm. Neat. I will give that a try.

So with /dev/sda4 a fat partition, I still didn't have any luck with:

boot hd:4,\grub

I just get:

0 > boot hd:4,\grub ok
0 >

Signature · 1 line
Len Sorensen
#17 lore raw
Quoted 10 lines · Lennart Sorensen

Hmm. Neat. I will give that a try.

So with /dev/sda4 a fat partition, I still didn't have any luck with:

boot hd:4,\grub

I just get:

0 > boot hd:4,\grub ok
0 >

So right now I have this state:

If I go to the open firmware prompt and do:

devalias hd /pci@800000020000200/pci1014,02BD@1/sas/disk@20000 boot hd

Then I can boot the grub image I dd'd to the /dev/sda1 PReP boot partition. I can then boot linux after loading the configfile manually (grub doesn't seem to know /dev/sda4 is where to look for it since it booted from /dev/sda1 I guess).

The devalias won't stay across reboots (Rather annoying).

So I can now boot from disk with some manual intervention. That's getting really close then.

Signature · 1 line
Len Sorensen