Rockbox and the 240Gbyte iPod

2009-12-22

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 …

Well … sort of. I could copy most of my music onto it, but nothing with a filename that broke the rules of pure FAT … no long extensions (so no FLAC files!!), no UTF-8 filenames (and “f#a#oo” isn’t quite a catchy a name as “f♯a♯∞”). So I rebuild the filesystem with the standard Linux tool mkfs.vfat

Bad move! Whilst all the files now copied onto the iPod, the Rockbox bootloader was now unable to load the main rockbox binary (“rockbox.ipod”). Seems that Rockbox’s idea of FAT32 on large disks isn’t quite the same as Linux’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.

Thus this page.

First of all, connect up the iPod and determine what device it is (mine showed up as /dev/sdh). The command fdisk -l is quite helpful here particularly as we use that next.

Once you find the iPod’s device, use that to display the partition table using fdisk :-

# fdisk /dev/sdh
# fdisk /dev/sdh
Note: sector size is 2048 (not 512)

The number of cylinders for this disk is set to 22506.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
 (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdh: 240.1 GB, 240057409536 bytes
84 heads, 62 sectors/track, 22506 cylinders
Units = cylinders of 5208 * 2048 = 10665984 bytes
Disk identifier: 0x20202020

 Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1          13      128394    0  Empty
Partition 1 does not end on cylinder boundary.
/dev/sdh2              13       22507   234302542    b  W95 FAT32

Command (m for help): q

Here we use the “p” command to list the partition table, and “q” 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 … or perhaps easier the value of the cylinder that the second partition starts on (13). This gives the values we use for mformat to format the filesystem.

Next we need to create a “drive letter” (!! – why doesn’t mtools allow you to specify a device to work with in the proper Unix fashion?) by editing /etc/mtools.conf and adding a line at the end like “drive z: file=”/dev/sdh2″”.

Finally we need to use mformat to create the filesystem :-

mformat -t 22493 -h 84 -n 62 -S 4 -M 2048 -F -v FATBOX -N deadcafe z:

The “-v” and “-N” options are unnecessary, but at least the “-v” 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 :-)

Categories : Computing
Tags :     

Silent Running: Electric and Hybrid Cars Too Quiet ?

2009-11-03

You know I was going to jump up and down shouting I told you so … except I cannot find the post from ages ago where I pointed out that this might be a problem (extra points to anyone who finds the link!). The BBC has just had a story about the dangers to visually impaired people from “quiet cars” – hybrids and electric vehicles. Actually of course it is just about everyone who finds it helpful to hear cars coming – indeed I will listen to my iPod on “mono” in certain situations to ensure I get an early warning from the noise of approaching vehicles.

Whilst loud vehicles are an enormous pain and I certainly would not want to encourage their use. The person who invented car stereos loud enough to cause nearby buildings to shake – and yes they can get that loud – needs to be tied down and forced to listen to my choice of music for a few weeks. So called silent cars do also cause problems; in fact a certain amount of noise results from the tyres running along the road. We are used to relying on sound to assist us in locating moving vehicles; in some cases it is the only sense we can rely on.

Apparently Lotus engineers have come up with a nifty system that generates noise that varies according to the amount acceleration the driver is applying. Sorry guys, you’ve been sniffing petrol fumes too much. Whilst the driver may be impressed by the feedback he (or she) gets when they press the acceleration pedal, the rest of us are more interested in the speed of the vehicle. Sound effects for the driver are all very well (when played inside the car) but rather out of scope for this discussion.

It would not be difficult to make hybrid and electric cars generate a noise when they are moving nearly silently. And the most sensible thing to do is to standardise the noise generation before we end up with a confusing variety of different sounds and volumes. The simplest is to have a tone generated when a vehicle is moving that starts low in pitch at low speeds and rises in pitch as the speed increases. Think old-fashioned milk floats.

Categories : General  Media