Posted by CANbike on Sat, 9 Mar 2013

USB Puppy Linux on Macbook Unibody (2008)

Laying around was a Macbook Unibody (2008) that would be perfect for Puppy Linux. Previously, though, when the Macbook was first purchased, I wiped out the hard drive and installed Debian Linux as the only operating system. Unfortunately the techniques used then, would not work for booting from a non OS X formatted USB flash drive. Nonetheless, the notebook would make a great Puppy machine if booted via USB flash drives. The following are instruction to boot a standard Live-USB of Puppy Can Bike 5.4.3 on the Macbook Unibody. Once setup, it requires only two clicks of the button to boot from the flash drive.

The Following are Required

OS X installed on a Macbook

I had to reinstall OS X on the Macbook.

Simply insert the installation DVD into the Macbook and follow the instructions. If no suitable hard drive partition is found, then run Disk Utility from the installation menu, and format the hard drive to an OS X Extended (Journaled) file system. Install OS X to the new partition.

After installation, run the software update to install the latest firmware and patches.

rEFInd

rEFInd is an EFI boot manager utility. Previously, rEFIt was used but that project has been abandoned. rEFInd is a modern updated fork of that project.

  1. Boot up the Macbook into OS X
  2. Login with an administrative account
  3. Download the latest rEFInd from http://sourceforge.net/projects/refind/
  4. If it was not automatically extracted, then extract it
  5. Using the terminal app, go to the directory of the extracted file. Execute the “install.sh” script
    ./install.sh
  6. Reboot

When the computer is rebooted the boot manager screen appears. Press any key but “Enter” to stop the automatic countdown.

rEFInd Configuration

The boot manager works. If a USB Puppy Can Bike 5.4.3 Flash Drive is inserted into the USB port, then “ESC” needs to pressed find the drive. After the drive is found, a selectable icon will appear which will load Puppy Can Bike 5.4.3 without issues.

However, this is a minor inconvenience having to press the “ESC” key to refresh the drive list even when it is plugged in before boot up. To fix this alter the rEFInd configuration file /EFI/refind/refind.conf.

  1. Boot up the Macbook into OS X
  2. Login with an administrative account
  3. Using the terminal app, go to the directory /EFI/refind
  4. Change the refind.conf permission to read and write via the command
    sudo chmod 664 refind.cond
  5. Use the command nano to edit the file.
  6. Add the line scan_delay=5 or uncomment line 177.
    i.e. change #scan_delay 5 to scan_delay 5
  7. Save the file.
  8. Reboot the computer.

If the USB Puppy Can Bike 5.4.3 Flash Drive is plugged into the USB port before startup, it will now appear automatically in the boot manager’s menu. Press the arrow key to select the icon, and enter to boot Puppy Can Bike 5.4.3 from the flash drive.

Puppy Can Bike 5.4.3 and Macbook Unibody (2008) Compatibility

Puppy Can Bike 5.4.3 is a remastered version of Precise Puppy 5.4.3. Results will be the same for either operating system.

Out of the box the following was noticed:

  • Display Resolution was correct
  • Sound was working
  • Trackpad worked, though no right-click
  • Wireless Card was detected and working

The only major issue was the monitor brightness set to maximum value.

According to cat /sys/class/backlight/apple_backlight/max_brightness the maximum setting is 15. Moreover according to cat /sys/class/backlight/apple_backlight/brightness the current setting was at 15.

The brightness was altered using the echo command and redirect command to set the brightness at level 5.

echo 5 > /sys/class/backlight/apple_backlight/brightness

This process can be further automated by adding the command to a startup script or installing a GUI program to alter the settings from the desktop.

Final Words

Simply by installing and configuring rEFInd on a Mac, Puppy Can Bike 5.4.3 can now be booted off a Live-USB Flash Drive or Live-CD with two clicks of the button. This makes it far easier to carry and transport work on a single flash drive from a PC to a Mac, as the flash drive contains the operating system, programs, and files.

CANbike-Puppy Linux-Macbook-01-thumb.jpgCANbike-Puppy Linux-Macbook-02-thumb.jpgCANbike-Puppy Linux-Macbook-03-thumb.jpgCANbike-Puppy Linux-Macbook-04-thumb.jpgCANbike-Puppy Linux-Macbook-05-thumb.jpg