iPod Linux is an operating system for Apple iPod. Like any other Linux operating systems, it is free, and open source. A lot of modules, are available,a lot of user interfaces, i.e the podzilla are available for selection. Currently it supports most of the iPod generations, except the newest ones. Rockbox is another OS, free and open source. iPodlinux is in the development phase, so a lot of things lacks, like the music has problems. Rockbox has good stable releases, with has very good feedbacks, and no problems to use. Both of them keeps developing, and a good future of iPod’s optional OSes can be seen, which make good utilizations of the hardware, and can cross the limitations which the Apple OS enforces. In this guide we will manually install iPodLinux and Rockbox along with the inbuilt Apple OS in an iPod Nano 1G using the latest iPodLinux Kernel and all. So get going and continue reading the whole article and triple boot your ipod.
Automatic installers are available for iPodlinux, but they are pretty out dated, so installing manually will get the latest things. Rockbox has updated auto installer, but in my opinion installing it manually is easier than automatic.
I will assume that a working directory where you dump all the needed files, have been created. I will refer it as “workingdir”, I will assume that “/mountpoint” is, where your iPod mounts. And “/mountpoint/fat” to denote the FAT32 partition mount directory and “/mountpoint/ext3” for the ext3 mount directory.
I will assume you have both a terminal, and konqueror, or nautilus e.t.c opened with superuser privileges. So you can use both the GUI and CUI whenever needed. This process has been divided in eight phases, I have seen people to mess things up fast, because they do not organize their work. Dividing the process in phases and checking after each step is done, will be the best,and the chances of messing up will be minimum.
- Phase I – Collect
- Phase II – Detect
- Phase III – Backup
- Phase IV – Partitioning
- Phase V – Formatting
- Phase VI – Installing Linux
- Phase VII – Install Rockbox
- Phase VIII – Install the Bootloader
- RESTORE WHEN MESSED UP
- What if the iPod Hangs ?
- Switching Between Podzilla
- Known Issues
Phase I – Collect
Check first if your iPod model is supported with iPodLinux and Rockbox.
For iPod Linux
- Latest Stable Kernel
- Ipod_fs_.tar.gz (filesystem)
Download these components from the urls provided by visiting the linked pages. Get the nightly builds, they don’t need to be compiled, and the work is easy.
Check out here for more podzilla, the user interfaces of iPod. In case of a broken link please let me know.
If you find some difficulties finding the iPodLinux packages then click here to download the above packages at once. This are the files that i used, so there are not new. I will tell you to manually download the new packages. Note that the rockbox files are not included in this package, so download then manually.
Note: some of the above are not direct links. After visiting the linked page find the component in it (by name) and download it.
Phase II – Detect
Open terminal and become superuser, Enter working directory, and make ipodpatcher executable and as below
chmod +x ipodpatcher ./ipodpatcher --scan
you’ll get an output like
[INFO] Scanning disk devices... [INFO] Ipod found - 1st Generation Nano ("winpod") - /dev/sdb
Your iPod model would be printed. The letter ‘b‘ in /dev/sdb may be anything like a,b,c,d etc. depending on your system. So note what it is. From now on I will use /dev/sdX to refer the iPod device. You should replace it with the appropriate character as detected on your system. Remember the “X“. For security, please forbid any writing access, for any user, to your HDD partitions , by any means, except the partition of workingdir and the mountpoint. Because you will be working as root, if you accidentally execute a command which formats the HDD, then you will be in trouble. I am telling this because it happened to me once.
If detection fails check if your iPod is mounted. You need to log on as root to do this. If still it fails, then your iPod is not supported. Check that your iPod is supported or not in http://ipodlinux.org/wiki/Project_Status.
Phase III – Backup
- Backup all the directories in the iPod. Specially the “iPod_Control” directory. Just copy-paste.
- Backup the MBR of your iPod by running the backup utility
dd if=/dev/sdX of=ipod_mbr_bak bs=512 count=1
A file “ipod_mbr_bak” will be created in the working directory.
- Backup Apple firmware, the Apple OS
./ipodpatcher -r appleos.bin
A file “appleos.bin” in your current working directory.
Preserve the backup files in the working directory.
Phase IV – Partitioning
We will be using fdisk and mkfs for partition and format. Users may create partitions with gparted, or other 3rd party tools to create appropriate partitions. To install the 3 OS es we will need three partitions.
- Partition 1: Raw partition containing the Apple Firmware
- Partition 2: Win FAT32 partition for the Rockbox OS, Musics, etc. Must be bootable
- Partition 3: Linux ext3 partition containing the Linux OS.
If gparted, or any tool which can resize the partitions,is used, then just resize the FAT32 partition and shrink it to get enough space for Linux (see below), and format the created free space to ext3. And make the FAT32 partition bootable. This will preserve the data , but backup is still recommended. fdisk commands are shown below.
- Unmount the iPod,but don’t eject,and run fdisk.
umount /mountpoint/fat/ /sbin/fdisk /dev/sdX
you will get the fdisk prompt, type “p” and jab Enter. The partition table of your iPod will be shown. It will be similar to
Disk /dev/sdX: 4095 MB, 4095737344 bytes 255 heads, 63 sectors/track, 497 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x20202020 Device Boot Start End Blocks Id System /dev/sdX1 1 10 80293+ 0 Empty /dev/sdX2 11 497 3911824+ b W95 FAT32
The parameters to note are:
Total Cylinders, bytes per cylinder, the end cylinder of the first partition /dev/sdX1. The first one is already a raw partition, so we don’t need to create the first partition. The total cylinder will differ from iPod to iPod depending upon capacity. Let us denote some needed parameters with some variables, which we will use.
- Total Cylinder = C
- End Cylinder of first partition = E
- Bytes per Cylinder = B (in bytes)
- Memory to be allocated to ext3 Partition = y (in M Bytes)
- Total Cylinders to be allocated for Linux ext3 partition = L
- Total Cylinders to be allocated for FAT32 partition = W
- Now decide how much space you want to give to the Linux partition. Minimum 20 MB will be okay. But i will prefer to give it some more like a 100MB if you want to install some goodies. Let us allocate “y” MB to the Linux partition.To calculate “L“, the number of cylinders associated with “y” we use a simple formula:
L = ceil( ( y*1024*1024 ) / B)
If 100MB is the size of Linux partition we have 100*1024*1024 bytes /8225280 bytes = 12.7483 , and ceil value = 13 cylinders. It would just a bit more than 100MB. The remaining will be the FAT32 partition. We have “L” cylinders for Linux.
The total Cylinders for FAT32 partition is:
W = C - ( E + L )
In my case it was: W = 497- (10+13) = 474
- Delete the existing FAT32 partition and create a FAT32 and an ext3 partition in a row. Follow the below instructions to do it:
- In the fdisk prompt type “d“.
- Enter “2” in the partition number to delete the existing FAT32 partition.
- Enter “n” in the prompt to create a new partition. When prompted,
- Enter “p” to create a primary partition.
- Enter “2” to create the 2nd partition.
- The first cylinder of the partition, which you are creating, will be asked for.
Now enter the value of (E+1). (In my case it is (10+1)=11)
- The last cylinder of this partition is now prompted for.
Enter the value of (W+E) in the prompt, i.e from the end of the first partition plus the cylinders allocated for FAT32 partition. The action in my iPod is shown below, with the variable interpretations in the box brackets, which should be replaced appropriately as your needs (Your responses in red).
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (1-497, default 1): 11 # value of [E+1] Last cylinder or +size or +sizeM or +sizeK (11-497, default 497): 484 # value of [W+E]
- Similarly to create the ext3 partition.
- Enter “n” to create a new partition.
- Enter “p” to select primary.
- Enter “3” in the partition number as this is the 3rd partition in the row.
- Enter the value of (W+E+1), i.e the next of the last cylinder of FAT32 partition.
- Enter the value of C, for the last cylinder on the disk.
Again, the action for my pod is shown below, with the variable interpretations in the brackets, which should be replaced appropriately. (Your responses are in red)
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (1-497, default 1): 485 # value of [W+E+1] Last cylinder or +size or +sizeM or +sizeK (485-497, default 497): 497 # value of [C]
- The 2nd partition, needs to be bootable. Do the following to make the partition bootable:
- Enter “a” in the fdisk prompt, it will ask the partition number. Enter 2 to make it bootable.
- Enter “p” and you will notice an asterisk sign beside the 2nd partition and under the boot column.
- By default all the newly created partitions are of Linux type.
We need to set the 2nd partition to FAT32.
- Enter “t” in the prompt,
- Enter “2“. You will be asked the hexadecimal code of the partition type.
- Enter “b“. The hex code for FAT32 is “b (lowercase).
- Enter “p” and make sure alls okay, and your table looks similar to the below.
Device Boot Start End Blocks Id System /dev/sdX1 * 1 10 80293+ 0 Empty /dev/sdX2 * 11 484 3807405 b W95 FAT32 /dev/sdX3 485 497 104422+ 83 Linux
Double check that you haven’t overlapped the partitions, by assigning same cylinders to different partitions. fdisk won’t warn you if you did this. If any error is there fix it. If you are not confident what you did and messed things up enter “q” to quit without saving and redo the things. If all seems okay then enter “w” in the prompt to save and exit.
The partition table is created successfully.
Phase V – Formatting
Now we have to format the partitions to appropriate file systems. If any of the partitions are mounted, unmount them first.
- Format the Linux partition with
- Disable the file system check for the ext3 partition, run
/sbin/tune2fs -c 0 /dev/sdX3
- Now format the FAT32 partition.
/sbin/mkfs.vfat -F 32 /dev/sdX2
this will format the FAT32 partition
- The sector size in the iPod 5.5G has 2048 bytes ,and which the mkfs don’t support. In that case try
mkfs.vfat -S 2048 -F 32 /dev/sdX2
Else, it’s better to use other 3rd party format application.
Phase VI – Installing Linux
In this phase the best will be to work in GUI with superuser privileges, just run konqueror, or nautilus from the shell (when in su).
- Unpack the file system base, i.e Ipod_fs_.tar.gz into the root of the Linux partition.
cd /mountpoint/ext3 tar xvzf /workingdir/Ipod_fs_.tar.gz
- Install the Linux kernel, by extracting the bin.gz into the root of your iPod’s ext3 partition. Rename the kernel from whatever, to “linux.bin“.
gzip -dv /workingdir/.bin.gz cp /workingdir/ /mountpoint/ext3/linux.bin
- The Mpd-floydzilla.zip file contains the floydzilla, and the mpd binary, and mpd.conf. Now:
- Extract and rename floydzilla to “podzilla” and copy it into iPod’s /bin directory.
- Extract podzillla2.tar.gz into the working directory, and rename the extracted to “podzilla2” and move it into iPod’s /bin directory.
- Activate podzilla and allow them to be executed.
chmod +x /mountpoint/ext3/bin/podzilla chmod +x /mountpoint/ext3/bin/podzilla2
This will let you switch between floydzilla and podzilla2 within the iPod.
- Configure mpd for floydzilla.Configuring floydzilla with mpd will let you do other stuffs, while a music is playing.Copy mpd, from Mpd-floydzilla.zip to /bin directory, and activate it
chmod +x /mountpoint/ext3/mpd
- Create a file in /etc named “mpd.conf” and type in the below lines and save.
port "6600" music_directory "/" playlist_directory "/home/.mpd/playlists" log_file "/home/.mpd/mpd.log" error_file "/home/.mpd/mpd.error" db_file "/home/.mpd/mpddb" state_file "/home/.mpd/state" mixer_control "PCM"
This conf file will service floydzilla’s mpd. Podzilla2’s mpd.conf will be created automatically on the first run.
- Create the directories for the mpd.
mkdir /mountpoint/ext3/home/.mpd mkdir /mountpoint/ext3/home/.mpd/playlists
- Install the downloaded modules. You need to extract the module’s tar.gz files into the /usr/lib dir in the iPod ext3 partition.
Extract pzmodules.tar.gz in /usr/lib. This provides a collection of official modules.
cd /mountpoint/ext3/usr/lib tar xvzf /workingdir/pzmodules.tar.gz
- Install the mpd-modules-0.4.tar.gz module as above by extracting the contents of the archive in the /usr/lib directory of your ipod’s ext3 partition, for music support, in podzilla2.
- Install the Appearances and FontsExtract appearance.tar.gz into /usr/share/ in your iPod’s Linux partition. The fonts also go in this directory.
cd /mountpoint/ext3/usr/share tar xvzf /workingdir/appearance.tar.gz
- Edit the /etc/rc with any text editor, add the below lines just before the line “exec podzilla“, which you will find at the end of the file.
. . . /bin/mpd /bin/sleep 5
This gives enough time to load mpd (5 sec) before floydzilla is loaded, and will let you play music.
Note: If you install a lot of modules, the loading time of podzilla2 will increase.
At last The iPod Linux OS is loaded!
Note: If you dont want mpd with floydzilla, then just download ordinary floydzilla, and skip step 4 and 7. Without mpd you will be able to play music, but while the music is playing, you can’t do any other thing in the iPod, not even browse musics, because when ever you try to do any other thing the music will stop.
Phase VII – Install Rockbox
- Unzip the rockbox.zip in the root of the FAT32 partition, using any application. rockbox.zip contains a directory named “.rockbox” so the file is hidden. Do “Show Hidden Files” in GUI, or ‘ls -a‘ in CLI to see it. You may execute
cd /workingdir/ unzip rockbox -d /mountpoint/fat/
Wow! Thats the end of installing rockbox.
- Now when you have finished with installing both OSes, copy-paste the iPod’s directories along with the iPod_Control directory in the root of the FAT32, to get back all the songs, pictures, and settings.
Phase VIII – Install the Bootloader
- Extract the ipodloader2 in the working directory.
cd /workingdir tar xvzf ipodloader2.tar.gz
A file named loader.bin will appear in the working directory.
- Now again we use the ipodpatcher for the last time. Execute the below as root.
./ipodpatcher -ab loader.bin
A lot of things will be printed, but if you see in the last line
[INFO] Bootloader loader.bin written to device.
Then you’re done. And thats it, you have triple booted your iPod!
- Unmount, eject, reboot your ipod, and select an OS to boot from the iPod Loader II list and have fun.
RESTORE WHEN MESSED UP
If you have messed up all, you need to restore the original condition, with the MBR and the firmware backup you took in Phase II
- Restore the MBR
dd if=ipod_mbr_bak of=/dev/sdX
- Format FAT32 partition.
/sbin/mkfs.vfat -F 32 /dev/sdX2
- Restore the OS partition,the firmware partition. (Not needed if this partition is not affected)
./ipodpatcher -w appleos.bin
- Remove iPL (iPod Loader)
- Copy-paste your iPod_Control directory into iPod’s FAT32 Partition
What if the iPod Hangs?
Keep the Menu and the Center button pressed for 5 seconds, and your iPod will reboot.
Switching Between Podzilla
In Phase – VI, step 3, both the floydzilla and podzilla2 were installed. Podzilla2 has problems with music, but has lots of great plugins. Keeping these two will let you switch to any podzilla, you want, within the iPod. By default floydzilla will be loaded. After it is loaded use the file browser, and visit the /bin directory within the iPod and then scroll down to the file “podzilla2” and press the center button. And podzilla2 will be loaded, and you will be able to enjoy the new podzilla2 modules. When you have finished using the podzilla2, go to the power option and select the “Quit Podzilla” and you will return to floydzilla. You also can keep the podzilla2 file in the root of the iPod, to quickly select it, without going through the long listing of files inside /bin directory. Simmilarly, more podzilla can be installed and switched between.
Currently podzilla2 is not fully ready for music. It lacks proper music, the only music player present in the podzilla2 is the MPDc, which works with MPD. Lots of different build is available of these modules, most of them does problem, and shows error. The MPD guides in the Internet are pretty outdated,even in the official website, and they don’t work. The link I have provided, contains a build of MPD,and MPDc , which is trouble free than other builds. They play music most of the time but some times there is a memory allocation error. floydzilla plays music, without such problem,but there are very minimal options which you get while playing music. Complains of freezing of podzilla2 is reported in the forums. Podzilla2 is currently under development. In the first run of both podzilla, they will make databases, of all songs, which will take time, depending on number of songs. After database creation, it will hang. Reboot it, and it will work fine.
We discussed about a lot of drawbacks, but we should talk of some good features. the positive side in iPodlinux, a huge amount of modules are available, which are really great and is worth installing them. In games, the iPobble,the well known Invaders, Vortex, Hunt the Wumps, are within the best of all. Iracer, Kaboom, Tetris, Pacman and a lot of cool games could be played. iBoy can be installed, the gameboy emulator, to play classic games. Other gaming emulators are available for download in the website. In applications,Calculator, Resistor Code calculator, Podwrite, Paint, are useful and interesting. Pod to Pod can transfer songs directly from an iPod to another iPod. Video and MIDI plugins are available. There’s lots of other fun stuff and demos. More than 140 modules are available. Music lacks at present in podzilla2, because the MPD, and MPDc modules are somewhat buggy,and podzilla2 is currently under development.
Rockbox has a professional touch. It supports a lot of music codecs, and play music without any problem. The OS configuration is fully customizable, especially the equillisers are the best, each band can be finely tuned. People interested in music would just love, to set equillisers and fine tune it. In games, the bubbles, and the brickmania, are the best and the most addictive,hours will pass by playing them. Else the skoban, star pegbox, sudoku, chess are some from the puzzle collection. Doom can also be installed. Special features are voice menus. Get the voice files from the website, and follow the instructions. Enable voice from settings, and when you select a menu, it will be read clearly and promptly. It can spells the directory and file names. Even pre-recorded voice files, and directory names can be configured. The text editor is I think the best, and one can type very fast, after some practice. By downloading additional MIDI patchset, MIDI files can also be played. Screen brightness can be adjusted, thus a lot of battery can be saved. Video in mpeg format can be played, after proper adjustment with the video resolution, in the iPods which don’t support video by default.
There are lots and lots of features and plugins in both of the OSes, which are left for the users to discover.
iPod Linux is in a very development stage. All the application is not capable to unleash the full power. The music is one of the most critical thing, in which iPod Linux is facing problem. The music interface is complex, and has a very few options, and is also unorganized. The podzilla2 has overcome most of the back draws of the previous podzilla, and I believe that further updates will overcome all the problems. ZeroSlacker project, has attempted to get the iPod Linux users an easy to use and updated iPod Linux installer. They can be used to install iPod Linux in an iPod. Many scattered installers, modules are available, a lot of them are discontinued, and never is updated. What iPod Linux needs in my opinion is to unify, and work organized. Which organization, and good synchronization we see in Rockbox. The installation is very easy, plugins, theme creation, interfaces are very easy , good , and official looking. Good and updated documentation and guides are present, in which iPod Linux lacks.
Using Rockbox, to listen to fine tuned music, view video, pictures, take notes,play brickmania, and bubbles, iPod Linux to explore the vast plugin collection, and play vortex, kaboom, iRacer, and using Apple OS to simply listen music, and for use of the people, who don’t like complicated interfaces, will be the best way to use your superpod, like i do with mine. Rockbox and iPod Linux are open source, so they keeps updating, and the bugs, problems are eliminated in every release, so updating your iPod with the latest releases is the best way to get rid of the bad bugs, and to get in touch with good features, and optimizations. Thus we can migrate to a new era, and redefine iPodding.
First Publish Information : This article was first published in Linux For You Magazine August 2008 issue under Creative Commons.
Editings are done to this updated.
Author : Arjun Pakrashi
3 thoughts on “Triple Boot Your iPod”
very difficult, for me. but very interesting news
there are some installers of iPodLinux which does work, but are not that much stable. The Rockbox installers are very good, you can still use them.