To restore an ipod using linux
This assumes that all the usual restores have failed you have lost your songs and nothing works. Itunes has failed you.
First get the right firmware. \Be sure to identify the correct model with judicious use of Google. You can download the firmware from
http://www.felixbruns.de/iPod/firmware/
it will down load a file with a name that end with ipsw
The downloaded file is a zip file. Create a working directory put the zip file in there and unzip the file. do an ls and you should see something like
Firmware-14.5.3.1 iPod_14.1.3.1.ipsw manifest.plist
The first file is the one you want.
Use df to see what file systems are in place, plug in the ipod, run df again to identify which device is your ipod. Many instructions refer to /dev/sda which may not be you ipod. In my case it was /dev/sdc
If the ipod is mounted, umount it. If it has mounted you may wish to only copy new firmware and maybe your songs can be recovered. Try skipping to the text below labelled COPYFIRMWARE. If that doesn't work go through the whole procedure again.
Erase the partition table and everything on the ipod. From her on your committed
dd if=/dev/zero of=/dev/sdc bs=1M count=10
Create some new partitions
fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xbbda16dc.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
#Create the firmware partition and the data partitionCommand (m for help): p
Disk /dev/sdc: 4095 MB, 4095737344 bytes
126 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7812 * 512 = 3999744 bytes
Disk identifier: 0xbbda16dc
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1023, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1023, default 1023):10S
Command (m for help): p
Disk /dev/sdc: 4095 MB, 4095737344 bytes
126 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7812 * 512 = 3999744 bytes
Disk identifier: 0x9d80036a
Device Boot Start End Blocks Id System
/dev/sdc1 1 10 39029 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (11-1023, default 11):
Using default value 11
Last cylinder, +cylinders or +size{K,M,G} (11-1023, default 1023):
Using default value 1023
# Now type the partitions the first partition is type zero, don't worry about that however make the firmware partition bootable using the a command
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 0
Type 0 means free space to many systems
(but not to Linux). Having partitions of
type 0 is probably unwise. You can delete
a partition using the `d' command.
Changed system type of partition 1 to 0 (Empty)
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): b
Changed system type of partition 2 to b (W95 FAT32)
Command (m for help): a
Partition number (1-4): 1
Warning: partition 1 has empty type
Command (m for help): p
Disk /dev/sdc: 4095 MB, 4095737344 bytes
126 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7812 * 512 = 3999744 bytes
Disk identifier: 0x9d80036a
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 10 39029 0 Empty
/dev/sdc2 11 1023 3956778 b W95 FAT32
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
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.
quit out of fdisk
Create a FAT32 file system in the second partition
mkfs.vfat -n "IpodName" -F 32 /dev/sdc2
COPYFIRMWARE:
Back at the Linux prompt copy the firmware into the first partition
dd if=Firmware-14.5.3.1 of=/dev/sdc1
removed ipod from computer and charge