view all posts by Greg Lehey

Disaster after disaster

Greg Lehey Posted by Greg Lehey | Sat, 17 Mar 2012
see the original posting from Greg's diary

Lots of things to record on TV tonight, and so I needed to use my external tuner for the first time in earnest. It has a USB disk interface, and though I was able to record something onto a USB stick a while back, it looked as if it wasn't fast enough, and in any case it wasn't big enough.

Not a problem: I have piles of old PATA disks lying around, and with a little searching I found an external PATA/USB housing. Put an 80 GB disk in it. Confirmed in lagoon, Yvonne's FreeBSD system, that it was a Solaris partition, clearly not what the tuner wanted. What did it want? I made my last recording with FAT32, like just about every other multimedia device.

When it comes to FAT32, Microsoft is the expert, of course, so plugged it in braindeath, the Microsoft I have on loan from Chris Yeardley. No new hardware appeared, nothing. It doesn't help that I don't do Microsoft, but it told me the new hardware had been inserted and was working correctly. Went to the Control Panel to look for ways to partition a disk, and found nothing. It seems that I should have gone to My Computer and clicked on the drive letter. Isn't that a beautiful indication of where menus fail you?

But there was no drive letter. Alex Wilkinson told me that I should be running DISKPART.EXE, which disconcertingly wouldn't tell me which disk I was working on (disk 1, disk 2, both non-removable). I would have been much happier with something like FORMAT D:, but there was no D: drive. There was a G: with some contents, clearly something on this machine. Was that drive 2?

In any case, this all looked far too dangerous, so put the disk back on lagoon and created a FAT32 partition on it, not helped by lack of documentation: what partition ID should I choose? Finally found that it was 11, so created a partition table, but my mtools config appeared incorrect, so I couldn't run mformat against it. Still, after that braindeath finally recognized the disk as drive D:, told me that it wasn't formatted, and offered to format it:

This should be Format-2.gif.  Is it missing?

That's right, I had the choice of formatting it with NTFS or nothing. Nothing was equally helpful:

This should be Format-5.gif.  Is it missing?

Still, there's always FORMAT.EXEisn't there? Well, up to a point. I forgot the /q option, so it went off for about 40 minutes writing to the disk before coming up with the message:

This should be Format-6.gif.  Is it missing?

Callum Gibson came up with this page showing some of the myriad limitations of FAT32, but it suggested that using a 64 kB cluster size should work. Not for me:

This should be Format-8a.gif.  Is it missing?

None of this was helped much by the fact that just about every time I ran into one of these problems, the system refused to recognize the disk any more, and I had to remove it and reconnect it.

This should be Format-7.gif.  Is it missing?

By that time I had decided to try it in boskoop, my Apple. It recognized the disk, but came up with another upsetting message: root disk has failed:

This should be disk-fail.gif.  Is it missing?

Tried copying it to the new disk (which happened to be larger) with dd, which despite the block size specification of 32 kB insisted in transferring in 4 kB chunks. But that failed with what proved to be unreadable sectors on the root disk:

=== [email protected] (/dev/ttyp1) / 8 -> dd if=/dev/disk0 of=/dev/disk1 bs=32k
dd: /dev/disk0: Input/output error
1032+0 records in
1032+0 records out
33816576 bytes transferred in 110.483766 secs (306077 bytes/sec)

Started running a backup on that, and moved on. The problem was with the size of the disk, so found a 20 GB disk and tried that. That proved to be no use: it was 200 GB, not 20. Then I found a 40 GB drive that I was able to partition. But then I couldn't talk to it with Microsoft. When I tried to start some program that I needed (I forget which), Microsoft claimed that the program was already running. In the end, decided on the standard Microsoft workaround and rebooted. And then I couldn't log in again: my mouse appears to be dead, and I couldn't click on the login button. Fortunately, after some considerable swearing, discovered that the VNC connection was working, so managed to connect after all.

In the meantime it occurred to me: mformat doesn't work, but doesn't FreeBSD have a FAT32 format program built in to it? Indeed, it does, with the somewhat archaic name newfs_msdos. And it works:

=== [email protected] (/dev/pts/2) /dereel/home/grog 22 -> newfs_msdos /dev/da0s1
/dev/da0s1: 3999616 sectors in 62494 FAT16 clusters (32768 bytes/cluster)
BytesPerSec=512 SecPerClust=64 ResSectors=1 FATs=2 RootDirEnts=512 Media=0xf0 FATsecs=245 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=4000185

braindeath recognized that, so off to put it in the tuner. Reception was terrible, so checked the antenna cables: the antenna connection was looped through the tuners in cvr2. Twiddled the cables, and of course cvr2 crashed. Powered it off and had no antenna connection at all. Much cursing and experimentation and discovered that one of the two tuners (both the same model number, but different design) didn't pass the antenna data through when powered down. And when I rebooted, one of them didn't show up. I had to power down, reseat the boards and power up again before they were both found. So I still do have trouble with the mechanical connections.

Finally got round to connecting the disk to the tuner. Two messages: Unknown error, leaving, followed by No disk device detected. On further investigation, discovered that those 3999616 sectors were only 2 GB. Somehow I had managed to create a tiny file system, and presumably Unknown error, leaving was the tuner's way of saying so. Now wouldn't it be nice to output the real size in MB or GB in that complicated message? Back to lagoon, repartitioned and tried again:

=== [email protected] (/dev/pts/2) /dereel/home/grog 34 -> newfs_msdos -F 32 /dev/da0s1
/dev/da0s1: 78137024 sectors in 1220891 FAT32 clusters (32768 bytes/cluster)
BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=78156162 FATsecs=9539 RootCluster=2 FSInfo=1 Backup=2

Put that in the tuner, and it spontaneously rebooted. But then it worked. 2 hours just to format a disk! Why do all these things go wrong at once? And why is it so difficult to initialize a disk with Microsoft?

see the original posting from Greg's diary

Back to top