1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <appendix id="appendixe" xreflabel="Appendix E">
|
---|
9 | <?dbhtml dir="appendices"?>
|
---|
10 | <?dbhtml filename="macmiscellany.html"?>
|
---|
11 |
|
---|
12 | <title>Open Firmware and Mac issues.</title>
|
---|
13 |
|
---|
14 | <para>This appendix documents some of the features of ppc macintoshes,
|
---|
15 | and in particular the requirements of coexisting with Mac OS's (OSX or
|
---|
16 | the old OS9). It is only relevant to NewWorld hardware.</para>
|
---|
17 |
|
---|
18 | <variablelist>
|
---|
19 |
|
---|
20 | <varlistentry>
|
---|
21 | <term><emphasis role="bold">Open Firmware and blessed partitions</emphasis></term>
|
---|
22 | <listitem>
|
---|
23 | <para>The Open Firmware (OF) is the code in ROM or nvram which controls
|
---|
24 | how the machine boots. If booting automatically, it will boot from the
|
---|
25 | first valid blessed partition it finds (this is a simplification,
|
---|
26 | but it is adequate for normal purposes).</para>
|
---|
27 |
|
---|
28 | <para>It can only read apple filesystems (hfs, hfs+, or hfsx depending
|
---|
29 | on the version of the firmware). For disks under linux, the blessing
|
---|
30 | is done by ybin when it installs yaboot (the loader) and yaboot.conf.</para>
|
---|
31 |
|
---|
32 | <para>Mac OS's have a tendency to look at other hfs{,+,x} filesystems
|
---|
33 | on the disk, and unbless them if they do not match their expectations.
|
---|
34 | Unblessing makes them unbootable. Fortunately, a filesystem of type
|
---|
35 | <literal>Apple_Bootstrap</literal> can be read as hfs by the OF, but will
|
---|
36 | be ignored by Mac OS.</para>
|
---|
37 | </listitem>
|
---|
38 | </varlistentry>
|
---|
39 |
|
---|
40 | <varlistentry>
|
---|
41 | <term><emphasis role="bold">Partitioning</emphasis></term>
|
---|
42 | <listitem>
|
---|
43 | <para>Macintoshes use their own partition format - this means that other
|
---|
44 | machines are unlikely to be able to read or write to macintosh partitions
|
---|
45 | (in particular, fdisk does not understand them). The format allows a large
|
---|
46 | number of individual partitions, and the native Mac tools had a tendency
|
---|
47 | to insert small "filler" partitions between the real partitions. Under
|
---|
48 | linux, using more than 15 partitions can be problematic (shortage of device
|
---|
49 | nodes), so the normal approach is to use the Mac tools to create an area
|
---|
50 | of freespace at the <emphasis>front</emphasis> of the disk, then put the
|
---|
51 | Mac OS partition(s) after it and (re-)install the Mac OS. The
|
---|
52 | freespace can then be partitioned using <command>parted</command> or the
|
---|
53 | older <command>mac-fdisk</command>. It seems that recent versions of the
|
---|
54 | Mac tools may no longer insert the filler partitions, so it may be
|
---|
55 | possible to do all the partitioning before installing OSX.</para>
|
---|
56 |
|
---|
57 | <warning>
|
---|
58 | <para>The Macintosh resizing and partitioning tools are destructive and may
|
---|
59 | delete all data when a partition is resized, even on unaltered partitions.
|
---|
60 | </para>
|
---|
61 | </warning>
|
---|
62 |
|
---|
63 | <para>For the Linux partitions, you will need a bootstrap partition - this
|
---|
64 | can normally be a mere 800KB in size (the smallest hfs partition available)
|
---|
65 | although the Fedora installer has been known to insist on 800MB. This has
|
---|
66 | to be in front of the Mac OS partition. The bootstrap is
|
---|
67 | <emphasis>never</emphasis> mounted as a regular partition and should not
|
---|
68 | be confused with a <literal>/boot</literal> partition. Other partitions
|
---|
69 | are as normal (at least one rootfs, perhaps swap, perhaps others).</para>
|
---|
70 |
|
---|
71 | <para>According to the lfs-from-osx hint, the Mac partitioning tools
|
---|
72 | can create an apple_bootstrap partition and therefore there is no need
|
---|
73 | to use a Linux CD to create the desired partitions from freespace, but
|
---|
74 | using a Linux CD to create the partitions is a more widely tested approach.
|
---|
75 | </para>
|
---|
76 |
|
---|
77 | <para>If you follow this approach, partition 1 will be the apple partition
|
---|
78 | map, partition 2 will be the bootstrap at the start of the disk, the
|
---|
79 | linux partitions will follow, and then the mac partition(s) - under OSX
|
---|
80 | the first mac partition will be number 3, under OS9 it would have a higher
|
---|
81 | number and there would be some apple driver partitions.</para>
|
---|
82 | </listitem>
|
---|
83 | </varlistentry>
|
---|
84 |
|
---|
85 | <varlistentry>
|
---|
86 | <term><emphasis role="bold">OSX or OF upgrades</emphasis></term>
|
---|
87 | <listitem>
|
---|
88 | <para>If the machine is dual-booted with OSX, the mac kernel or the OF
|
---|
89 | will probably be upgraded at some point. This appears to either unbless
|
---|
90 | the bootstrap, or else just point the OF boot device to the mac partition
|
---|
91 | - so, the linux system will no longer be bootable.</para>
|
---|
92 |
|
---|
93 | <para>Therefore, you will need to know which partition contains the bootstrap
|
---|
94 | so that you can boot it from OF (on an apple keyboard, hold down
|
---|
95 | option-command-o-f (that is, alt-apple-o-f) while booting then enter a
|
---|
96 | command like:</para>
|
---|
97 |
|
---|
98 | <screen><userinput role="nodump">boot hd:2,yaboot</userinput></screen>
|
---|
99 |
|
---|
100 | <para>This will allow you to select a linux boot, and from there you
|
---|
101 | will have to rerun <command>ybin</command>.</para>
|
---|
102 |
|
---|
103 | <para>The "OS chooser" menu that yaboot typically loads is stored in the
|
---|
104 | OF and will not be available after a Mac kernel or firmware upgrade until
|
---|
105 | <command>ybin</command> has been rerun.</para>
|
---|
106 | </listitem>
|
---|
107 | </varlistentry>
|
---|
108 |
|
---|
109 | <varlistentry>
|
---|
110 | <term><emphasis role="bold">Yaboot's requirements</emphasis></term>
|
---|
111 | <listitem>
|
---|
112 | <para>Yaboot is the boot loader for linux, sometimes referred to as
|
---|
113 | the second stage loader. It reads the yaboot.conf file on the bootstrap
|
---|
114 | partition to find which linux system(s) should be available, and
|
---|
115 | attempts to load the required kernel.</para>
|
---|
116 |
|
---|
117 | <para>The bootstrap man page warns that the path to the kernel should
|
---|
118 | contain no more than one directory for reliability.</para>
|
---|
119 |
|
---|
120 | <para>Yaboot has to be able to understand the filesystem, so that it
|
---|
121 | can find the kernel. It understands hfs (not useful for linux, it is
|
---|
122 | not case-sensitive), ext2 (and therefore it can read ext3), reiser3,
|
---|
123 | and xfs. If you want to use a different type of filesystem for '/'
|
---|
124 | you will have to create a separate boot partition with a supported
|
---|
125 | filesystem, and use that to hold the kernels.</para>
|
---|
126 |
|
---|
127 | </listitem>
|
---|
128 | </varlistentry>
|
---|
129 |
|
---|
130 | <varlistentry>
|
---|
131 | <term><emphasis role="bold">Requirements if starting from OSX</emphasis></term>
|
---|
132 | <listitem>
|
---|
133 | <para>Older versions of OSX (panther, leopard) can write to ext2
|
---|
134 | filesystems using version 1.3 of ext2fsx. The upgrade to tiger broke
|
---|
135 | this, and version 1.4 of ext2fsx only supports reading. Users of
|
---|
136 | current OSX will therefore have to find some other way of creating
|
---|
137 | a suitable filesystem and populating it, such as a Live CD or rescue CD.
|
---|
138 | </para>
|
---|
139 | </listitem>
|
---|
140 | </varlistentry>
|
---|
141 |
|
---|
142 | </variablelist>
|
---|
143 |
|
---|
144 | </appendix>
|
---|