iPodLinux on 2G iPod Mini

Hackaday iPod

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!

Thanks ImageShack!Thanks ImageShack!Thanks ImageShack!

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

  6. 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.

  7. 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

  8. 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

  9. Write the new kernel image (about 4-5 MB) to your iPod.
    $ dd if=my_sw.bin of=/dev/disk1s2
  10. Copy the kernel libraries to your iPod.
    $ cp -r lib /Volumes/iPod
  11. Copy the base filesystem to your iPod.
    $ tar xzf ipod_fs_040403.tar.gz -C /Volumes/iPod
  12. Copy the nightly podzilla binary to your iPod.
    $ cp yyyy-mm-dd-podzilla /Volumes/iPod/sbin/podzilla
    $ chmod +x /Volumes/iPod/sbin/podzilla
  13. 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 --hctosys

    Now open /Volumes/iPod/etc/inittab and replace it with:

    inet:unknown:/bin/inetd
    pz:unknown:/bin/podzilla

  14. 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:

Published by Reid Burke

Hi, I'm @reid. I work on developer tools at Yahoo. I serve at Awakening Church with a focus on technology. I also enjoy riding motorcycles.

Join the Conversation

67 Comments

  1. Hey man this is a really good tutorial, but do you know where I could find something similar to this for windows? Also, I got a mini 1G… do you think it’ll work similar to the 2G if I try this?

  2. Sorry, I wasn’t paying attention (it was late at night :P). This is not (easily) possible from Windows, but for Linux, you could follow steps 1 through 4 on my procedure to get the required files, then follow the steps in this procedure substituting the files you downloaded from here with the files suggested on that procedure. Also, make sure you use the -3 option whenever you use the make_fw program like I did in my procedure.

    Good luck!

  3. Hey, I’m using windows as well and am wondering if there’s a way to do this… Is there any way to use the ipodlinux windows installer and copy over these new files into the installer directory? Sorry if this wouldn’t work, I just got my ipod today and I don’t know much about the topic. Thanks

  4. Not sure how to edit my previous post, but I just looked through the windows installer package, and there’s lots of different files from what I’ve got in the ipodlinux working directory. However, I read something about cygwin and could this be used to get the job done? Thanks, I think that a tutorial for doing this on windows would be widely appreciated across the web, thanks.

  5. Alex, you need the make_fw program compiled for 4G support, which isn’t in the release version. If you don’t want to compile it yourself, try this build. I also came across how to for installing to a recent iPod from Linux which may be helpful.

    Fr0zt, I assume you have a 2G mini? If so, you could try using the 4G Installer for Windows I suggested eariler while making sure you use a nightly build of podzilla and kernel instead of the ones provided in the ‘Linux Folder’. I can’t confirm that will work, so you’re on your own here. Good luck and let me know if you get it working!

  6. Reading your second message, yeah, they will be similar. If you use the Windows 4G installer (you must use the 4G installer if anything) then you should be able to replace the provided podzilla and kernel with nightly builds.

    If the installer won’t work, then Cygwin is used to provide a command shell for installing manually.

    I don’t have access to a Windows machine right now, so I can’t test what I’m telling you… proceed at your own risk.

  7. hey, ipodlinux.org was just temporarily down. So ya, I’ve got ipodlinux working on my 2g mini now from windows. It seems pretty good, but I’ve noticed 1 main problem… When a song finishes playing, instead of loading the next song and playing it, the ipod just freezes and I have to do a hard reset. Thanks for your help, without it I wouldn’t have linux on my ipod right now.
    – Fr0zt

  8. That’s odd. Does it say “malloc failed” in a small box on your ipod when that happens? That’s a problem currently being worked on by iPL devs. If not, it could be that or some other bug. I’d recomment searching and posting on iPodLinux’s discussion forums to find an answer to that.

    Always glad to help.

  9. I just tried this on my 2g mini, and its working good until I try to go to any submenu off the toplevel Music folder.

    No matter which menu choice I pick, the mini goes to a blank screen (except for the battery and “Music” at the top) and no longer responds.

  10. No, don’t see anything that says malloc failed. I just tried using floydzilla and it works as well, but I’ve still got the same problem with freezing after playing a song. It plays the song, then displays the name of the next song, but freezes and doesnt play it. I’ll try a playlist and see if that will fix it. Also, is there any way to be listening to music while at the main menu? Thanks

  11. Alex: if the -3 option does not exist, it means you are running an old version of make_fw. Try a nightly build or compiling from CVS.

  12. Fr0zt: Weird. You may want to get in touch with the iPodLinux devs if the problem persists. Also, I also haven’t found a way to have music play while doing anything else in Linux… I don’t know if it’s supported yet.

  13. hey

    my computer is now on dial up internet instead of my preivios DSL since im movin soon, is there any way i can download the neccesary programs to install ipodlinux on windows XP without taking up much time with my 2g ipod mini. I have done (and created) many ipod mods and hacks but i have never heard of this, it is very interesting thank you

  14. Hey guys. Frozt, I want to know how you got it working in a 2G Mini. I have a 4GB 2G mini, and for the life of me, I cant get Podzilla to work. When I attempt to boot itno Linux, the iPod freezes and I have to do a hard reset to fix it. No text pops up, it just sits there with a blank screen. Thanks.

  15. Well Sir ,
    my query :does it play OGG files perfectly please tell then only its worth ,

    i have 2g mini four giga drive should i also go for http://ipodlinux.org/4G_Installer link 4gipl.zip is 16.2 mb file then on that page also confusion in HOW TO point #2 what does it refert to OS.rar

    my request :windows is widely used so please release a page for it too

  16. hey Fr0zt did you have 2g mini after downloading 4gipl.zip (16.2 mb) from http://ipodlinux.org/4G_Installer link and latest compiled build from http://ipodlinux.org/builds/ you must have copied kernel file renamed linux.bin inside (iPod Linux Installer Modded) folder and then you must have run ipod installer.exe and the page (http://ipodlinux.org/4G_Installer) says copy podzilla later on to ipod root
    this page also says “It WILL NOT work with 2G mini, color (0x00060004) and nano.”
    question is 1. did you use windows
    2. is your ipod mini a 2G
    3.was the work over with installer.exe file and kernel replacement or did you had to use windows interface what did you do to podzilla ,did you just click installer.exe and that was it or you compiled something on windows command line interface
    you can also send me email at kamalneet@hotmail.com

  17. :-\… why am i having the worst time uncompressing podzilla or the kernels …. podzilla just changes into an 800KB document and the kernels begin to decompress, but they are then called ‘yyyy-mm-dd-kernel.bin’ and they do not decompress from there am i suppose to use these files or what???

  18. ok….. how come when i run ‘dd if=/dev/disk1s2 of=ipod_os_partition_backup’ i get /dev/disk1s2/: resources busy

    actually in my case the /dev/disk1s2 is replaced with /dev/disk2s3

    and how do i fix that?? please respond

  19. Jake, the yyy-mm-dd-kernel.bin is the actual kernel binary (thus the .bin extension). You shoudln’t decompress it further.

    Also make sure you use ‘if=/dev/disk2s2’ without a trailing slash, assuming mount reports your iPod is mounted on /dev/disk2s3. (And replace disk1 with disk2 wherever it is found in the instructions.)

  20. ive read all the instructions but um… what exactly does ipodlinux do? doesnt say anywhere what it is, or what kind of program.. :S

  21. JC, the version of iTunes you use does not have an effecn on if iPodLinux will work or not. The installation procedure allows you to boot into the “official” orginial Apple OS for listening to your music (including any DRM’ed music) or to boot into Linux to play games, listen to MP3s, etc. You can still sync your iPod with iTunes and such by switching to the Apple OS… and its easy to do: you just reset your iPod and hold down Rewind to switch between the two.

  22. Alex: uhm sorry that this post is a little late, you asked for a guide for Linux. I’ve written one:

    http://www.willempen.org/ipod/ipodlinux-ipod-mini/

    I think there are more of them (if you know any, I’d glad to know, I’ll add it to the links section).

    If I look at this guide, most things are the same, so with a little knowledge of Unix and some extra pages from iPodLinux’ Wiki, you can use this Mac OS X guide too I think.

  23. I understand that, but I’ve tried this several times, and I can boot into ipodlinux just fine and use many of the various programs.

    But once I try to use any of the menus under the main Music menu item, my iPod mini freezes, and I have to reboot it…. I was wondering if the version of iTunes had anything to do with that……….

  24. to excuse me if my grammar is incorrect, but I am French. I will like right knowledge if it had a simple process to install Doom on my minis ipod 2g. If it is not the case can you say to me when that will be possible mercy

  25. Well i dont mean to be a buzzkill, BUT WATCH YOUR BACK! I like my ipod mini, but its not my original… I bricked my original Ipod Mini and luckily the warranty got me a new one(I had good luck that Apple didnt catch it!) The cause? Ipod linux… So BE ABSOLUTELY SURE YOU HAVE THE CORRECT IPOD VERSION. So the point of my rant, READ Version Info.

  26. Yes, this is true. I nearly bricked my iPod myself when I used the wrong bootloader while developing this procedure. Luckily, my iPod was able to go into “Disk Mode” and I was able to reinstall the Apple OS by using the Apple’s iPod Software Updater app. So be careful and follow the directions carefully.

  27. Hey I tried all the steps and there were no errors (except a warning that some files had the wrong date) but when I boot up into ipl it flashes a long list of text on the screen and then stops at “mount_devfs_fs(); unable to mount devfs, err: -2 Freeing init memory: 64k Warning: unable to open an initial console. Kernel panic: No init found. Try passing init- option to kernel.” Any idea what that means?

  28. I just tried changing the directory where I copied the podzilla binary from sbin to bin and it works now.. weird?

  29. does anyone know if line in recording on the 2g mini will ever be possible? or if it is, how? because according to the ipodlinux.org page it isn’t capable, but it would be great to be able to do that.

  30. Hey Reid,
    I followed the steps for the Windows Installation but now when I boot my iPod Mini (2G) I keep getting the apple logo and when I (hard) reset it it just shows the apple logo again and it freezes on that.
    Is my iPod bricked?

    Thanks for your reply in advance.

Leave a comment

Your email address will not be published. Required fields are marked *