• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: Strugglong with USB Hub and External HD on: August 23, 2009, 06:54:16 PM
The plug's USB system has been pretty finicky for me as well. I'd guess you are running into power issues. Is the new hub powered? Is the USB1 hub powered? It could be that USB1 draws less power so when your drive is operating on that standard it works alright and doesn't work otherwise. I was having all sorts of trouble with USB2 flash drives until I got a powered USB2 hub.
2  General Category / Application ideas and development Q/A / Re: Floating point requirements for Virtualized OS on: July 09, 2009, 08:06:34 PM
You can install the qemu binary from the apt repository. I don't have the time to create a windows vm right now but I tried TinyCoreLinux http://www.tinycorelinux.com but I got a kernel panic. I'll try fiddling with it a bit more tomorrow. It's likely I just didn't pass the correct command line parameters.
3  Linux Stuff / Linux distributions / Re: Space left after installation of ubuntu? on: July 08, 2009, 11:12:15 AM
After using the alpha6 installer, my internal nand looks like this:
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi1:rootfs             472848    189068    278944  41% /mnt/nand

I'm pretty sure I haven't loaded anything else on it since I run my actual rootfs from a usb stick.
4  Linux Stuff / General Linux questions / Re: Why it takes so long to mount the onboard nand fs? on: July 07, 2009, 11:38:17 AM
Quote
This is something really bugging me: why it takes ages to mount an on-board nand memory on sheevaplug (also true on openrd client, so it seems it's filesystem type related)? It takes at least half a minute, if not a full minute, to mount a nand partition. Can someone exaplain a bit on this? Thanks.

See more info here:
http://www.plugcomputer.org/plugwiki/index.php/Enabling_UBIFS#Why_UBIFS_instead_of_JFFS2.3F

Quote
BTW, can someone explain to me how to mount the NAND after running the alpha6 installer?  It's not really a jffs2 FS anymore, but something that resides over the UBI layer.  I use an SDcard for the root fs here, and have no idea how to access the NAND from this configuration -- not that it's a pressing problem; it's more a matter of curiosity.

Answered here:
http://plugcomputer.org/plugforum/index.php?topic=478.msg2838#msg2838
5  Linux Stuff / General Linux questions / Re: Booting entirely off an external USB device on: July 07, 2009, 11:33:25 AM
A little more digging and with the help of the link you provided I managed to get the internal device to mount. It is in the wiki but it's buried in another topic. http://www.plugcomputer.org/plugwiki/index.php/Enabling_UBIFS#Why_UBIFS_instead_of_JFFS2.3F I'll walk through it in a bit more detail just for fun.

First, make sure you have a kernel with UBI support. I imagine if you used the Installer you're running one of cbxbiker61's excellent kernels which has the support built in.

Next, you should be able to see the mtd devices in the plug by executing:
Code:
root@sheeva:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00020000 "uImage"
mtd1: 1fb00000 00020000 "rootfs"

We see that my "rootfs" on the nand is on mtd1. Now we need to attach the mtd device. This can be done in a number of ways. One way is to do it in the kernel parameters at boot time but I find the ubiattach utility the easiest. See more info here: http://www.linux-mtd.infradead.org/faq/ubi.html#L_attachmtd To attach mtd1 to ubi device 0, use:
Code:
root@sheeva:~# ubiattach /dev/ubi_ctrl -m 1 -d 0
UBI device number 0, total 4055 LEBs (523192320 bytes, 499.0 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)

The dmesg output after running the above command should look something like this:
Code:
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "rootfs"
UBI: MTD device size:            507 MiB
UBI: number of good PEBs:        4055
UBI: number of bad PEBs:         1
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 4055
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 3/0
UBI: background thread "ubi_bgt0d" started, PID 22880

Now that the device is attached (you should see /dev/ubi0 and /dev/ubi0_0 entries if you ran the above code), we can mount it with:
Code:
root@sheeva:~# mount -t ubifs ubi0_0 /mnt/nand
OR
Code:
root@sheeva:~# mount -t ubifs ubi0:rootfs /mnt/nand
I prefer the second one as it is easier to read.

Finally, you can unmount with:
Code:
root@sheeva:~# umount ubi0:rootfs

And detach ubi device 0 with:
Code:
root@sheeva:~# ubidetach /dev/ubi_ctrl -d 0

Cheers!
6  Linux Stuff / General Linux questions / Re: Booting entirely off an external USB device on: July 06, 2009, 06:17:47 PM
From the "README.txt" in the "installer" directory in the installer.

Quote
This is an installer for Ubuntu image to /dev/mtdblock1 on the internal NAND flash as UBIFS.

I'm thinking you need to mount /dev/mtdblock1 as UBIFS. I'm not sure how to do that. The kernel I'm running is supposed to have UBIFS support but I always get the following when I try:
Code:
sudo mount -t ubifs ubi0:rootfs /mnt/nand/
mount: unknown filesystem type 'ubifs'

Hopefully this might be of help.
7  General Category / Application ideas and development Q/A / Re: Mediatomb? on: June 11, 2009, 09:07:13 AM
I haven't compiled 0.12 but I've installed the binary for 0.11 (available in apt) and it worked just fine so I doubt you'd run into any issues. On a slightly related note, I think Coherence is nicer  Wink
8  Hardware and U-Boot firmware / Hardware / Re: Unstable USB on: May 28, 2009, 04:15:36 PM
I'd be curious to understand whether the problems you were experiencing that were ameliorated by the powered hub were caused by the hub being able to provide more power to the devices, or whether it was the forcing of the USB connection to USB1 speeds that resolved them.  (If it is the latter, that is not necessarily a good sign.)

I'm pretty sure it was the former. I picked up a powered USB 2 hub and the drive is now running well (as my root fs) at full speed.  Grin
9  Hardware and U-Boot firmware / Hardware / Re: Unstable USB on: May 28, 2009, 09:29:10 AM
Super.  Hope your new USB hub proves reliable...

I was having a similar problem and I just dug up an old (circa 2000) self powered USB 1 hub and my USB key seems to be working just fine. No more problems like I was describing here: http://plugcomputer.org/plugforum/index.php?topic=349.0. So other than the fact that I'm running at 12Mbps, everything seems to be alright. I might have to go out and get a newer and less bulky hub.

Hopefully the USB system will get beefed up in a future hardware revision!
10  Hardware and U-Boot firmware / Hardware / EXT2 Corruption on USB Key on: May 26, 2009, 03:56:40 PM
I'm having a hell of a time getting an EXT2 formatted USB key to work with the plug. I've tried this key in Ubuntu (in a VM) and a x86 Ubuntu box with no problems. I've also had success using the key with a FAT fs in the plug. The plug seems to corrupt the file system horribly. I'm a bit of Linux newb though so please, any insight would be appreciated.

I'll try to give details as to exactly what his happening:

1. I insert the key, the plug picks it up fine (I assume):
ay 26 18:30:22 sheeva kernel: usb 1-1: new high speed USB device using orion-ehci and address 5
May 26 18:30:22 sheeva kernel: usb 1-1: configuration #1 chosen from 1 choice
May 26 18:30:22 sheeva kernel: scsi3 : SCSI emulation for USB Mass Storage devices
May 26 18:30:22 sheeva kernel: usb-storage: device found at 5
May 26 18:30:22 sheeva kernel: usb-storage: waiting for device to settle before scanning
May 26 18:30:27 sheeva kernel: scsi 3:0:0:0: Direct-Access     Real-Way RW8021 PENDRIVE  1.0  PQ: 0 ANSI: 2
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: Attached scsi generic sg0 type 0
May 26 18:30:27 sheeva kernel: usb-storage: device scan complete
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: [sda] 7852032 512-byte hardware sectors: (4.02 GB/3.74 GiB)
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: [sda] Write Protect is off
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: [sda] Mode Sense: 0b 00 00 08
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: [sda] Assuming drive cache: write through
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: [sda] Assuming drive cache: write through
May 26 18:30:27 sheeva kernel:  sda: sda1
May 26 18:30:27 sheeva kernel: sd 3:0:0:0: [sda] Attached SCSI removable disk

2. I mount the partition, my fstab line is:
/dev/sda1 /media/usbstick ext2 rw,nosuid,nodev,errors=continue 0 0

3. When I try to create a file on the partition:
semery@sheeva:/media/usbstick$ touch bar
touch: cannot touch `bar': Input/output error

4. The following shows up in syslog:
May 26 18:31:07 sheeva kernel: usb 1-1: reset high speed USB device using orion-ehci and address 5
May 26 18:31:09 sheeva last message repeated 5 times
May 26 18:31:09 sheeva kernel: sd 3:0:0:0: [sda] Unhandled error code
May 26 18:31:09 sheeva kernel: sd 3:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
May 26 18:31:09 sheeva kernel: end_request: I/O error, dev sda, sector 1998
May 26 18:31:09 sheeva kernel: EXT2-fs error (device sda1): read_inode_bitmap: Cannot read inode bitmap - block_group = 0, inode_bitmap = 242

5. After I do a few more file operations, the kernel prints some sort of trace (I don't know if it is related) and then it seems to pick up the drive again and assign it to sdb (instead of sda):
May 26 18:46:04 sheeva kernel: WARNING: at fs/buffer.c:1152 mark_buffer_dirty+0x38/0xd8()
May 26 18:46:04 sheeva kernel: Modules linked in: tun dm_crypt dm_mod cifs ipv6
May 26 18:46:04 sheeva kernel: [<c00309c0>] (unwind_backtrace+0x0/0xe0) from [<c003da80>] (warn_slowpath_common+0x50/0x68)
May 26 18:46:04 sheeva kernel: [<c003da80>] (warn_slowpath_common+0x50/0x68) from [<c00c6458>] (mark_buffer_dirty+0x38/0xd8)
May 26 18:46:04 sheeva kernel: [<c00c6458>] (mark_buffer_dirty+0x38/0xd8) from [<c01093f0>] (ext2_sync_super+0x3c/0x54)
May 26 18:46:04 sheeva kernel: [<c01093f0>] (ext2_sync_super+0x3c/0x54) from [<c0109940>] (ext2_error+0x50/0xc8)
May 26 18:46:04 sheeva kernel: [<c0109940>] (ext2_error+0x50/0xc8) from [<c0106df0>] (ext2_get_inode+0x104/0x11c)
May 26 18:46:04 sheeva kernel: [<c0106df0>] (ext2_get_inode+0x104/0x11c) from [<c01083cc>] (ext2_iget+0x48/0x39c)
May 26 18:46:04 sheeva kernel: [<c01083cc>] (ext2_iget+0x48/0x39c) from [<c0109070>] (ext2_lookup+0x40/0x54)
May 26 18:46:04 sheeva kernel: [<c0109070>] (ext2_lookup+0x40/0x54) from [<c00acec0>] (do_lookup+0xcc/0x194)
May 26 18:46:04 sheeva kernel: [<c00acec0>] (do_lookup+0xcc/0x194) from [<c00aed14>] (__link_path_walk+0x9b8/0xe98)
May 26 18:46:04 sheeva kernel: [<c00aed14>] (__link_path_walk+0x9b8/0xe98) from [<c00af244>] (path_walk+0x50/0x9c)
May 26 18:46:04 sheeva kernel: [<c00af244>] (path_walk+0x50/0x9c) from [<c00af400>] (do_path_lookup+0x128/0x150)
May 26 18:46:04 sheeva kernel: [<c00af400>] (do_path_lookup+0x128/0x150) from [<c00afd18>] (user_path_at+0x60/0x98)
May 26 18:46:04 sheeva kernel: [<c00afd18>] (user_path_at+0x60/0x98) from [<c00a8258>] (vfs_fstatat+0x38/0x68)
May 26 18:46:04 sheeva kernel: [<c00a8258>] (vfs_fstatat+0x38/0x68) from [<c00a8384>] (sys_stat64+0x20/0x3c)
May 26 18:46:04 sheeva kernel: [<c00a8384>] (sys_stat64+0x20/0x3c) from [<c002b940>] (ret_fast_syscall+0x0/0x2c)

6. fsck on the plug then reports a broken file system. I can fsck it on my x86 box and it can usually recover from the errors.

I'm running 2.6.30-rc7 from cbxbiker61 (thanks for the builds!) and the key is plugged directly into the device (no hub). This is a freshly minted file system (I used gparted on my x86 box because I figured my fdisk skills may have been part of the problem).

Thanks for any ideas!
11  General Category / General Discussion / Re: iTunes Server? on: May 21, 2009, 05:39:39 PM
I have firefly running on the plug. It works great! Just to test I shared my iTunes directory from my Mac with samba and firefly managed to scan the whole thing (it took a little while) and served it up to my local network.

I just did an:

apt-get install mt-daapd
12  Hardware and U-Boot firmware / Hardware / Re: did a resetenv, now how to restore various args so it boots from internal me on: May 09, 2009, 12:44:02 PM
See the wiki http://plugcomputer.org/plugwiki/index.php/Factory_Default_u-Boot_Environment. I ran into the same problem. The wiki could probably use some better structure but all the info is there  Wink In short, after doing a resetenv, you'll need to do at least:

Code:
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none'
setenv ethaddr 00:50:43:4c:02:26
setenv run_diag no
saveenv

Be sure to set the ethernet address to the one on the sticker on the back of the plug. Don't just copy/paste above.
13  Hardware and U-Boot firmware / Hardware / Re: is this bad or expected on: May 09, 2009, 12:37:22 PM
You can turn diagnostics off by setting the run_diag boot variable to "no". The following U-Boot commands should do the trick:
Code:
setenv run_diag no
saveenv
reset
Pages: [1]