Skip navigation.

the definitive debian/osx dual-boot aluminium powerbook 15 inch

| | | |

Having played around with the prototypical installation that I set up recently, I've now decided to take the plunge - having sussed out the connectivity in Islington-by-Sea as well (see a post to come that I started recently in a pub but then lost and is still to be rewritten). I'm planning on setting up a dual-boot powerbook, with the main focus being a debian system, but a "backup" macosx partition of about 20GB and also a shared media partition where I can store music - and any other files I wish to share between the two systems.

First, however, a brief recap of my hardware. This is a pretty standard Apple laptop that I bought about 3 years ago; recently the hard drive failed and I took it into the store for repair, where they replaced all the casing, the screen and the keyboard. I then replaced the original 80GB hard drive with a larger, 160GB drive. The exact spec is:

  • 15-inch aluminium powerbook
  • 1.5GHz PowerPC G4 processor with Velocity Engine, 512K SRAM on-chip L2 cache, 167MHz system bus
  • 1GB PC2700 (333MHz) DDR SDRAM
  • 15.2-inch (diagonal), 1280 x 854 resolution, TFT widescreen (replaced March 2007)
  • 160GB Travelstar E5K160
  • ATI Mobility Radeon 9700 with 64MB of DDR SDRAM (available with 128MB as BTO option on 1.5GHz configurations)
  • SuperDrive (DVD-R/CD-RW): writes DVD-R discs at up to 4x speed, reads DVDs at up to 8x speed, writes CD-R discs at up to 16x speed, writes CD-RW discs at up to 8x speed, reads CDs at up to 24x speed
  • Full size keyboard, illuminated with ambient light sensor (replaced March 2007)

and, of course, more details on the apple page I've linked to above.

Having decided what I want to use this computer for, I now needed to start installing things and figuring out how much space to allocate. As it is necessary to first install OSX "Tiger" followed by debian afterwards, I only needed to have an approximation at this stage, so I decided to go with a 20GB partition for this install, meaning that I would have a decent amount of space for whatever work I wanted to do, yet have plenty of space for media and still leave more space than I had originally (i.e. greater than 80GB) for my new operating system. Installing "Tiger" was a breeze, merely requiring me to insert the disc and answer a few simple questions regarding language, time zone, and so on. The one thing I did need to do, before really diving into the process, was just use the Disk Utility feature that was incorporated on the disc to rearrange the partition sizes and set the 20GB partition for OSX. There is more guidance about all of this in the debian installation manual.

debian

Debian takes other operating systems that are pre-installed into account, so should be installed after the apple software is set up. This also means that you've already got an operating system to use to download the debian netinstall cdrom, and it's possible to burn the disc using the Disk Utility program. To get the powerbook to boot from the cdrom, you need to start the machine with the disc pre-inserted (or insert it immediately) and then hold down the option key. This causes the powerbook firmware to scan all the available media and display bootable partitions.

After selecting the cdrom (it has the linux penguin on it, too), there is a prompt for choosing the type of installation that you desire: I chose expert to maximise the amount of input that I was able to have in the installation process, although many things I will just go with the defaults presented, and then I was off! Like the apple installation, the first few options relate to language, keyboard type, geographical location, and so on. The one important note here is the menu option Load installer components from CD under which I chose the following options:

[*] choose-mirror: Choose mirror to install from (menu item)
[*] crypto-modules-2.6.18-4-powerpc-di: crypto modules

I also selected the options for loop-aes modules, although I don't think that I need them (I will use dmcrypt).

partitioning

This is always the most worrying bit. There are some important things to bear in mind when partitioning a dual-boot system on a powerpc. First is that there is a little apple partition that needs to be kept - I presume this is a boot partition. Secondly, you also don't want to overwrite the macosx installation that you've just done! Thirdly, I want to set up encrypted disks.

suggested schema

To ensure that I can do all this, I first run the guided partitioning tool, to get an idea of the suggested formatting. This does not take into account previous installations, but considers the disk as a whole. It is possible to do this as the actually overwriting and reformatting part does not take place immediately, but only when you are happy with the partition map. Thus, the suggested schema looks like this:

IDE1 master (hda) - 160.0 GB Hitachi HTS541616J9AT00
      #1  32.3 kB                Apple
      #2   1.0 MB B K boot       untitled
      #3 256.0 MB   f ext3       untitled     /boot
      #4 159.8 GB   f cypto      untitled     not active

That looks okay, but I have a preformatted disc (via the tiger installation that I have already done) with various partitions, of which one contains the mac osx software. And I don't want to delete that! Furthermore, I'd like to have a shared media partition, and that needs to be formatted by OSX in order for it to be recognised, so I also want to preserve that partition.

