• VirtualBox access physical disk partition

    List DISK partitions:

    VBoxManage.exe internalcommands listpartitions -rawdisk \.PhysicalDrive0
    VBoxManage.exe internalcommands listpartitions -rawdisk \.PhysicalDrive1
    VBoxManage.exe internalcommands listpartitions -rawdisk \.PhysicalDrive2

     

    Create raw VMDK:

    VBoxManage internalcommands createrawvmdk -filename K:vdiskwhole.vmdk -rawdisk \.PhysicalDrive1 -partitions 1,2,3,4
    VBoxManage internalcommands createrawvmdk -filename K:vdiskpart1.vmdk -rawdisk \.PhysicalDrive1 -partitions 1
    VBoxManage internalcommands createrawvmdk -filename K:vdiskpart2.vmdk -rawdisk \.PhysicalDrive1 -partitions 2
    VBoxManage internalcommands createrawvmdk -filename K:vdiskpart3.vmdk -rawdisk \.PhysicalDrive1 -partitions 3
    VBoxManage internalcommands createrawvmdk -filename K:vdiskpart4.vmdk -rawdisk \.PhysicalDrive1 -partitions 4

     

    Manage ram VMDK in Graphics VirtualBox Manager as usual.

     

  • Reserve eth0 slot in Linux Kernel

    Modification:
       Function:      __dev_alloc_name
       Location:      net/core/dev.c
     
    static int __dev_alloc_name(...)
    {
    ……
    for_each_netdev(net, d) {
    ……
    }
    /* Add two lines */ 
    if (!strncmp(name,"eth",3))                    
      set_bit(0, inuse);
    …… 
    }
  • Ubuntu 10.04/Lucid Kernel Rebuild

    https://help.ubuntu.com/community/Kernel/Compile

     

    Install tool:

    sudo apt-get install fakeroot build-essential crash kexec-tools 
    makedumpfile kernel-wedge
    sudo apt-get build-dep linux
    sudo apt-get install git-core libncurses5 libncurses5-dev 
    libelf-dev asciidoc binutils-dev

     

    Download the source archive

    sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
    apt-get source linux-image-$(uname -r)

     

    Change to source directory & Make scripts executable 

    cd linux-2.6.32/

    sudo chmod -R u+x debian/scripts/*

     

    Modify code

    ……

     

    Update config

    debian/rules updateconfigs

     

    Build kernel

    sudo fakeroot debian/rules clean
    AUTOBUILD=1 NOEXTRAS=1 DEB_BUILD_OPTIONS=parallel=2 sudo 
    fakeroot debian/rules binary-generic
     
     

    Trigger Rebuild

    sudo rm debian/stamps/stamp-build-generic
    AUTOBUILD=1 NOEXTRAS=1 DEB_BUILD_OPTIONS=parallel=2 sudo 
    fakeroot debian/rules binary-generic
     
     

    Build Result

    Located in parent directory:
     

    Install new kernel

    sudo dpkg -i linux-headers-2.6.32-30-generic_2.6.32-30.59_amd64.deb
    sudo dpkg -i linux-image-2.6.32-30-generic_2.6.32-30.59_amd64.deb
     

    Check new kernel

            ls /usr/src
            ls /boot
  • Linux patch


    Generate a patch:

    diff  -Nur  OldDir  NewDir > xxx.patch

     

    Apply a patch

        patch –p 0 < xxx.patch

  • Linux家用监控程序

    基于 Motion 的方案:
    能够在特定环境下触发,如声音、特定操作等,并能用邮件、SMS远程操纵,同时支持远程调节亮度、对比度等。
    http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

    基于 webcam-server 的方案:
    使用简单,并有GUI。
    http://webcamserver.sourceforge.net/

    基于 ZoneMinder 的方案:
    这是一个专业的商业方案,能够使用多摄像头和闭路电视,并支持数据的采集、分析、记录,以及远程和半自动处理。
    http://www.zoneminder.com/

  • USB key utility

    Format/Backup/Restore  tool:

    EASEUS Partition Master 6.5.2 Home Edition

    http://www.easeus.com/

     

    Compuapps SwissKnife V3.22

    http://www.compuapps.com/

     

     

    DriveImage XML V2.20

    http://www.runtime.org/driveimage-xml.htm

     

    dd for windows

    http://www.chrysocome.net/dd

     

     

     Defragment:

    WinContig 1.00

     

    http://www.mydefrag.com/

     

     

    Installer:

     

    Multisystem

      Support multiboot

      running on linux

    http://liveusb.info/dotclear/

     

    Portable linux:

       For all Capser based Livecd,  support data persistence

       Running on linux

    http://rudd-o.com/new-projects/portablelinux

     

    Debian live-magic

       Can create various image types (CD, USB, netboot, webboot)

    http://packages.debian.org/lenny/live-magic

     

    SARDU   — Shardana Antivirus Rescue Disk Utility

        Include  Various recovery tools, Linux Live and Windows PE

        Support Build Multi-Boot USB and CD/DVD

        Running on windows

     

    usb-creator

         official tool to create Live USBs of Ubuntu from the Live CD or from an iso image.

         Running on ubuntu

     

    UNetbootin    — Universal Netboot Installer

        cross-platform utility that can create Live USB systems and can load a variety of system utilities or install various Linux distributions and other operating systems without a CD

    http://unetbootin.sourceforge.net/

     

       

  • Open Source Media Center Software

    mythtv

    http://www.mythtv.org/

    moovida ( formely Elisa) Media Center

    Elisa is an Open Source cross-platform (Linux/Windows/Mac) media center connecting the Internet to an all-in-one media player.

    http://www.moovida.com/

    Elisa Homepage
    How-to install Elisa
    Elisa Download (Strongly recommended you install from PPA

     

     

    XBMC Media Center

    Originally developed for Xbox game console under the name Xbox Media Center, the XBMC team has ported their popular software to various platforms, including Linux, OSX and Windows OS. Though not as friendly as Elisa, XBMC offers a full feature set and customization options advance users seek.

    XBMC Homepage
    How-to install XBMC
    XBMC Download (Strongly recommended you install from PPA)

     

    Aeon Project

    Put some beauty back into XBMC, get Aeon!

     

     

  • NirSoft

    NirSoft web site provides a unique collection of small and useful freeware utilities, all of them developed by Nir Sofer.

      http://www.nirsoft.net/
  • The Essential Guide to Open-Source VoIP

    http://blog.zhenglei.net/admin/post