{"id":674,"date":"2009-12-22T21:05:29","date_gmt":"2009-12-22T21:05:29","guid":{"rendered":"http:\/\/really.zonky.org\/?p=674"},"modified":"2010-01-31T16:02:10","modified_gmt":"2010-01-31T16:02:10","slug":"rockbox-and-the-240gbyte-ipod","status":"publish","type":"post","link":"https:\/\/really.zonky.org\/?p=674","title":{"rendered":"Rockbox and the 240Gbyte iPod"},"content":{"rendered":"<p>So in the interests of science (ok, I wanted a new toy with a <em>large<\/em> amount of storage for music), I bought a pre-upgraded iPod 5.5 with a 240Gbyte hard disk in it. Loaded up Rockbox as soon as it arrived with the special version for upgraded iPods and everything was working &#8230;<\/p>\n<p>Well &#8230; sort of. I could copy <em>most<\/em> of my music onto it, but nothing with a filename that broke the rules of pure FAT &#8230; no long extensions (so no FLAC files!!), no UTF-8 filenames (and &#8220;f#a#oo&#8221; isn&#8217;t quite a catchy a name as &#8220;f\u266fa\u266f\u221e&#8221;). So I rebuild the filesystem with the standard Linux tool <em>mkfs.vfat<\/em><\/p>\n<p>Bad move! Whilst all the files now copied onto the iPod, the Rockbox bootloader was now unable to load the main rockbox binary (&#8220;rockbox.ipod&#8221;). Seems that Rockbox&#8217;s idea of FAT32 on large disks isn&#8217;t quite the same as Linux&#8217;s version (or to be fair OSX either). So I spend ages hunting around to see how to create an appropriate filesystem on the iPod to allow things to work, without success.<\/p>\n<p>Thus this page.<\/p>\n<p>First of all, connect up the iPod and determine what device it is (mine showed up as <em>\/dev\/sdh<\/em>). The command <em>fdisk -l<\/em> is quite helpful here particularly as we use that next.<\/p>\n<p>Once you find the iPod&#8217;s device, use that to display the partition table using <em>fdisk<\/em> :-<\/p>\n<pre># fdisk \/dev\/sdh\r\n# fdisk \/dev\/sdh\r\nNote: sector size is 2048 (not 512)\r\n\r\nThe number of cylinders for this disk is set to 22506.\r\nThere is nothing wrong with that, but this is larger than 1024,\r\nand could in certain setups cause problems with:\r\n1) software that runs at boot time (e.g., old versions of LILO)\r\n2) booting and partitioning software from other OSs\r\n (e.g., DOS FDISK, OS\/2 FDISK)\r\n\r\nCommand (m for help): p\r\n\r\nDisk \/dev\/sdh: 240.1 GB, 240057409536 bytes\r\n84 heads, 62 sectors\/track, 22506 cylinders\r\nUnits = cylinders of 5208 * 2048 = 10665984 bytes\r\nDisk identifier: 0x20202020\r\n\r\n Device Boot\u00a0\u00a0\u00a0\u00a0\u00a0 Start\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 End\u00a0\u00a0\u00a0\u00a0\u00a0 Blocks\u00a0\u00a0 Id\u00a0 System\r\n\/dev\/sdh1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13\u00a0\u00a0\u00a0\u00a0\u00a0 128394\u00a0\u00a0\u00a0 0\u00a0 Empty\r\nPartition 1 does not end on cylinder boundary.\r\n\/dev\/sdh2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 22507\u00a0\u00a0 234302542\u00a0\u00a0\u00a0 b\u00a0 W95 FAT32\r\n\r\nCommand (m for help): q<\/pre>\n<p>Here we use the &#8220;p&#8221; command to list the partition table, and &#8220;q&#8221; to quit. The key bit of information we are looking for are the number of cylinders, heads and sectors per track (22506, 84, 62). For the number of cylinders, we need to subtract the number of cylinders used by the first partition &#8230; or perhaps easier the value of the cylinder that the second partition starts on (13). This gives the values we use for <em>mformat<\/em> to format the filesystem.<\/p>\n<p>Next we need to create a &#8220;drive letter&#8221; (!! &#8211; why doesn&#8217;t mtools allow you to specify a device to work with in the proper Unix fashion?) by editing <em>\/etc\/mtools.conf<\/em> and adding a line at the end like &#8220;drive z: file=&#8221;\/dev\/sdh2&#8243;&#8221;.<\/p>\n<p>Finally we need to use <em>mformat<\/em> to create the filesystem :-<\/p>\n<pre>mformat -t 22493 -h 84 -n 62 -S 4 -M 2048 -F -v FATBOX -N deadcafe z:<\/pre>\n<p>The &#8220;-v&#8221; and &#8220;-N&#8221; options are unnecessary, but at least the &#8220;-v&#8221; option is kind of handy to allow the iPod to be automatically mounted in an appropriate place. And I usually take every opportunity to assign some funky hex value \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So in the interests of science (ok, I wanted a new toy with a large amount of storage for music), I bought a pre-upgraded iPod 5.5 with a 240Gbyte hard disk in it. Loaded up Rockbox as soon as it arrived with the special version for upgraded iPods and everything was working &#8230; Well &#8230; <a href='https:\/\/really.zonky.org\/?p=674' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[4],"tags":[42,43,41],"class_list":["post-674","post","type-post","status-publish","format-standard","hentry","category-it","tag-ipod","tag-linux","tag-rockbox","category-4-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1f2KI-aS","_links":{"self":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=674"}],"version-history":[{"count":3,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/674\/revisions"}],"predecessor-version":[{"id":765,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/674\/revisions\/765"}],"wp:attachment":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}