• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: usb devices interfere with netwoking on Dreamplug  (Read 3357 times)
alexK
Newbie
*

Karma: 1
Posts: 22


View Profile
« on: June 21, 2012, 10:04:18 PM »

I have a version 1001 (vs 0901) DreamPlug and USB mounted hard drive partitions seem to interfere with networking.
The first line in /etc/fstab reads "#  UNCONFIGURED FSTAB FOR BASE SYSTEM" which might be trying to tell me something I'm not getting.
An external usb connected HD with several partitions, gets its partitions automatically mounted to /media/usbX where there is a different X for each partition.
Anything I add to fstab seems to be ignored, probably because what I want to mount is already mounted and must be unmounted before it can be mounted where I want it. This can all be done mannually. Since fstab wasn't doing it for me I tried unmounting and then mounting in /etc/rc.local
This worked regarding the drives but it kills networking. The output of ifconfig suggests that all is in order but the networking doesn't work.
The relevant error message seems to be "ADDRCONF(NETDEV_UP): eth0: link not ready."
If I get rid of the external hard drive and all the mounting commands, networking works fine.
Has any one encountered anything like this &/or can anyone suggest how to trouble shoot it further?
thks, alex
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #1 on: June 22, 2012, 07:11:33 AM »

get rid of automount
Logged

alexK
Newbie
*

Karma: 1
Posts: 22


View Profile
« Reply #2 on: June 23, 2012, 11:11:20 AM »

I checked and found that there is no automount:
Code:
root@dp3:/etc/init.d# man automount
No manual entry for automount
root@dp3:/etc/init.d# dpkg -L automount
Package `automount' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
root@dp3:/etc/init.d#
Is there some other deamon that might be causing the problem?
Here's a listing of /etc/init.d:
Code:
root@dp3:/etc/init.d# ls
README        hostname.sh       mtab.sh      single
alsa-utils     hwclock.sh       mysql      skeleton
apache2        hwclockfirst.sh       networking     ssh
bluetooth      ifupdown       nginx      stop-bootlogd
bootlogd       ifupdown-clean       openbsd-inetd  stop-bootlogd-single
bootlogs       kbd       portmap      sudo
bootmisc.sh    keyboard-setup       pppd-dns      udev
checkfs.sh     killprocs       procps      udev-mtab
checkroot.sh   lighttpd       rc      udhcpd
console-setup  module-init-tools      rc.local      umountfs
cron        mountall-bootclean.sh  rcS      umountnfs.sh
dbus        mountall.sh       reboot      umountroot
dnsmasq        mountdevsubfs.sh       rmnologin      urandom
exim4        mountkernfs.sh       rsync      x11-common
fam        mountnfs-bootclean.sh  rsyslog
hal        mountnfs.sh       samba
halt        mountoverflowtmp       sendsigs
root@dp3:/etc/init.d#

Thank you for your input.
ak
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #3 on: June 24, 2012, 09:21:48 AM »

I checked and found that there is no automount:
There is no automount.
But you do have a mechanism in place which is mounting devices as you plug them in.  This will be something to do with udev and/or hal.
Logged

alexK
Newbie
*

Karma: 1
Posts: 22


View Profile
« Reply #4 on: June 24, 2012, 04:55:14 PM »

I agree that there is a mechanism that automounts but I can't find what it is.
I can see no mention of usb in the hal, udev or udev-mtab files in /etc/init.d.
Has anyone any suggestions where this is being done?
alex
Logged

alexK
Newbie
*

Karma: 1
Posts: 22


View Profile
« Reply #5 on: June 27, 2012, 12:03:11 AM »

I haven't figured out what's actually doing the mounting but I did manage to get around the problem by adding the following python script to the end of /etc/rc.local. It might be useful to someone.
Code:
#!/usr/bin/env python
# myfstab.py

# My hack to get around the automounting of attached USB connected partitions.
# This problem seems to arise on the 1001 version of the DreamPlug.
# I have not encountered it on the 0901 version.

"""
Creates a file 'sde_mounts' for parsing so that all
/dev/sde partitions can be unmounted and then remounted where
we want them, this time making use of labels.
"""
import os

device = "/dev/sde"
file = "/tmp/sde_mounts"
sleep = "sleep 30"
os.system(sleep)  # So that system can complete what it does.
cmd = "mount -l | grep %s > %s"%(device, file,)
os.system(cmd)    # Create file for parsing.
# The above command is harmless and need not be commented out.
# If you do comment it out, the rest of the program will fail.

for line in open(file):
  if line[:8] == '/dev/sde':    # A partition that we want to unmount.
    dev = line[:9]
    cmd = "umount %s"%(dev, )
    # print cmd
    os.system(cmd)

fstab = (
("ext3", "rw,auto", "LABEL=/home",     "/mnt/Home",        ),
("ext3", "rw,auto", "LABEL=TODD",      "/mnt/Todd",        ),
("ext3", "rw,auto", "LABEL=BU",        "/mnt/BU",          ),
("ext3", "rw,auto", "LABEL=/usrlocal", "/mnt/oldusrlocal", ),
("ext3", "rw,auto", "LABEL=/var",      "/mnt/oldvar",      ),
("ext3", "rw,auto", "LABEL=/tmp",      "/mnt/oldtmp",      )
)

for t in fstab:
  cmd = "mount -t %s -o %s %s %s"% t
  print cmd
  os.system(cmd)

Anyone who chooses to use it will of course need to edit the fstab list of tuples to suit their own needs.
Logged

Pages: [1]
Print
Jump to: