# Cannot write to TrekStor i.Beat classico

## lumiere

I just bought a brand new TrekStor i.Beat classico and like it very much (design, Ogg-support, usability, ...) But even though TrekStor claims to be Linux compatible I have some trouble with it.

# uname -a

```

Linux tipi 2.6.18-suspend2-r1 #1 PREEMPT Thu Dec 21 14:15:17 CET 2006 i686 Intel(R) Pentium(R) M processor 1400MHz GenuineIntel GNU/Linux

```

# lsusb -v

```

..

Bus 001 Device 011: ID 1372:b005

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0

  bDeviceProtocol         0

  bMaxPacketSize0        64

  idVendor           0x1372

  idProduct          0xb005

  bcdDevice            1.00

  iManufacturer           1 TrekStok MASS STORAGE

  iProduct                2 TrekStor USB MASS STORAGE

  iSerial                 3 000000000000

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           32

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          1 TrekStok MASS STORAGE

    bmAttributes         0x80

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           2

      bInterfaceClass         8 Mass Storage

      bInterfaceSubClass      6 SCSI

      bInterfaceProtocol     80 Bulk (Zip)

      iInterface              0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x02  EP 2 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

Device Qualifier (for other device speed):

  bLength                10

  bDescriptorType         6

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0

  bDeviceProtocol         0

  bMaxPacketSize0        64

  bNumConfigurations      1

can't get debug descriptor: Connection timed out

Bus 001 Device 001: ID 0000:0000

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            9 Hub

  bDeviceSubClass         0 Unused

  bDeviceProtocol         1 Single TT

  bMaxPacketSize0        64

  idVendor           0x0000

  idProduct          0x0000

  bcdDevice            2.06

  iManufacturer           3 Linux 2.6.18-suspend2-r1 ehci_hcd

  iProduct                2 EHCI Host Controller

  iSerial                 1 0000:00:1d.7

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           25

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0

    bmAttributes         0xe0

      Self Powered

      Remote Wakeup

    MaxPower                0mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           1

      bInterfaceClass         9 Hub

      bInterfaceSubClass      0 Unused

      bInterfaceProtocol      0

      iInterface              0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            3

          Transfer Type            Interrupt

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0002  1x 2 bytes

        bInterval              12

Hub Descriptor:

  bLength               9

  bDescriptorType      41

  nNbrPorts             6

  wHubCharacteristic 0x000a

    No power switching (usb 1.0)

    Per-port overcurrent protection

    TT think time 8 FS bits

  bPwrOn2PwrGood       10 * 2 milli seconds

  bHubContrCurrent      0 milli Ampere

  DeviceRemovable    0x08

  PortPwrCtrlMask    0x01

 Hub Port Status:

   Port 1: 0000.0100 power

   Port 2: 0000.0100 power

   Port 3: 0000.0503 highspeed power enable connect

   Port 4: 0000.0000

   Port 5: 0000.0100 power

   Port 6: 0000.0100 power

```

#udevinfo -a -p /sys/block/uba