current schema

The actual partition table, post-OSX installation looks like this:

IDE1 master (hda) - 160.0 GB Hitachi HTS541616J9AT00
      #1  32.3 kB                Apple
      #2 256.0 MB     hfs+       Apple_HFS_Un
         134.2 MB     FREE SPACE
      #4   5.1 GB     hfs+       Apple_HFS_Un
         134.2 MB     FREE SPACE
      #6  21.2 GB     hfs+       Apple_HFS_Un
      #7   8.9 MB     hfs+       eXternal boo
      #8  35.0 GB                Apple_UFS_Un
          98.2 GB     FREE SPACE

lvm schema

Thus, using the information from the suggested schema, I can rewrite the partition table to take account of these points. This, however, would give me three encrypted partitions. In actual fact, I would rather use LVM if I can to unite these partitions into one, and so that I have increased flexibility for the future. For example, I may find that having a 35GB shared media drive is unnecessary, and want to incorporate that into the rest of the system.

At this point, I have to write the partition map to disk in order to configure the Logical Volume Manager. Then, I can create a volume group (dove) and include the three available partitions in it. Next, I create a logical volume (logic) and now I can return to the main partition manager menu and set up the logical volume group to contain encrypted data. In doing this, I am presented with the following options:

                                                        | Alternative options 
                                                        +----------------------
Name:                  crypt0                           |
Use as:                Physical volume for encryption   |
Encryption method:     Device-mapper (dm-crypt)         | Loopback (loop-aes)
Encryption:            aes                              | blowfish, serpent, twofish
Key size:              256                              | 192, 128
IV algorithm:          cbc-essiv:sha256                 | cbc-plain, plain, ecb
Encryption key:        Passphrase                       | Random key

Returning to the main menu again, the partition map now looks as it did a minute or two ago, but has two additional lines to represent the volume group:

IDE1 master (hda) - 160.0 GB Hitachi HTS541616J9AT00
      #1  32.3 kB                Apple
      #2   1.0 MB B K boot       NewWorld
      #3 256.0 MB   f ext3       /boot        /boot
      #4   5.4 GB   K lvm        part0
      #6  21.2 GB     hfs+       tiger
      #5   8.9 MB   K lvm        part1
      #8  35.0 GB   f xfs        media
      #7  98.2 GB   K lvm        part2
LVM VG dove, LV logic - 103.6 GB Linux device-mapper
      #1 103.6 GB   K crypto     not active

encrypted schema

Finally, I am at the point where I can configure the encryption. To do this, I choose Configure encrypted volumes and am then asked if I wish to erase the data that is presently on the partitions I have flagged for encryption - i.e. hda4 and hda7. I say "yes", even though this is a pretty new drive and not used much: one can never be too sure! Erasing the data (it is in fact being overwritten with random data) takes a little while and enables me to update this post while I am waiting. I am next prompted for a passphrase, and then finally I am at the point of choosing where to mount this. I choose '/' as I haven't yet defined a root filesystem and have no need for different partitions.

Thus, my overall partition map looks like this:

IDE1 master (hda) - 160.0 GB Hitachi HTS541616J9AT00
      #1  32.3 kB                Apple
      #2   1.0 MB B K boot       NewWorld
      #3 256.0 MB   f ext3       /boot        /boot
      #4   5.4 GB   K lvm        part0
      #6  21.2 GB     hfs+       tiger
      #5   8.9 MB   K lvm        part1
      #8  35.0 GB   f xfs        media
      #7  98.2 GB   K lvm        part2
LVM VG dove, LV logic - 103.6 GB Linux device-mapper
      #1 103.6 GB   K crypto     not active
Encrypted volume (dove-logic_crypt) - 103.6 GB Linux device-mapper
      #1 103.6 GB   f ext3       /

At this point, make sure you remember your passphrase!! I've written it down, in pencil, on a piece of paper which I currently have in front of me - I'm on my own here. As per the guidance, it uses a mixture of upper and lower case characters, numerals and punctuation, and is at least 20 characters in length.

NB: at this point I got a warning that I hadn't configured any swap space; however, I'm not bothered about that at present (after all, I could always resize the encrypted partition later and create some using the LVM)

base system

The debian installer now provides prompts for configuring the time zone, clock and initial users, before loading the base installation from the CD. Then, it is necessary to set up the package manager. There are various prompts to complete, which are dependent upon locality and how you want to configure the rest of the system - the main point to note is the one for the debian popularity contest which I elected not to enable, as I don't have great connectivity with my laptop. If I do get to a stable connection again, maybe I'll change that.

And onto reboot....