Remount all read-only usb mounts as read-write (1)


    November 8th, 2009 | Tags: , , ,

    Some of you may have realized that USB mass storage devices attached to the PlayOn!HD are automatically mounted as read-only. In a read-only mount, you cannot write files to the drive.

    The following script will remount all available USB mass storage devices (mounted in read-only mode) as read-write!

    The down side is that you got to execute the script every time you plug in a new device. The script work best with View USB storage attached to A.C.Ryan PlayOn!HD over network.

    #!/bin/sh
    # author: shadowandy.sg[at]gmail[dot]com <http://www.shadowandy.net>
    #
    # Simple remounting script for A.C.Ryan PlayOn!HD Media Player
    #
    # Version 1.1
    #

    try_remount() {
    echo “remounting $1 as read-write”
    mount -o,remount,rw $1
    }

    if [$(mount | grep /tmp/usbmounts/ | grep ro | wc -l) -eq 0 ]; then
    echo “no read-only usb drives found!”
    else
    echo “remounting read-only usb drives…”
    for remount in $(mount | grep /tmp/usbmounts/ | grep ro | cut -d ” ” -f3); do
    try_remount $remount
    sleep 1
    done
    echo “all read-only usb drives mounted as read-write!”
    fi

    Creating the script

    1. Telnet and login to your A.C.Ryan PlayOn!HD
    2. In the command prompt window, enter “vi /tmp/hdd/root/script/remount.sh
    3. In the vi window, press “i” to start edit mode
    4. Paste the content of the above script
    5. Press “<ESC>” to exit out of edit mode
    6. Enter “:wq” to save the script
    7. Enter “ls /tmp/hdd/root/script
      remount.sh should be listed as one of the files

    Executing the script

    1. In the command window, enter “sh /tmp/hdd/root/script/remount.sh
      The script would remount existing read-only USB drives as read-write





    1 response

    1. Thanks, it works :)

      I noticed transfer is a bit slow (5MB/sec) so I probably will only use the network write access feature occasionally for light work. Like when adding some subtitles files. Then it is not a real problem if I have to execute the script first. Maybe I can build some Putty shortcut command that logs in and executes the scripts..

      I have pre-formated my external disks with the PlayonHD so that if I ever build one into the POHD, I dont have to format it anymore. But now those 2 external drives also show an extra EXT3 partition (SDB3 & SDC3) when browsing over the network and in the Player’s browser. Is there a way to temporary hide those partitions so they do not clutter the view?

      Do you know a way to create shortcuts on the internal HDD to both my external HDDs (SDB1&SDC1) so that I can always Browse to HDD to reach all my 3 harddisks? Or even better, how to merge the folders in the root of my external disks with the internal HDD root folder or -movies- folder?

       

    RSS Feeds




    Treat shadowandy!


    Like to treat shadowandy a cup of Starbucks?

    Recent Comments



    Friend's Blog



    Interesting Links



    Previous Postings



    Copyright © 2005 - 2010 www.shadowandy.net  110 queries. 1.044 seconds.Go back up ↑