Seagate Dockstar Discussion and Tutorial Thread

okay here is it copy pasted...

Problem:

Tonidoplug when connected with the certain USB drives with multiple partitions, mounts the partitions in random order every time the drive is connected. For example, partition /dev/sda1 is mounted on /media/usb0 when connected, and the same partition /dev/sda1 will be mounted on /media/usb1 when reconnected. This happens only when the USB drive has multiple partitions.

Reason:

When USB drive is connected to Tonidoplug, the Linux OS running in Tonidoplug detects the partitions on the drive in random order. The "usbmount" subsystem mounts the partitions on the available mount point as the partitions are detected.

Solution:

Follow these steps to ensure the partitions are mounted in the same mount point every time the harddisk is connected.

Use this script at your own risk. This script is not supported by codelathe.

- These steps are not tested(since I dont have this problem).

- These steps will work only for USB mounting. Not for USB booting

1) Create a script /etc/usbmount/mount.d/00_a_ensure_mount_order

2) Place the following contents into this new script.

Code:
#!/bin/bash

# Script name: /etc/usbmount/mount.d/00_a_ensure_mount_order

# Beta script: not tested

# This script will ensure mount order of harddisk

# This script will not be effective in changing the boot order

set -e

LOGFILE="/root/usbmount.log"

# Enlist the partitions and its desired mount path

DEVICE[0]=/dev/sda1

MOUNTPOINT[0]="/media/usb0"

DEVICE[1]=/dev/sda2

MOUNTPOINT[1]="/media/usb1"

DEVICE[2]=/dev/sda3

MOUNTPOINT[2]="/media/usb2"

log()

{

       echo "$1" >> $LOGFILE

}

start_script()

{

   log ">>>Detected device start: $UM_DEVICE>>>>>>>>"

}

exit_script()

{

   log "<<<Detected device end : $UM_DEVICE<<<<<<<<"

   exit

}

start_script

#Check if the devices and mount points match

if [[ ${#DEVICE[*]} -ne ${#MOUNTPOINT[*]} ]]; then

        log "Device and Mount mismatch"

        exit_script

fi

MTPOINT=

index=0

#Check if the mounted device is on the desired partitions list

for d in ${DEVICE[*]}

do

        if test "${DEVICE[index]}" = "$UM_DEVICE"; then

                MTPOINT=${MOUNTPOINT[index]}

        fi

        let index=$index+1

done

if test ! -z $MTPOINT; then

        log "Match found for $UM_DEVICE"

        log "Matching mount point $MTPOINT"

else

        log "Device not found on the list..exiting."

        exit_script

fi

#Unmount the device

# Better logic can be added to check if the device is mounted

# at the correct desired location. Unmount only if not.

log "executing command: umount -l $UM_MOUNTPOINT"

umount -l "$UM_MOUNTPOINT"

#Mount the device at the right path

log "executing command: mount $UM_DEVICE $MTPOINT"

mount $UM_DEVICE $MTPOINT

#Finally set the mount path to UM_MOUNTPOINT

export UM_MOUNTPOINT="$MTPOINT"

exit_script

3) Save the script.

4) The above script has a predefined set of 3 mount points. Add or modify the list.

5) Assign executable permission to the script

Code:
chmod +x /etc/usbmount/mount.d/00_a_ensure_mount_order

6) Connect the USB device multiple times and ensure the mount order. Debug logs will be created under /root/usbmount.log
 
But that is still only for mounting once you have booted to debian, not for the boot order. Anyway will check it out, but the booting issue has to be solved first before we can try multiple drives.

- These steps will work only for USB mounting. Not for USB booting
 
m-jeri said:
for 2k + local shipping??..

I am in. but isnt this device slow??.. isnt that what @varkey said by slow write speeds. and besides i also want NTFS.. :S
In case you don't know you can, read/write ext3 drives in windows as well. just need to install the ext2fs driver:)
 
^ The price was valid only for about 1-2 hours so now expired. Anyway I got confirmation saying my order was placed on 1saleaday.com and should be getting it in a week. :) Gaurish also was lucky to get the item at Rs 1711 :P
 
^ Congrats!

Another issue I noticed is that, sometimes when there is a power failure, the device fails to boot back into debian. This is due to the errors in the filesystem. During the boot process a filesystem check is usually done, but maybe its getting stuck at uboot itself? I had to run e2fsck manually by connecting the pendrive to another machine to get it back running. But there had been many power failures but this happened only twice.

I don't know how to rectify this, maybe putting /boot in a separate partition? This time when it happened I was actually installing some packages using apt-get which maybe the reason.

We can know the actual reason only if we check it with a serial cable, I will try to do this soon. :)
 
