View unanswered posts | View active topics It is currently Tue May 21, 2013 4:04 am



This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
 [How to] Mount a swap partition 
Author Message

Joined: Tue Oct 05, 2010 9:35 pm
Posts: 4299
Location: Netherlands
Post [How to] Mount a swap partition
Steffen (s-n1965) developed the “mountSwap” script file, which mounts and activates a Linux swap partition on your Playon.
A Linux swap partition performs the same function as the Windows Pagefile.sys, namely providing a virtual extension of the computer’s real memory RAM.
It is not clear why the Playon’s firmware does not provide this function. When the internal hard disk is formatted by the system, a swap partition is created, but it is not used by the player.
By using a swap partition the system’s stability will be enhanced and a small increase of processing speed will be achieved, especially for applications which demand a lot of memory.

An English instruction (in PDF format) to install the script can be found here. The original German text can be downloaded from here.
The script file can be downloaded from here.
All files together zipped into a RAR file can be downloaded from here. A text file with the Telnet commands is included. It may be simpler to make a text file with commonly used commands in advance and copy these commands from the text file.

I would like to thank Steffen for his ongoing efforts to enhance the Playon’s firmware.

_________________
Evert

Playon!HD Mini Firmware 7317 modified [192.168.178.3]
PC Windows 7-64 SP1 [192.168.178.DHCP]
PC Windows 7-64 SP1 + Virtual XP SP3 [192.168.178.DHCP]
Fritz!Box 7390 [192.168.178.1]
Seagate BlackArmor 400 4 x 3TB in RAID-5 [192.168.178.2]


Thu Jan 19, 2012 12:05 pm
Profile

Joined: Tue Oct 05, 2010 9:35 pm
Posts: 4299
Location: Netherlands
Post Re: [How to] Mount a swap partition
Steffen (s-n1965), the author of the mountSwap script, discovered that the latest 7317 firmware for his Playon!DVR HD, switches on swapping automatically, thus dispensing with the need to install and run the mountSwap script. This may also be case for the Playon!HD models with an internal hard disk.

You can verify if the firmware switches on swapping automatically. If you have already installed the mountSwap script, however, you must deactivate that first.

Open a Telnet session to your Playon.
Enter the following command lines:
cd /usr/local/etc
vi rcS
place the cursor at the beginning of the line containing /usr/local/etc/mountSwap &
press i
type a hash (#) at the beginning of this line, so it will become #/usr/local/etc/mountSwap &
type ESC, followed by :wq (write and quit)
Type reboot

To verify if swapping has been switched on by the system, open a (new) Telnet session (after the system has rebooted) and type
cat /proc/swaps
If the system reply looks like this
Code:
Filename                                        Type            Size         Used    Priority
/mnt/rd/swap.img                                file            32           0       -3
/dev/scsi/host0/bus0/target0/lun0/part2         partition       128480       0       -2
swapping has been switched on by the system and running the mountSwap script is no longer necessary.
Just type
rm /usr/local/etc/mountSwap
to delete the mountSwap script. You can leave the rcS script unchanged, because the # deactivated the relevant command line that invoked the mountSwap script.

If the system reply looks like this
Code:
Filename                        Type          Size     Used         Priority
/mnt/rd/swap.img                file          32       0            -3
swapping has not been swiched on by the system and the mountSwap script must be activated.
In the latter case remove the # you just inserted into the rcS script with the vi editor.
Goto to the last line of the rcS script, place the cursor just behind the #, press i and DEL, followed by ESC and :wq.

We would appreciate if you could report if the new firmware switches on swapping on your Playon.

_________________
Evert

Playon!HD Mini Firmware 7317 modified [192.168.178.3]
PC Windows 7-64 SP1 [192.168.178.DHCP]
PC Windows 7-64 SP1 + Virtual XP SP3 [192.168.178.DHCP]
Fritz!Box 7390 [192.168.178.1]
Seagate BlackArmor 400 4 x 3TB in RAID-5 [192.168.178.2]


Mon Feb 20, 2012 9:38 pm
Profile

Joined: Tue Oct 05, 2010 9:35 pm
Posts: 4299
Location: Netherlands
Post Re: [How to] Mount a swap partition
I regret to state that Steffen has suspended his support to this forum and that the links in the first post of this topic are no longer accessible.
This topic will be locked.

_________________
Evert

Playon!HD Mini Firmware 7317 modified [192.168.178.3]
PC Windows 7-64 SP1 [192.168.178.DHCP]
PC Windows 7-64 SP1 + Virtual XP SP3 [192.168.178.DHCP]
Fritz!Box 7390 [192.168.178.1]
Seagate BlackArmor 400 4 x 3TB in RAID-5 [192.168.178.2]


Wed Feb 22, 2012 12:31 pm
Profile

Joined: Tue Oct 05, 2010 9:35 pm
Posts: 4299
Location: Netherlands
Post Re: [How to] Mount a swap partition
In the attachment you will find a ZIP file with an abridged version of s-n1965's mountSwap script without error trapping. The original script issued error messages, but these could not be seen, because the Linux Standard Output is not visible when the Playon boots. If the script encounters an error, it will be terminated with an error condition but without explanatory error message(s).

Download the swap_install.zip file to your PC and copy the unzipped swap_install folder to the root of a USB stick.

Disconnect all USB devices from your Playon and insert the USB stick with the swap_install folder.

In a Telnet session issue the command (use copy and paste to copy this command into the Telnet window):
/tmp/usbmounts/sd*/swap_install/swap_install.sh

The utilities will be installed and your Playon will reboot, disrupting the Telnet connection.

After reconnecting to your Playon in a new Telnet session type the command:
cat /proc/swaps

If the system reply looks like this
Code:
Filename                                        Type            Size         Used    Priority
/mnt/rd/swap.img                                file            32           0       -3
/dev/scsi/host0/bus0/target0/lun0/part2         partition       128480       0       -2
swapping has successfully been enabled on by the system.
If the system reply looks like this
Code:
Filename                        Type          Size     Used         Priority
/mnt/rd/swap.img                file          32       0            -3
swapping has not been enabled, most probably because a valid swap partition could not be found.

On Playon models with an internal hard disk a Linux swap partition is created when the hard disk is formatted with the Playon.

Error trapping has been omitted from the scripts. So you use the script completely at your own responsibility and risk. In the worst case you may have to reinstall the firmware in the safe mode to undo the changes of the script.

Do not run the swap_install.sh script more than once, because it adds the same new line to the rcS start script of the firmware on each run.


Attachments:
swap_install.zip [1.51 KiB]
Downloaded 52 times

_________________
Evert

Playon!HD Mini Firmware 7317 modified [192.168.178.3]
PC Windows 7-64 SP1 [192.168.178.DHCP]
PC Windows 7-64 SP1 + Virtual XP SP3 [192.168.178.DHCP]
Fritz!Box 7390 [192.168.178.1]
Seagate BlackArmor 400 4 x 3TB in RAID-5 [192.168.178.2]
Tue Feb 28, 2012 3:37 pm
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by: phpBB | Innitial forum Design by: STSoftware | Modified by: AC Ryan.