•   Compiling custom kernel has its own advantages and disadvantages. However, new Linux user / admin find it difficult to compile Linux kernel. Compiling kernel needs to understand few things and then just type couple of commands. This step by step howto covers compiling Linux kernel version 2.6.xx under Debian GNU Linux. However, instructions remains the same for any other distribution except for apt-get command.

    Step # 1 Get Latest Linux kernel code

    Visit http://kernel.org/ and download the latest source code. File name would be linux-x.y.z.tar.bz2, where x.y.z is actual version number. For example file inux-2.6.25.tar.bz2 represents 2.6.25 kernel version. Use wget command to download kernel source code:
    $ cd /tmp
    $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2

    Note: Replace x.y.z with actual version number.

    Step # 2 Extract tar (.tar.bz3) file

    Type the following command:
    # tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src
    # cd /usr/src

    Step # 3 Configure kernel

    Before you configure kernel make sure you have development tools (gcc compilers and related tools) are installed on your system. If gcc compiler and tools are not installed then use apt-get command under Debian Linux to install development tools.
    # apt-get install gcc

    Now you can start kernel configuration by typing any one of the command:

    • $ make menuconfig - Text based color menus, radiolists & dialogs. This option also useful on remote server if you wanna compile kernel remotely.
    • $ make xconfig - X windows (Qt) based configuration tool, works best under KDE desktop
    • $ make gconfig - X windows (Gtk) based configuration tool, works best under Gnome Dekstop.

    For example make menuconfig command launches following screen:
    $ make menuconfig

    You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.

    Step # 4 Compile kernel

    Start compiling to create a compressed kernel image, enter:
    $ make
    Start compiling to kernel modules:
    $ make modules

    Install kernel modules (become a root user, use su command):
    $ su -
    # make modules_install

    Step # 5 Install kernel

    So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.
    # make install

    It will install three files into /boot directory as well as modification to your kernel grub configuration file:

    • System.map-2.6.25
    • config-2.6.25
    • vmlinuz-2.6.25

    Step # 6: Create an initrd image

    Type the following command at a shell prompt:
    # cd /boot
    # mkinitrd -o initrd.img-2.6.25 2.6.25

    initrd images contains device driver which needed to load rest of the operating system later on. Not all computer requires initrd, but it is safe to create one.

    Step # 7 Modify Grub configuration file - /boot/grub/menu.lst

    Open file using vi:
    # vi /boot/grub/menu.lst

    title           Debian GNU/Linux, kernel 2.6.25 Default
    root (hd0,0)
    kernel /boot/vmlinuz root=/dev/hdb1 ro
    initrd /boot/initrd.img-2.6.25
    savedefault
    boot

    Remember to setup correct root=/dev/hdXX device. Save and close the file. If you think editing and writing all lines by hand is too much for you, try out update-grub command to update the lines for each kernel in /boot/grub/menu.lst file. Just type the command:
    # update-grub
    Neat. Huh?

    Step # 8 : Reboot computer and boot into your new kernel

    Just issue reboot command:
    # reboot
    For more information see:

    • Our Exploring Linux kernel article and Compiling Linux Kernel module only.
    • Official README file has more information on kernel and software requirement to compile it. This file is kernel source directory tree.
    • Documentation/ directory has interesting kernel documentation for you in kernel source tree.

    Original source:http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html

  •   因为一些原因,我必須要对我的本本进行系統的重新安装,包括windows XP和ubuntu.刚好也趁此机会整理一下硬盘的内容,重新规划一下安排。本来想把刚买的250GB硬盘换上本本上去的,拆开一看,发现本本的硬盘上还贴着Lenovo的标记,换了之后恐没有保修,因此还是保持原样。将所有数据转移至移动硬盘上进行系統重装。

      使用的Windows XP是lenovo专用版本,因此安装的时候是免序列号輸入的,还是蛮快,大概一个小时左右就安排完了,当中最烦人的就是那一系列的驱动安装,芯片组,声卡,网卡,无线网卡,显卡,猫等等,由于Lenovo F31原装的时候是vista的,因此在安装的时候,一定要注意显卡驱动要最后安装,如果不是的话,重新启动的话,就会非常的慢,无法退出。之前有过一次的经验,因此这次安装还是非常的成功的。安装完毕后,照例的安装一些必須就用軟件,就算是完成了大部分,最重要的,恢复了以前使用的firefox的所有addon就算完成了。

      接下来就安装Ubuntu 8.10,使用的是U盘启动的方式,进入到系統后直接就可以进行安装了,大概設置了七步,再把分区設置一下,大概二十来分钟就安装完毕了,重新启动系統。 設置一下源使用杭州的双线服务器Lupa源,sudo apt-get update,速度非常快,在我这里是10M Lan的情况下可以达到700K/s。更新内核到2.6.27-10,然后安装两个受限驱动无线网卡和Nivida显卡驱动,将需要的軟件sudo apt-get install一下,不需要的就remove一下,就可以正常使用了。

      这一次的安装过程中,明显的感覺到使用的Ubuntu要比windows快很多,不论是安装的速度,設置的速度还是运行的速度。但是,无奈的是,有一些事情还必須要在windows下运行,ubuntu商業的应用,特別是工業的应用还是不够。但是,现在也是时候慢慢的让一些没有特殊需求,只需要用电脑来上网啊,聊天啊,写写文档什么的人士就用是足夠了。

  • for i in *.txt; do mv $i ${i%%\.*}.cnx; done

     #记录于此

  •      如果有朋友和我一样经常各地来回的跑,而且又如同我一般没有网络便是没有生活的话,或许可以参考一些我的个人网络解决方案。不过,如果您有更好的方案,不仿分享一下,因为对于我来说,没有网络的日子,是不行的。当然,也有不少朋友问过我,看你蛮是喜欢玩计算机的啊,那你玩什么游戏呢?不好意思,我答案一般会让人无话可说,因为我不玩游戏。那上网一般会做什么呢?交友,玩游戏,论坛,还是其他什么?或是什么second life之类的,下载,etc...对于游戏,我是基本上的免疫的,那对我没有任何的吸引力,这种虚拟的不真实的东西,纯粹是空虚的人需要的。一般上网使用网络的话信息的获取和朋友的交流,是我的主要部分。所以,google reader一直是我使用的信息获取的方法,如碰到有好的blog,我都会直接订阅的方式来阅读,这方面了很不多。好了,言归正转。目前我主要使用的网络解决方案有两种:

    1.palm treo 680手机上网

        浙江移动在这方面的资费还是不错的,目前我是使用了20块包月使用200M流量的套餐,基本上用来收一下邮件及看一些信息,速度方面在开通了EDGE的地方还是不错的。

    2.各地无线方案

        因为手机本身不带WIFI,所以这个方案就必须要用我的计算机了,现在已经迷上了使用界面非常友好的个人定制版的ubuntu,compiz界面,dock特效,高效的处理过程,对于windows,只有在必须用的时候,出现。之前有同事同我提到在机场的无线中可以使用chinanet中国电信宽带的帐号来登录无线,之前天津测试了一下,浙江的帐号似乎不能使用。有可能是需要开通类似于漫游的功能,此不得知。今天,在杭州是可以测试成功的。各位可以不仿不试.

    目前,就此两种方案比较不错的,如果3G到来了,将会更好,速度是一种快感。当你使用了杭州的ubuntu镜像来安装软件时,那种1000k/s的速度,会让你疯狂。哈哈

     

  •     近来一段时间,事情颇多,这里整理一下。

    1.为什么要用linux?为什么要用电脑?
        目的很明显,我是一个正直的人,所以我不想再去用盗版了;我又是一个喜爱尝试新鲜事物的人;同时,我还是一个喜欢让我的电脑高效工作的人;还有一个,我又一是个想要全盘了解我的软件安装状态的人.所以,我用了linux,并且用了ubuntu,所有的软件都是经过我的同意而安装在上面的.哈哈.
        上周刚刚将系统完全的重新打理了一篇,使用ubuntu server安装了一个最小系统,然后自行安装上Xwindows,gnome及相应的一些软件,设置了酷酷的compiz和AWN dock,现在使用不要太爽.从中的一些设置过程,中间发生的一些事情,处理过程还是很有意思的.总之,除非必要,ubuntu是我目前私人使用时用,工作时必须要用windows,这是正版的.但是工作用的电脑不尽如人意,不像是工程师用的电脑,像是一台商务机,徒用外表而无性能,当然我是说运行3D等一些专业软件时的速度,不尽如人意.经常的同IT们打趣,应该把这台电脑送去养老了,嘿嘿.
          至于为什么要用电脑?这个问题对于现在的我来说,就好像问我为什么要吃饭一样.每天都在网络在一起,无论是手机还是电脑,没有网络的日子,就会变得无趣.不过,近来也有一点开始慢慢的减少宅居的时间,尽量的外出参加活动.使用电脑的原因,是因为信息获取的快速与方便,不用求人,需要什么GOOGLE一查就有了.做技术的有时就有这么拽,你不给,不给我自己做一个,自己买一个.嘿嘿,此不提.



  • 一..每次装完linux后在终端中运行命令,碰到错误或者其他情况都会发出“滴滴”声,在X Window系统下,可以使用xset 命令为之,  命令如下:xset b off (输入xset 回车后得到xset命令的选项)

    二 ..加速ubuntu compiz 及firefox
    1.禁用IPv6
    目前IPv6还没有到来,Ubuntu这个超前的功能暂时可以屏蔽掉,以加快速度
    #vi /etc/modprobe.d/aliases

    alias net-pf-10 ipv6

    ===>

    alias net-pf-10 off #ipv6

    2、并行运行开机启动脚本(慎用)

    /etc/init.d/下面的都是启动脚本,默认这些脚本是按顺序启动的,实际上,如果你使用的是SATA或SCSI接口,可以并行启动这些脚本程序,加速启动过程。

    # vi /etc/init.d/rc

    CONCURRENCY=none

    ===>

    CONCURRENCY=shell

    3、将localhost化名为主机名

    据说这个方法可以改善使用Ubuntu一段后,在GNOME中启动应用程序变慢的问题

    # vi /etc/hosts

    127.0.0.1 localhost

    127.0.1.1 Ubuntu

    ===>

    127.0.0.1 localhost Ubuntu

    127.0.1.1 Ubuntu

    注:在第一行末尾加上主机名,也就是第二行的那个名字。

    4、禁用Pango

    Pango是一个着重于国际化的,用于输出和文本渲染的库,但是这个库可能导致Firefox等一些程序占用过高的 CPU,所以我们可以禁用它。

    # vi /etc/environment

    MOZ_DISABLE_PANGO="1"

    5、禁用gettys

    # vi /etc/event.d/tty3

    把所有以start开头的行,用#注释掉(:%s/^start/#start/)

    6、安装preload

    可以把一些常用到的lib库和应用程序预加载到内存,以提高程序的启动速度

    # apt-get install preload

    7、设置swappiness

    减少系统对于swap频繁的写入,将加快应用程序之间的切换,有助于提升系统性能

    系统默认为60,你可以改为10

    # sysctl vm.swappiness=10

    如果要让它开机自动设定

    # vi /etc/sysctl.conf (加入)

    vm.swappiness=10

    三.加速firefox

    1、打开 Firefox,在地址栏输入 about:config。
    2、在过滤器中分别输入下列名字,把它们的值改为后面的就行了。

    network.dns.disableIPv6 值为 true
    network.http.pipelining 值为 true
    network.http.pipelining.maxrequests 值为 8
    network.http.proxy.pipelining 值为 true

     

  • 1.下载psptoolchain
    wget http://ps2dev.org/psp/Tools/Toolchain/psptoolchain-20070626.tar.bz2
    将其保存/opt目录并解包
    2.安装相关的软件包
    sudo apt-get install build-essential autoconf automake bison flex libncurses5-dev libreadline-dev libusb-dev texinfo
    3.设置环境变量
    sudo mousepad ~/.bashrc
    在最后加上
    export PSPDEV=/usr/local/pspdev
    export PATH=$PATH:$PSPDEV/bin

    4.重新加载
    source ~/.bashrc
    5.编译并安装psptoolcain和pspsdk
    cd /opt/psptoolchain
    sudo ./toolchain-sudo.sh

    6.改变/usr/local/pspdev文件夹属性,加入使用的用户及组
    7.检查编译器版本
    psp-gcc -v
    成功后会有如下输出
    Using built-in specs. Target: psp Configured with: ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0 Thread model: single gcc version 4.1.0 (PSPDEV 20060507)

    8.编译测试
    cd /usr/local/pspdev/psp/sdk/samples/savedata/decrypt

    make

    成功后会生成一个EBOOT.PBP文件。

  • 代码:
    mousepad ~/.wine/system.re


    搜索: LogPixels
    找到的行应该是:[System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]
    将其中的:
    “LogPixels”=dword:00000060
    改为:
    “LogPixels”=dword:00000070


    搜索: FontSubstitutes
    找到的行应该是:[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes]
    将其中的:
    “MS Shell Dlg”=”Tahoma”
    “MS Shell Dlg 2″=”Tahoma”
    改为:
    “MS Shell Dlg”=”SimSun”
    “MS Shell Dlg 2″=”SimSun”

    拷贝simsun.ttc文件到wine中的windows/fonts下面。