State of GRUB on PowerPC
Hello list,
Many months after my last try, I've given GRUB2 a go on my G4-based Apple laptop.
For this, I used Debian's 1st of December snapshot packaged to experimental.
Thanks to daChaac, the IRC hero once again ;) the executive summary changed from "frustrating failure" to "works with quite a few quirks".
- grub-install generated an incorrect device.map. I've discussed this here
before: my OpenFirmware calls my hard disk "hd", not "hd0", but grub-mkdevicemap will insist in adding the number. I corrected that manually.
- GRUB2 will load correctly and will display a menu, but will fail to load Linux, giving a fun error "initrd: command not found". Some modules needed by my grub.cfg are missing: _linux, linux, elf and search.
Loading linux.mod was challenging. insmod linux would result in a "file not found" error. I have two partitions that matter when booting:
hd,2 is the Apple_bootstrap hfs partition, and holds all my grub stuff. hd,3 is my Debian partition, and holds /usr/lib/grub.
daChaac helped me finding the deps for linux.mod, and loading them sequentially made the module load:
grub> insmod elf
grub> insmod (hd,3)/usr/lib/grub/powerpc-ieee1275/_linux.mod grub> insmod (hd,3)/usr/lib/grub/powerpc-ieee1275/linux.mod
This gets linux loaded, and things start to be smoother.
However, going back to the menu and trying to boot fails with "you need to load your kernel first". Damn.
Right, my menu entry includes a search command, which isn't loaded
grub> insmod search
But this still fails miseraby.
On the command-line, I copied the "search --fs-uuid --set" line from my grub.cfg, and
1) it printed "no such device" and errored out ($?=12, GRUB_ERR_UNKNOWN_DEVICE)
2) set my root variable to (second-boot).
Our guess is that this second-boot device has the same uuid as hd or hd,3 and that makes search fail or whatever.
if I do "ls", I get hd + its partitions, ide0, ide1, first-boot and second-boot. ls (first-boot) gives:
Device first-boot: partition table
and ls (first-boot)/ gives the "unknown filesystem" error.
Finally, if I get rid of the search command and change my root device to simply /dev/hda3, linux is able to boot and I remain happy.
So, in short, a few problems:
- grub-mkdevicemap insists on calling my drive by another name (hd0 vs hd)
- what's going on with linux.mod loading? I won't rule out a hfs fs bug, and I'll format to find out, but it could be a hfs.mod bug too. Some modules load, some others don't.
- why wasn't search.mod loaded?
- what to do about second-boot confusing search?
Ah, also, my menu appears as white on red colours, but this is so minor at this point I was not even going to mention it. :)
Hopefully some OF expert can have a look at some of this.
Thanks,
Jordi
Signature · 3 lines
Jordi Mallach Pérez -- Debian developer http://www.debian.org/ [email protected] [email protected] http://www.sindominio.net/ GnuPG public key information available at http://oskuro.net/
I'm working in a patch to make the install process better. I ĺl send it soon, once some license issues are resolved.
Quoted 7 lines · Jordi Mallach
Hello list,
Many months after my last try, I've given GRUB2 a go on my G4-based Apple laptop.
For this, I used Debian's 1st of December snapshot packaged to experimental.
Quoted 7 lines
Thanks to daChaac, the IRC hero once again ;) the executive summary changed from "frustrating failure" to "works with quite a few quirks".
- grub-install generated an incorrect device.map. I've discussed this here
before: my OpenFirmware calls my hard disk "hd", not "hd0", but grub-mkdevicemap will insist in adding the number. I corrected that manually.
grub-mkconfig will not use that in the future but use ofpathname instead.
Quoted 44 lines
- GRUB2 will load correctly and will display a menu, but will fail to load Linux, giving a fun error "initrd: command not found". Some modules needed by my grub.cfg are missing:
_linux, linux, elf and search.Loading linux.mod was challenging.
insmod linuxwould result in a "file not found" error. I have two partitions that matter when booting:
hd,2 is theApple_bootstraphfs partition, and holds all my grub stuff. hd,3 is my Debian partition, and holds/usr/lib/grub.daChaac helped me finding the deps for linux.mod, and loading them sequentially made the module load:
grub> insmod elf
grub> insmod (hd,3)/usr/lib/grub/powerpc-ieee1275/_linux.mod grub> insmod (hd,3)/usr/lib/grub/powerpc-ieee1275/linux.modThis gets linux loaded, and things start to be smoother.
However, going back to the menu and trying to boot fails with "you need to load your kernel first". Damn.
Right, my menu entry includes a search command, which isn't loaded
grub> insmod search
But this still fails miseraby.
On the command-line, I copied the "search --fs-uuid --set" line from my grub.cfg, and
1) it printed "no such device" and errored out ($?=12,GRUB_ERR_UNKNOWN_DEVICE)
2) set my root variable to (second-boot).Our guess is that this second-boot device has the same uuid as hd or hd,3 and that makes search fail or whatever.
if I do "ls", I get hd + its partitions, ide0, ide1, first-boot and second-boot.
ls (first-boot)gives:
Device first-boot: partition table
andls (first-boot)/gives the "unknown filesystem" error.Finally, if I get rid of the search command and change my root device to simply
/dev/hda3, linux is able to boot and I remain happy.
Quoted 6 lines
So, in short, a few problems:
- grub-mkdevicemap insists on calling my drive by another name (hd0 vs hd)
- what's going on with linux.mod loading? I won't rule out a hfs fs bug, and I'll format to find out, but it could be a hfs.mod bug too. Some modules load, some others don't.
that's strange, i did my tests with a FAT partition so I can't tell at the moment.
Quoted 1 line
- why wasn't search.mod loaded?
I think the search module isn't working in powerrPC, i have to look better at it.
Quoted 13 lines
- what to do about second-boot confusing search?
Ah, also, my menu appears as white on red colours, but this is so minor at this point I was not even going to mention it. :)
Hopefully some OF expert can have a look at some of this.
Thanks,
Jordi
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
Best Regards, Manoel Abranches <[email protected]> IBM Linux Technology Center Brazil
Hello,
Just a little correction, I was really tired when I wrote this down the other day:
Quoted 6 lines · Jordi Mallach
On the command-line, I copied the "search --fs-uuid --set" line from my grub.cfg, and
1) it printed "no such device" and errored out ($?=12,GRUB_ERR_UNKNOWN_DEVICE)
2) set my root variable to (second-boot).
Quoted 7 lines
Our guess is that this second-boot device has the same uuid as hd or hd,3 and that makes search fail or whatever.
if I do "ls", I get hd + its partitions, ide0, ide1, first-boot and second-boot.
ls (first-boot)gives:
Device first-boot: partition table
andls (first-boot)/gives the "unknown filesystem" error.
So, what the search command sets my root variable to is "first-boot", not second boot.
The search command does print a "no such device" message, but our guess is that it's caused by search trying to look into second-boot.
Thanks,
Jordi
Signature · 3 lines
Jordi Mallach Pérez -- Debian developer http://www.debian.org/ [email protected] [email protected] http://www.sindominio.net/ GnuPG public key information available at http://oskuro.net/