View Single Post
Old 10-24-2013, 10:39 AM   #11
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Setting up a swapfile over NBD

on donor PC:

apt-get nbd-server
then after you make a swapfile (see dd command above)
share it.
nbd-server 1024 /home/me/STUFF-FOR-DEBIAN/swapfile (thats port 1024)

Quote:
** (process:392): WARNING **: Specifying an export on the command line is deprecated.
** (process:392): WARNING **: Please use a configuration file instead.
make it a swapfile
mkswap /home/me/STUFF-FOR-DEBIAN/swapfile
Quote:
Setting up swapspace version 1, size = 1957884 KiB
no label, UUID=2bbac2d8-d5c7-41eb-a499-064a1af85061
======================================

THEN on debian (on kindle)

dump the relevant kernel modules in /lib/modules

I needed:
https://bitbucket.org/twobob/kual-sy...b126?at=master

(if you don't do this step.. the next step will error like:
Starting NBD client process: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/2.6.31-rt11-lab126/modules.dep.bin')

then install nbd-client

root@kindle:/usr/local/src/webkit-1.8.1# apt-get install nbd-client
Quote:
Reading package lists... Done
Building dependency tree
..elided..
Setting up nbd-client (1:3.2-4~deb7u3) ...
Stopping NBD client process:
Error: Module nbd is not currently loaded
nbd-client.
Starting NBD client process: Connecting...Activating...
nbd-client.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
root@kindle:/usr/local/src/webkit-1.8.1# lsmod
Module Size Used by
nbd 10564 0
g_ether 27444 0
...
so it loaded okay

next up EDIT the file in /etc/nbd-client

Quote:
# If you don't want to reconfigure this package after installing, uncomment
# the following line:
#AUTO_GEN="n"
# If you don't want the init script to kill nbd-client devices that aren't
# specified in this configuration file, set the following to "false":
KILLALL="false"
# Note that any statical settings in this file will be preserved
# regardless of the setting of AUTO_GEN, so its use is only recommended
# if you set things in a dynamical way (e.g., through a database)
#
# Name of the first used nbd /dev-entry:
NBD_DEVICE[0]=/dev/nbd0
#
# Type; s=swap, f=filesystem (with entry in /etc/fstab), r=raw (no other setup
# than to run the client)
NBD_TYPE[0]=s
#
# The host on which the nbd-server process is running
#NBD_HOST[0]=<your.server.ip.or.name>
NBD_HOST[0]=192.168.1.20
#
# The port on which this client needs to connect. Optional for
# new-style exports (which use a single port, and export names).
NBD_PORT[0]=1024
#
# The name of the export. Required for new-style exports.
#NBD_NAME[0]=swapspace
#
# Any extra parameters you would want to specify
NBD_EXTRA[0]=
# The second networked block device could look like:
# NBD_DEVICE[1]=/dev/nbd1
# NBD_TYPE[1]="f"
# NBD_HOST[1]="localhost"
# NBD_NAME[1]="disk1"
#
# You can add as many as you want, but don't skip any number in the variable
# names, or the initscript will fail.
Let's start that...

root@kindle:/usr/local/src/webkit-1.8.1# /etc/init.d/nbd-client start
Quote:
Starting NBD client process: Connecting...Negotiation: ..size = 1912MB
bs=1024, sz=2004877312 bytes
connected /dev/nbd0
Activating...
Setting up swapspace version 1, size = 1957884 KiB
no label, UUID=05bbbd40-ed4a-4ccf-94dc-ac6fffa69cd0
/dev/nbd0: swap activated.
nbd-client.
boom. Happy days.

EDIT:

This is also HIGHLY risky...
see... http://thread.gmane.org/gmane.linux.kernel.mm/62008
http://article.gmane.org/gmane.linux.kernel.mm/62008
Attached Thumbnails
Click image for larger version

Name:	Selection_712.png
Views:	570
Size:	13.4 KB
ID:	113928  

Last edited by twobob; 10-25-2013 at 12:59 AM.
twobob is offline   Reply With Quote