Repair your iPod Mini using Linux

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

IpodFixed

New member
Joined
Apr 23, 2005
Messages
4
Points
0
Hi,
I've finally written this up after fixing an ipod mini.. I thought I'd share it with you. Its for the daring people out there! :)
iPodFixer.


====================================
Repair your iPod Mini using Linux :)
====================================
Last Updated : 23 April 2005


**************
THE DISCLAIMER
**************
This process involves using a Linux Boot CD, an iPod Mini (4GB), and a local Harddisk!
It was tested with a friends nuked iPod Mini. You need to follow these instructions EXACTLY. If you are worried about erasing your own local PC Harddisk in the process, take it out and use another disk or use a test-PC you may have etc.. this process should only touch your local HD for READING, but if you make a typo you could accidently write the ipod firmware to your own local HD and that would render your PC USELESS! OK!? I also hope I wrote this up proper.. I've re-read it a few times! Also, I guess this process goes against your warranty or somein.

This process has been tested with: iPod Mini 4GB WINDOWS version using USB connection, Knoppix Live CD v3.4, Windows 2000 SP4, Pentium 3-500 PC.

NOTE! - This process has been tested using a USB connection, I have not seen the firewire connection and therefore most of this document would be irrelevant for that connection type!

NOTE! - The MAC iPod Mini is slightly different (disk structure is 3 partitions instead of 2), and since I haven't even seen a Mac iPod none of the below applies to a Mac iPod!

NOTE! - This process has been tested with a 4GB iPod Mini. Larger size Mini's should also work since we are not specifying a size for the 2nd partition, but that is untested OK!.

Have Fun!


=======
Problem
=======

iPod appears nuked, only shows folder icon and ! on its LCD and is unmountable under windows? (running iPod Updater just does nothing - does not even detect the device as an ipod!)

This is likely due to complete loss of Harddisk boot sector, structure and areas.


======
Basics
======

iPod structure: (WINDOWS iPod Mini version)

Hard Disk (4GB)
-> Partition 1 = 32MB for Operating System
-> Partition 2 = ~4GB (4161536MB?) for User Data (FAT32 file system)

Boot sequence: (?)

Arm ARM7TDMI CPU init
-> Execute ROM init and code
-> Boots HD Boot Sector
-> Boots HD Partition 1 (Operating System, Arm code)
-> System Up!


============
Requirements
============

- iPod Mini (tested : 4GB UK model)
- iPod Updater software (tested : 2005-03-23)
- Resource Hacker program (v3.4.0)
- Knoppix Live CD Linux v3.4 or later
(other Linux versions would abviously work, I guess you need kernel 2.4.x, dd, mkfs.x, fdisk etc)
- .. adventurer's spirit hey!


===========
The Process
===========

Firstly, you need to extract the firmware binary file out of the iPod Updater program. Use Resource Hacker under Windows, open the iPod Updater exe file, open the FIRM folder. Now you need to open the IDR_FIRMWARE-3.2.5 folder, and then select the 1033 file. Now extract this resource as a binary file to somewhere on your local HD (eg: c:\mini325.bin).

Shutdown windows.

Turn off PC.

Plug in your iPod Mini. (tested : USB connection)

Boot your PC from your Knoppix Linux Live CD.

Once Linux is up and booted, it should have mounted your local HD, probably as hda1.
I would mount it manually anyway!

Open a Terminal session, get into root user with "su -"<return>, you should have:
~Knoppix[root]$: (or something like that).


===================
Mount your local HD
===================

Make a local mount point directory (where you will access your local HD)
mkdir /mnt/localhd

Mount your local HD: (NTFS drives, windows xp, 2000 etc)
mount -t ntfs /dev/hda1 /mnt/localhd

Mount your local HD: (FAT32 drives, windows 98, me)
mount -t vfat /dev/hda1 /mnt/localhd

Do a directory listing to check contents of your local HD:
cd /mnt/localhd
ls -la

You should see "mini325.bin", your ipod mini firmware! (or the file you called it!)

Of course, if you stored the firmware on a slave HD, you need to mount that instead. In the end of the day you need access to the firmware binary file.


======================
Prepare Your iPod Mini
======================

Your iPod Mini should have attached as a fake scsi device /dev/sda.

To check this, "more /dev/sda" should show it is there. (Ctrl+C to quit moreing)

Now we need to prepare the disk stucture on the iPod:

fdisk /dev/sda

Use "p" to print out the current disk structure, it should be blank! no partitions! (if there are partitions then you are in unchartered terriroty and perhaps should delete them all - untested!)

Now we need to make two new partitions, one for the boot area, one for the user data.

Follow exactly: { explanations are in curly brackets, do not type these ;) }

{ setup first partition, 32 MB in size }
n <return>
p <return>
1 <return>
<just press return, accept default value of 1>
+32M <return>

{ setup second partition, the rest of the hard disk }
n <return>
p <return>
2 <return>
<just press return, accept default value>
<just press return, accept default value>

{ change type of partition 1 to 0, no format }
t <return>
1 <return>
0 <return>

