Rockbox Technical Forums

Installation / Removal => Manual Installation => Apple - Installation/Removal => Topic started by: wintermute23 on June 26, 2020, 10:13:11 PM

Title: iPod Classic - I messed something up
Post by: wintermute23 on June 26, 2020, 10:13:11 PM
I have an iPod Classic that I've had for a few years, and I'm getting some data corruption problems that I think might be down to bad sectors. So I've wiped out the partition table and recreated it, but I've clearly done something wrong. I'm using Ubuntu Linux and have access to Win10 and MacOS machines if needed.

I've used iTunes (on a Mac) to reinstall the OF and that seems to work fine but I can't get the RockBox bootloader back on there.

Following the instructions here (https://files.freemyipod.org/~user890104/bootloader-ipodclassic.html), I've put it into DFU mode, and apparently successfully installed the bootloader:
Code: [Select]
$ ./mks5lboot.x86_64 --bl-inst bootloader-ipod6g.ipod
mks5lboot Version d832e1c-170228
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[INFO] Building DFU:
[INFO]  type:         BL installer
[INFO]  BL size:      102336
[INFO]  DFU size:     110480
[INFO]  model name:   Classic 6G
[INFO]  platform:     ipod6g
[INFO]  RB name:      ip6g
[INFO]  RB num:       71
[INFO] libusb: found [05ac:1223] at bus 1, device 52, USB ver. 0200
[INFO] DFU image sent successfully (110480 bytes)

But then the iPod immediately tells me "No partition found... Entering USB mode"

It's also not mounting properly; when I try to mount manually it tells me:
Code: [Select]
$ sudo mount /dev/sdc1 /media/ross/iPodClassic
mount: /media/ross/iPodClassic: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.

It looks like iTunes decided to format it as HFS+ when I reinstalled the OF, which would be part of the problem, but I'm not sure how to undo that and have it be formatted properly...

Any help would be much appreciated. Thanks.
Title: Re: iPod Classic - I messed something up
Post by: wintermute23 on June 26, 2020, 11:38:32 PM
I've deleted the HFS+ partition and replaced it with a FAT32 partition, leaving the 192 MB unknown partition (the bootloader?) intact. It now mounts properly, and I can see it in the file explorer and copy my .rockbox directory back onto it, but it still tells me "No partition found... Entering USB mode".
Title: Re: iPod Classic - I messed something up
Post by: darkcity on June 27, 2020, 02:14:19 AM
This thread suggests, if the he apple firmware not does not boot restore with iTunes.

https://forums.rockbox.org/index.php?topic=52086.0
Title: Re: iPod Classic - I messed something up
Post by: wintermute23 on June 27, 2020, 07:26:23 AM
The Apple firmware does boot; Rockbox does not.
Title: Re: iPod Classic - I messed something up
Post by: wintermute23 on June 27, 2020, 07:54:21 AM
OK I got it working again.

I wiped out all the partition data, and let iTunes restore it again, but this time I did it from the Windows machine instead of the Mac.

Once that was done, I just needed to flash the bootloader again, and it could see the partition and complained that the .ipod file wasn't there. I copied my .rockox directory back on there, and it looks like it's all good.

Something about the way the HFS+ volume was set up must have been causing issues, even after it was removed and replaced with a FAT32 partition.
Title: Re: iPod Classic - I messed something up
Post by: darkcity on June 28, 2020, 04:26:21 AM
That's good. Interesting it worked from Windows but not Mac.
Title: Re: iPod Classic - I messed something up
Post by: Chronon on June 29, 2020, 09:57:19 PM
I believe it's due to the partition table.  The instructions here (https://www.rockbox.org/wiki/IpodConversionToFAT32) ask you to write the appropriate partition table to the device prior to formatting the second partition to FAT32.
Title: Re: iPod Classic - I messed something up
Post by: LambdaCalculus on July 01, 2020, 08:47:09 AM
That's good. Interesting it worked from Windows but not Mac.

The reason why it works from Windows is because iTunes on Windows will format iPods to FAT32 format (which Rockbox expects). iTunes on macOS defaults to HFS+, which isn't supported by Rockbox.