thunar

ArchLinux硬盘安装

流浪 posted @ 2007年8月24日 00:36 in Arch tips , 14594 阅读

这里备份我的一份Archlinux硬盘安装的资料

安装前的准备

  1. 下载ArchLinux镜像文件,因为Arch更新很快,所以我们只需下载最基本的base包就可以了,然后可以通过网络来安装最新系统。
  2. 下载grub for dos,如果你是从LINUX安装,那就不需要这一步。
  3. 将grub for dos 解压,将其中的grub.exe和grldr文件拷到Windows系统盘根目录下,例如为C盘。在C盘下建立文件夹C:\boot\grub,将根目录下的menu.lst文件复制到grub目录下,清空文件内容,并添加以下内容:
  4. timeout 10

    title DOS/Win9x/Me/NT/2K/XP on (hd0,0)
    root (hd0,0)
    chainloader +1

    title archinstall
    root (hd0,4)
    kernel (hd0,4)/vmlinuz
    initrd (hd0,4)/initrd.img
    注意:hd0表示用的是第一块硬盘,4表示你存放LINUX镜像文件的分区,一般这里4为D盘。
  5. 编辑系统盘根目录下的boot.ini文件,在最后一行加入如下内容:
    c:\grldr="grub"
  6. 重启计算机会就可以进入安装程序。

基本系统的安装

重启计算机后,到操作系统列表时,选grub选项,接着选archinstall这一项,开始安装。待屏幕不再有大片的英文字母滚动,我们拥有临时终端的控制权后,做如下操作:

  1. 创建一个临时目录,用来挂载iso所在fat分区:
    # mkdir archiso
  2. 挂载iso所在分区到新创建目录:
    # mount -t vfat /dev/hda4 archiso

    注意:这里你的分区可能不像往常一样是/dev/hda4,而是/dev/sda4
  3. 挂载iso文件到/src目录:
    # mount archiso/arch*0.8*.iso /src -o loop -t iso9660
  4. 开始安装:
    # arch/setup
  5. 安装源的选择,选择CD-ROM
  6. 分区操作:出现主目录( MAIN MENU) 后,选 Prepare Hard Drive,接下来的目录中选择 Partition Hard Drives 进入 cfdisk 2.12 分区工具操作界面。“上下”键将高亮条移动到你所分出的空闲分区。“左右”键,选操作动作:new为新建分区,write为将新建分区写入硬盘分区表,分区操作完成后. Quit为退出 cfdisk. 回车结束分区操作,回到上级目录。(分区提示:至少两个分区,一个用来挂载 "/",一个作为 swap 交换分区。这里不用考虑分区类型,下一步将会让你选择分区类型。)
  7. 设置挂载点:选择 Set Filesystem Mountpoints ,根所文字提示 Select the patition to use as (swap,/,.....),正确选择相应的挂载分区。当出现 Patitions were successfully mounted 的时候,挂载完成。
  8. 安装包选择:回到主目录,选择 Select Packages ,一路回车(因为,我们安装的是base包,对于我们新手来说没什么选择的余地)到回到主目录
  9. 安装软件包:主目录下选择 Install Packages 进得安装
  10. 内核安装 (一路回车,略)
  11. 启动管理器安装(个人爱好,推荐grub,现在几乎用的都是grub),安装到 /dev/hda或/dev/sda
    注意:在这里提示你修改menu.lst时,记得将windows系统前的注释去掉,这样万一安装不成功你还可以进入到WIN,再想办法。默认是没有进入WINDOWS选项的。
  12. 修改/boot/grub/menu.lst,添加如下代码装windows添加到grub引导列表中:
    title WinXP
    root (hd0,0)
    chainloader+1
    boot
    注:这一步可以不要,menu.lst中己经有进入WINDOWS的选项了。
  13. 到此基本系统安装完成。

配置系统

Arch的特点和ubuntu很相似,在线安装,在线升级,平滑升级到最新版本,所以对Arch来说,网络太重要了。 在安装好基本系统以后重启进入Arch的字符界面。最要紧的就是配置网络。 如果你在装基本系统时没有设置一个普通用户可以现在添加一个,首先给root设置一个密码:

passwd

添加一个普通用户:

