ºìÁªLinuxÃÅ»§
Linux°ïÖú

°²×°archlinuxµÄ¾­Àú

·¢²¼Ê±¼ä:2007-04-12 21:27:00À´Ô´:ºìÁª×÷Õß:Bnciwoz
Arch LinuxÊÇÒ»·ÝΪi686ÓÅ»¯µÄÇáÁ¿¼¶Linux·¢ÐУ¬Ëü°üº¬Á˸÷ÖÖÈí¼þµÄ×îÐÂÎȶ¨°æ±¾¡£Èí¼þÒÔ.tar.gz¸ñʽ´ò°ü²¢Óɰü¹ÜÀíÆ÷½øÐиú×Ùά»¤£¬ÕâÑùµÄÉè¼ÆÊ¹µÃÈí¼þÉý¼¶·Ç³£ÈÝÒס£ÓëÆäËû·¢ÐÐÏà±È£¬ArchµÄ¼¼ÊõÏ൱֮ÏȽø¡£Ò»Ð©Ïà¶Ô²»´óʹÓõĶ«Î÷ûÓб£ÁôÏÂÀ´£¨ÀýÈ磬infoÒ³Ãæ£©¡£Ò»´ÎȱʡµÄArch°²×°´ø¸øÄãµÄÊÇÒ»Ì×Àι̵Äϵͳ»ù´¡£¬Äã¿ÉÒÔÔÚ´Ë»ù´¡ÉÏÔö¼ÓÈí¼þ°ü´Ó¶ø´´½¨ÄãËùÐèÒªµÄ¶¨Öư²×°¡£ArchµÄ°üϵͳÔÊÐíÄã·½±ãµØ´´½¨Äã×Ô¼ºµÄÈí¼þ°ü£¬ÕâʹµÃ°´Äã×Ô¼ºÌض¨µÄÅäÖÃÖØÐ±àÒëÒ»·ÝеÄÈí¼þ°ü±äµÃ·Ç³£ÈÝÒס£ArchµÄÁíÒ»¸öÄ¿±êÊÇÈÃÓû§¾¡¿ÉÄܵØÊ¹Óõ½LinuxµÄÐÂÌØÐÔ£¬ÀýÈç ReiserFS¡¢ext3ÒÔ¼°devfs¡£

ÎÒ²ÉÓÃchroot·½Ê½°²×°----

ÏÈ´ÓISOÖÐÌáÈ¡³öchroot°²×°ÐèÒªµÄinitrd.img£º
#mount arch-0.*.iso Arch
#cp Arch/isolinux/initrd.img ~

½âѹËõinitrd.img:
#cat initrd.img |gzip -d >initrd

¹ÒÔØÔÚ~/tmpÏ£º
#mount -o loop initrd ~/tmp

½«initrd.imgÖеĶ«¶«È«²¿¸´ÖƵ½Ä¿±ê·ÖÇøÉÏ(ÎÒ¹ÒÔØÔÚ/mnt/distro):
#mkdir /mnt/distro/Arch
#cp -aR /root/tmp/* /mnt/distro/Arch

ÒòΪ°²×°³ÌÐòÐèÒªÔÚ/dev/vc/5¼Ç¼°²×°ÐÅÏ¢£¬ËùÒÔÔÚ/devÏ´´½¨Ëü£º
#cd /mnt/distro/Arch/dev
#mkdir vc
#mknod vc/5 c 4 5

½«arch-0.*.iso¹ÒÔØÔÚsrcĿ¼ÏÂ,ÒÔ±¸°²×°Èí¼þ°ü:
#mount arch-0.7.iso /mnt/distro/Arch/src -o loop

chroot°²×°Arch:
#chroot /mnt/distro/Arch /bin/sh

´ËʱÒѾ­½øÈëchroot»·¾³£º
ÉèÖÃTERMΪlinux,ÕâÑùÔËÐÐsetup²Å²»»á³ö´í£º
#TERM=linux

ÔËÐÐsetup¿ªÊ¼°²×°
#arch/setup

Ê×ѡѡÔñ°²×°½éÖÊ£¬Ñ¡SRC¾Í¿ÉÒÔÁË¡£

