iPod USB Key and going back to normal
January 29, 2023DISCLAIMER: I take no responsibility for any damage you cause to your devices
About
A couple of days ago, I was looking for a used Chromebook, when I stumbled upon a company called rebuy. They sell and buy used phones as computers, that are still in a usable condition.
After getting a €90 offer for an old tablet of mine, I went through all the old devices I own, to see how much they are worth.
This is when I found my old iPod nano touch 7g, which I've been using as an ext4 USB Thumb drive for a couple of years now. To my surprise, rebuy gave me an offer of about €70[fn::It has dropped to €55 since then, I guess I'll have to play the waiting-game]. So I decided I had to get the stock-firmware back up on it, which turned out to be harder that I thought it would be.
Using an iPod as a USB Thumb Drive
Before we dive into the process of factory-resetting an iPod, let's take a look at how I was able to delete all partitions in the first place.
Disk-mode
Getting rid of the original iPod OS is actually not that difficult, you only have to boot into disk mode.
For me, this involved pressing the power and the home button simultaneously until the Apple logo appeared. Afterward, you have to press and hold both the volume up, and the volume down button. Your iPod should now show a white screen, asking you to connect it to a computer. Keep in mind, that I have an iPod nano 7g, so the process might look different for you. If you get stuck, just have a look at apples disk-mode guide.
After you booted your iPod into disk mode,
your laptop should be able to pick it up properly.
Running lsblk on Linux should show
that you have a new device connected.1
Back up your data
Creating a new partition
Once you successfully saved the iPod disk image on your computer, you can erase the current iPod partitions.
Again: keep in mind, that this might brick your iPod. I do not take responsibility for any damage you cause. Proceed at your own risk!
From what I can tell, you probably don't even have to delete the partitions, but deleting them will keep you from accidentally booting into the iPod OS.
The easiest way to set up the iPod as a thumb-drive
is to open a command-line util, such as cfdisk,
deleting all current partitions and creating a new ext4 partition,
that spans across the whole disk.
To prevent inexperienced users from doing anything, I won't go into further detail.
Going back to normal
Now that you know how I ended up here, let's have a look at how I got out of this mess.
With a backup
But before we get going, this is what I would have had to do if I followed Step 2 and created a disk image.
First of all, I would have booted the iPod into disk-mode.
Then I would have connected it to my computer and copied the disk image back to the iPod:
dd of=/dev/sdX if=~/Documents/iPod.iso status=progressAfter unplugging and rebooting the iPod, this should have fixed it.
Now that we established how easy it could have been, let's have a look at how long it took me.
iTunes
As I'm no experience in working with Apple devices, I decided to look for a solution online. And after a couple of DuckDuckGo searches, I came up with an answer: Using iTunes
As you probably noticed by now, I'm running Linux, so there is no official way for me to install iTunes. Instead, I had to install wine, a Windows compatibility layer, and install iTunes through it.
Unfortunately, iTunes and wine do not play along nicely, and I was greeted by a black screen with no apparent way of fixing it. And although I found some tutorials online on how to fix the problem, none of them seemed to work for me.
Which meant that I had to look for a different solution.
idevicerestore
After scrolling through the DuckDuckGo search results, I eventually stumbled upon a project called libimobiledevice, which claims to be a cross-platform library to communicate with iOS devices.
Unfortunately, I was unable to get it to detect my iPod, and looking back, that probably is because the iPod nano Touch 7g doesn't actually run iOS.
Either way, I was really close to giving up at this point, and just asking someone with a Windows computer for help, but when I scrolled ever so slightly further in my search results, I found a new promising lead.
Manual Formatting
After finding a Ubuntu forum post on restoring the iPod classic generation, I immediately went through all the outgoing links on the forum post, trying to find something related to my iPod.
According to the forum post, I needed 2 things:
- the Master-Boot-Record (MBR) image
- and the Firmware
The latter was obtained easily,
by visiting felix bruns firmare collection
and downloading the .ipsw file for my iPod.
Unfortunately, the MBR table does not provide a image for my iPod generation. As this was my only promising lead so far, I decided to go all in and guess the partition size.
I unzipped the firmware and checked its size
du -h Firmware.MSE177M Firmware.MSE
177 megabytes meant that the 8mb recommendation,
I found on a different website, were completely off.
So I decided on the default EFI partition size: 512MB.
Now it was finally time to put everything together:
I connected the iPod in disk-mode
and opened cfdisk.
Afterward, I removed my existing partition and set the layout to MBR,
or dos as it is labeled in cfdisk.
Next up, I created a 512M partition with the type set to empty,
as seen in the above mention blog entry.
And assigned the remaining storage space to the FAT32 partition.
After writing the changed to disk, I formatted the FAT32 partition
using mkfs
mkfs.vfat -F 32 /dev/sdX2and flashed the firmware using dd
dd if=Firmware.MSE of=/dev/sdX1 status=progressThere was no turning back now, I crossed my finger, unplugged the iPod and rebooted it.
And luckily, it rebooted into the original iPod OS.
After testing it and charging it to 100%, I can finally say, that it is working again.
But what I also know now is, that I won't ever do this again.