Your Digital Media Has Never Looked So Good

 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

swap file question

Tue Sep 13, 2005 2:46 pm

Is it not possible to create a swap file on a network drive instead of using a compact flash card? From what I've read it sounds like you have to use a flash card for the swap file... is this true?

If you can create one on a network drive then will this allow you to bypass running the Swap program at start-up each since the file would be in a fixed location or would you still need to run the program?
M1000 wired running WMC and Rhapsody servers
M1001 wireless running WMC and Rhapsody servers
HD1000 wired
 
Wulgaru
Posts: 137
Joined: Mon Oct 25, 2004 9:59 pm
Location: Western Springs, IL

Tue Sep 13, 2005 2:54 pm

I believe that somebody has previously posted a solution to creating a network swap file. Also, somebody has previously posted the solution to having to run the swap program every time you boot. I would think that the latter would be required regardless of where your swap file lives.
 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

Tue Sep 13, 2005 3:03 pm

Before posting my question I did run a search for all topics with Swap AND file in them and didn't see anything that led me to believe this was possible. Any clues as to either how to do this or what topic(s) these issues were discussed in? The reason I ask is b/c I have seen a few "Rev A" models for sale at decent prices but I'm trying to decide whether or not it's going to be a pain dealing with the swap file or not. I will predominantly use the HD1000 for veiwing DVDs (.vob files) over my network via Mplay. But if I have to engage the swap routine each time I turn on the unit that's going to be a problem for me b/c it won't be wife and kid friendly.
M1000 wired running WMC and Rhapsody servers

M1001 wireless running WMC and Rhapsody servers

HD1000 wired
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Tue Sep 13, 2005 3:33 pm

mebby wrote:
Before posting my question I did run a search for all topics with Swap AND file in them and didn't see anything that led me to believe this was possible. Any clues as to either how to do this or what topic(s) these issues were discussed in? The reason I ask is b/c I have seen a few "Rev A" models for sale at decent prices but I'm trying to decide whether or not it's going to be a pain dealing with the swap file or not. I will predominantly use the HD1000 for veiwing DVDs (.vob files) over my network via Mplay. But if I have to engage the swap routine each time I turn on the unit that's going to be a problem for me b/c it won't be wife and kid friendly.


Info about creating and mounting a network swap file:
http://www.rokulabs.com/forums/viewtopic.php?t=2074

Info on automatically mounting the swap file on boot:
http://www.rokulabs.com/forums/viewtopic.php?t=2061
http://www.rokulabs.com/forums/viewtopic.php?t=1104

TheEndless
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
 
tjdebon
Posts: 111
Joined: Mon May 09, 2005 4:47 pm

How to automatically launch a swapfile on CF card

Tue Sep 13, 2005 3:54 pm

I use this method of automatically launching the swap file by putting commands in the .flashrc.local and .autoexec.roku on a CF card. The advantage of this technique is that it only runs when the CF card is in place since all the code resides on the CF card. I've pasted in my .flashrc.local file (which runs if the CF card is already inserted at boot up); and the .autoexec.roku file (which runs if the CF card is inserted after bootup).

The swap file only needs to be created once, it resides permanently on the CF card. Code to create the swapfile is not shown here. Note: the swapfile must be unmounted before removing the CF card or the PB will hang and require reboot.

The leading . (dot) in the filename is important. In general, any file or directory named with a leading .(dot) will execute but is not shown on the user interface. Incidentally, it is also a nice method to use to hide pictures and music that you only want to execute thru a program and don't want to execute directly (such as artpacks you've copied to the CF or share)I was not able to create files with .dot as the leading character in windows. I had to create the leading dot named files on the Roku PB. Once created you can copy and edit the files in windows using textpad etc.

I also launch the userkeys program to access additional remote codes. Other commands and calls to other programs can also be added. A delay (sleep 20) is needed to let the PB completely boot up before executing that program. The sleep time can be reduced from 20 to 10 (on my system) for .autoexec.roku. Some experimentation may be neccessary to determine optimal delays.

Now if only I could figure out how to rename my SMB shares... :oops:


.flashrc.local
#!/bin/sh

# This is .flashrc.local

# This script runs at boot up. It resides on CF card.
# Note flashrc.local will not run if CF card is not inserted at boot up. Upon insertion .autoexec.roku executes
# CF Card is configured with swapfile in root directory.