```

  looking at device '/block/uba':

    KERNEL=="uba"

    SUBSYSTEM=="block"

    DRIVER==""

    ATTR{stat}=="      12       24       36       15        0        0        0        0        0       11       15"

    ATTR{size}=="0"

    ATTR{removable}=="1"

    ATTR{range}=="8"

    ATTR{dev}=="180:0"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0':

    KERNELS=="1-3:1.0"

    SUBSYSTEMS=="usb"

    DRIVERS=="ub"

    ATTRS{modalias}=="usb:v1372pB005d0100dc00dsc00dp00ic08isc06ip50"

    ATTRS{bInterfaceProtocol}=="50"

    ATTRS{bInterfaceSubClass}=="06"

    ATTRS{bInterfaceClass}=="08"

    ATTRS{bNumEndpoints}=="02"

    ATTRS{bAlternateSetting}==" 0"

    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1/1-3':

    KERNELS=="1-3"

    SUBSYSTEMS=="usb"

    DRIVERS=="usb"

    ATTRS{configuration}=="TrekStok MASS STORAGE  "

    ATTRS{serial}=="000000000000"

    ATTRS{product}=="TrekStor USB MASS STORAGE  "

    ATTRS{manufacturer}=="TrekStok MASS STORAGE  "

    ATTRS{maxchild}=="0"

    ATTRS{version}==" 2.00"

    ATTRS{devnum}=="11"

    ATTRS{speed}=="480"

    ATTRS{bMaxPacketSize0}=="64"

    ATTRS{bNumConfigurations}=="1"

    ATTRS{bDeviceProtocol}=="00"

    ATTRS{bDeviceSubClass}=="00"

    ATTRS{bDeviceClass}=="00"

    ATTRS{bcdDevice}=="0100"

    ATTRS{idProduct}=="b005"

    ATTRS{idVendor}=="1372"

    ATTRS{bMaxPower}=="100mA"

    ATTRS{bmAttributes}=="80"

    ATTRS{bConfigurationValue}=="1"

    ATTRS{bNumInterfaces}==" 1"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1':

    KERNELS=="usb1"

    SUBSYSTEMS=="usb"

    DRIVERS=="usb"

    ATTRS{configuration}==""

    ATTRS{serial}=="0000:00:1d.7"

    ATTRS{product}=="EHCI Host Controller"

    ATTRS{manufacturer}=="Linux 2.6.18-suspend2-r1 ehci_hcd"

    ATTRS{maxchild}=="6"

    ATTRS{version}==" 2.00"

    ATTRS{devnum}=="1"

    ATTRS{speed}=="480"

    ATTRS{bMaxPacketSize0}=="64"

    ATTRS{bNumConfigurations}=="1"

    ATTRS{bDeviceProtocol}=="01"

    ATTRS{bDeviceSubClass}=="00"

    ATTRS{bDeviceClass}=="09"

    ATTRS{bcdDevice}=="0206"

    ATTRS{idProduct}=="0000"

    ATTRS{idVendor}=="0000"

    ATTRS{bMaxPower}=="  0mA"

    ATTRS{bmAttributes}=="e0"

    ATTRS{bConfigurationValue}=="1"

    ATTRS{bNumInterfaces}==" 1"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7':

    KERNELS=="0000:00:1d.7"

    SUBSYSTEMS=="pci"

    DRIVERS=="ehci_hcd"

    ATTRS{broken_parity_status}=="0"

    ATTRS{enable}=="1"

    ATTRS{modalias}=="pci:v00008086d000024CDsv00001014sd0000052Ebc0Csc03i20"

    ATTRS{local_cpus}=="1"

    ATTRS{irq}=="11"

    ATTRS{class}=="0x0c0320"

    ATTRS{subsystem_device}=="0x052e"

    ATTRS{subsystem_vendor}=="0x1014"

    ATTRS{device}=="0x24cd"

    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':

    KERNELS=="pci0000:00"

    SUBSYSTEMS==""

    DRIVERS==""

```

I made a udev-entry (sic: "TrekStok"):

/etc/udev/rules.d/10-local.rules

```

BUS=="usb", KERNEL=="ub?", SYSFS{manufacturer}=="TrekStok MASS STORAGE  ", SYSFS{product}=="TrekStor USB MASS STORAGE  ", NAME="%k", SYMLINK="iBeat"
```

Now I can mount the device:

# mount -t vfat -o utf8 /dev/iBeat /media/iBeat/

"utf8" was necessary to correctly display the non-iso characters

Now I can copy files from the device. They are intact.

But when I copy files to the device (ls shows them in the directory), unmount and mount again, they are gone.

When I access the "copied" files (rename or so), I soon run into trouble. The usb (or vfat?) kernel modules seem to lock-up, I cannot unmount and not even correctly shutdown the laptop.

Please note, that the device is not partitioned (/dev/uba1 does not exist, raw device). I tried to partition it, but fdisk cannot read the partition table:

# fdisk /dev/uba

```
Unable to read /dev/uba
```

I also tried to format the fat 32 system from Linux, but that does not work either:

# mkfs.vfat /dev/iBeat

```
mkfs.vfat 2.11 (12 Mar 2005)

mkfs.vfat: Attempting to create a too large file system

unable to get drive geometry, using default 255/63

```

On Windows everything is fine. I formatted the device as described in the manual and successfully copied some files (they play well). The device can also format itself (not changing anything).

I upgraded to the current firmware to 1.08, I haven't tried Linux before the upgrade.

So far I had no problems with other USB mass storage (Pentax-camera, various USB-sticks and harddisks)

Can anybody help?

----------

## turtles

Do you have windows file system write support enabled in your kernel?

I imagine you do, but just thought I'd ask.

----------

## lumiere

My kernel config looks as this:

DOS/FAT/NT Filesystems:

```
<M> MSDOS fs support 

<M> VFAT (Windows-95) fs support    

(850) Default codepage for FAT                          

(iso8859-1) Default iocharset for FAT                    

<M> NTFS file system support                        

[ ]   NTFS debugging support                                   

[*]   NTFS write support       

```

Note that I mount the TrekStor as vfat, not ntfs. 

Here as a more detailed error report:

# mount -t vfat -o rw,noexec,nosuid,nodev,noatime,uid=1000,utf8,shortname=lower /dev/iBeat /media/iBeat/

- copy some files (via  KDE-Konqueror)

- ls shows files are there

# umount /media/iBeat/

# mount -t vfat -o rw,noexec,nosuid,nodev,noatime,uid=1000,utf8,shortname=lower /dev/iBeat /media/iBeat/

- copied files are no longer there!