i have never had this problem... i think u should try with root fs on a separate partition from the data... maybe may be the workaround... the other reason could be that the dock fails to boot from the usb hdd, instead goes straight to the nand... i ahd this issue once, and realised the hdd was set to auto power mode... once i changed to manual, there has been no similar recurrence... it now always boots from the usb
 
^ But it happened only twice and in both cases it was after a power failure and the flash drive had lot of errors according to e2fsck. And I'm not storing any download data on this pendrive, only the OS is there.

The dock is set to boot from NAND, only if its not able to ping my router and I think that setting is working perfectly as only if I disconnect the ethernet cable I can get into the Pogoplug OS. And when it failed to boot, it was actually stuck in some loop as it did not boot from the NAND as well. The led on the pendrive was always lit and would blink occassionally.
 
Yes while I was installing some packages using apt-get, lost electricity and once it was restored the dock failed to boot. And on checking the filesystem with e2fsck on another machine it reported lot of errors. Once the errors were fixed and drive was clean, connected to the dock and it booted to debian in no time.
 
guys, I am thinking of connecting a dedicated 160Gb external for running and downloading stuff on the dockstar. Now while installing Linux, I can of course create multiple partitions for system and data (for example). Would this cause issues with booting?
 
^ The first partition should contain the boot files ie /boot I think, other than that you are free to create other partitions. But the debian installer by Jeff, installs the full OS in the first partition itself.

Btw today I opened my dockstar and connected the serial cable which I bought from eBay :) I suggest everyone who has ordered the dockstar to get hold of this cable. :)

The cable which I got from the above link, the wires Black = GND, Blue = Rx and White = Tx

Also looks like booting when more than one device is connected is no longer a problem. First follow the instructions here. The OS drive should be connected to a lower numbered port. The ports are numbered in the following way

1 - The one right next to the ethernet port

2 - Port beside 1

3 - The port on the side

So as long as the primary OS drive's port comes first it will boot fine even with two devices connected at the same time.

USB: Register 10011 NbrPorts 1

USB EHCI 1.00

scanning bus for devices... 4 USB Device(s) found

scanning bus for storage devices... 2 Storage Device(s) found

** Can not find directory. **

** Error ext2fs_ls() **

Failed to mount ext2 filesystem...

** Bad ext2 partition or disk - usb 1:1 **

** Block device usb 2 not supported

** Block device usb 3 not supported

Loading file "/boot/uImage" from usb device 0:1 (usbda1)

1432436 bytes read

Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)

4703187 bytes read

## Booting kernel from Legacy Image at 00800000 ...

Image Name: Linux-2.6.32-5

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 1432372 Bytes = 1.4 MB

Load Address: 00008000

Entry Point: 00008000

Verifying Checksum ... OK

## Loading init Ramdisk from Legacy Image at 01100000 ...

Image Name: initramfs

Image Type: ARM Linux RAMDisk Image (gzip compressed)

Data Size: 4703123 Bytes = 4.5 MB

Load Address: 00000000

Entry Point: 00000000

Verifying Checksum ... OK

Loading Kernel Image ... OK

OK

Now if we connect the OS drive in the wrong order the device will go on a indefinite reset loop.

Hit any key to stop autoboot: 0

(Re)start USB...

USB: Register 10011 NbrPorts 1

USB EHCI 1.00

scanning bus for devices... 4 USB Device(s) found

scanning bus for storage devices... 2 Storage Device(s) found

Failed to mount ext2 filesystem...

** Bad ext2 partition or disk - usb 0:1 **

** Can not find directory. **

** Error ext2fs_ls() **

** Block device usb 2 not supported

** Block device usb 3 not supported

Loading file "/boot/uImage" from usb device 0:1 (usbda1)

Failed to mount ext2 filesystem...

** Bad ext2 partition or disk - usb 0:1 **

Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)

Failed to mount ext2 filesystem...

** Bad ext2 partition or disk - usb 0:1 **

Wrong Image Format for bootm command

ERROR: can't get kernel image!

resetting ...

Another improvement, now I am getting about 9 MB/s when writing to an NTFS drive. I don't know what changes I made caused the speed to improve as I had removed the ntfs-3g driver, reinstalled it, tried to install a new version etc etc. But finally here are the read and write speeds on an NTFS formatted 2.5" drive :)

root@dockstar:/home# dd if=/dev/zero of=/home/files/test.out bs=1M count=280

280+0 records in

280+0 records out

293601280 bytes (294 MB) copied, 31.849 s, 9.2 MB/s

root@dockstar:/home/files# dd of=/dev/zero if=/home/files/test.out bs=1M count=280

280+0 records in

280+0 records out

293601280 bytes (294 MB) copied, 9.77697 s, 30.0 MB/s
 
Back
Top