2010年11月21日
Mount extend partition - LVM using Knoppix LiveCD
- Burned a Knoppix LiveCD - version 5.1.1 (Newest:6.2)
(it has lvm-tools available)
- Booted the PC with Knoppix Live CD
- Started a Terminal
$ su
# lvm vgchange --ignorelockingfailure -P -a y
Code:
Partial mode. Incomplete volume groups will be activated read-only.
2 logical volume(s) in volume group "ubuntu" now active
It shows the name of the "volume group"
# lvm lvs
Code:
LV VG Attr LSize Origin Snap% Move Log Copy%
root ubuntu -wi-a- 142.92G
swap_1 ubuntu -wi-a- 5.89G
# mkdir /vg_mnt
# mount /dev/ubuntu/root /vg_mnt
# ls /vg_mnt/
Code:
bin cdrom etc initrd lib media proc sbin sys usr vmlinuz
boot dev home initrd.img lost+found opt root srv tmp var
# ls /vg_mnt/home/satimis/
all my work displayed here.
Inserted an USB pendrive and copied all my work on it.
# umount /vg_mnt
Now I have my work saved on the USB pendrive. Then I successfully copied my files on another PC.
2010年7月21日
修改GRUB開機順序
2. sudo gedit /boot/grub/menu.lst 開啟menu.lst檔案
3.找出default 0
4.把0改成windows開機的次序(注意:看windows是第幾個,若是是第3個則改成2-因為由0開始數)
5.存檔..重開機..
2010年6月3日
Fix Failed to execute child process "xscreensaver" in Solaris 10
/usr/dt/config/Xinitrc.tjds
/usr/dt/config/Xinitrc.jds
and log out
you will find this problem is fixed
2010年6月2日
solaris 10 加裝中文字體(繁體+簡體)
Solaris 10以後,用localeadm來添加語言,例如添加Japanese:
# localeadm -a ja -d
其它語言:zh_TW, zh_HK, hi_IN, th_TH, ko_KR, ja..etc.
Listing All of the Locales and Codesets
#localeadm -lc
Listing the Regions Available on a Solaris CD or DVD
#localeadm -ls -d /cdrom/cdrom0
2010年5月10日
XP 英文版 顯示中文與中文輸入
- Start -> Control Panel -> Regional and Language -> 上方的 Language ->
勾選 Install files for East Asian languages (此選項上面那個不要勾) - 再選上方的 Advanced -> Language for non-Unicode programs 選 Chinese(Taiwan)
- 於 Code page conversion tables 選取所有相關 Traditional Chinese 的選項 -> Apply 就會開始安裝(需要 XP 光碟)
- 重新開機完成後, 一樣到 Regional and Language Options -> 上方的 Language -> Details -> 會開啟 Text Services and Input Languages 視窗去新增輸入法
- 就完成囉.
http://plog.longwin.com.tw/news-windows/2007/01/07/windowsxp_input_chinese_2007
2010年4月19日
gcc instal on Solaris 10 SPARC
Solaris 10 x86系統下安裝gcc過程
1. 系統環境準備
a. 由於系統默認的shell使用不太方便,所以將系統shell更改為bash。
# which bash
usr/bin/bash
# usermod -s /usr/bin/bash root
b. 建立系統 .profile文件:
# cp /etc/skel/local.profile /.profile
c. 在.profile文件中添加如下內容
PATH=/usr/bin:/usr/local/bin:/usr/ucb:/etc:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:.
export PATH
export PS1='\u:\w#'
d. 從Solaris 10安裝光盤中安裝如下工具包
# pkgadd –d /cdrom/sol_10_1009_sparc/Solaris_10/Product SUNWwgetr
# pkgadd –d /cdrom/sol_10_1009_sparc/Solaris_10/Product SUNWwgetu
# pkgadd –d /cdrom/sol_10_1009_sparc/Solaris_10/Product SUNWwgetS
# pkgadd –d /cdrom/sol_10_1009_sparc/Solaris_10/Product SUNWgcmn
2. 下載gcc軟件
# /usr/sfw/bin/wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/gcc-3.4.6-sol10-sparc-local.gz
# /usr/sfw/bin/wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/libiconv-1.13.1-sol10-sparc-local.gz
# /usr/sfw/bin/wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/libgcc-3.4.6-sol10-sparc-local.gz
# /usr/sfw/bin/wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/libintl-3.4.0-sol10-sparc-local.gz
註:第一個為gcc的應用程序,下面3個為gcc的庫文件包
3. 解壓和安裝
# gunzip gcc-3.4.6-sol10-sparc-local.gz
# gunzip libiconv-1.11-sol10-sparc-local.gz
# gunzip libgcc-3.4.6-sol10-sparc-local.gz
# gunzip libintl-3.4.0-sol10-sparc-local.gz
#pkgadd -d gcc-3.4.6-sol10-sparc-local
#pkgadd -d libiconv-1.11-sol10-sparc-local.gz
#pkgadd -d libgcc-3.4.6-sol10-sparc-local.gz
#pkgadd -d libintl-3.4.0-sol10-sparc-local.gz
4. 修改 .profile文件
在 .profile文件中增加如下內容
export LD_LIBRAEY_PATH=/usr/local/lib:.
export CC=gcc
2010年4月15日
Solaris 指令
inid 5
遇到 filename.tar.gz 壓縮並執行的方法
gunzip -c filename.tar.gz | tar xvpf -
disable keyboard beeping
Method 1. /usr/openwin/bin/xset b 0
Method 2. /usr/openwin/bin/xset b off
Method 3. /usr/openwin/bin/xset -b
Where is the command "wget"
/usr/sfw/bin/wget
查詢外接USB位址(c3t0d0s0)
rmformat
mount -F pcfs /dev/dsk/cxtxdxsx:c /mnt
or
cd /dev/rdsk
isotat -En
mount -F pcfs /dev/dsk/cxtxdxsx:c /mnt
umount
fuser -c -u /mnt
umount /mnt
Solaris 10 Install (SPARC)
2G RAM
"ok" Mode (stop+A on Sun's keyboard)
ok boot cdrom
then boot the installation
other modification can reference this website
1.

2. Here
3. Here
4. Official Guide
2010年2月5日
Ubuntu static IP setup
static IP setup
# sudo vi /etc/network/interfaces
1 auto lo
2 iface lo inet loopback
3
4
5 iface eth0 inet static
6 address 140.127.ooo.xxx / * 固定IP位址 * /
7 netmask 255.255.255.0 / * 網路遮罩 * /
8 gateway 140.127.qqq.ppp / *預設閘道 * /
9
10
11
12 auto eth0
修改完可利用以下指令重新啟動網路# sudo /etc/init.d/networking restart
---------------------------------------------
DNS setup
# sudo vim /etc/resolv.conf
1 # generated by NetworkManager, do not edit!
2
3
4
5 nameserver 140.127.Orz.Qrz / * 主要的DNS Server Address * /
6 nameserver 140.117.OO.QQ / * 次要的DNS Server Address * /
修改完可利用以下指令重新啟動網路# sudo /etc/init.d/networking restart
----------------------------------------------
2010年2月3日
Matalb memory test
type "feature('meminstats')"
The Largest blocks show the maximum matrix size you can create
In official web of MATLAB, they say
Operating system | Process Limit |
32-bit Windows XP, Vista and Windows 2000 (default) | 2GB |
32-bit Windows XP with 3GB boot.ini switch or 32-bit Vista with increaseuserva set (see later) | 3GB |
32-bit Linux | ~3GB |
64-bit Windows XP, MAC OSX, Linux or Solaris running 32-bit MATLAB | ≤4GB |
64-bit Windows XP, Vista, Linux or Solaris running 64-bit MATLAB | 8TB |
Matlab Install flowchart
Copy the "license.dat" file to the directory. Let us call this dir $MATLAB
from now on.
b) Run the installer and proceed with the installation.
cd /usr/local/matlab7
sudo /cdrom/install* &
%% display "Insert CD 2"
sudo umount /media/cdrom0
eject
c) Open the "license.lic" file and replace the string "your_host_name" with
the hostname of the computer where Matlab is being installed.
d) Copy the edited "license.lic" file to "$MATLAB/etc".
e) Now you are all set to run Matlab. Enjoy!
-------------------------------------------------------------------------------------
If your Linux is Debian, then you will meet some problems,
such as
Problem 1:
xxxxx:/usr/local/matlab7# /media/cdrom/install* &
bash: /media/cdrom/install: /bin/sh: bad interpreter: Permission denied
Solution:
Become root
Unmount CD-ROM
Make dirctory /cdrom
Give command: mount -t iso9660 -o exec /dev/cdrom /cdrom
After this go to the directory where you want to install the matlab. Put licence
file in that directory and from being in that directory give command:
/cdrom/install
Installation will start
Ref: http://www.linuxquestions.org/questions/linux-software-2/matlab-on-debian-232213/
Problem 2:
An error status was returned by the program 'xsetup',
the X Window System version of 'install'. The following
messages were written to standard error:
/tmp/5447tmwinstall/update/bin/glnx86/xsetup: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
Attempt to fix the problem and try again. If X is not available
or 'xsetup' cannot be made to work then try the terminal
version of 'install' using the command:
install* -t or INSTALL* -t
Solution:
According to some forums do:
# apt-get install libxp-dev
and then,
insert the MATLAB CD-ROM
XXXX:/usr/local/matlab7# sh /media/cdrom/install
However, I did follow the instructions of:
http://www.debianhelp.org/node/7432
1. Let run the install script so that it creates some environmental variables correctly.
2. Then
# cp /media/cdrom/update/bin/glnx86/libmwins.so /usr/lib
Check if you want to install the one of glnx86, glnxa64 and sol64 instead
3. Copy xsetup from the same directory to the install directory.
# cp /media/cdrom/update/bin/glnx86/xsetup /usr/local/matlab
4. From the install directory:
# ./setup
LATER when you run matlab you will see some errors associated to java
install java (http://www.java.com/en/download/index.jsp)
and then edit the file in bin/matlab
at the begining of the script (around line 180) write down:
# There is an error with the java that comes with MATLAB. Use the other java
export AWT_TOOLKIT=MToolkit
#export MATLAB_JAVA=/usr/lib/jvm/java-1.6.0-sun-1.6.0.10/jre
#export MATLAB_JAVA=/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
export MATLAB_JAVA=/opt/jre1.6.0_12/
Finally activate the multithreading part in Preferences
ENJOY!
Ref: http://diegotorquemada-linux.blogspot.com/2009/02/installing-matlab.html