"Prepare Hard Device" ÂÔÈ¥¡£Îҿɲ»Ïë·ÖÇø :)
"Select Packages" Ñ¡Ôñsrc£¬Ñ¡Ôñbase£¬µ÷Õû°²×°µÄÈí¼þ°ü£¬Ä¬Èϼ´¿É¡£²»¹ýÎÒ¸ù¾Ý×Ô¼ºµÄ»úÆ÷È¡ÏûÁËһЩ²»Óõİü¡£
"install Packages" ¿ªÊ¼°²×°£¬ËùÓÐÈí¼þ°ü°²×°ÔÚ/mnt¡£
"install kernel " ÎÒûÓа²×°£¬Ö±½Ó°ÑLFSϵÄÄÚcpÁËÒ»¸ö
"Configure System" ±à¼­ÏµÍ³ÅäÖÃÎļþ¡£Ñ¡Ôñϲ»¶µÄ±à¼­Æ÷±à¼­×ö¡£
"Install Bootloader" ÂÔÈ¥¡£ÎÒÓÐ/boot·ÖÇø£¬Ê¹ÓÃËü¹ÜÀíËùÓеÄϵͳÆô¶¯¡£

ÅäÖÃÎļþ£º
(ÎÒÊÇADSLÉÏÍø)
# cat /etc/rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux
# LOCALIZATION
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/unimaps
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="zh_CN.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="Beijing/Asia"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

#
# HARDWARE
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()
#
# Modules to load at boot-up (in this order)
# - prefix a module with a ! to blacklist it
#
MODULES=()
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# NETWORKING
#
HOSTNAME="ArchLinux"
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
##lo="lo 127.0.0.1"
##eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
##INTERFACES=(lo eth0)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
##gateway="default gw 192.168.0.1"
##ROUTES=(!gateway)
#
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=(main)

#
# DAEMONS
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng !hotplug !pcmcia network !netfs crond adsl gpm alsa)
# End of file

ÅäÖÃ/etc/fstab:

# cat /etc/fstab

#
# /etc/fstab: static file system information
#
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/sda9 / ext3 defaults 0 0
/dev/sda11 swap swap defaults 0 0

»ù±¾ÉϾͿÉÒÔÁË£¬Í˳öchroot¡£
°Ñchroot°²×°ºÃµÄÒÆµ½Ïë°²×°µÄµØ·½----
#mv /mnt/distro/Arch/mnt/* /ARCH

×öһЩÐÞ²¹¹¤×÷£º
1. ÓÉÓÚʹÓõÄÊÇÒÑÓеÄÄÚºË----½«Ô­Äں˵Ä/lib/modules/`uname -r`Ŀ¼¸´ÖƵ½ArchµÄ /lib/modulesÖУ¬ÔÚ/etc/rc.confÖмÓÔØÐèÒªÆô¶¯µÄÄ£¿é¾Í¿ÉÒÔÁË¡£Êµ¼ÊÉÏÎÒÈ«²¿±à¼­¾­Äںˣ¬Ö±½Ó touch /lib/modules/`uname -r`/modules.def¾Í¿ÉÒÔÁË¡£

2. ÐÞ¸ÄhostµÄgrub.conf£¬Ôö¼Ó£º

title Arch Linux
root (hd0,8)
kernel /ARCH/boot/kernel26 root=/dev/sda9 init=/ARCH/sbin/pre-init

ÔÚsbin/ϼÓÈëÒ»¸öpre-init¡££¨ÕâÊÇLFS hintµÄÒ»¸ö°ì·¨£©

ÏÖÔھͿÉÒÔreboot£¬ÌåÑéArchµÄ·ç²ÉÀ²¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 51 ÌõÆÀÂÛ

  1. Á½½ï¶þ¹øÍ· ÓÚ 2009-10-18 23:03:00·¢±í:

    ºÃ³¤°¡¡­¡­ÎÒ²»»á

  2. 213.8.34.* ÓÚ 2007-07-17 19:33:19·¢±í:

    http://cf7cf27dca415c3df1bf3b8f1c65d3f8-t.xkktxb.org cf7cf27dca415c3df1bf3b8f1c65d3f8 http://cf7cf27dca415c3df1bf3b8f1c65d3f8-b1.xkktxb.org cf7cf27dca415c3df1bf3b8f1c65d3f8 http://cf7cf27dca415c3df1bf3b8f1c65d3f8-b3.xkktxb.org 8d1f2bfe3cbc5359328d95464cab8b7c