Make your own free website on Tripod.com

A.5. Ubuntu Partitioning Programs

Several varieties of partitioning programs have been adapted by Debian and Ubuntu developers to work on various types of hard disks and computer architectures. Following is a list of the program(s) applicable for your architecture.

partman

Recommended partitioning tool in Ubuntu. This swiss army knife can also create filesystems and assign them to the mountpoints.

cfdisk

A simple-to-use, full-screen disk partitioner for the rest of us; read the cfdisk manual page.

Note that cfdisk doesn't understand FreeBSD partitions at all, and, again, device names may differ as a result.

mac-fdisk

Mac-aware version of fdisk; read the mac-fdisk manual page.

One of these programs will be run by default when you select Partition a Hard Disk. If the one which is run by default isn't the one you want, quit the partitioner, go to the shell (tty2) by pressing Alt and F2 keys together, and manually type in the name of the program you want to use (and arguments, if any). Then skip the Partition a Hard Disk step in debian-installer and continue to the next step.

If you will be working with more than 20 partitions on your ide disk, you will need to create devices for partitions 21 and beyond. The next step of initializing the partition will fail unless a proper device is present. As an example, here are commands you can use in tty2 or under Execute A Shell to add a device so the 21st partition can be initialized:

cd /dev
mknod hda21 b 3 21 
chgrp disk hda21
chmod 660 hda21

Booting into the new system will fail unless proper devices are present on the target system. After installing the kernel and modules, execute:

cd /target/dev
mknod hda21 b 3 21 
chgrp disk hda21
chmod 660 hda21

See the mac-fdisk manual page for information on how to create partitions. One key point, is that the swap partition is identified on Mac type disks by its name; it must be named `swap'. All Mac linux partitions are the same partition type, Apple_UNIX_SRV2. Please read the fine manual. We also suggest reading the mac-fdisk Tutorial, which includes steps you should take if you are sharing your disk with MacOS.

A.5.1. Partitioning Newer PowerMacs

If you are installing onto a NewWorld PowerMac you must create a special bootstrap partition to hold the boot loader. The size of this partition must be 800KB and its partition type must be Apple_Bootstrap. If the bootstrap partition is not created with the Apple_Bootstrap type your machine cannot be made bootable from the hard disk. This partition can easily be created in mac-fdisk using the b command.

The special partition type Apple_Bootstrap is required to prevent MacOS from mounting and damaging the bootstrap partition, as there are special modifications made to it in order for OpenFirmware to boot it automatically.

Note that the bootstrap partition is only meant to hold 3 very small files: the yaboot binary, its configuration yaboot.conf, and a first stage OpenFirmware loader ofboot.b. It need not and must not be mounted on your file system nor have kernels or anything else copied to it. The ybin and mkofboot utilities are used to manipulate this partition.

In order for OpenFirmware to automatically boot Debian GNU/Linux the bootstrap partition should appear before other boot partitions on the disk, especially MacOS boot partitions. The bootstrap partition should be the first one you create. However, if you add a bootstrap partition later, you can use mac-fdisk's r command to reorder the partition map so the bootstrap partition comes right after the map (which is always partition 1). It's the logical map order, not the physical address order, that counts.

Apple disks normally have several small driver partitions. If you intend to dual boot your machine with MacOSX, you should retain these partitions and a small HFS partition (800k is the minimum size). That is because MacOSX, on every boot, offers to initialize any disks which do not have active MacOS partitions and driver partitions.