Hi Bob,
This works for me on a Lombard PowerBook, the oldest NewWorld PowerBook. Apparently its Open Firmware is too old to use GRUB.
1) I use Debian 7.8 to manage my yaboot configuration. This isn't much of an inconvenience, since I want to be able to boot Debian 7.8, anyway, and my yaboot configuration doesn't change very often.
2) I'm able to boot Mac OS 9.2.2, Debian 7.8, Debian SID, and Gentoo via yaboot.
3) I can manually configure my boot device, root device and so on by manually editing /etc/yaboot.conf in Debian 7.8, then run "ybin -v" (also in Debian 7.8) to save the configuration to the Apple_Bootstrap partition.
Here's my disk layout:
# parted -l
Model: ATA ST9120821A (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: mac
Number Start End Size File system Name Flags
1 512B 32.8kB 32.3kB Apple
2 32.8kB 60.4kB 27.6kB Macintosh
3 60.4kB 98.3kB 37.9kB Macintosh
4 98.3kB 126kB 27.6kB Macintosh
5 126kB 164kB 37.9kB Macintosh
6 164kB 134MB 134MB hfs Apple_Bootstrap boot
7 134MB 2282MB 2147MB hfs+ MacOS
8 2282MB 10.9GB 8590MB ext3 Debian_7
9 10.9GB 28.1GB 17.2GB ext3 Debian_sid
10 28.1GB 45.2GB 17.2GB ext3 Gentoo
11 45.2GB 46.3GB 1074MB linux-swap(v1) swap swap
12 46.3GB 111GB 65.1GB ext3 data
13 111GB 120GB 8590MB hfs+ Data
Here's my /etc/yaboot.conf:
-----
boot="/dev/disk/by-id/scsi-SATA_ST9120821A_3PL03XXL-part6"
device=/pci@80000000/mac-io@10/ata-3@20000/@0
timeout=50
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
macos=/pci@80000000/mac-io@10/ata-3@20000/@0:7
enablecdboot
image=/boot/vmlinux
label=Debian_7
partition=8
root=/dev/sda8
read-only
initrd=/boot/initrd.img
image=/boot/vmlinux
label=Debian_sid
partition=9
root=/dev/sda9
read-only
initrd=/boot/initrd.img
image=/boot/vmlinux
label=Gentoo
partition=10
root=/dev/sda10
read-only
initrd=/boot/initrd.img
-----
It looks like "boot" above could be set to this:
"/pci@80000000/mac-io@10/ata-3@20000/@0"
And I could specify the Open Firmware names instead for /dev/sda8, /dev/sda9 and /dev/sda10.
Running ofpath from Debian SID:
# ofpath /dev/sda6
/pci@80000000/mac-io@10/ata-3@20000/@0:6
# ofpath /dev/sda
/pci@80000000/mac-io@10/ata-3@20000/@0
# ofpath /dev/sda7
/pci@80000000/mac-io@10/ata-3@20000/@0:7
# ofpath /dev/sda8
/pci@80000000/mac-io@10/ata-3@20000/@0:8
# ofpath /dev/sda9
/pci@80000000/mac-io@10/ata-3@20000/@0:9
# ofpath /dev/sda10
/pci@80000000/mac-io@10/ata-3@20000/@0:10
It's not necessary to use an initrd if you have everything you need in the kernel. However, I do use an initrd, specifying "/boot/vmlinux" for the kernel and "/boot/initrd.img" for the initrd for each distribution. I then use symbolic links in each /boot so I don't have to update yaboot every time I change a kernel. For example, in Debian SID:
# ls -l /boot/vmlinux*
lrwxrwxrwx 1 root root 23 Nov 29 09:32 /boot/vmlinux -> vmlinux-5.10.0-rc5-pmac
-rwxr-xr-x 1 root root 11831940 Nov 29 09:31 /boot/vmlinux-5.10.0-rc5-pmac
# ls -l /boot/initrd*
lrwxrwxrwx 1 root root 26 Nov 29 09:34 /boot/initrd.img -> initrd.img-5.10.0-rc5-pmac
-rw-r--r-- 1 root root 5731569 Dec 16 10:02 /boot/initrd.img-5.10.0-rc5-pmac
It's possible that GRUB could be made to work wherever yaboot works, but for me, yaboot configuration files are easier to understand and maintain (I use GRUB on Intel-based Macs and yaboot on PowerPC-based Macs).
Hope that helps.
-Stan Johnson
On 2/19/21 11:01 PM, Bob McGowan wrote:
> On 2/19/21 4:09 PM, John Paul Adrian Glaubitz wrote:
>> Hi Bob!
>>
>> On 2/19/21 7:47 AM, Bob McGowan wrote:
>>> The kernel prints a bunch of normal type lines, then panics because it can't find the root
>>> device. It also reports a list of partitions it can find. The only disks are the ram disk
>>> (partitions 0-15) and sr0.
>>>
>>> This looks like it is missing drivers for the SCSI cards, but the CD kernel had no problems
>>> and I thought the kernel placed on sda3 would have them also. That kernel is what I copied
>>> to the 9G disk.
>> You're missing the initrd. You're just providing a kernel and the root device, but the drivers
>> for the root device are stored in the initrd.
>>
>> The initrd is stored next to the kernel, so you just need to edit your yaboot.conf to have
>> the initrd variable point to the correct name.
>>
>> Adrian
>>
> Thanks Adrian. I'll give this some work next week.
>
> Bob
>