2008年4月30日 星期三

Change boot loader of Slax to grub on a USB stick

1. downloadgrub4dos from https://gna.org/projects/grub4dos/ and grubinst from
http://download.gna.org/grubutil/

2. run grubinst_gui.exe to install grub into USB

3. extract grldr to root directory of USB

4. create a text file named menu.lst which lists boot menu

find --set-root /boot/vmlinuz

title Slax Graphics mode (KDE)
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
initrd /boot/initrd.gz

title Slax Always Fresh
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4
initrd /boot/initrd.gz

title Slax Copy To RAM
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw copy2ram autoexec=xconf;telinit~4
initrd /boot/initrd.gz

title Slax Graphics VESA mode
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=telinit~4 changes=/slax/
initrd /boot/initrd.gz

title Slax Text mode
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw changes=/slax/
initrd /boot/initrd.gz

title Run Memtest86 utility
kernel /boot/mt86p

2008年4月29日 星期二

Modify existing module on Slax

for example
if you use some module then face a path problem, you can modify it.
the below message is showed when I run tsocks module what I have installed

ERROR: ld.so: object '/usr/lib/libtsocks.so' from LD_PRELOAD cannot be preloaded: ignored.


1. download tsocks module from http://bencoh89.free.fr/slax6modules/

2. extract content of tsocks module to a directory

mkdir tsocks
lzm2dir tsocks.lzm tsocks/

3. pack the module back to the .lzm format by using

dir2lzm tsocks/ tsocks.lzm

2008年4月27日 星期日

Set up Socks 5 server on Ubuntu

1. install dante server

sudo apt-get install dante-server

skip the error message from the output of configure dante-server once installed. that's cause dante configuration was not complete.

2. start editing the config file

vi /etc/danted.conf

--
# log to what file
logoutput: stderr /var/log/danted.log

# listening interface and port
internal: ppp0 port = 80

# outgoing interface
external: ppp0

# method: username requires the client to provide a username and password which match the system password file.

# method: none requires no form of authentication.
method: username

# privileged ports like 80 and 443 must use root permission.
user.privileged: root

# the package seems not complied with libwrap support.
#user.libwrap: nobody

# allowed IPs
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}

# allowed protocols with these source IPs
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
}

3. run dante-server

sudo /etc/init.d/danted start

2008年4月23日 星期三

How to Secure Copy on Unix

upload

scp filename username@ip:path/new_filename

download

scp username@ip:path/filename new_filename

parameter

-v toggle verbose

2008年4月15日 星期二

Configure kernel on Ubuntu

1. install necessary complier and libraries.

# libncurses5-dev is developer's libraries and doc for ncurses
sudo apt-get install build-essential libncurses5-dev

2. download source linux-x.y.z.tar.bz2 from http://www.kernel.org
3. extract it then enter the directory and type

# console-based color menu
make menuconfig
# X-based GUI
make xconfig

Run GUI programs with cron on Linux

you have to tell cron what display the program should use. For that you use:

export DISPLAY=:0


so you'll add the export variable like this:

* * * * * export DISPLAY=:0 && somecommand