Linux on iPod at SourceForge. |
Linux iPod Installation GuideIntroductionThe Linux on iPod project offers a development platform for building applications that run on the iPod hardware. Currently we have also developed a basic application that mimics some of the functionality of the existing Apple firmware, over time we hope to add to this application to provide similar functionality to that as the Apple firmware as well as innovations not available with the standard software. Installation of Linux on your iPod is a non-destructive process and will leave all your existing configuration and music on your iPod. The included bootloader will also allow you to choose either the Apple or the Linux software to start at reset. This document describes how to install Linux on your iPod using a Unix-like system (for example Linux or Mac OSX). The process is based on the 2.4.24-ipod0 release of the Linux kernel and the 040403 release of the root filesystem. Any feedback on this documentation is greatly appreciated. OverviewThis document covers the following sections.
Firewire/Connection SetupIn order to install Linux on your iPod you firstly need to have your system configured for your iPod. If you are using Mac OSX then there is probably nothing further to do, however if you are using Linux (especially if this the first time!) you need to ensure that you have either Firewire or USB correctly configured for your iPod. To configure Firewire or USB for your system please consult the documentation provided with your operating system. Once the operating system is configured you need to determine how your operating system identifies your iPod. To do this you should plug in your iPod to your PC and ensure that it switches to Disk-Mode. Normally it should do so automatically when the appropriate connection is established by your operating system, however, you can enter forced disk mode by resetting your iPod (hold down menu and play/pause for 3 seconds) and then when the Apple icon appears hold down fast-forward and rewind. Once in disk mode you should see the message "Do not disconnect." on your iPod. You should then check your operating system configuration to see how your iPod is configured. To continue with the installation please go to the operating system specific section of the manual.
This section of the guide details how to install Linux on your iPod using a Linux based PC. It assumes that you are using a Windows formatted iPod (e.g. FAT32) - if your iPod is HFS+ formatted it is generally easier to reformat as FAT32. Note, with Linux it is necessary to have root permissions to install Linux on your iPod. Locating your iPodUnder Linux you should check the file "/proc/scsi/scsi" for an entry where the Vendor is "Apple" and the model is "iPod". For example:
The BackupSince we will update the partition information and replace the hard-drive firmware image we will firstly make a backup of this data. The first backup file is simply a copy of the MBR (master boot record) which contains the partition table for the disk. The second backup file is a complete backup of the operating system partition on the iPod and includes the Apple iPod operating system (this file is 40MB and can be compressed once the installation process is complete).
Should you need to restore these backups for any reason simply use the following commands.
Note, if you want to upgrade the Apple firmware then you should firstly restore the iPod operating system backup. It is also possible to completely restore your iPod to its factory state by using the restore program from Apple. This will restore the original operating system and standard partitioning to your iPod. Unfortunately this will mean any settings or music will have to be copied back to your iPod. PartitioningNow that the backups are done we will add a new partition to the iPod to hold the root file system for Linux. This is required on Win-iPods as Linux cannot use a FAT partition for its root file system. The following commands describe a session with fdisk that deletes the existing firmware partition and then creates a new, smaller, partition to hold the firmware. The additional space is then used to create a new partition which we then format for use with Linux. Note, the output displayed below is correct for a 20GB iPod, some output will be different for different sized iPods however the values entered by the user remain the same.
Kernel InstallationTo install the kernel you need the iPod Boot Loader, a version of the iPod Linux Kernel and the iPod operating system backup created earlier in the backup process. Firstly extract the ipodloader and iPod Linux kernel archives into a working directory and check for any last minute release notes. In the examples below the
Userland InstallationThe iPod Linux Userland contains the operating system tools and libraries (including the podzilla and mp3 applications). This archive should be installed on the root partition of your iPod as created during the partition step above.
Finishing upThe current release contains a number of usability bugs that can be resolved by executing the following commands.
Using the configuration above on reboot your iPod will automatically start Linux. You should see the Tux logo and then the normal Linux boot console messages will scroll by. Once the operating system is booted the Podzilla application will start. This work-in-progress interface mimics the Apple interface. When you are finished with Linux you can reboot the iPod by holding down the menu and play/pause buttons for 3 seconds. When the Apple logo appears hold down the rewind button to start the Apple firmware. UpgradingTo upgrade to a new version of the kernel simply repeat the process in the Kernel Installation section. To upgrade to a new version of the user tools simply repeat the process in the Userland Installation section. To install a new version of podzilla simply copy the new podzilla binary to your iPod:
Uninstalling iPod LinuxTo completely remove Linux from your iPod you should restore the original firmware partition and MBR from your backup files.
Mac OSX InstallationThis section of the guide details how to install Linux on your iPod using a Mac OSX based PC. To use this portion of the guide your iPod must be formatted with the HFS+ filesystem (this is the default for Mac-iPods). Locating your iPodWith OSX your iPod should be automatically mounted when you plug it into your Mac. To determine the device name: Start the Terminal application, and run the mount command.
The The following example commands will use BackupThe backup file is a complete backup of the operating system partition on the iPod and includes the Apple iPod operating system (this file is 40MB and can be compressed once the installation process is complete).
Should you need to restore the backup for any reason simply use the following commands.
Note, if you want to upgrade the Apple firmware then you should firstly restore the iPod operating system backup. It is also possible to completely restore your iPod to its factory state by using the restore program from Apple. This will restore the original operating system to your iPod. Unfortunately this will mean any settings or music will have to be copied back to your iPod.
To install the kernel you need the iPod Boot Loader, a version of the iPod Linux Kernel and the iPod operating system backup created earlier in the backup process. Firstly extract the ipodloader and iPod Linux kernel archives into a working directory and check for any last minute release notes. In the examples below the
Userland InstallationThe iPod Linux Userland contains the operating system tools and libraries (including the podzilla and mp3 applications). This archive should be installed on your normal iPod filesystem. Extract the root filesystem onto the iPod.
Finishing upThe current release contains a number of usability bugs that can be resolved by executing the following commands.
Using the configuration above on reboot your iPod will automatically start Linux. You should see the Tux logo and then the normal Linux boot console messages will scroll by. Once the operating system is booted the Podzilla application will start. This work-in-progress interface mimics the Apple interface. When you are finished with Linux you can reboot the iPod by holding down the menu and play/pause buttons for 3 seconds. When the Apple logo appears hold down the rewind button to start the Apple firmware. UpgradingTo upgrade to a new version of the kernel simply repeat the process in the Kernel Installation section. To upgrade to a new version of the user tools simply repeat the process in the Userland Installation section. To install a new version of podzilla simply copy the new podzilla binary to your iPod:
Uninstalling iPod LinuxTo completely remove Linux from your iPod you should restore the original firmware partition from your backup.
Windows InstallationFor installation using a Windows PC please see the ipodlinuxinst project.
|