{ change type of partition 2 to b, ie: FAT32 }
t <return>
2 <return>
b <return>

{ show partition layout, should be two partitions now }
p <return>

{ write partition layout to the iPod }
w <return>

{ quit fdisk back to command prompt once complete }
q <return>

You should now be back to the good ol' ~Knoppix[root]$: prompt. (or similar!)


==================
Format Partition 2
==================

From the command prompt:

mkfs.vfat -F 32 -n "name" /dev/sda2 <return>

This will format the 2nd partition of the iPod, and give it a volume name "name".

After this you are returned to the command prompt ~Knoppix[root]$: etc.


=============================
Write Firmware to Partition 1
=============================

From the command prompt:

dd if=/mnt/localhd/mini325.bin of=/dev/sda1 <return>

This will write the input file mini325.bin from your localhd mount to the 1st partition of the ipod mini (the partition for the operating system).

This may take a few moments, you will be returned to the command prompt when complete!


===========================
Mount your iPod under Linux
===========================

Out of curiosity, mount the 2nd partition of your iPod to check it is ok!

mkdir /mnt/myipod
mount -t vfat /dev/sda2 /mnt/myipod
cd /mnt/myipod
ls -la

There should be no files, but it should mount ok like any other fat32 disk!




Shutdown Linux and turn off your PC!


Unplug your iPod Mini from your PC.

Switch the iPod on, it should require you to plug into your mains power supply!

Plug in power, switch power on, iPod will boot up like any other booting computer, complete with loading progress bar and screen refresh :). After this, you should be able to select language and use your iPod again!


Next up - ditch i-tunes because it is a bit of a demon and use Anapod or Gnupod or something and enjoy your iPod as you should! Freee...


Thank heavens for Linux eh!! and thank heavens for people trying to stick linux their pods, reading up on that is where I figured all this stuff out.

Forgotten Credits - these guys did all the hard work - Alan Donovan, Pedro Diaz. Without them this would not have been so easy! :)

Thats all folks..!
iPodFixed


PS. Of course, I dare say using other firmwares and knowledge of ipod structures etc you could use the basics here to fix other pods.
 
Last edited:

IpodFixed

New member
Joined
Apr 23, 2005
Messages
4
Points
0
Also...

Just had a thought...

It could be the case that after applying all the above and getting your Ipod to work again, that the windows Ipod Updater might not work with your fixed ipod. I haven't tested this. (the priority was to get it working again!).

I mean, if the Ipod Updater runs a quick checksum on the Ipod's 1st partition, it would find that it is perhaps different to what it expects and could fail, possibly breaking the ipod's disk structure again..

Anyway.. the choice is yours! The one I fixed has worked all day and works fine with Anapod software! cool.

:)
 

IpodFixed

New member
Joined
Apr 23, 2005
Messages
4
Points
0
Hi!

I'm sure there must be a way.. I think the crux of the problem lies with the ipod loosing the partitions, and then the Ipod Updater just ignores the unit, which is crazy.

Maybe the author of EphPod could program a Repair Ipod feature which does what I've detailed above.. I guess the programmer would need to handle the USB access directly rather than through window's drivers.. dunno..

The linux route isn't going to be feasible for some folk either due to the large size of the modern live CD distros.. we're talking a 500MB download sometimes.. however, I did notice you can get Slax linux, which has a Slax Frodo version weighing in at 40MB, which could do the trick.. but it does not have mkfs.vfat, it does have mkdosfs I think which can do fat32.

In the end of the day Apple should have made a tool which actually repairs the ipod! Its crazy.

Maybe I'll mention all this to the EphPod author..
 

remzsk8r

New member
Joined
Apr 20, 2005
Messages
11
Points
0
alright, let me know thru e-mail if u can have someone write up a program or anything to help with this. also, where can I get slax linux? will it work with the abovementioned instructions? thanks

-alonso
[email protected]
 

xof7

New member
Joined
Nov 15, 2005
Messages
1
Points
0
Website
xof7.com
For me, All i have ever had to do is take it to a mac and then start a zero fill on the ipod and that will erase all and any partitions. Then ipod updater will recognize it. This has worked when i have attempted to put linux on my nano and when i had accidentally changed the device id in the firmware.
 

l_train16

New member
Joined
Nov 16, 2005
Messages
3
Points
0
Hi iPodFixed,

Thanks very much for taking the time to post this fix. I have two 3rd Gen iPods both of which are showing the folder icon on boot. One of them has a fried hard drive I'm sure as I can hear the drive try but fail to spin on boot.

The other iPod , however, does start spinning the hard drive and gets into a continuous loop of booting, showing the icon, and then re-booting. This makes me think that your solution could be a perfect fix. The iPod is rarely recognized by my Windows XP OS and I have been unable to reformat it with iPod updater or any other formatting tool. I then tried formatting it with a Mac but when formatting starts it just freezes up and does nothing...

