Archive for the ‘linux’ Category

[apt同步问题]apt-mirror: can’t chdir to skel at /usr/bin/apt-mirror line 313.

apt-mirror

突然想搞一个ubuntu的套件库(repository)。最近常使用ubuntu,系统安装完后的那些安全升级和一般包的升级需要700MB左右,我们学校上网费用按照流量计算,所以打算做一个本地的apt server,需要一个apt-mirror的工具来同步同步apt server上的文件。做好了拿出来共享给大家那就牛逼啦。

大三上学期的课程1个星期6节,就两科。机房上网是不需要流量的,上机课的时候跑到机房最后一排在移动硬盘上下载安装cygwin(啥是 cygwin?Cygwin is a Linux-like environment for Windows. It consists of two parts:

  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools which provide Linux look and feel.
  • )。

    本校有个老师做了一个cygwin的套件库镜像:http://cygwin.mirrors.cqit.edu.cn/ 安装的时候选择All->Install 全部安装,下载800MB,安装后解压出来3.75 GB。

    具体方法:

    1.到官方下载cygwin , http://www.cygwin.com/ 文件大小不超过1MB

    2.下载后运行,选择“install from internet”

    3.下一步 ,Root Direcotry是安装后的cygwin的根目录,我指定到位置J:\cygwin

    4.下一步 ,选择包下载到本地硬盘的位置,我制定到位置J:\cygwin_pkgs

    5.下一步,根据需要选择网络连接方式

    6.下一步,会在cygwin.com下载mirrors.lst是cygwin软件包服务器列表

    7.下一步,输入http://cygwin.mirrors.cqit.edu.cn/ 点“Add”

    8.下一步,会下载setup.bz2,这个文件是这个软件包服务器上所提供的软件包列表

    9.下一步,选择需要安装的软件包,避免手动安装麻烦,我全部安装上了,点All->Install

    10.然后是漫长的下载,安装,运行配置的过程。

    11.打开cygwin , 运行apt-mirror直接弹出错误:apt-mirror: can’t chdir to skel at /usr/bin/apt-mirror line 313. 我猜想可能是配置文件没有配置好。

    12.修改配置文件/etc/apt/mirror.list :

    # apt-mirror configuration file

    ##
    ## The default configuration options (uncomment and change to override)
    ##
    #取消以下内容前面的#
    set base_path       /var/spool/apt-mirror
    set mirror_path  $base_path/mirror
    set skel_path       $base_path/skel
    set var_path     $base_path/var

    set defaultarch  amd64
    set nthreads     20

    ##
    ## Example sources
    ##我改成了ubuntu karmic 的源
    deb http://tw.archive.ubuntu.com/ubuntu karmic main universe restricted multiverse
    deb http://tw.archive.ubuntu.com/ubuntu karmic-updates universe main multiverse restricted
    deb http://tw.archive.ubuntu.com/ubuntu karmic-proposed universe main multiverse restricted
    deb http://tw.archive.ubuntu.com/ubuntu karmic-security universe main multiverse restricted
    deb http://tw.archive.ubuntu.com/ubuntu karmic-backports main multiverse restricted universe

    ##
    ## Cleaner configuration example
    ##
    #
    # set cleanscript $var_path/clean.sh
    #需要清理的url

    # Cleaning section

    clean http://tw.archive.ubuntu.com/ubuntu

    13.运行apt-mirror出现错误:apt-mirror: can’t chdir to skel at /usr/bin/apt-mirror line 313.

    打开apt-mirror文件,定位到313行:

    chdir get_variable(“skel_path”) or die(“apt-mirror: can’t chdir to skel”);

    这是一个perl脚本,出现错误的原因是chdir get_variable(“skel_path”)这个命令没有执行成功,skel_path这个变量是在mirror.list文件中定义了的,发现目录是:/var/spool/apt-mirror/ 还有其他几个目录,所以执行以下命令:

    mkdir -p /var/spool/apt-mirror/mirror
    mkdir -p /var/spool/apt-mirror/var
    mkdir -p /var/spool/apt-mirror/skel

    继续运行apt-mirror成功,接下来就是漫长的下载过程,需要寂寞的等待。因为mirror.list有这么一句:set defaultarch  amd64,所以只会下载amd64构架的包,可以节约不少空间和时间。

     

    wget抓大文件 +2009.9.4日记

    昨天(2009.9.3)提着三个大麻布口袋来到了学校,感觉这个暑假过得还是挺快的。不过还好,驾驶考试在9.1考完。等驾照发下来了再po上来提哈劲。在来学校前几天,同学找我修复硬盘,结果自己的硬盘冒烟了,还好及时的拔掉了电源,没有烧起来。硬盘接口烧了,电源线也烧焦了,反正就是没有办法用了。最后决定到他自己亲戚家去修复。

    次日来到山洞,一个很到处都是工地与灰尘的地方。修了一上午,无果。倒是我的移动硬盘数据不小心被格,郁闷!下午到石桥铺修理硬盘和电源,问了很多家还是“华人数据维护”还比较专业点,修硬盘的是个非主流,弄了半天说了一句话:弄不起,要到总部去修,改天来拿只有。我囧。

    次日上午10点来到学校,收拾了1个小时,算是安顿了下来。刚开机,23个未接电话的提示短信,其中21个都是余二娃的。我以为是什么十万火急的事情呢(其实我也知道现在一般找我的都没啥急事),结果是他女人的笔记本系统出问题了,下午闲着没有事情做就跑到花溪校区去游荡了一下。vista装了三次都是:安装完了,重新启动后左右角的光标不停的闪烁。最后一次,安装前把系统盘格式化了一次再安装搞定。弄到6点,吃饭的时间到。新校区倒是没有好大的变化,不过前门的餐饮业是搞起来了,开啥子都很赚的样子,整了点串串,晚上7点就屁颠屁颠的打回老校区。下午打电话给小蒋,听说徒弟要走远门了,叫我去践行。唉,恩是不早点说,要怪就怪手机那段时间处于散架状态。

    在寝室复习老久都没有看的日语了,现在复习到了12课。

    次日上午打电话听说硬盘修复好了就去拿,随便那个硬盘的坏道也已经修复了。我就纳闷的我才买两年不到的硬盘就有坏道了,还不少呢。人品?回来的路上在科艺苑缴了学费8.8k,唉,真tmd贵啊。

    另外听说我的无敌10G免费drcom帐号因为在暑假的时候给别人使用,现在有个帐号的密码已经被人修改了,问了一圈,都说没有改。我ri,这就是大学生的素质?!

    学校上网按流量计费,所以在上网的时候,一般是抱着谨慎而不浪费的原则。学校有个Linux服务器,有个公共帐号可以登录,已经连接外网,平时比较多的使用wget来下载东东。刚发现个问题,当使用机子自带的 GNU Wget 1.8.2 下载大于4G的文件时候,文件长度是错误的,一般比真实文件长度少:

    -bash-2.05b$ wget http://tw.archive.ubuntu.com/ubuntu-dvd-releases/releases/jau
    nty/release/ubuntu-9.04-dvd-amd64.iso
    --23:29:40--  http://tw.archive.ubuntu.com/ubuntu-dvd-releases/releases/jaunty/r
    elease/ubuntu-9.04-dvd-amd64.iso
     => `ubuntu-9.04-dvd-amd64.iso.1'
    Resolving tw.archive.ubuntu.com... done.
    Connecting to tw.archive.ubuntu.com[140.112.8.139]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 317,794,304 [application/x-iso9660-image]
    
     0% [                                     ] 516,750      598.62K/s    ETA 08:37
    

    因为一开始我就怀疑是wget版本过低对大文件支持不是很好的原因,就自己抓了个最新的GNU Wget 1.11.4 下来编译使用。

    -bash-2.05b$ ./wget -V
    GNU Wget 1.11.4
    
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://www.gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
    Currently maintained by Micah Cowan <micah@cowan.name>.
    -bash-2.05b$ ./wget http://tw.archive.ubuntu.com/ubuntu-dvd-releases/releases/jaunty/release/ubuntu-9.04-dvd-amd64.iso
    --2009-09-04 17:50:58--  http://tw.archive.ubuntu.com/ubuntu-dvd-releases/releas
    es/jaunty/release/ubuntu-9.04-dvd-amd64.iso
    Resolving tw.archive.ubuntu.com... 140.112.8.139
    Connecting to tw.archive.ubuntu.com|140.112.8.139|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 4612761600 (4.3G) [application/x-iso9660-image]
    Saving to: `ubuntu-9.04-dvd-amd64.iso'
    
    100%[====================================>] 4,612,761,600 1.02M/s   in 77m 43s
    
    2009-09-04 19:08:42 (966 KB/s) - `ubuntu-9.04-dvd-amd64.iso' saved [4612761600/4
    612761600]
    
    -bash-2.05b$ pwd
    /home/open/wget-1.11.4/src
    -bash-2.05b$
    9% [==>                                    ] 422,890,854  961K/s  eta 67m 35s
    
    

    这样就正常了,这种方法下东东老节约了。

     

    dpkg error: trying to overwrite X, which is also in package Y

    今天ubuntu9.10 alpha4 升级出现了点问题:

    Preparing to replace language-pack-zh 1:9.10 (using .../language-pack-zh_1%3a9.10+20090805_all.deb) ...
    Unpacking replacement language-pack-zh ...
    Preparing to replace language-pack-zh-base 1:9.10 (using .../language-pack-zh-base_1%3a9.10+20090805_all.deb) ...
    Unpacking replacement language-pack-zh-base ...
    dpkg: error processing /var/cache/apt/archives/language-pack-zh-base_1%3a9.10+20090805_all.deb (--unpack):
     trying to overwrite `/usr/share/locale-langpack/zh_TW/LC_MESSAGES/sed.mo', which is also in package language-pack-zh-hant-base
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Preparing to replace language-pack-gnome-zh 1:9.10 (using .../language-pack-gnome-zh_1%3a9.10+20090805_all.deb) ...
    Unpacking replacement language-pack-gnome-zh ...
    Preparing to replace language-pack-gnome-zh-base 1:9.10 (using .../language-pack-gnome-zh-base_1%3a9.10+20090805_all.deb) ...
    Unpacking replacement language-pack-gnome-zh-base ...
    dpkg: error processing /var/cache/apt/archives/language-pack-gnome-zh-base_1%3a9.10+20090805_all.deb (--unpack):
     trying to overwrite `/usr/share/locale-langpack/zh_TW/LC_MESSAGES/gnome-settings-daemon.mo', which is also in package language-pack-gnome-zh-hant-base
    

    中文的显示是这样:

    (正在读取数据库 ... 系统当前总共安装有 123909 个文件和目录。)
    正在解压缩 language-pack-gnome-zh-hans-base (从 .../language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb) ...
    dpkg:处理 /var/cache/apt/archives/language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb (--unpack)时出错:
     正试图覆盖“/usr/share/locale-langpack/zh_CN/LC_MESSAGES/gnome-settings-daemon.mo”,它属于软件包 language-pack-gnome-zh-base
    dpkg-deb: 子进程 粘贴 被信号(Broken pipe)终止了
    正在解压缩 language-pack-gnome-zh-hant-base (从 .../language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb) ...
    dpkg:处理 /var/cache/apt/archives/language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb (--unpack)时出错:
     正试图覆盖“/usr/share/locale-langpack/zh_TW/LC_MESSAGES/gnome-settings-daemon.mo”,它属于软件包 language-pack-gnome-zh-base
    dpkg-deb: 子进程 粘贴 被信号(Broken pipe)终止了
    在处理时有错误发生:
     /var/cache/apt/archives/language-pack-gnome-zh-hans-base_1%3a9.10+20090819_all.deb
     /var/cache/apt/archives/language-pack-gnome-zh-hant-base_1%3a9.10+20090819_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    类似这样的错误:

    dpkg: error processing /var/cache/apt/archives/AAA (–unpack):
    trying to overwrite `/usr/lib/BBB‘, which is also in package CCC
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Errors were encountered while processing:
    AAA
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    解决方法:

    sudo dpkg -i –force-overwrite AAA

    (give full path of AAA), and then run

    sudo apt-get -f install

    again.

    [via(翻墙的需要..)]

     

    用gpg(Gnu 隐私卫士)来生成自己的密钥

    先唠叨一扳手:今天是20号,明天21号驾驶考试科目2--场考,今天练习了最有一把,感觉还行吧,关键是练习间斗地主,输了30多快钱,5毛的底,最高三番对番。打得太撇了,运气也不好,所以我比较理性的认为我不适合赌博,还好我也不好这口儿。

    回家折腾建立ubuntu本地源,这个很有用,特别是在上网算流量的学校用linux,方法主要参照这个wiki页面:

    http://wiki.ubuntu.org.cn/使用apt-move创建软件库光盘

    root@ubuntu:/mirrors/debian# gpg -bao dists/karmic/Release.gpg dists/karmic/Release
    gpg: directory `/home/tun/.gnupg’ created
    gpg: new configuration file `/home/tun/.gnupg/gpg.conf’ created
    gpg: WARNING: options in `/home/tun/.gnupg/gpg.conf’ are not yet active during this run
    gpg: keyring `/home/tun/.gnupg/secring.gpg’ created
    gpg: keyring `/home/tun/.gnupg/pubring.gpg’ created
    gpg: no default secret key: secret key not available
    gpg: signing failed: secret key not available

    当执行以上蓝色字体的命令的时候出错了。这个命令功能是生成Release文件的gpg密钥。从字面意思来理解应该是gpg没有默认的gpg密钥, 参照这个minihowto: Gnu 隐私卫士 (GnuPG) 袖珍 HOWTO (中文版) 发现可以用gpg –gen-key来生成自己的密钥:(蓝色字体是我输入的)

    root@ubuntu:/mirrors/debian# gpg –gen-key
    gpg (GnuPG) 1.4.9; Copyright (C) 2008 Free Software Foundation, Inc.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Please select what kind of key you want:
    (1) DSA and Elgamal (default)
    (2) DSA (sign only)
    (5) RSA (sign only)
    Your selection? 1
    DSA keypair will have 1024 bits.
    ELG-E keys may be between 1024 and 4096 bits long.
    What keysize do you want? (2048) (直接回车)
    Requested keysize is 2048 bits
    Please specify how long the key should be valid.
    0 = key does not expire
    <n>  = key expires in n days
    <n>w = key expires in n weeks
    <n>m = key expires in n months
    <n>y = key expires in n years
    Key is valid for? (0) (直接回车)
    Key does not expire at all
    Is this correct? (y/N) y

    You need a user ID to identify your key; the software constructs the user ID
    from the Real Name, Comment and Email Address in this form:
    “Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>”

    Real name: tunpishuang
    Email address: tunpishuang@gmail.com
    Comment: just 4 fun.
    You selected this USER-ID:
    “tunpishuang (just 4 fun.) <tunpishuang@gmail.com>”

    Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
    You need a Passphrase to protect your secret key.

    gpg: gpg-agent is not available in this session
    We need to generate a lot of random bytes. It is a good idea to perform
    some other action (type on the keyboard, move the mouse, utilize the
    disks) during the prime generation; this gives the random number
    generator a better chance to gain enough entropy.
    ++++++++++++++++++++++++++++++.+++++.++++++++++++++++++++++++++++++.++++++++++++++++++++++++++++++.+++++++++++++++++++++++++.+++++.+++++>+++++.+++++……………..>+++++…+++++
    ds
    Not enough random bytes available.  Please do some other work to give
    the OS a chance to collect more entropy! (Need 283 more bytes)
    We need to generate a lot of random bytes. It is a good idea to perform
    some other action (type on the keyboard, move the mouse, utilize the
    disks) during the prime generation; this gives the random number
    generator a better chance to gain enough entropy.
    +++++…++++++++++..++++++++++.++++++++++..+++++++++++++++..+++++…++++++++++++++++++++.+++++++++++++++++++++++++.+++++..++++++++++++++++++++++++++++++…+++++..+++++>…++++++++++>+++++.>.+++++……<.+++++……………..<+++++>..+++++…………………………………………………………………………………………………………………………………………..<+++++…>+++++…………………………………..+++++^^^^^^^^^

    (上面这一砣蓝字的主要意思是通过移动鼠标和写入/输出硬盘数据来生成随机数字,我一般使用du / 命令)
    gpg: key EDA38ECC marked as ultimately trusted
    public and secret key created and signed.

    gpg: checking the trustdb
    gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
    gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
    pub   1024D/EDA38ECC 2009-08-20
    Key fingerprint = 8B43 BB97 2716 0124 83C5  D73B DEE3 732F EDA3 8ECC
    uid                  tunpishuang (just 4 fun.) <tunpishuang@gmail.com>
    sub   2048g/15197563 2009-08-20

    root@ubuntu:/mirrors/debian# gpg –list-keys    (生成成功了)
    /home/tun/.gnupg/pubring.gpg
    —————————-
    pub   1024D/EDA38ECC 2009-08-20
    uid                  tunpishuang (just 4 fun.) <tunpishuang@gmail.com>
    sub   2048g/15197563 2009-08-20

    root@ubuntu:/mirrors/debian# apt-key list (通过这个我们发现改gpg的key和apt的key不是一个库的,但是可以通过gpg导入到apt-key中)
    /etc/apt/trusted.gpg
    ——————–
    pub   1024D/437D05B5 2004-09-12
    uid                  Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
    sub   2048g/79164387 2004-09-12

    pub   1024D/FBB75451 2004-12-30
    uid                  Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>

    root@ubuntu:/mirrors/debian# gpg -bao dists/karmic/Release.gpg dists/karmic/Release (执行成功)

    You need a passphrase to unlock the secret key for (这点输入私人密钥就ok)
    user: “tunpishuang (just 4 fun.) <tunpishuang@gmail.com>”
    1024-bit DSA key, ID EDA38ECC, created 2009-08-20

    gpg: gpg-agent is not available in this session

    ——————————–祈祷明天通过场考END分割线————————–



     

    iceweasel[firefox]的kde4主题:KFirefox

    才安装好kde4.3,发现iceweasel(也就是firefox)的默认主题十分的丑陋,或许是因为我用的是kde桌面环境,而firefox for linux是用gtk+开发,于是乎发现了个仿kde4的主题:KFirefox , 主页和下载地址:http://ramonantonio.net/kde-firefox/

    对比一下安装前后:

    安装前:

    before-firefox-theme-kde43

    安装后:

    firefox-theme-kde43

     

    debian amd64安装flashplayer

    flashplayer10

    7/30/09之前64位的机子一直都是用nspluginwrapper来模拟运行32位的浏览器插件,不过7/30/09那天,adobe发布了flashplayer 64bit for linux alpha, 可以从这个页面下载:http://labs.adobe.com/downloads/flashplayer10.html

    直接下载(最新版本是10.0.32.18)

    下载下来后
    tar zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
    mkdir /usr/bin/iceweasel/plugins/
    cp libflashplayer.so /usr/bin/iceweasel/plugins/

    重启iceweasel,搞定。在youku, tudou , vimeo上溜达了一圈没有任何问题。

     

    trying to overwrite `/usr/bin/keditfiletype’, which is also in package kcontrol

    因为前几天硬盘出现故障,老是进不了windows,没办法,开始不知道,傻傻的以为是系统问题,就安装了debian 5.02,也就是最新的debian/linux稳定版lenny。结果安装的时候也提示install failed , 昨天跑到白市一街上买了根sata数据线,结果机子尽然可以用了,难道真的是数据线的问题? 不过可以用就行了,不怕找不到娱乐工具了。

    我安装的是debian 5.02 amd64的基本系统,以前一直用gnome,现在想换换胃口就安装了kde,主要是被kde4的华丽丽的界面给征服鸟。

    找任意一个编辑器把一下内容写入/etc/apt/sources.list ,我重庆电信的,这个源是中国科大的,贼快哦。

    deb http://211.86.156.210/debian/ unstable main non-free contrib
    deb http://211.86.156.210/debian-multimedia/ unstable main
    deb http://211.86.156.210/debian-security/ testing/updates main

    debian 和 debian-multimedia 库都是用的unstable版本,因为只有unstable的kde版本才是最新的4.3 ,debian-security用来打安全补丁。

    运行
    apt-get update
    apt-get install x-window-system kde
    apt-get dist-upgrade
    直接startx kde4.3就安装好了。

    --------------------华丽丽分割现---------------

    其实本来安装是没有这样的顺利的,本来开始用的是mirrors.163.com这个源,但是在apt-get dist-upgrade后,出现了下面的错误:

    Preparing to replace kdebase-runtime 4:4.2.4-2 (using .../kdebase-runtime_4%3a4.3.0-1_amd64.deb) ...
    Unpacking replacement kdebase-runtime ...
    dpkg: error processing /var/cache/apt/archives/kdebase-runtime_4%3a4.3.0-1_i386.deb (--unpack):
     trying to overwrite `/usr/bin/keditfiletype', which is also in package kcontrol
    
    看字面意思来解释,应该是kdebase-runtime_4:4.3.0-1_amd64.deb这个包和之前安装的kcontrol发生了冲突。google了半天,发现这个是个bug:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540009
    修复的方法是:
    cd /var/lib/dpkg/info
    rm -rf kdebase-runtime.*
    rm -rf kcontrol.*
    apt-get -f install
    

    然后换成科大的源,重新下载安装。 查看了kdebase-runtime_4.3.0-2的changlog,这个bug已经修正了:

       +++ Changes by Modestas Vainius:
    
       * Merge kdebase-runtime-data-common to kdebase-runtime-data.
       * Merge kdebase-runtime-bin-kde4 to kdebase-runtime.
       * kdebase-runtime conflicts with kcontrol. (Closes: #540009).
       * Urgency medium due to RC bugfix.
       * Add build depend on libslp-dev.
    

    我后来查看了mirrors.163.com的套件库,已经修正的包是存在的:

    kdebase-runtime_4.3.0-2_amd64.deb                  06-Aug-2009 00:03             2466466

    但是我们用apt-get update 下载下来163的包索引文件:

    Packages.bz2                                       05-Aug-2009 16:15             6028664

    并没有及时的更新,日期是8月5日生成不信可以抓下来bzip2 -d -v Packages.bz2 然后 less Packages 搜索Filename: pool/main/k/kdebase-runtime 发现版本还是4.3.0-1。

    [   ] Packages.bz2            11-Aug-2009 22:27  5.8M

    上面这个是科大的,8月11日生成,这个:Wed, 05 Aug 2009 13:30:30 +0200 是bug修复的日期,可见及时更新Packages包索引是多么的重要啊。

    snap-kde43
     

    mac os x安装使用日志

    我到硬件配置:

    CPU: AMD Athlon 64 4200+
    内存: 2G RAM
    板子:NF520TS
    硬盘:ST160G
    显卡:nvdia 7300GT
    显示器:Topview TD199W
    光驱:sony 8x dvd+/- r/rw
    键盘:dell sk-8115
    鼠标:罗技MX518

    上学期期末,也就是放暑假之前,突然苹果系统的图片映入我的眼帘
    于是乎就想安装一个mac os x来玩玩。最开始尝试刻盘安装,但是发现个奇特的现象,挂载后的iso只有几个KB,而实际上都是3到4个 G。刻盘直接从光驱启动后显示can’t find driver for this platform “ACPI”

    unable to find driver for this platform "acpi"

    出现这样到问题,基本上可以说明那个系统不适合你到硬件。

    对于苹果到了解再这几天把玩之前完全为零,苹果到macintosh系统本来是ppc上面跑的,可能考虑到商业的因素,macintosh机子开始采用intel的u,也就支持了x86构架.伟大的osx86 project就是研究mac在x86机子上的移置过度.

    回家后这几天又开始倒腾mac安装,虽然网友大多赞成这个东东装成功否主要取决于人品,但是我还是认为不是什么难事.

    这个坛子http://macos.it168.com/上提供大多数的改造后的mac for pc的系统镜像下载.我下载的是最新版本支持amd的iATKOS v7 Leopard 10.5.7 , 这个帖子有详细介绍, 下载地址回复可见.觉得注册麻烦的,直接给个地址: http://download.macwind.com/200906/iATKOS_v7/iATKOS_v7.zip

    安装方法我主要参见了这篇文章:

    硬盘安装Leopard

    其中需要注意的就是在安装之前的组建的选择,我的勾选是在下面这个图的基础上,勾选了:SMBIOS-EFI , APPLESMBIOS-28 , 9.7.0 kernel voodoo , X86 ACPI , NVEnabler , nForce SATA/IDE , USB , ext2fs , ntfs-3g , marvell yukon 88e8056 , 汉语
    iatkos_components

    安装之后顺利进入了系统初始设置的时候提示键盘未连接 , 我之前那个键盘是罗技标准键盘ps/2接口的. 后来知道了苹果上的设备最好是用usb,或者鼠标,键盘同时ps/2 , 我同时ps/2了 , 一个下午重装了几次都没有把键盘识别出来.无奈之下买了一个戴尔的8115 usb键盘. 才把系统安装好.

    ———————-使用阶段————————-

    其实只要是gui的系统都还是好上手的. 先把主菜单, 下面的”系统偏好设置” 每个选项都都调整一次, 熟悉全部功能 , 然后了解mac程序安装和卸载, 很多软件都是”绿色软件” , 大多以dmg格式打包 , 然后挂载拖到磁盘任意目录就可以使用了.不过一些大型软件还是需要安装dmg里面装的就是安装程序了, 比如Adobe CS4套件就需要安装.

    我的关于mac的推特:

    中文字体发虚的问题 我以为是mac系统造成的,结果是safari造成的,现在用firefox字体看起来好多了。
    mac的expose&spaces功能和gnome的4个工作间类似。
    mac的safari字体发虚:设置字体为“华文黑体”
    装了个QIM,比mac默认拼音输入法好用多了。
    aMule-2.2.5-OSX10.5.dmg , http://bit.ly/18FGUB
    mac的显示器调节自带屏幕以90°基数的旋转,以前在win下intel显卡驱动有这个功能,但是屏幕调节后,鼠标无法自动调节方向,以前发现过一个软件eeerotate可以同时调节显示和鼠标。
    QQ for Mac 1.0 Beta1 Build 600 发布 http://bit.ly/GhBMG
    Mac截图快捷键大全 http://bit.ly/UtEMO
    MAC版上的dreamweaver cs4 序列号———— Mac SN: 1192-0099-6817-0618-7538-0626
    其他的还在研究中,上个图,睡觉了,都凌晨2点了,
    rotated-leopard
     

    ls命令加入配色,颜色,色彩

    【标题利于seo…..】

    打开/root/.bashrc (假设你修改root的bash环境)  :

    # ~/.bashrc: executed by bash(1) for non-login shells.

    export PS1=’\h:\w\$ ‘
    umask 022

    # You may uncomment the following lines if you want `ls’ to be colorized:
    #export LS_OPTIONS=’–color=auto’
    #eval “`dircolors`”
    #alias ls=’ls $LS_OPTIONS’
    #alias ll=’ls $LS_OPTIONS -l’
    #alias l=’ls $LS_OPTIONS -lA’

    #
    # Some more alias to avoid making mistakes:
    # alias rm=’rm -i’
    # alias cp=’cp -i’
    # alias mv=’mv -i’

    将蓝色那几行前面的#都去掉,红色的字体看得懂,就知道咋整。

     

    grub2调整debian字符界面分辨率

    我的debian 5默认安装完成之后分辨率是640×480,非常的不方便,并且我安装了grub 2 而不是grub legacy,毕竟喜欢尝试点新东东,配置文件由menu.lst转到了gurb.cfg,我的机子是19寸宽屏,最佳分辨率是1400×900,贴一个grub.cfg文件:

    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/update-grub using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #

    ### BEGIN /etc/grub.d/00_header ###
    set default=0
    set timeout=5
    set root=(hd0,1)
    search –fs-uuid –set f4695aac-a0bb-468f-8fe1-a88cbe979f49
    if font /usr/share/grub/unicode.pff ; then
    set gfxmode=“1024×768x32;800×600x32;640×480x32;1024×768;800×600;640×480″
    insmod gfxterm
    insmod vbe
    terminal gfxterm
    fi
    ### END /etc/grub.d/00_header ###

    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=cyan/black
    set menu_color_highlight=white/black
    ### END /etc/grub.d/05_debian_theme ###

    ### BEGIN /etc/grub.d/10_hurd ###
    ### END /etc/grub.d/10_hurd ###

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry “Debian GNU/Linux, linux 2.6.26-1-amd64″ {
    set root=(hd0,1)
    search –fs-uuid –set f4695aac-a0bb-468f-8fe1-a88cbe979f49
    linux    /boot/vmlinuz-2.6.26-1-amd64 root=/dev/sda1 ro vga=36D
    initrd    /boot/initrd.img-2.6.26-1-amd64
    }
    menuentry “Debian GNU/Linux, linux 2.6.26-1-amd64 (single-user mode)” {
    set root=(hd0,1)
    search –fs-uuid –set f4695aac-a0bb-468f-8fe1-a88cbe979f49
    linux    /boot/vmlinuz-2.6.26-1-amd64 root=/dev/sda1 ro single
    initrd    /boot/initrd.img-2.6.26-1-amd64
    }
    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # This file is an example on how to add custom entries
    ### END /etc/grub.d/40_custom ###

    蓝色的部分是我自己添加或者修改的,unicode.pff是用来添加cjk字体支持 的,默认是ascii.pff,

    set gfxmode=“1024×768x32;800×600x32;640×480x32;1024×768;800×600;640×480″  是用来添加gfx的模式,默认是640×480,格式是:width x height x depth , 多加一些值,用分号括起来,引号引起来,最后又两menuentry,就是grub的启动菜单,修改第一个正常模式启动菜单,后面加个vga=36D ,36D就表示1400×900x32 , vga的值可以通过这里得到:http://en.wikipedia.org/wiki/VESA_BIOS_Extensions#VBE_mode_numbers

    不过我发现这个不准确,有时候启动不起,启动系统的时候提示vga的值为未知,然后点enter 列出所有vga的值,这个时候你就记下你所需要的值然后写入grub.cfg就可以了。。。

    最后要说的就是grub 2加入了module,需要的功能都必须先insmod ,比如背景图片支持png : insmod png ,支持图形终端:insmod gfxterm 等,现在grub 2的版本是1.96 ,最新的消息可以移步到grub 2 wiki (官方)http://grub.enbug.org/