# Change CF card to read write
     mount /dev/ide/host0/bus0/target0/lun0/part1 /mnt/flash1 -o remount,rw,sync,noatime,nodiratime

# Turn on swap file
     swapon "/mnt/flash1/swapfile"

# Run userkeys program to activate extra remote control codes
     PATH=$PATH:/mnt/flash1/userkeys
     (sleep 20 && /mnt/flash1/userkeys/userkeys ) &
     
     exit



.autoexec.roku
#!/bin/sh

# This is .autoexec.roku

# This script runs when Compact Flash card is inserted AFTER boot up. It resides on CF card.
# Note .flashrc.local will  run if CF card is already inserted at boot up.
# CF Card is configured with swapfile in root directory.

# Change CF card to read write
     mount /dev/ide/host0/bus0/target0/lun0/part1 /mnt/flash1 -o remount,rw,sync,noatime,nodiratime

# Turn on swap file
     swapon "/mnt/flash1/swapfile"

# Run userkeys program to activate extra remote control codes
     PATH=$PATH:/mnt/flash1/userkeys
     (sleep 10 && /mnt/flash1/userkeys/userkeys ) &
     
     exit
 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

Wed Sep 14, 2005 12:08 am

I appreciate all the help but not being a very technical user I'm a bit lost. While I know a lot about computers and a little bit about networking I do not have any programming knowledge so most of the content contained in the posts "The Endless" sent me to are well above my head.

But... from what I've read it sounds like there are two possibilities. You can create a swap file on a CF card and have it mount on boot-up. automatically OR you can create a swap file on a SMB (is this normal Microsoft shared folder?) share and have it mounted on boot-up. The problem is, that I can't even begin to follow the steps described in order to make this happen. Can someone dumb it down for me? If not, then I'll just buy a Rev B unit and be done with it, but if I can get a good Rev A unit off Ebay for cheap then I'd rather do that.

But I still have one question that I saw conflicting answers to. If I have the HD1000 in my home theater set-up and it will turn on (boot-up) only when needed, will I have problem with it automatically using the swap file or will there be some process that I have to go through each time to make this happen? It sounds like it won't be a problem but I was unable to get clarity on this...

Again - any help here is appreciated. If it's just easier to buy a Rev B unit then I can do that, but given somewhat dumbed down instructions I'm sure I can make it work.

Thanks
M1000 wired running WMC and Rhapsody servers

M1001 wireless running WMC and Rhapsody servers

HD1000 wired
 
Wulgaru
Posts: 137
Joined: Mon Oct 25, 2004 9:59 pm
Location: Western Springs, IL

Wed Sep 14, 2005 9:35 am

The swap file never needs to be re-created. If you reboot the unit or remove the CF card, the swap file needs to be re-mounted. The easiest thing for you to do is this:

1.) Download the swap program and put it on a CF card.
2.) Insert the CF card in the Roku and run the swap program.
3.) Wait for a few minutes for the swap file to be created. Check to System Information panel to tell when it is done.
4.) Power-down the Roku.
5.) Remove the CF card.
6.) Create the two files mentioned by tjdebon on the CF card. You can also remove the swap program.
7.) Insert the CF card into the Roku.
8.) Power-on the Roku and you should be good to go.

Any time you reboot or re-insert the CF card, the swap file that you created in step 2 on the CF card will be mounted.

From what I recall, those are the basic steps in pretty simple terms. Let us know how it works out.
 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

Wed Sep 14, 2005 9:50 am

Wulgaru,
I appreciate the response. And I apologize again for being so stubborn about this, but I am understanding you to say that once I create the swap file on the CF card (a one time process) that each time I boot the unit up the swap file will be mounted and there is nothing else I have to do as long as I simply have the card in the slot at boot-up and it will remain in effect while the system runs as long as the CF card is not removed?

I also understand that removing the CF Card once the unit has booted will require me to reboot the unit.

Please confirm.

Thanks again for your help.
M1000 wired running WMC and Rhapsody servers

M1001 wireless running WMC and Rhapsody servers

HD1000 wired
 
jriihi
Posts: 11
Joined: Thu Sep 08, 2005 4:42 am

Wed Sep 14, 2005 11:14 am

