| 1 |
swift |
1.1 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
|
|
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
|
|
| 4 |
|
|
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
swift |
1.29 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
|
| 6 |
swift |
1.1 |
|
| 7 |
swift |
1.50 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.49 2010/07/21 01:28:29 nightmorph Exp $ -->
|
| 8 |
swift |
1.1 |
|
| 9 |
|
|
<sections>
|
| 10 |
swift |
1.20 |
|
| 11 |
nightmorph |
1.49 |
<abstract>
|
| 12 |
|
|
To be able to install Gentoo, you must create the necessary partitions.
|
| 13 |
|
|
This chapter describes how to partition a disk for future usage.
|
| 14 |
|
|
</abstract>
|
| 15 |
|
|
|
| 16 |
swift |
1.50 |
<version>11</version>
|
| 17 |
|
|
<date>2011-10-17</date>
|
| 18 |
swift |
1.20 |
|
| 19 |
swift |
1.1 |
<section>
|
| 20 |
|
|
<title>Introduction to Block Devices</title>
|
| 21 |
nightmorph |
1.46 |
|
| 22 |
swift |
1.1 |
<subsection>
|
| 23 |
nightmorph |
1.46 |
<include href="hb-install-blockdevices.xml"/>
|
| 24 |
|
|
</subsection>
|
| 25 |
swift |
1.1 |
|
| 26 |
|
|
<subsection>
|
| 27 |
swift |
1.31 |
<title>Partitions</title>
|
| 28 |
swift |
1.1 |
<body>
|
| 29 |
|
|
|
| 30 |
|
|
<p>
|
| 31 |
|
|
Although it is theoretically possible to use a full disk to house your Linux
|
| 32 |
|
|
system, this is almost never done in practice. Instead, full disk block devices
|
| 33 |
|
|
are split up in smaller, more manageable block devices. On most systems,
|
| 34 |
swift |
1.31 |
these are called <e>partitions</e>.
|
| 35 |
swift |
1.1 |
</p>
|
| 36 |
|
|
|
| 37 |
|
|
</body>
|
| 38 |
|
|
</subsection>
|
| 39 |
|
|
</section>
|
| 40 |
|
|
<section>
|
| 41 |
|
|
<title>Designing a Partitioning Scheme</title>
|
| 42 |
|
|
<subsection>
|
| 43 |
|
|
<title>Default Partitioning Scheme</title>
|
| 44 |
|
|
<body>
|
| 45 |
|
|
|
| 46 |
|
|
<p>
|
| 47 |
|
|
If you are not interested in drawing up a partitioning scheme for your system,
|
| 48 |
nightmorph |
1.38 |
you can use the partitioning scheme we use throughout this book. Choose the
|
| 49 |
|
|
filesystem layout that best matches the type of PowerPC system you are
|
| 50 |
|
|
installing on.
|
| 51 |
|
|
</p>
|
| 52 |
|
|
|
| 53 |
|
|
</body>
|
| 54 |
|
|
</subsection>
|
| 55 |
|
|
<subsection>
|
| 56 |
|
|
<title>Apple New World</title>
|
| 57 |
|
|
<body>
|
| 58 |
|
|
|
| 59 |
|
|
<p>
|
| 60 |
nightmorph |
1.48 |
Apple New World machines are fairly straightforward to configure. The first
|
| 61 |
|
|
partition is always an <e>Apple Partition Map</e>. This partition keeps track of
|
| 62 |
|
|
the layout of the disk. You cannot remove this partition. The next partition
|
| 63 |
|
|
should always be a bootstrap partition. This partition contains a small (800k)
|
| 64 |
|
|
HFS filesystem that holds a copy of the bootloader Yaboot and its configuration
|
| 65 |
|
|
file. This partition is <e>not</e> the same as a <path>/boot</path> partition as
|
| 66 |
|
|
found on other architectures. After the boot partition, the usual Linux
|
| 67 |
|
|
filesystems are placed, according to the scheme below. The swap partition is a
|
| 68 |
|
|
temporary storage place for when your system runs out of physical memory. The
|
| 69 |
|
|
root partition will contain the filesystem that Gentoo is installed on. If you
|
| 70 |
|
|
wish to dual boot, the OSX partition can go anywhere after the bootstrap
|
| 71 |
|
|
partition to insure that yaboot starts first.
|
| 72 |
swift |
1.1 |
</p>
|
| 73 |
|
|
|
| 74 |
josejx |
1.35 |
<note>
|
| 75 |
nightmorph |
1.39 |
There may be "Disk Driver" partitions on your disk such as
|
| 76 |
|
|
<path>Apple_Driver63</path>, <path>Apple_Driver_ATA</path>,
|
| 77 |
|
|
<path>Apple_FWDriver</path>, <path>Apple_Driver_IOKit</path>, and
|
| 78 |
nightmorph |
1.48 |
<path>Apple_Patches</path>. These are used to boot MacOS, so if you have no need
|
| 79 |
|
|
for this, you can remove them by initializing the disk with <c>mac-fdisk</c>'s
|
| 80 |
|
|
<c>i</c> option. This will completely erase the disk! If you are in doubt, just
|
| 81 |
|
|
let them be.
|
| 82 |
nightmorph |
1.38 |
</note>
|
| 83 |
|
|
|
| 84 |
|
|
<note>
|
| 85 |
|
|
If you partitioned this disk with Apple's Disk Utility, there may be
|
| 86 |
nightmorph |
1.48 |
128Mb spaces between partitions which Apple reserves for "future use". You
|
| 87 |
nightmorph |
1.38 |
can safely remove these.
|
| 88 |
josejx |
1.35 |
</note>
|
| 89 |
|
|
|
| 90 |
swift |
1.1 |
<table>
|
| 91 |
|
|
<tr>
|
| 92 |
nightmorph |
1.38 |
<th>Partition</th>
|
| 93 |
|
|
<th>Size</th>
|
| 94 |
swift |
1.1 |
<th>Filesystem</th>
|
| 95 |
|
|
<th>Description</th>
|
| 96 |
|
|
</tr>
|
| 97 |
|
|
<tr>
|
| 98 |
nightmorph |
1.47 |
<ti><path>/dev/sda1</path></ti>
|
| 99 |
sejo |
1.17 |
<ti>32k</ti>
|
| 100 |
nightmorph |
1.38 |
<ti>None</ti>
|
| 101 |
|
|
<ti>Apple Partition Map</ti>
|
| 102 |
sejo |
1.17 |
</tr>
|
| 103 |
|
|
<tr>
|
| 104 |
nightmorph |
1.47 |
<ti><path>/dev/sda2</path></ti>
|
| 105 |
swift |
1.1 |
<ti>800k</ti>
|
| 106 |
nightmorph |
1.38 |
<ti>HFS</ti>
|
| 107 |
|
|
<ti>Apple Bootstrap</ti>
|
| 108 |
|
|
</tr>
|
| 109 |
|
|
<tr>
|
| 110 |
nightmorph |
1.47 |
<ti><path>/dev/sda3</path></ti>
|
| 111 |
nightmorph |
1.38 |
<ti>512Mb</ti>
|
| 112 |
|
|
<ti>Swap</ti>
|
| 113 |
|
|
<ti>Linux Swap</ti>
|
| 114 |
swift |
1.1 |
</tr>
|
| 115 |
|
|
<tr>
|
| 116 |
nightmorph |
1.47 |
<ti><path>/dev/sda4</path></ti>
|
| 117 |
nightmorph |
1.38 |
<ti>Rest of Disk</ti>
|
| 118 |
|
|
<ti>ext3, reiserfs, xfs</ti>
|
| 119 |
|
|
<ti>Linux Root</ti>
|
| 120 |
|
|
</tr>
|
| 121 |
|
|
</table>
|
| 122 |
|
|
|
| 123 |
|
|
</body>
|
| 124 |
|
|
</subsection>
|
| 125 |
|
|
<subsection>
|
| 126 |
|
|
<title>Apple Old World</title>
|
| 127 |
|
|
<body>
|
| 128 |
|
|
|
| 129 |
|
|
<p>
|
| 130 |
|
|
Apple Old World machines are a bit more complicated to configure. The first
|
| 131 |
|
|
partition is always an <e>Apple Partition Map</e>. This partition keeps track
|
| 132 |
|
|
of the layout of the disk. You cannot remove this partition. If you are using
|
| 133 |
|
|
BootX, the configuration below assumes that MacOS is installed on a seperate
|
| 134 |
|
|
disk. If this is not the case, there will be additional partitions for "Apple
|
| 135 |
|
|
Disk Drivers" such as <path>Apple_Driver63, Apple_Driver_ATA, Apple_FWDriver,
|
| 136 |
|
|
Apple_Driver_IOKit, Apple_Patches</path> and the MacOS install. If you are
|
| 137 |
|
|
using Quik, you will need to create a boot partition to hold the kernel, unlike
|
| 138 |
|
|
other Apple boot methods. After the boot partition, the usual Linux filesystems
|
| 139 |
|
|
are placed, according to the scheme below. The swap partition is a temporary
|
| 140 |
|
|
storage place for when your system runs out of physical memory. The root
|
| 141 |
|
|
partition will contain the filesystem that Gentoo is installed on.
|
| 142 |
|
|
</p>
|
| 143 |
|
|
|
| 144 |
|
|
<note>
|
| 145 |
|
|
If you are using an OldWorld machine, you will need to keep MacOS available.
|
| 146 |
|
|
The layout here assumes MacOS is installed on a separate drive.
|
| 147 |
|
|
</note>
|
| 148 |
|
|
|
| 149 |
|
|
<table>
|
| 150 |
|
|
<tr>
|
| 151 |
|
|
<th>Partition</th>
|
| 152 |
|
|
<th>Size</th>
|
| 153 |
|
|
<th>Filesystem</th>
|
| 154 |
|
|
<th>Description</th>
|
| 155 |
swift |
1.28 |
</tr>
|
| 156 |
|
|
<tr>
|
| 157 |
nightmorph |
1.47 |
<ti><path>/dev/sda1</path></ti>
|
| 158 |
nightmorph |
1.38 |
<ti>32k</ti>
|
| 159 |
|
|
<ti>None</ti>
|
| 160 |
|
|
<ti>Apple Partition Map</ti>
|
| 161 |
|
|
</tr>
|
| 162 |
|
|
<tr>
|
| 163 |
nightmorph |
1.47 |
<ti><path>/dev/sda2</path></ti>
|
| 164 |
nightmorph |
1.38 |
<ti>32Mb</ti>
|
| 165 |
swift |
1.28 |
<ti>ext2</ti>
|
| 166 |
nightmorph |
1.38 |
<ti>Quik Boot Partition (quik only)</ti>
|
| 167 |
swift |
1.28 |
</tr>
|
| 168 |
|
|
<tr>
|
| 169 |
nightmorph |
1.47 |
<ti><path>/dev/sda3</path></ti>
|
| 170 |
nightmorph |
1.38 |
<ti>512Mb</ti>
|
| 171 |
|
|
<ti>Swap</ti>
|
| 172 |
|
|
<ti>Linux Swap</ti>
|
| 173 |
|
|
</tr>
|
| 174 |
|
|
<tr>
|
| 175 |
nightmorph |
1.47 |
<ti><path>/dev/sda4</path></ti>
|
| 176 |
nightmorph |
1.38 |
<ti>Rest of Disk</ti>
|
| 177 |
|
|
<ti>ext3, reiserfs, xfs</ti>
|
| 178 |
|
|
<ti>Linux Root</ti>
|
| 179 |
|
|
</tr>
|
| 180 |
|
|
</table>
|
| 181 |
|
|
|
| 182 |
|
|
</body>
|
| 183 |
|
|
</subsection>
|
| 184 |
|
|
<subsection>
|
| 185 |
|
|
<title>Pegasos</title>
|
| 186 |
|
|
<body>
|
| 187 |
|
|
|
| 188 |
|
|
<p>
|
| 189 |
nightmorph |
1.40 |
The Pegasos partition layout is quite simple compared to the Apple layouts.
|
| 190 |
nightmorph |
1.38 |
The first partition is a Boot Partition, which contains kernels to be booted,
|
| 191 |
nightmorph |
1.45 |
along with an Open Firmware script that presents a menu on boot. After the boot
|
| 192 |
nightmorph |
1.38 |
partition, the usual Linux filesystems are placed, according to the scheme
|
| 193 |
|
|
below. The swap partition is a temporary storage place for when your system
|
| 194 |
|
|
runs out of physical memory. The root partition will contain the filesystem
|
| 195 |
|
|
that Gentoo is installed on.
|
| 196 |
|
|
</p>
|
| 197 |
|
|
|
| 198 |
|
|
<table>
|
| 199 |
|
|
<tr>
|
| 200 |
|
|
<th>Partition</th>
|
| 201 |
|
|
<th>Size</th>
|
| 202 |
|
|
<th>Filesystem</th>
|
| 203 |
|
|
<th>Description</th>
|
| 204 |
|
|
</tr>
|
| 205 |
|
|
<tr>
|
| 206 |
nightmorph |
1.47 |
<ti><path>/dev/sda1</path></ti>
|
| 207 |
nightmorph |
1.38 |
<ti>32Mb</ti>
|
| 208 |
|
|
<ti>affs1 or ext2</ti>
|
| 209 |
|
|
<ti>Boot Partition</ti>
|
| 210 |
|
|
</tr>
|
| 211 |
|
|
<tr>
|
| 212 |
nightmorph |
1.47 |
<ti><path>/dev/sda2</path></ti>
|
| 213 |
nightmorph |
1.38 |
<ti>512Mb</ti>
|
| 214 |
|
|
<ti>Swap</ti>
|
| 215 |
|
|
<ti>Linux Swap</ti>
|
| 216 |
swift |
1.1 |
</tr>
|
| 217 |
|
|
<tr>
|
| 218 |
nightmorph |
1.47 |
<ti><path>/dev/sda3</path></ti>
|
| 219 |
nightmorph |
1.38 |
<ti>Rest of Disk</ti>
|
| 220 |
|
|
<ti>ext3, reiserfs, xfs</ti>
|
| 221 |
|
|
<ti>Linux Root</ti>
|
| 222 |
swift |
1.1 |
</tr>
|
| 223 |
|
|
</table>
|
| 224 |
dertobi123 |
1.21 |
|
| 225 |
nightmorph |
1.38 |
</body>
|
| 226 |
|
|
</subsection>
|
| 227 |
|
|
<subsection>
|
| 228 |
|
|
<title>IBM PReP (RS/6000)</title>
|
| 229 |
|
|
<body>
|
| 230 |
|
|
|
| 231 |
|
|
<p>
|
| 232 |
nightmorph |
1.41 |
The IBM PowerPC Reference Platform (PReP) requires a small PReP boot partition
|
| 233 |
|
|
on the disk's first partition, followed by the swap and root partitions.
|
| 234 |
nightmorph |
1.38 |
</p>
|
| 235 |
|
|
|
| 236 |
|
|
<table>
|
| 237 |
|
|
<tr>
|
| 238 |
|
|
<th>Partition</th>
|
| 239 |
|
|
<th>Size</th>
|
| 240 |
|
|
<th>Filesystem</th>
|
| 241 |
|
|
<th>Description</th>
|
| 242 |
|
|
</tr>
|
| 243 |
|
|
<tr>
|
| 244 |
nightmorph |
1.47 |
<ti><path>/dev/sda1</path></ti>
|
| 245 |
nightmorph |
1.38 |
<ti>800k</ti>
|
| 246 |
|
|
<ti>None</ti>
|
| 247 |
|
|
<ti>PReP Boot Partition (Type 0x41)</ti>
|
| 248 |
|
|
</tr>
|
| 249 |
|
|
<tr>
|
| 250 |
nightmorph |
1.47 |
<ti><path>/dev/sda2</path></ti>
|
| 251 |
nightmorph |
1.38 |
<ti>512Mb</ti>
|
| 252 |
|
|
<ti>Swap</ti>
|
| 253 |
|
|
<ti>Linux Swap (Type 0x82)</ti>
|
| 254 |
|
|
</tr>
|
| 255 |
|
|
<tr>
|
| 256 |
nightmorph |
1.47 |
<ti><path>/dev/sda3</path></ti>
|
| 257 |
nightmorph |
1.38 |
<ti>Rest of Disk</ti>
|
| 258 |
|
|
<ti>ext3, reiserfs, xfs</ti>
|
| 259 |
|
|
<ti>Linux Root (Type 0x83)</ti>
|
| 260 |
|
|
</tr>
|
| 261 |
|
|
</table>
|
| 262 |
nightmorph |
1.36 |
|
| 263 |
swift |
1.28 |
<warn>
|
| 264 |
nightmorph |
1.38 |
<c>parted</c> is able to resize partitions including HFS+. Unfortunately there
|
| 265 |
|
|
may be issues with resizing HFS+ journaled filesystems, so, for the best
|
| 266 |
|
|
results, switch off journaling in Mac OS X before resizing. Remember that any
|
| 267 |
|
|
resizing operation is dangerous, so attempt at your own risk! Be sure to always
|
| 268 |
|
|
have a backup of your data before resizing!
|
| 269 |
swift |
1.28 |
</warn>
|
| 270 |
nightmorph |
1.36 |
|
| 271 |
swift |
1.1 |
<p>
|
| 272 |
swift |
1.22 |
If you are interested in knowing how big a partition should be, or even how many
|
| 273 |
swift |
1.31 |
partitions you need, read on. Otherwise continue now with
|
| 274 |
|
|
<uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk
|
| 275 |
|
|
</uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to
|
| 276 |
swift |
1.6 |
Partition your Disk</uri>.
|
| 277 |
swift |
1.1 |
</p>
|
| 278 |
|
|
|
| 279 |
|
|
</body>
|
| 280 |
|
|
</subsection>
|
| 281 |
|
|
<subsection>
|
| 282 |
|
|
<title>How Many and How Big?</title>
|
| 283 |
|
|
<body>
|
| 284 |
|
|
|
| 285 |
|
|
<p>
|
| 286 |
|
|
The number of partitions is highly dependent on your environment. For instance,
|
| 287 |
|
|
if you have lots of users, you will most likely want to have your
|
| 288 |
|
|
<path>/home</path> separate as it increases security and makes backups easier.
|
| 289 |
swift |
1.22 |
If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
|
| 290 |
nightmorph |
1.38 |
should be separate as all received mail is stored in <path>/var</path>. A good
|
| 291 |
|
|
choice of filesystem will then maximise your performance. Game servers should
|
| 292 |
|
|
have a separate <path>/opt</path> as most game servers are installed there. The
|
| 293 |
|
|
reason is similar for <path>/home</path>: security and backups. Whatever layout
|
| 294 |
|
|
you chose, you will definitely want to keep <path>/usr</path> large: not only
|
| 295 |
|
|
will it contain the majority of applications, the Portage tree alone takes
|
| 296 |
|
|
more than 500Mb excluding the various sources that are stored in it.
|
| 297 |
swift |
1.1 |
</p>
|
| 298 |
|
|
|
| 299 |
|
|
<p>
|
| 300 |
|
|
As you can see, it very much depends on what you want to achieve. Separate
|
| 301 |
|
|
partitions or volumes have the following advantages:
|
| 302 |
|
|
</p>
|
| 303 |
|
|
|
| 304 |
|
|
<ul>
|
| 305 |
|
|
<li>
|
| 306 |
neysx |
1.9 |
You can choose the best performing filesystem for each partition or volume
|
| 307 |
swift |
1.1 |
</li>
|
| 308 |
|
|
<li>
|
| 309 |
|
|
Your entire system cannot run out of free space if one defunct tool is
|
| 310 |
|
|
continuously writing files to a partition or volume
|
| 311 |
|
|
</li>
|
| 312 |
|
|
<li>
|
| 313 |
|
|
If necessary, file system checks are reduced in time, as multiple checks can
|
| 314 |
|
|
be done in parallel (although this advantage is more with multiple disks than
|
| 315 |
|
|
it is with multiple partitions)
|
| 316 |
|
|
</li>
|
| 317 |
|
|
<li>
|
| 318 |
swift |
1.28 |
Security can be enhanced by mounting some partitions or volumes read-only,
|
| 319 |
swift |
1.1 |
nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
|
| 320 |
|
|
</li>
|
| 321 |
|
|
</ul>
|
| 322 |
|
|
|
| 323 |
|
|
<p>
|
| 324 |
swift |
1.50 |
However, multiple partitions have disadvantages as well. If not configured
|
| 325 |
|
|
properly, you will have a system with lots of free space on one partition and
|
| 326 |
|
|
none on another. Another nuisance is that separate partitions - especially
|
| 327 |
|
|
for important mountpoints like <path>/usr</path> or <path>/var</path> - often
|
| 328 |
|
|
require the administrator to boot with an initramfs to mount the partition
|
| 329 |
|
|
before other boot scripts start. This isn't always the case though, so YMMV.
|
| 330 |
|
|
</p>
|
| 331 |
|
|
|
| 332 |
|
|
<p>
|
| 333 |
|
|
There is also a 15-partition limit for SCSI and SATA.
|
| 334 |
swift |
1.1 |
</p>
|
| 335 |
|
|
|
| 336 |
|
|
</body>
|
| 337 |
|
|
</subsection>
|
| 338 |
|
|
</section>
|
| 339 |
swift |
1.31 |
<section id="mac-fdisk">
|
| 340 |
swift |
1.28 |
<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
|
| 341 |
swift |
1.1 |
<body>
|
| 342 |
|
|
|
| 343 |
|
|
<p>
|
| 344 |
|
|
At this point, create your partitions using <c>mac-fdisk</c>:
|
| 345 |
|
|
</p>
|
| 346 |
|
|
|
| 347 |
|
|
<pre caption="Starting mac-fdisk">
|
| 348 |
nightmorph |
1.47 |
# <i>mac-fdisk /dev/sda</i>
|
| 349 |
swift |
1.1 |
</pre>
|
| 350 |
|
|
|
| 351 |
|
|
<p>
|
| 352 |
nightmorph |
1.38 |
If you used Apple's Disk Utility to leave space for Linux, first delete the
|
| 353 |
nightmorph |
1.48 |
partitions you have created previously to make room for your new install. Use
|
| 354 |
|
|
<c>d</c> in <c>mac-fdisk</c> to delete those partition(s). It will ask for the
|
| 355 |
|
|
partition number to delete. Usually the first partition on NewWorld machines
|
| 356 |
|
|
(Apple_partition_map) cannot be deleted. If you would like to start with a
|
| 357 |
|
|
clean disk, you can simply initialize the disk by pressing <c>i</c>. This
|
| 358 |
nightmorph |
1.38 |
will completely erase the disk, so use this with caution.
|
| 359 |
swift |
1.1 |
</p>
|
| 360 |
|
|
|
| 361 |
|
|
<p>
|
| 362 |
nightmorph |
1.36 |
Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will
|
| 363 |
|
|
ask for what block you want to start. Enter the number of your first free
|
| 364 |
|
|
partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
|
| 365 |
swift |
1.1 |
</p>
|
| 366 |
|
|
|
| 367 |
|
|
<note>
|
| 368 |
swift |
1.28 |
This partition is <e>not</e> a <path>/boot</path> partition. It is not used by
|
| 369 |
|
|
Linux at all; you don't have to place any filesystem on it and you should never
|
| 370 |
|
|
mount it. Apple users don't need an extra partition for <path>/boot</path>.
|
| 371 |
swift |
1.1 |
</note>
|
| 372 |
|
|
|
| 373 |
|
|
<p>
|
| 374 |
|
|
Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will
|
| 375 |
swift |
1.22 |
ask for what block you want to start this partition from. As we used <c>2</c>
|
| 376 |
swift |
1.1 |
before to create the Apple_Bootstrap partition, you now have to enter
|
| 377 |
swift |
1.22 |
<c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size
|
| 378 |
nightmorph |
1.38 |
you want -- a minimum of 512MB is recommended, but 2 times your physical memory
|
| 379 |
|
|
is the generally accepted size). When asked for a name, enter <c>swap</c>.
|
| 380 |
swift |
1.1 |
</p>
|
| 381 |
|
|
|
| 382 |
|
|
<p>
|
| 383 |
swift |
1.22 |
To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select
|
| 384 |
swift |
1.1 |
from what block the root partition should start. When asked for the size, enter
|
| 385 |
swift |
1.22 |
<c>4p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available
|
| 386 |
nightmorph |
1.38 |
space". When asked for the name, enter <c>root</c>.
|
| 387 |
swift |
1.1 |
</p>
|
| 388 |
|
|
|
| 389 |
|
|
<p>
|
| 390 |
|
|
To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to
|
| 391 |
|
|
quit <c>mac-fdisk</c>.
|
| 392 |
|
|
</p>
|
| 393 |
dertobi123 |
1.21 |
|
| 394 |
sejo |
1.19 |
<note>
|
| 395 |
nightmorph |
1.38 |
To make sure everything is ok, you should run <c>mac-fdisk -l</c> and check
|
| 396 |
nightmorph |
1.48 |
whether all the partitions are there. If you don't see any of the partitions you
|
| 397 |
|
|
created, or the changes you made, you should reinitialize your partitions by
|
| 398 |
|
|
pressing <c>i</c> in <c>mac-fdisk</c>. Note that this will recreate the
|
| 399 |
|
|
partition map and thus remove all your partitions.
|
| 400 |
sejo |
1.19 |
</note>
|
| 401 |
dertobi123 |
1.21 |
|
| 402 |
swift |
1.1 |
<p>
|
| 403 |
nightmorph |
1.38 |
Now that your partitions are created, you can continue with
|
| 404 |
|
|
<uri link="#filesystems">Creating Filesystems</uri>.
|
| 405 |
swift |
1.1 |
</p>
|
| 406 |
|
|
|
| 407 |
|
|
</body>
|
| 408 |
|
|
</section>
|
| 409 |
swift |
1.6 |
<section id="parted">
|
| 410 |
nightmorph |
1.38 |
<title>Using parted to Partition your Disk (Pegasos and RS/6000)</title>
|
| 411 |
swift |
1.6 |
<body>
|
| 412 |
|
|
|
| 413 |
|
|
<p>
|
| 414 |
dertobi123 |
1.11 |
<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by
|
| 415 |
nightmorph |
1.48 |
Mac OS and Mac OS X. With this tool you can resize your Mac partitions and
|
| 416 |
dertobi123 |
1.11 |
create space for your Linux partitions. Nevertheless, the example below
|
| 417 |
|
|
describes partitioning for Pegasos machines only.
|
| 418 |
|
|
</p>
|
| 419 |
|
|
|
| 420 |
|
|
<p>
|
| 421 |
swift |
1.6 |
To begin let's fire up <c>parted</c>:
|
| 422 |
|
|
</p>
|
| 423 |
|
|
|
| 424 |
|
|
<pre caption="Starting parted">
|
| 425 |
nightmorph |
1.47 |
# <i>parted /dev/sda</i>
|
| 426 |
swift |
1.6 |
</pre>
|
| 427 |
|
|
|
| 428 |
|
|
<p>
|
| 429 |
nightmorph |
1.38 |
If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new
|
| 430 |
swift |
1.6 |
disklabel for the drive.
|
| 431 |
|
|
</p>
|
| 432 |
|
|
|
| 433 |
|
|
<p>
|
| 434 |
|
|
You can type <c>print</c> at any time in parted to display the current partition
|
| 435 |
swift |
1.28 |
table. If at any time you change your mind or made a mistake you can press
|
| 436 |
nightmorph |
1.48 |
<c>Ctrl-c</c> to abort <c>parted</c>.
|
| 437 |
swift |
1.6 |
</p>
|
| 438 |
|
|
|
| 439 |
|
|
<p>
|
| 440 |
|
|
If you intend to also install MorphOS on your Pegasos create an affs1 filesystem
|
| 441 |
nightmorph |
1.38 |
at the start of the drive. 32MB should be more than enough to store the MorphOS
|
| 442 |
nightmorph |
1.42 |
kernel. If you have a Pegasos I or intend to use any filesystem besides ext2 or
|
| 443 |
|
|
ext3, you will also have to store your Linux kernel on this partition (the
|
| 444 |
|
|
Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the
|
| 445 |
|
|
partition run <c>mkpart primary affs1 START END</c> where <c>START</c> and
|
| 446 |
|
|
<c>END</c> should be replaced with the megabyte range (e.g. <c>0 32</c>) which
|
| 447 |
nightmorph |
1.38 |
creates a 32 MB partition starting at 0MB and ending at 32MB. If you chose to
|
| 448 |
|
|
create an ext2 or ext3 partition instead, substitute ext2 or ext3 for affs1 in
|
| 449 |
nightmorph |
1.48 |
the <c>mkpart</c> command.
|
| 450 |
swift |
1.6 |
</p>
|
| 451 |
|
|
|
| 452 |
|
|
<p>
|
| 453 |
nightmorph |
1.38 |
You will need to create two partitions for Linux, one root filesystem and one
|
| 454 |
|
|
swap partition. Run <c>mkpart primary START END</c> to create each partition,
|
| 455 |
|
|
replacing <c>START</c> and <c>END</c> with the desired megabyte boundries.
|
| 456 |
swift |
1.6 |
</p>
|
| 457 |
|
|
|
| 458 |
|
|
<p>
|
| 459 |
nightmorph |
1.38 |
It is generally recommended that you create a swap partition that is two times
|
| 460 |
|
|
bigger than the amount of RAM in your computer, but at least 512Mb is
|
| 461 |
|
|
recommended. To create the swap partition, run
|
| 462 |
|
|
<c>mkpart primary linux-swap START END</c> with START and END again denoting
|
| 463 |
|
|
the partition boundries.
|
| 464 |
swift |
1.6 |
</p>
|
| 465 |
|
|
|
| 466 |
|
|
<p>
|
| 467 |
nightmorph |
1.48 |
When you are done in <c>parted</c> simply type <c>quit</c>.
|
| 468 |
swift |
1.6 |
</p>
|
| 469 |
|
|
|
| 470 |
|
|
</body>
|
| 471 |
|
|
</section>
|
| 472 |
swift |
1.1 |
<section id="filesystems">
|
| 473 |
|
|
<title>Creating Filesystems</title>
|
| 474 |
|
|
<subsection>
|
| 475 |
|
|
<title>Introduction</title>
|
| 476 |
|
|
<body>
|
| 477 |
|
|
|
| 478 |
|
|
<p>
|
| 479 |
swift |
1.28 |
Now that your partitions are created, it is time to place a filesystem on them.
|
| 480 |
nightmorph |
1.38 |
If you're not sure which filesystems to choose and are happy with our defaults,
|
| 481 |
|
|
continue with
|
| 482 |
|
|
<uri link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
|
| 483 |
|
|
Otherwise, read on to learn about the available filesystems.
|
| 484 |
swift |
1.1 |
</p>
|
| 485 |
|
|
|
| 486 |
|
|
</body>
|
| 487 |
|
|
</subsection>
|
| 488 |
nightmorph |
1.46 |
|
| 489 |
swift |
1.1 |
<subsection>
|
| 490 |
nightmorph |
1.46 |
<include href="hb-install-filesystems.xml"/>
|
| 491 |
|
|
</subsection>
|
| 492 |
swift |
1.1 |
|
| 493 |
nightmorph |
1.38 |
<subsection>
|
| 494 |
|
|
<title>Activating the Swap Partition</title>
|
| 495 |
|
|
<body>
|
| 496 |
|
|
|
| 497 |
|
|
<p>
|
| 498 |
|
|
<c>mkswap</c> is the command that is used to initialize swap partitions:
|
| 499 |
|
|
</p>
|
| 500 |
|
|
|
| 501 |
|
|
<pre caption="Creating a swap signature">
|
| 502 |
nightmorph |
1.47 |
# <i>mkswap /dev/sda3</i>
|
| 503 |
nightmorph |
1.38 |
</pre>
|
| 504 |
|
|
|
| 505 |
|
|
<p>
|
| 506 |
|
|
To activate the swap partition, use <c>swapon</c>:
|
| 507 |
|
|
</p>
|
| 508 |
|
|
|
| 509 |
|
|
<pre caption="Activating the swap partition">
|
| 510 |
nightmorph |
1.47 |
# <i>swapon /dev/sda3</i>
|
| 511 |
nightmorph |
1.38 |
</pre>
|
| 512 |
|
|
|
| 513 |
|
|
<p>
|
| 514 |
|
|
Create and activate the swap now before creating other filesystems.
|
| 515 |
|
|
</p>
|
| 516 |
|
|
|
| 517 |
|
|
</body>
|
| 518 |
|
|
</subsection>
|
| 519 |
swift |
1.1 |
<subsection id="filesystems-apply">
|
| 520 |
|
|
<title>Applying a Filesystem to a Partition</title>
|
| 521 |
|
|
<body>
|
| 522 |
|
|
|
| 523 |
|
|
<p>
|
| 524 |
|
|
To create a filesystem on a partition or volume, there are tools available for
|
| 525 |
|
|
each possible filesystem:
|
| 526 |
|
|
</p>
|
| 527 |
|
|
|
| 528 |
|
|
<table>
|
| 529 |
|
|
<tr>
|
| 530 |
|
|
<th>Filesystem</th>
|
| 531 |
|
|
<th>Creation Command</th>
|
| 532 |
|
|
</tr>
|
| 533 |
|
|
<tr>
|
| 534 |
|
|
<ti>ext2</ti>
|
| 535 |
nightmorph |
1.38 |
<ti><c>mke2fs</c></ti>
|
| 536 |
swift |
1.1 |
</tr>
|
| 537 |
|
|
<tr>
|
| 538 |
|
|
<ti>ext3</ti>
|
| 539 |
nightmorph |
1.38 |
<ti><c>mke2fs -j</c></ti>
|
| 540 |
swift |
1.1 |
</tr>
|
| 541 |
|
|
<tr>
|
| 542 |
|
|
<ti>reiserfs</ti>
|
| 543 |
nightmorph |
1.38 |
<ti><c>mkreiserfs</c></ti>
|
| 544 |
swift |
1.1 |
</tr>
|
| 545 |
|
|
<tr>
|
| 546 |
|
|
<ti>xfs</ti>
|
| 547 |
|
|
<ti><c>mkfs.xfs</c></ti>
|
| 548 |
|
|
</tr>
|
| 549 |
|
|
</table>
|
| 550 |
|
|
|
| 551 |
|
|
<p>
|
| 552 |
nightmorph |
1.38 |
For instance, to make an ext3 filesystem on the root partition
|
| 553 |
nightmorph |
1.47 |
(<path>/dev/sda4</path> in our example), you would use:
|
| 554 |
swift |
1.1 |
</p>
|
| 555 |
|
|
|
| 556 |
|
|
<pre caption="Applying a filesystem on a partition">
|
| 557 |
nightmorph |
1.47 |
# <i>mke2fs -j /dev/sda4</i>
|
| 558 |
swift |
1.1 |
</pre>
|
| 559 |
|
|
|
| 560 |
|
|
<p>
|
| 561 |
|
|
Now create the filesystems on your newly created partitions (or logical
|
| 562 |
|
|
volumes).
|
| 563 |
|
|
</p>
|
| 564 |
|
|
|
| 565 |
nightmorph |
1.44 |
<impo>
|
| 566 |
|
|
If you choose to use ReiserFS for <path>/</path>, do not change its default
|
| 567 |
|
|
block size if you will also be using <c>yaboot</c> as your bootloader, as
|
| 568 |
|
|
explained in <uri link="?part=1&chap=10">Configuring the Bootloader</uri>.
|
| 569 |
|
|
</impo>
|
| 570 |
|
|
|
| 571 |
dertobi123 |
1.11 |
<note>
|
| 572 |
nightmorph |
1.38 |
On the PegasosII your partition which holds the kernel must be ext2, ext3 or
|
| 573 |
nightmorph |
1.36 |
affs1. NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or
|
| 574 |
|
|
even HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel
|
| 575 |
|
|
must be placed on an HFS partition, but this will be completed when you
|
| 576 |
|
|
configure your bootloader.
|
| 577 |
dertobi123 |
1.11 |
</note>
|
| 578 |
|
|
|
| 579 |
swift |
1.1 |
</body>
|
| 580 |
|
|
</subsection>
|
| 581 |
|
|
</section>
|
| 582 |
|
|
<section>
|
| 583 |
|
|
<title>Mounting</title>
|
| 584 |
|
|
<body>
|
| 585 |
|
|
|
| 586 |
|
|
<p>
|
| 587 |
|
|
Now that your partitions are initialized and are housing a filesystem, it is
|
| 588 |
nightmorph |
1.36 |
time to mount those partitions. Use the <c>mount</c> command. As an example we
|
| 589 |
|
|
mount the root partition:
|
| 590 |
swift |
1.1 |
</p>
|
| 591 |
|
|
|
| 592 |
|
|
<pre caption="Mounting partitions">
|
| 593 |
nightmorph |
1.47 |
# <i>mount /dev/sda4 /mnt/gentoo</i>
|
| 594 |
swift |
1.1 |
</pre>
|
| 595 |
|
|
|
| 596 |
|
|
<note>
|
| 597 |
|
|
If you want your <path>/tmp</path> to reside on a separate partition, be sure to
|
| 598 |
nightmorph |
1.38 |
change its permissions after mounting and unpacking with
|
| 599 |
|
|
<c>chmod 1777 /mnt/gentoo/tmp</c>. This is also true for <path>/var/tmp</path>.
|
| 600 |
swift |
1.1 |
</note>
|
| 601 |
|
|
|
| 602 |
pylon |
1.4 |
<p>
|
| 603 |
swift |
1.12 |
Continue with <uri link="?part=1&chap=5">Installing the Gentoo
|
| 604 |
swift |
1.1 |
Installation Files</uri>.
|
| 605 |
|
|
</p>
|
| 606 |
|
|
|
| 607 |
|
|
</body>
|
| 608 |
|
|
</section>
|
| 609 |
|
|
</sections>
|