useradd -m -G users,wheel,audio -s /bin/bash/ yourname

  • 配置网络
    1. 如果你的IP是动态的,那么修改/etc/rc.conf成相应代码:
      lo="lo 127.0.0.1"
      eth0="dhcp"
      INTERFACES=(lo eth0)
      ROUTES=(!gateway)
    2. 如果你的IP是静态IP,编辑/etc/rc.conf如下:
      lo="lo 127.0.0.1"
      eth0="IP" #这里是你的IP
      gateway="default gw 192.168.0.1" #这里是你的网关
    3. 重启后ping下自己看网卡是否正常,有结果证明网卡正常,可以使用。
    4. ADSL拔号上网,在基本的安装包中己带有拔号工具re-pppoe,相关的命令有:pppoe-setup,pppoe-start, pppoe-stop, pppoe-status,第一次使用时可以先执行pppoe-setup,进行 拔号设置。

  • 我的ADSL设置
  • 用过了网上所有的方法,都不能自己拔号上网,最后我发现可以通过如下方法正常拔号。

    1. 通过WINDOWS系统拔号上网,然后在网络连接中查看服务器IP,记下来,比如为:222.75.45.1。
    2. 在/etc/rc.conf文件中,将网关填成服务器IP地址。让路由用网关的IP。设置如下:
      # -----------------------------------------------------------------------
      # NETWORKING
      # -----------------------------------------------------------------------
      HOSTNAME="myhost"
      lo="lo 127.0.0.1"
      eth0="dhcp"
      INTERFACES=(lo eth0)
      gateway="default gw 222.75.45.1"
      ROUTES=(gateway)
    3. 然后再执行:
      pppoe-setup
      其中DNS,跟据提示设置为:server,设置成功后就可以执行:
      pppoe-start
      现在就可以通过拔号正常上网了。

  • 更新系统
    1. 编辑/etc/pacman.conf添加服务器地址。可以在网上搜索一下快一点的服务器地址,添加进配置文件。找出相应的地方,如下添加,以下是我找的几个服务器地址。
      [current]
      Server = ftp://cle.linux.org.tw/pub2/ArchLinux/current/os/i686
      Server = http://mirrors.lcuc.org.cn/archlinux/current/os/i686
      Include = /etc/pacman.d/current
      [extra]
      Server = ftp://cle.linux.org.tw/pub2/ArchLinux/extra/os/i686
      Server = http://mirrors.lcuc.org.cn/archlinux/extra/os/i686
      Include = /etc/pacman.d/extra
      [community]
      Include = /etc/pacman.d/community
      [unstable]
      Server = http://mirrors.lcuc.org.cn/archlinux/unstable/os/i686
      Include = /etc/pacman.d/unstable
      我ADSL 2M带宽可以达到240k/s ^_^
    2. 更新己安装的系统至最新版本
      pacman -Syu

  • 安装xorg
    1. 安装xorg,及xorg的配置工具hwd
      pacman -S xorg hwd xterm
    2. 配置xorg 利用hwd配置xorg很简单:生成xorg.conf文件
      hwd -x
    3. 在/etc/X11目录中就有了一个xorg.conf.hwd文件,先测试一下文件是否能起作用
      Xorg -config xorg.conf.hwd
      如果屏幕出现图形界面,可以移动鼠标,说明正常。更改文件名xorg.conf.hwd为xorg.conf
      mv xorg.conf.hwd xorg.conf
      用startx命令试试,正常的话,会出现xterm的界面。然后退出图形界面,回到命令行.

  • 安装alsa,让系统出声
    1. 安装alsa驱动
      pacman -S alsa-lib alsa-oss alsa-utils
    2. 运行下面的命令系统会自动帮你设置好声卡
      alsaconfig
      将alsa加入后台运行。
      #cat /etc/rc.conf
      DAEMONS=(syslog-ng network netfs crond alsa)

    安装KDE环境

    1. 安装KDE基本环境
      pacman -S kdebase kde-i18n-zh_cn
      注:在没有配置字体前不要进入X环境,否则KDE中显示的是乱码,不能显示中文。
    2. 在/etc/rc.conf中加入kdm,开机自动进入KDE桌面环境
      #cat /etc/rc.conf
      DAEMONS=(syslog-ng network netfs crond alsa kdm)

  • 配置中文环境
    1. 修改/etc/rc.conf:
      # cat /etc/rc.conf
      LOCALE="zh_CN.utf8"
      LANG="zh_CN.utf8"
      HARDWARECLOCK="localtime"
      #TIMEZONE="Canada/Pacific"
      TIMEZONE="Asia/Shanghai"
      KEYMAP="us"
      CONSOLEFONT=
      CONSOLEMAP=
      USECOLOR="yes"
    2. 修改/etc/locale.gen:
      # cat /etc/locale.gen
      en_US.UTF-8 UTF-8
      en_US ISO-8859-1
      h_CN.GB18030 GB18030
      zh_CN.GBK GBK
      zh_CN.UTF-8 UTF-8
      zh_CN GB2312
      然后运行:
      locale-gen
  • 安装,配置字体
  • pacman -S ttf-arphic-ukai ttf-arphic-uming ttf-fireflysung
    ttf-bitstream-vera ttf-ms-fonts xorg-fonts-75dpi xorg-fonts-100dpi

    去文泉驿的网站www.wenquanyi.org下载文泉驿字体pcf版(不要用ttf版)。 目前的版本: wqy-bitmapfont-pcf-0.8.1-7.tar.gz 因为Arch默认是关闭点阵字体的,我们要打开它。 进入/etc/fonts/conf.d/目录 删除10-bitmaps.conf(它是个链接文件,原本指向no-bitmaps.conf),我这里按照上面的安装不存在这个目录。 运行:

    #su - root
    #cd /etc/fonts/conf.d/
    #ln -s no-bitmaps.conf yes-bitmaps.conf //我这里也不需要这个步骤
    1. 在/usr/share/fonts中建立一个目录,命名为wqy-bitmapfont 代码:
      mkdir /usr/share/fonts/wqy-bitmapfont/
    2. 解压文泉驿字体包,将里面的pcf字体复制到/usr/share/fonts/wqy-bitmapfont目录。
      tar zxvf wqy-bitmapfont-pcf-0.8.1-7.tar.gz
      cp *.pcf /usr/share/fonts/wqy-bitmapfont
    3. 切换到wqy-bitmapfont目录。完成如下操作。执行以下命令:
      #cd /usr/share/fonts/wqy-bitmapfont
      #mkfontdir
      #cp fonts.dir fonts.scale
      #xset +fp /usr/share/fonts/wqy-bitmapfont
      编辑/etc/X11/xorg.conf 在Files段里的
      FontPath "/usr/share/fonts/misc"
      下面添加
      FontPath "/usr/share/fonts/wqy-bitmapfont"
      再运行:
      #fc-cache -f -v
      到这里,字体就装完了

  • 安装fcitx输入法
    1. pacman -S fcitx
    2. 修改配置文件$HOME/.bash_profile,在其中添加如下代码:
      export XMODIFIERS="@im=fcitx"
      export XIM=fcitx
      export XIM_PROGRAM=fcitx
      fcitx &
      这样当用户登陆X环境时,fcitx就可以自动运行。
    Avatar_small
    iNeo 说:
    2010年12月21日 17:55

    呵呵,原来是这么回事,多谢了

    Avatar_small
    LIC term plan calcul 说:
    2022年7月31日 13:52

    As the name suggests, this LIC premium calculator online introduced by LIC India helps its customer to calculate the amount of premium to be paid against any particular Life insurance policy on any type of endowment, child, pension, money back, term plan, LIC term plan calculator whole life plan or health plan. Where LIC premium calculator not only calculates about premium but also calculates the amount that you will get after the LIC maturity. The calculation of Life Insurance premium and maturity seems easy for some who are good at mathematics and can do wonders with a calculator in hand, but not all the people are that much efficient. Moreover, the availability of LIC online premium calculator helps one to make the premium calculations in a matter of seconds.

    Avatar_small
    run 3 说:
    2022年9月07日 17:43

    Calculating life insurance premiums and maturity may seem easy for some people who are good at math and can do wonders with a calculator in hand, but not everyone is so efficient.

    Avatar_small
    usps tracking 说:
    2022年11月17日 22:51

    This is an excellent article. This is, in my opinion, one of the best posts ever written. Your work is excellent and inspiring. Thank you very much.

    Avatar_small
    trap the mouse 说:
    2023年1月12日 11:43

    The information you give is very useful, I have been following it a lot

    Avatar_small
    Webmail Bluehost 说:
    2023年2月03日 15:22

    Blue host Webmail allows users to build a professional and personalised email address. Having a personal or corporate brand necessitates a customised email address, which adds trust. Webmail Bluehost Customers would be more interested if you use your company or personal name in the email instead of @outlook or @gmail. Blue host Webmail has capabilities that allow users to generate personal email without having to construct a website.

    Avatar_small
    x trench run 说:
    2023年3月14日 10:42

    Those people who are strong at arithmetic and can do miracles with a calculator may find calculating life insurance premiums and maturity to be simple, but not everyone is so adept.


    登录 *


    loading captcha image...
    (输入验证码)
    or Ctrl+Enter