mebby wrote:
And I apologize again for being so stubborn about this, but I am understanding you to say that once I create the swap file on the CF card (a one time process) that each time I boot the unit up the swap file will be mounted and there is nothing else I have to do as long as I simply have the card in the slot at boot-up and it will remain in effect while the system runs as long as the CF card is not removed?


Yes.

mebby wrote:
I also understand that removing the CF Card once the unit has booted will require me to reboot the unit.


Yes unless you telnet to unit and unmount it.
 
Wulgaru
Posts: 137
Joined: Mon Oct 25, 2004 9:59 pm
Location: Western Springs, IL

Wed Sep 14, 2005 11:54 am

If you follow the process of putting the two files on the CF card, then the answer is yes. The files will cause the share to be re-mounted when you boot or re-insert the CF card.

If you look at the CF card on your PC after running the swap program, you will notice that there is a 64MB swap file on the card. It will stay there until you delete it. When you reboot the Roku, it just looses the "connection" to the file.

If you do not put the two files on the CF card, then you must run the swap program every time you re-boot. It will run faster after the first time because the swap file will already exist on the card, so it will just be mounting the file.

Glad to help.
 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

Wed Sep 14, 2005 1:18 pm

OK - Great! I really do appreciate the help. Just one last question due to my lack of technical knowledge.

How do I go about creating the two files (".flashrc.local" and ".autoexec.roku")? I can follow the logic of the two files and understand how they interact (in probably over-simplistic terms) but I'm don't technically know how to go about creating the two files to contain the code supplied.
M1000 wired running WMC and Rhapsody servers

M1001 wireless running WMC and Rhapsody servers

HD1000 wired
 
dgburns
Posts: 807
Joined: Mon Jun 27, 2005 9:37 am

Thu Sep 15, 2005 5:51 am

mebby wrote:
How do I go about creating the two files (".flashrc.local" and ".autoexec.roku")?


If you don't have a CF device on your PC you'll need to create on PC and then telnet into the Roku and copy them from PC share to the CF card. If you're brave, you CAN create them directly on the Roku once you telnet it and go to the directory where the CF card is mounted (I think /tmp/Volumes is where it shows up) using the 'vi' program.

Another thing to keep in mind about this whole process. When you turn the Roku "off" with the remote or front panel, you ARE NOT really turning it off. You're only disabling the output. Unless you pull the plug or otherwise disconnect power from the Roku, it's always "on" and booted up so the swap file stays mounted through turning it "off" and "on" again, the wife wouldn't have to re-mount swap every time she turns it "on". So, the only time you need to re-enable the swap file is if it loses power or you manually reboot it.
HD-1500 RevB #1 (media room)
Mitsubishi WD-62528 62" LCD RPTV
Kenwood VR-407 receiver w/PSB Alpha's
PS/3 60GB (now 250GB) w/750GB Seagate ext
M1000 (upstairs)
HD-1000 RevB #2 (bedroom)
Visco 32" LCD
AR 2.1 audio system
PS/2
 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

Thu Sep 15, 2005 6:33 am

Dgburns,
Thanks for the information on turning the unit on and off. That makes sense to me now.

But as for creating the files - what I really meant was what process do I go through to create the two files. I mean, I can go into Windows Explorer and create two files named - ".flashrc.local" and ".autoexec.roku" but my question is really how do I go about inserting the command lines for each file? Or to rephrase - how to I make each file contain the programming listed in TJdebon's post?

I do have a CF card reader for my computer so this isn't a problem.
M1000 wired running WMC and Rhapsody servers

M1001 wireless running WMC and Rhapsody servers

HD1000 wired
 
Wulgaru
Posts: 137
Joined: Mon Oct 25, 2004 9:59 pm
Location: Western Springs, IL

Thu Sep 15, 2005 7:56 am

You should just be able to open WordPad, copy and paste the code from this forum, and save the file. I actually use TextPad (not included with Windows), but I think with WordPad, you want to save the file as a "Unicode Text Document" as opposed to any of the other options. Someone will correct me if that last comment is wrong.
 
mebby
Topic Author
Posts: 286
Joined: Tue Mar 29, 2005 9:57 pm
Location: Charlotte, NC

Thu Sep 15, 2005 8:19 am

Bingo! I'm all set now. Thanks for everyone's help!
M1000 wired running WMC and Rhapsody servers

M1001 wireless running WMC and Rhapsody servers

HD1000 wired

Who is online

Users browsing this forum: No registered users and 2 guests