New IT forum Follow us on Twitter
21 May 2012, 04:20:32 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: TonidoPlug2 - Now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: USB HD for linux newbie  (Read 1431 times)
Quinny
Newbie
*
Posts: 10


« on: 22 December 2009, 08:47:18 pm »

I've just go my Sheevaplug (brilliant service BTW) Smiley.

Logged in at it seems to be working fine.

I have plugged in a USB disk, but don't even know how to check it's recognised.  df -h doesn't show it, but I haven't mounted it or anything.  I was hoping to check it and then install Samba to share it with my Windows PC's.

Any pointers would be gratefully received.
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #1 on: 22 December 2009, 08:52:25 pm »

I've just go my Sheevaplug (brilliant service BTW) Smiley.

Logged in at it seems to be working fine.

I have plugged in a USB disk, but don't even know how to check it's recognised.  df -h doesn't show it, but I haven't mounted it or anything.  I was hoping to check it and then install Samba to share it with my Windows PC's.

Any pointers would be gratefully received.

You must mount the drive before it becomes visible. dmesg should show something when you connect the drive.

What is the format of the disk? NTFS?

What version of the Sheevaplug do you have? (specifically - what kernel version - uname -a to check).
Logged
Quinny
Newbie
*
Posts: 10


« Reply #2 on: 22 December 2009, 08:58:08 pm »

uname -a gives

Linux ubuntu 2.6.30.2 #11 PREEMPT Wed Jul 22 19:53:31 MDT 2009 armv5tel GNU/Linux

It does say something about USB mass storage device !

What next?



Dmesg output below


Linux version 2.6.30.2 (kelly@speedy) (gcc version 4.2.1) #11 PREEMPT Wed Jul 22          19:53:31 MDT 2009
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c053a408, node_mem_map c060c000
  Normal zone: 1024 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 130048 pages, LIFO batch:31
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootdelay=5
NR_IRQS:114
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB = 512MB total
Memory: 513408KB available (4728K code, 998K data, 140K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 980 bytes
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
initial MPP regs: 01111111 11113322 00001111 00100000 00000000 00000000 00000000
  final MPP regs: 01111111 11113322 00001111 00000000 00000000 00000000 00000000
Kirkwood: Gating clock using mask 0x1ac224
bio: create slab <bio-0> at 0
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
NET: Registered protocol family 1
Switched to high resolution mode on CPU 0
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4012, nTxLock = 32100
msgmni has been set to 1003
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:50:43:01:6a:50
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 3976 at 0x00001f100000
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "root"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mice: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
Registered led device: plug:green:health
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD08G 7.49 GiB
 mmcblk0: p1 p2
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
rtc-mv rtc-mv: setting system clock to 2009-12-22 19:34:36 UTC (1261510476)
Waiting 5sec before mounting root device...
kjournald starting.  Commit interval 5 seconds
EXT3 FS on mmcblk0p2, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
VFS: Mounted root (ext3 filesystem) on device 179:2.
Freeing init memory: 140K
eth0: link up, 100 Mb/s, full duplex, flow control disabled
device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised: dm-devel@redhat.com
NET: Registered protocol family 10
eth0: no IPv6 routers present
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 22 December 2009, 10:11:25 pm »

You didn't answer the most important question (what format is the drive) and I wasn't clear about dmesg.

Unplug your drive. Wait a few seconds. Plug it back in. Type dmesg and look for lines at the end of the output (not the complete output) that refer to a USB device. That is how you "check it's recognised". lsusb should give you some output too.

Now, about the format of the drive (and why I asked about your kernel version).

With 2.6.30.2, you won't be able to write to an NTFS formatted drive. But you can still proceed with reading data from it, even if it is NTFS.

if the drive is not (yet) formatted, you could format it as ext3 and share it using SAMBA. If it is NTFS, or you intend to format it as NTFS, and you want to be able to write to it, you'll need to look into a kernel upgrade at some point.

The Ubuntu documentation will be helpful for learning how to mount your drive.

The plugcomputer.org forum is your starting place for kernel upgrades.
Logged
Quinny
Newbie
*
Posts: 10


« Reply #4 on: 22 December 2009, 10:27:38 pm »

I didn't answer because I'm not sure, I think it's NTFS.

I'll try unplugging and plugging in again see if that helps.

Thanks - BTW although I haven't actually done anything yet - I'm impressed at the moment.  Is there a guide to installing as a webserver?

Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #5 on: 22 December 2009, 10:33:36 pm »

I didn't answer because I'm not sure, I think it's NTFS.

I'll try unplugging and plugging in again see if that helps.

Thanks - BTW although I haven't actually done anything yet - I'm impressed at the moment.  Is there a guide to installing as a webserver?



https://help.ubuntu.com/community/ApacheMySQLPHP


Logged
Quinny
Newbie
*
Posts: 10


« Reply #6 on: 22 December 2009, 10:40:23 pm »

Thanks for that. 

Now seeing drive

root@ubuntu:/# lsusb
Bus 001 Device 002: ID 0930:0b03 Toshiba Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and /dev/sda has appeared. 

I tried to
mkdir /mnt/usbdrive
and then
mount /dev/sda /mnt/usbdrive

but got

root@ubuntu:/# mkdir /mnt/usbdrive
root@ubuntu:/# mount /dev/sda /mnt/usbdrive
mount: /dev/sda: unknown device


Any suggestions please
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #7 on: 22 December 2009, 11:41:20 pm »

mount /dev/sda1 /mnt/usbdrive is more likely to be proper (that's sda1, not sda, and represents the first partition on the drive, rather than the drive as a whole), but it still won't work if the disk format isn't right.

Post #4 here starts to tackle the same issues as you will be dealing with now. (Note that that discussion is about Ubuntu 9.10; you only have Ubuntu 9.04 and upgrade to 9.10 is not possible).

Consider:

  • The filesystem of your drive, specifically in relation to the NTFS / writeability issue
  • You can test and evolve the correct mount command from the command line
  • When you want to make it permanent, in /etc/fstab, the syntax is different
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!