- copy the same files again (via  KDE-Konqueror)

--> Strange error message ("Process was closed.." or something). Konqueror hangs.

Kernel log:

```
Jan 14 11:48:36 [kernel] Modules linked in: vfat fat usb_storage ub arc4 ieee802

11_crypt_wep radeon snd_pcm_oss snd_mixer_oss parport_pc parport yenta_socket rs

rc_nonstatic radeonfb ipw2100 ohci1394 pcmcia_core firmware_class ieee1394

Jan 14 11:48:36 [kernel] EIP:    0060:[<c0174317>]    Not tainted VLI

Jan 14 11:48:36 [kernel] EFLAGS: 00210246   (2.6.18-suspend2-r1 #1)

Jan 14 11:48:36 [kernel]  [<c0172325>] __find_get_block+0x35/0x70

Jan 14 11:48:36 [kernel]  [<c01720f3>] __bread_slow+0x33/0x70

Jan 14 11:48:36 [kernel]  [<c0172437>] __bread+0x37/0x40

Jan 14 11:48:36 [kernel]  [<e1741a3f>] fat_ent_bread+0x4f/0xe0 [fat]

Jan 14 11:48:36 [kernel]  [<e17424eb>] fat_alloc_clusters+0x16b/0x3a0 [fat]

Jan 14 11:48:36 [kernel]  [<e173e5d7>] fat_bmap_cluster+0x47/0x90 [fat]

Jan 14 11:48:36 [kernel]  [<e17431d9>] fat_add_cluster+0x19/0x60 [fat]

Jan 14 11:48:36 [kernel]  [<e17433d9>] __fat_get_blocks+0x1b9/0x210 [fat]

Jan 14 11:48:36 [kernel]  [<e17434dc>] fat_get_block+0x2c/0x40 [fat]

Jan 14 11:48:36 [kernel]  [<c0172d2a>] __block_prepare_write+0x27a/0x430

Jan 14 11:48:36 [kernel]  [<c0156646>] get_page_from_freelist+0x86/0xb0

Jan 14 11:48:36 [kernel]  [<c0173527>] cont_prepare_write+0xb7/0x260

Jan 14 11:48:36 [kernel]  [<e17434b0>] fat_get_block+0x0/0x40 [fat]

Jan 14 11:48:36 [kernel]  [<c01566ba>] __alloc_pages+0x4a/0x2d0

Jan 14 11:48:36 [kernel]  [<e1743569>] fat_prepare_write+0x29/0x40 [fat]

Jan 14 11:48:36 [kernel]  [<e17434b0>] fat_get_block+0x0/0x40 [fat]

Jan 14 11:48:36 [kernel]  [<c015395b>] generic_file_buffered_write+0x1eb/0x610

Jan 14 11:48:36 [kernel]  [<c0122815>] current_fs_time+0x55/0x70

Jan 14 11:48:36 [kernel]  [<c018a06d>] file_update_time+0x3d/0xb0

Jan 14 11:48:36 [kernel]  [<c015407a>] __generic_file_aio_write_nolock+0x2fa/0x510

Jan 14 11:48:36 [kernel]  [<c0152610>] file_read_actor+0x0/0xe0

Jan 14 11:48:36 [kernel]  [<c01544f8>] generic_file_aio_write+0x68/0xe0

Jan 14 11:48:36 [kernel]  [<c016f9cd>] do_sync_write+0xad/0x100

Jan 14 11:48:36 [kernel]  [<c01313b0>] autoremove_wake_function+0x0/0x50

Jan 14 11:48:36 [kernel]  [<c0390985>] schedule+0x325/0x640

Jan 14 11:48:36 [kernel]  [<c016fab7>] vfs_write+0x97/0x150

Jan 14 11:48:36 [kernel]  [<c016fc37>] sys_write+0x47/0x80

Jan 14 11:48:36 [kernel]  [<c0103005>] sysenter_past_esp+0x56/0x79

```

Unmount not possible:

# umount /media/iBeat/

umount: /media/iBeat: device is busy

umount: /media/iBeat: device is busy

But there are no open files:

# fuser -m -u -v /media/iBeat/

Mhm, any ideas? Seems like a kernel module / hardware problem.

Cheers,

  Jörn

----------

## turtles

```
modprobe vfat
```

might help.

[url]http://gentoo-wiki.com/HOWTO_Mount_Windows_partitions_(DOS,_FAT,_NTFS)[/url]

----------

## I.C.Wiener

I just had a similar problem with an i.Beat Cebrax:

1. even when I deleted all files df told me that 260MB were still in use

2. every file I copied on the i.Beat was gone after remounting it

After some experimenting I noticed that formating with some weird options works for me:

```

mkfs.vfat -F 16 -v -S 2048 -n i.Beat /dev/sdx1

```

(Of course you need to replace sdx by the correct device name)

Good luck

----------

