Linux 2.4 and the Neodeo Winfast USB disk
If you want to try this at home, you should have an understanding of partitioning and devices.
I bought a Leadtek WinFast USB device. Very handy, but not
Linux friendly out of the box. Apparently it's slightly
non-standard and needs to be explicity defined before it can
be recognised by Linux 2.4.x (it works fine in 2.6.x).
I had to add a definition to the
unusual_devs.h in the 2.4.x USB storage driver - the
full path to this file on my Redhat 7.2 system is
I added the following entry and built a custom kernel:
UNUSUAL_DEV( 0x0aec, 0x5010, 0x0100, 0x0100, "Neodio Technologies Corp.", "Neodio/Leadtek WinFast Disk", US_SC_SCSI, US_PR_BULK, NULL, US_FL_FIX_INQUIRY),
Once the kernel recognised the device, I found that it also needed to be partitioned and reformatted before Linux (2.4.19) could mount it. The device as-shipped lacks a partition table and WinXX treats it like a floppy. But Linux needs a partition table. I found that the sfdisk and and mkdosfs can be used to partition and reformat the device so that both operating systems are happy:
- Find out which scsi drive the device is on, query each
device until something of the right size is listed. Be very
careful if you have any scsi disks - you don't want to pick the
wrong device, because the following steps erase its contents.
sfdisk -l /dev/sda sfdisk -l /dev/sbd sfdisk -l /dev/sdc ...I was looking for something of around 128MB (1003*130560 is about right).
[root@viking2 root]# sfdisk -l /dev/sda Disk /dev/sda: 1003 cylinders, 5 heads, 51 sectors/track Units = cylinders of 130560 bytes, blocks of 1024 bytes, counting from 0
Partition the disk with one partition of type FAT16. I
wanted one partition from the first cylinder 0 to the last
1003 of type 6 (FAT16):
[root@viking2 root]# sfdisk /dev/sda /dev/sda1 :0 1003 6 /dev/sda1 0+ 1002 1003- 127882 6 FAT16 /dev/sda2 : /dev/sda2 0 - 0 0 0 Empty /dev/sda3 : /dev/sda3 0 - 0 0 0 Empty /dev/sda4 : /dev/sda4 0 - 0 0 0 Empty New situation: Units = cylinders of 130560 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 1002 1003- 127882 6 FAT16 /dev/sda2 0 - 0 0 0 Empty /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Do you want to write this to disk? [ynq] y Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) [root@viking2 root]#
As detailed in the sfdisk man page, you then need to zero
out the first 512 bytes of the DOS partition so that DOS
format will believe the partition table over any header info
that might normally be found at the start of the
partition. Note the warning on the man page which basically
says "if you choose the wrong disk you'll toast your data."
In this example I want to zero /dev/sda1, the first
partition of /dev/sda.
[root@viking2 root]# dd if=/dev/zero of=/dev/sda1 bs=512 count=1
Format the partition with mkdosfs (again be careful to type
the right device name):
[root@viking2 root]# mkdosfs -F 16 /dev/sda1
Test mount the device:
[root@viking2 root]# mkdir -p /mnt/tmp1 [root@viking2 root]# mount -t auto /dev/sda1 /mnt/tmp1
Once I had the usb-device working I had to write usb-mount to integrate it with the desktop.