Help!

Question about booting

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Ports PowerPC RSS
Next:  Today I played with dh-make-perl...  
Author Message
"Martín_Ferrari
External


Since: Mar 28, 2006
Posts: 15



PostPosted: Wed Aug 08, 2007 2:13 am    Post subject: Question about booting
Archived from groups: linux>debian>ports>powerpc (more info?)

Hi,

I'm working on a tool for testing the Debian CDs for the Google Summer
of Code (http://pancutan.alioth.debian.org/), this tool will run all
sort of tests over the iso files, and I'm fairly lost about the
different booting methods in powerpc (which I will inspect to be sure
that the cd is bootable in all arches). So as people that know the
architecture, maybe you can give me some pointers, sorry if this is
offtopic here.

So far, I've found that:

- the CDs are build as hybrid ISO9660+hfs, with an APM partition. But
the partition lists a boot area of size 0. What's that partition for?
- the image also has an MBR partition with invalid physical addresses
and I couldn't figure what's for,
- the /install folder is -hfs-blessed, but don't know what that means,
- there is prep boot support, but I don't know the format of the boot
file, nor I could find any information on how this works,
- there is a bootfile.txt file for chrp booting, but don't know if
that is triggered by something else or the OF loads it automatically,
- there is another chrp descriptor called ofboot.b, but I don't know what it is,
- there is a forth script for pegasos, but I don't know how's that loaded,
- the yaboot boot loader is present, but I couldn't find what enables it,
- there is a ElTorito boot descriptor, with invalid checksum, and finally,
- I don't know how these parts relate to each other for each subarch Smile

Thanks in advance for anything that you could help me with.

PS: please CC me, I'm not subscribed.

--
Martín Ferrari
Back to top
Brad Boyer
External


Since: Jun 13, 2004
Posts: 92



PostPosted: Wed Aug 08, 2007 8:50 am    Post subject: Re: Question about booting [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, Aug 08, 2007 at 02:24:51AM +0100, Martín Ferrari wrote:
> I'm working on a tool for testing the Debian CDs for the Google Summer
> of Code (http://pancutan.alioth.debian.org/), this tool will run all
> sort of tests over the iso files, and I'm fairly lost about the
> different booting methods in powerpc (which I will inspect to be sure
> that the cd is bootable in all arches). So as people that know the
> architecture, maybe you can give me some pointers, sorry if this is
> offtopic here.
>
> So far, I've found that:
>
> - the /install folder is -hfs-blessed, but don't know what that means,
> - there is another chrp descriptor called ofboot.b, but I don't know what it is,
> - the yaboot boot loader is present, but I couldn't find what enables it,

These parts are used for the Mac subarchitecture, although I believe
yaboot and ofboot.b are also used on other types.

An HFS or HFS+ filesystem can have a single folder marked as blessed.
This is recorded in the equivalent of a super block on disk. The
firmware can use this as a shortcut to find the bootloader on the
filesystem instead of using a fixed block location method for loading
an operating system. For example, the boot-device setting in the
firmware on my PowerMac G5 is the following:

/ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:2,\\:tbxi

This is the path to the device and the search path on the filesystem
on that device to find the bootloader. (Hypertransport, then PCI, then
the SATA controller, then one bus, then one disk, then a partition,
then a path on the filesystem on that disk.) In particular, the \\ near
the end means to look in the blessed folder on the filesystem. The rest
of the path is a special Mac shortcut that says to look for a
particular file type (tbxi is a code for a bootloader). Older Mac ROM
code was hard-coded to only look in the blessed folder for the System
file.

Because of this, booting from a blessed folder on a CD could use a
boot path as simple as "cd:,\\:tbxi".

The ofboot.b file is a way to give boot options and configuration
to Open Firmware. I haven't used it on a CHRP system, but on a Mac
it allows you to set an icon for a drive and load a secondary
bootloader. The ofboot.b file is generally given the HFS file
type of tbxi to fit in with the default settings Apple sets. Here
are the relevant files on a real install:

# hmount /dev/sda2
Volume name is "bootstrap"
Volume was created on Sat Jul 10 23:10:57 2004
Volume was last modified on Sun Jul 3 13:43:28 2005
Volume has 649216 bytes free
# hls -l
f tbxi/UNIX 0 3109 Jul 3 2005 ofboot.b
f boot/UNIX 0 149740 Jul 3 2005 yaboot
f conf/UNIX 0 714 Jul 3 2005 yaboot.conf
#

The yaboot bootloader can be set directly in the firmware or it
can be referenced from the ofboot.b file. My system has the following
command set as one of the possibilities in ofboot.b:

: bootyaboot " Loading second stage bootstrap..." .printf 100 ms load-base release-load-area " /ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:2,\\yaboot" $boot ;

This is telling the firmware to create a command bootyaboot that will
load and run the file yaboot in the blessed folder on the 2nd partition
on the SATA disk. The ofboot.b file also has a menu to choose a boot
method which can run this command based on the user input.

With an Open Firmware that can directly load an ELF file, the yaboot
file could be specified as the boot-file setting. This would mean
that the firmware would always load yaboot as the normal boot process.

Brad Boyer
flar DeleteThis @allandria.com


--
To UNSUBSCRIBE, email to debian-powerpc-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
"Martín_Ferrari
External


Since: Mar 28, 2006
Posts: 15



PostPosted: Wed Aug 08, 2007 7:40 pm    Post subject: Re: Question about booting [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

On 8/8/07, Brad Boyer <flar RemoveThis @allandria.com> wrote:

> > - the /install folder is -hfs-blessed, but don't know what that means,
> > - there is another chrp descriptor called ofboot.b, but I don't know what it is,
> > - the yaboot boot loader is present, but I couldn't find what enables it,

> of the path is a special Mac shortcut that says to look for a
> particular file type (tbxi is a code for a bootloader). Older Mac ROM
> code was hard-coded to only look in the blessed folder for the System
> file.
>
> Because of this, booting from a blessed folder on a CD could use a
> boot path as simple as "cd:,\\:tbxi".

Ah, I see, so the mapfile does the magic here:

..b Raw 'UNIX' 'tbxi' "bootstrap"

So, this is neither prep nor chrp, yes?

> The ofboot.b file is a way to give boot options and configuration
> to Open Firmware. I haven't used it on a CHRP system, but on a Mac

>From what I've read in the CHRP paper, it looks for a file called
bootinfo.txt; it said nothing about other files...

> it allows you to set an icon for a drive and load a secondary
> bootloader. The ofboot.b file is generally given the HFS file
> type of tbxi to fit in with the default settings Apple sets. Here
> are the relevant files on a real install:

> The yaboot bootloader can be set directly in the firmware or it
> can be referenced from the ofboot.b file. My system has the following
> command set as one of the possibilities in ofboot.b:
>
> : bootyaboot " Loading second stage bootstrap..." .printf 100 ms load-base release-load-area " /ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:2,\\yaboot" $boot ;

I see. But in the debian-cd's map, yaboot gets a filetype of boot
(just like in your setup). But you said that the firmware was looking
for tbxi...

> This is telling the firmware to create a command bootyaboot that will
> load and run the file yaboot in the blessed folder on the 2nd partition
> on the SATA disk. The ofboot.b file also has a menu to choose a boot
> method which can run this command based on the user input.

Yes, and it has the same format as bootinfo.txt, it confuses me completely Smile

> With an Open Firmware that can directly load an ELF file, the yaboot
> file could be specified as the boot-file setting. This would mean
> that the firmware would always load yaboot as the normal boot process.

i see... So, the boot process you described would be: firmware, if
used with boot "cd:,\\:tbxi", locates a blessed folder with a tbxi
file on it: the ofboot.b, which calls yaboot. Right? Do you know
anything about the remaining bits I've found?

Thanks a lot!


--
Martín Ferrari
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Ports PowerPC All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum