Update: (2005-08-17 5:05 pm) This story has made news on Hackaday!
WARNING: This procedure is unsupported by Apple, the iPodLinux project, or myself. I, Reid Burke, can not accept any responsibility for any damage this procedure may cause to your iPod, your computer, or your sanity. I hosed my firmware the first time I tried this (used the wrong bootloader when testing this procedure), and although I recovered my iPod, you lose all of your music and settings on the iPod. That being said, please backup all of your music before continuing!
I recently was able to install Linux on my second-generation iPod mini. Although it still has some known issues it works well for me. It really wasn’t that hard to do, but I had to refer though about 5 different iPodLinux wiki pages and do a few Google searches to fill in the missing pieces. Because of all of the different information it was easy to miss something and screw up, so I decided to write a howto to make it easier on those who are interested in getting Linux on their iPods. Nevertheless, I’d recommend having some experience with the command line before attempting to install it. If you’re interested in getting Linux to work on your iPod mini, then here’s how under Mac OS X:
- The make_fw firmware creation program and the loader.bin boot loader included in the official iPodLinux boot loader package does not work with iPod mini. Support for the mini has only been recently introduced. For your convenience I have compiled the latest version (as of August 15th, 2005) of make_fw and loader.bin and am providing the binaries to download. You can obtain these files here. Create a iPodLinux working directory for iPodLinux-related files and extract the download into that folder.
- Now you’ll need to download the iPodLinux kernel and podzilla, the GUI for iPodLinux. The release versions of these files won’t work with iPod mini, so we will need to download a nightly CVS build of both files. Simply visit the iPodLinux nightly builds download area and download the latest compressed kernel and podzilla binary. Extract these files into the iPodLinux directory you created eariler.
- You’ll also need to download the official kernel package to obtain the necessary libraries needed by the kernel. Download the latest kernel release from SourceForge.net’s download area and extract it anywhere. You should get a folder named “uclinux-2.4.24-ipod2” (the current release as of August 15th, 2005). Drag the lib folder inside of that folder into your iPodLinux working folder.
- Finally, you’ll need to download the base filesystem for iPodLinux, located at SourceForge.net’s download area. Don’t extract the downloaded file, simply place it into your iPodLinux directory. You should now have these items in that directory: the lib folder, ipod_fs_mmddyy.tar.gz make_fw, loader.bin, yyyy-mm-dd-kernel.bin, and yyyy-mm-dd-podzilla.
- Connect your iPod to your computer. You’ll need to discover the device name, so open Terminal and run the mount command:
$ mount
...
/dev/disk1s3 on /Volumes/iPod (local, nodev, nosuid, journaled)The /dev/disk1s3 portion indicates the iPod is the first SCSI device and so will be visible as /dev/disk1, if on your system you see /dev/disk2s3 then your iPod would be using device /dev/disk2. In the above example the volume is mounted as /Volumes/iPod. The iPod portion will be the name of your iPod.
The following example commands will use disk1 as the device for the iPod and /Volumes/iPod for the mount point, please replace these with the corrects values for you configuration.
- Before continuing, you should create a backup of the Apple OS. The backup file is a complete backup of the operating system partition on the iPod and includes the Apple iPod operating system (this file is about 40MB and can be compressed once the installation process is complete). To create a backup file, open Terminal, cd into your iPodLinux directory, have your iPod connected and run:
$ dd if=/dev/disk1s2 of=ipod_os_partition_backup
If you need to restore the backup for any reason simply run the following command:
$ dd if=ipod_os_partition_backup of=/dev/disk1s2
Note: If you want to upgrade the Apple firmware then you should firstly restore the iPod operating system backup using the above command.
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. This is useful if anything goes wrong while installing Linux into your iPod. For more information, see “When something goes wrong…” later on this page.
- Now you’re ready to install iPodLinux into your iPod. In Terminal, make sure you’re in your iPodLinux directory. Now extract the Apple OS from the firmware image.
$ ./make_fw -3 -o apple_os.bin -e 0 ipod_os_partition_backup
- Create a new firmware image containing both Linux and the Apple OS. (Remember to replace yyyy-mm-dd-kernel.bin with the appropiate filename of your kernel.)
- To boot into Linux by default, and Apple OS by holding down Rewind, use this command:
$ ./make_fw -3 -o my_sw.bin -l yyyy-mm-dd-kernel.bin -i apple_os.bin loader.bin
- To boot into Apple OS by default, and Linux by holding down Rewind, use this command:
$ ./make_fw -3 -o my_sw.bin -i apple_os.bin -l yyyy-mm-dd-kernel.bin loader.bin
- To boot into Linux by default, and Apple OS by holding down Rewind, use this command:
- Write the new kernel image (about 4-5 MB) to your iPod.
$ dd if=my_sw.bin of=/dev/disk1s2
- Copy the kernel libraries to your iPod.
$ cp -r lib /Volumes/iPod
- Copy the base filesystem to your iPod.
$ tar xzf ipod_fs_040403.tar.gz -C /Volumes/iPod
- Copy the nightly podzilla binary to your iPod.
$ cp yyyy-mm-dd-podzilla /Volumes/iPod/sbin/podzilla
$ chmod +x /Volumes/iPod/sbin/podzilla - The included /etc/rc and /etc/inittab files need to be edited for greater stability and for the clock to work.Open up an editor and replace /Volumes/iPod/etc/rc with:
hostname ipod
mount -t proc proc /proc
ln -s /dev/pty/m0 /dev/ptyp0
ln -s /dev/pty/m1 /dev/ptyp1
ln -s /dev/ide/host0/bus0/target0/lun0/disc /dev/hda
ln -s /dev/ide/host0/bus0/target0/lun0/part3 /dev/hda3
ln -s /dev/tts/1 /dev/ttyS1
mknod /dev/ttyp0 c 3 0
mknod /dev/ttyp1 c 3 0
mount -o remount,rw /dev/hda3 /
hdparm -S 3 /dev/hda
hwclock --hctosysNow open /Volumes/iPod/etc/inittab and replace it with:
inet:unknown:/bin/inetd
pz:unknown:/bin/podzilla - You’re done! Eject your iPod and it should automatically restart. Depending on how you installed your firmware eariler, you may need to press Rewind while the iPod reboots to get into Linux (or back into the Apple OS).
Where to go from here…
Discover podzilla! You’ll be suprised what it does right “out-of-the-box”. If you’re interested in more functionality, check out the iPL 2G Mini page for more advanced information.
When something goes wrong…
See the iPodLinux troubleshooting FAQ for help if something goes wrong. They do a good job of explainig what you need to do for a wide range of iPodLinux problems.
Again, running iPodLinux on any iPod mini is not supported whatsoever! If you choose to install Linux and you encounter something not working right, by all means don’t ask for support on the iPL forums and waste the time of support people… you’re on your own with unsupported installs like this.
References
Giving credit where credit is due, alot of material on this page was obtained from the follwing wikiPodLinux pages: