Re: rs/6000 kernel help


Subject: Re: rs/6000 kernel help
From: Todd Inglett (tinglett@bresnanlink.net)
Date: Fri Jan 05 2001 - 21:36:16 MST


Hollis R Blanchard wrote:
>
[...]
> I'm aware that CHRP machines *can* use a PPC Boot partition, but with OF
> they shouldn't have to. If you can 'boot floppy:\ZIMAGE', why can't you
> boot from a file on a FAT partition?

Yes, you can. As noted already, there are two ways to make the zImage
available for OF to boot. It can be stored raw on a PReP (type 41)
partition, or it can be stored as a file in a FAT (type 2, IIRC)
filesystem. **I have found that in both cases the partition must be
less than 8MB for this to work.** I'm not sure why, but it is possible
that OF blindly sucks the whole thing in to decode the filesystem.

As with the PReP partition, OF should find the first suitable FAT
partition to boot. You can force the partition number by specifying it
on the device name after the colon (e.g. boot disk:2,\zimage
root=/dev/fd0 blah...).

And there is another cool thing you can do with a FAT filesystem: you
can enable the multiboot stuff.

Write a text file, typically called "bootinfo.txt" with contents like
this and put it in your type 2 FAT partition:

<chrp-boot>
  <description>My test kernel</description>
  <os-name>Linux 2.4.0-ac1</os-name>
  <boot-script>boot disk:,\zimage root=/dev/sda3
console=ttyS0</boot-script>
</chrp-boot>

Now you can "boot" this file if you like (e.g. boot
disk:1,\bootinfo.txt) and it will provide the kernel args for you. But
to be most useful you want to tell the multiboot menu about it. To do
this simply set an OF var:

0> setenv bootinfo-linux disk:,\bootinfo.txt

The OF var name must start with "bootinfo-" and the rest you can make
up. Use care because I'm not sure if you can actually delete these vars
without clearing nvram (don't specify removable media like the cdrom. I
found that out the hard way :(). Now hit F1 as the machine boots to get
into the SMS menu. To into the multiboot menu and you should see "Linux
2.4.0-ac1" as an image to boot. This string comes from the <os-name> in
the bootinfo.txt file. If you have AIX on another disk it also can be
booted from this menu (do a printenv at the OF prompt and you should see
a var called "bootinfo-aix". And you should be able to check a box to
say you want the machine to boot into the multiboot menu. At this point
I think this is the only way to dual-boot an RS/6000 between linux and
AIX. Otherwise if you are using only Linux you can also install yaboot
(again, either as a FAT file or raw on a PReP partition). Yaboot can
boot kernels straight out of the ext2 filesystems which is very nice, of
course. If you are crazy you can use multiboot to select between AIX
and yaboot, and use yaboot to pick a linux kernel. Whatever. The
combinations work.

Good luck! Hopefully, I got all my facts straight. Holler if you have
troubles. I've had this working on several different models.

Reminder: this info is for chrp machines, including the 150, B50, 170,
270, F50, B80, etc. With older prep machines (7248, 850) you don't have
Open Firmware and can't do this. It should work on the 140 provided you
have the latest firmware -- once we get that puppy running linux....

-- 
todd inglett



This archive was generated by hypermail 2a24 : Fri Jan 05 2001 - 21:37:04 MST