I'm considering trying your linux solution but I'm hesitant because my iPod is not a mini. Another thing, what does this Linux solution offer that is any better than trying a reformat with a Mac or PC? I'm also concerned that iPod updater won't work with my iPod if I successfully make this change. Any extra information/feedback would be greatly appreciated.

Thanks
 

LiveSquid

New member
Joined
Nov 16, 2005
Messages
3
Points
0
Tried this with my iPod Photo 30.. No dice. But thats because my iPod wasnt mounted under the /sda. I think my disk is really dead.. click, whirr. click, whirr. click, whirr. etc

Oh, fwiw, If anyone else needs to do this to their Photo, use firmware 5.4.0 (its 5.4.2 in the 2005-10-12 updater) instead of the 3.2.5 mentioned for the mini.

While Im here, would a dead drive cause my LCD to no longer illuminate or is that a separate problem?

Thanks.
 

l_train16

New member
Joined
Nov 16, 2005
Messages
3
Points
0
Hi LiveSquid,

I spoke to a tech at an iPod repair shop yesterday and he was almost 100% sure that the hard drive not starting to spin at all on boot, (just makes tick noises) in one of my iPods, meant it was dead. If you listen close to your iPod on boot it should be obvious if the drive starts spinning. Hope that helps.
 

l_train16

New member
Joined
Nov 16, 2005
Messages
3
Points
0
Hi stinkiedmb,

I had a look at the hardware swap you posted. Since I don't have access to a working 3rd Gen iPod I won't be able to try your solution. I do have a question though. How does swapping a dead harddrive into another iPod allow an OS to mount it and then the ipod updater to recognize it? This information could help me with my problems since I have 2 iPods not working and the hard drive may not be the problem on both. I'm hoping to salvage a working unit from all the parts.

Thanks
 

Spaceboyboy

New member
Joined
Nov 18, 2005
Messages
1
Points
0
Well, I was going to try this on my ipod photo. However fdisk show my ipod's capacity as 74MB! Any idea how I can fix this. If run fdisk and type V (verify) it reports 146015 unallocated sectors.
 

johncarter

New member
Joined
Jul 15, 2005
Messages
2
Points
0
may want to try via mac 1st

Hi

My ipod was also showing the ! folder icon and would either turn off right away ok would display "ok yo disconnect" message even if i put it in hard drive mode (hold down center and play butons ). I connected it to my cousins mac, which did see it . then it became a normally functioning mac ipod. once i reconnected it to my windows it say it as an ipod that needed to be restored which it did successfully. now its working as a windows ipod. :)

jc
btw has anyone notice the diagostic mode. (track back and select)
 

moe07728

New member
Joined
Nov 19, 2005
Messages
4
Points
0
I'm trying this on my friends ipod, because it has the folder with "!" when it boots up, and you hear a little clicking noise when its reading it. I followed everything on the tutorial exactly, but when I got up to this: { write partition layout to the iPod }
w <return>

i got this message:
Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

Any ideas or is this hdd totally busted? Because Windows detects it as removeable disk but when you try to access it or restore fireware with apple's software it freezes.
 

martynguk2002

New member
Joined
Jan 11, 2006
Messages
3
Points
0
Age
43
I am trying to extract the binary file from the ipod updater program from apple, in the guide it says go to the firm folder but I dont see it in the list in resource hacker. I have GIF, Cursor, Icon, Dialog, String Table, Cursor group, Icon Group, Version Info and 24. I have had a look around in these folders but still couldnt spot it. I have version 3.4.0.79 of resource hacker and have tried ipod setup 2005-03-23 as well as the latest version of ipod setup from apples website.

Any help would be greatly appreciated.
 

martincollett

New member
Joined
Jun 10, 2006
Messages
1
Points
0
Fixing a 'ticking' ipod

Thanks for the info earlier in this thread - my ipod was ticking, the drive wasn't spinning. By hitting it onto a newspaper on my wooden desk, each corner on the side of the case so it imparts a spinning shock to the ipod, and harder than I would have thought sensible, I seem to have freed the drive. It's started spinning again, and now playes tunes again. I'd only try this as a last resort, and I'm not sure how long it will last for - but I'm happy for now!
Martin
 

rae

New member
Joined
Jun 12, 2006
Messages
3
Points
0
i thought i found the ultimate solution. here's the prob. my ipod keeps looping itself..preventing linux frm detecting the drive properly. after linux starts, it enters disk mode(an icon with a tick) tried 'more /dev/sda' nothing was found. any of u guys experienced that? how do you bypass that problem?
 

toothpaste

New member
Joined
May 22, 2004
Messages
3,584
Points
0
Location
New York City
IpodFixed,

Have you tried this in terminal on an OS X box? The reason I say this, terminal uses the Bash shell by default which is also the default shell on most linux distributions. It could be a useful how-to for OS X users as well.
 

KrayZiePiNoy

New member
Joined
Jun 10, 2007
Messages
10
Points
0
Hi..
ii heard about fixing unbootable iPods using linux..

can you make a tutorial for fixing unbootable iPod Nano's?
First Generation to be exact..
4GB - black..

kay..thanks.
 
Top