Install ArchLinuxAfter testing, it is possible to establish a archlinux system correctly.
focus on the following 4 Web sites
1, Beginners ' Guide (Simplified Chinese)-archwiki
Https://wiki.archlinux.org/index.php/Beginners%27_guide_ (%e7%ae%80%e4%bd%93%e4%b8%ad%e6%96%87) #. e9.85.8d.e7.bd.ae.e7.bd.91.e7.bb.9c
2, general recommendations (Simplified Chinese)-ArchWiki
Https://wiki.archlinux.org/index.php/General_recommendations_ (%e7%ae%80%e4%bd%93%e4%b8%ad%e6%96%87)
3, ArchLinux installation notes-time travel lazy cat-Blog Park
Http://www.cnblogs.com/timeship/archive/2013/02/28/2937635.html
4, VMware installed Arch Linux Records-meetrice-Blog Park
Http://www.cnblogs.com/meetrice/p/3681406.html
Build the Environment
1.VMware Workstation 10.0.1 build-1379776
2. Archlinux-2015.09.01-dual.iso
first set up the virtual machine, my network settings are selected (NAT).
Open the virtual machine, boot up with CD-ROM, and reach the boot interface.
Running Boot Arch Linux (i686)
I chose the i686, which is 32-bit mode.
The LiveCD will automatically log in as the root user.
1 Building Partitions
The following command runs FDISK:
# FDISK/DEV/SDA
Then create the first partition:
Command (M for help): Enter N and press ENTER
Partition type:select (Default p): Press Enter
Partition number (1-4, default 1): Press Enter
Sector (2048-209715199, default2048): Press Enter
Last sector, +sectors or +size{k,m,g} (2048-209715199 ..., default 209715199): Enter +15g and press ENTER
Then create a second partition:
Command (M for help): Enter N and press ENTER
Partition type:select (Default p): Press Enter
Partition number (1-4, default 2): Press Enter
Sector (31459328-209715199, default31459328): Press Enter
Last sector, +sectors or +size{k,m,g} (31459328-209715199 ..., default 209715199): Press Enter
Now preview the new partition table:
Command (M for help): Enter P and press ENTER
disk/dev/sda:107.4 GB, 107374182400bytes, 209715200 sectors
Units = sectors of 1 * the bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512bytes
Disk identifier:0x5698d902
Device Boot Start End Blocks Id System
/DEV/SDA1 2048 31459327 15728640 Linux
/dev/sda2 31459328 209715199 89127936 Linux
Then write these changes to the disk:
Command (M for help): Enter W and press ENTER
If everything goes well without errors the Fdisk program will display the following information:
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
Only the root partitions and/home are divided here
Next, create the file system, taking the Ext4 file system as an example.
# MKFS.EXT4/DEV/SDA1
# Mkfs.ext4/dev/sda2
Mount Partition
Before you mount a partition, check the identifier and layout of the current disk:
Lsblk/dev/sda
Note to mount the root partition to the/mnt in order.
#mount/dev/sda1/mnt
Then mount the/home partition and the rest of the separate partitions (/boot,/var, etc.).
Mkdir/mnt/home
Mount/dev/sda2/mnt/home
Edit a mirrored source
Vim/etc/pacman.d/mirrorlist
163 Source Address
Server = http://mirrors.163.com/archlinux/$repo/os/i686
Then upgrade the file list and change the configuration
Once you have changed the mirror list, be sure to remember to force the refresh using PACMAN-SYY
Pacman-syy
The following must be changed, especially siglevel = Never, otherwise there will be a signature error keyring
#vim/etc/pacman.conf
[Options]
Change the previous option to this
RootDir =/mnt
DBPath =/mnt/var/lib/pacman/
Cachedir =/mnt/var/cache/pacman/pkg/
LogFile =/mnt/var/log/pacman.log
Gpgdir =/mnt/etc/pacman.d/gnupg/
Siglevel = Never
Behind
Core, Extra, community
Siglevel = packagerequired before add # comment out
To install the basic system using the Pacstrap script:
# pacstrap/mnt Base Base-devel
Generate Fstab
Generate fstab with the command below. If you want to use UUIDs, use the-u option, and if you want to use a label, use the-l option.
# genfstab-u-p/mnt >>/mnt/etc/fstab
# Nano/mnt/etc/fstab
chroot to the new system
#arch-chroot/mnt configuration system localization
#vi/etc/locale.gen
Select the type of localization you need, and remove the front #
en_US. UTF-8 UTF-8
en_GB. UTF-8 UTF-8
Zh_cn. GB18030 GB18030
Zh_cn. GBK GBK
Zh_cn. UTF-8 UTF-8
ZH_CN GB2312
And then run:
# Locale-gen
After each glibc update, the Locale-gen is run once, and the localized files specified by/etc/locale.gen are regenerated.
locale.conf file default does not exist, generally set Lang on the line, it is the default value of other settings.
/etc/locale.conf
Lang=zh_cn. UTF-8
LC_TIME=EN_GB. UTF-8
Configuring the system time zone
-------------------------------
# Vim/etc/timezone
Asia/shanghai
# ln-s/usr/share/zoneinfo/asia/shanghai/etc/localtime
set host name by preference:
# echo Myhostname >/etc/hostname
Note: There is no need to edit/etc/hosts now.
Configure a network for a new system
It is important to configure the network, which is configured for the new system installed.
Install NetworkManager and start the service
------------------------------------------------------
# pacman-s NetworkManager
# Systemctl Enable Networkmanager.service
PS: The default installation of the network, need to start: Dhcpcd@<interface>.service, it seems not very easy to use, here I directly loaded NetworkManager.
set a root password with passwd
passwd
Install configuration boot loader
It's also important to install grub, which is when you reboot, you need to select the system
-------------------------------
Pacman-s Grub
# Grub-install--TARGET=I386-PC--RECHECK/DEV/SDA
# cp/usr/share/locale/en\ @quot/lc_messages/grub.mo/boot/grub/locale/en.mo
# pacman-s Os-prober
# Grub-mkconfig-o/boot/grub/grub.cfg
uninstall partitions and reboot the system
If you are still in the chroot environment, first exit the system with the Exit command:
# exit
Uninstall the system that is mounted in the/MNT:
#umount-R/mnt
Reboot: Reboot
at this point, a minimal installation of arch has been completed
Install the graphical interface, which can be installed after the arch minimum installation is completed
Install desktop
Pacman-s Lxde (or pacman-sgnome-core this choice, KDE, GNOME, LXDE or can choose Openbox, awesome, etc. wm)
After the installation is complete, copy the 3 files in the/etc/xdg/openbox to ~/.config/openbox:
Mkdir-p ~/.config/openbox
Cp/etc/xdg/openbox/menu.xml/etc/xdg/openbox/rc.xml/etc/xdg/openbox/autostart ~/.config/openbox
To set up a program that starts automatically
Open the/etc/xdg/lxsession/lxde/autostart with your favorite editor and add the program you want to start automatically, just like this:
@xscreensaver-no-splash
@lxpanel--profile LXDE
@pcmanfm-D
@fcitx
@xcompmgr-ss-n-CC-FF-I-10-O-10-D1-T-3-L-4-R4 &
Start the desktop environment
Using the Login Manager
By starting the Login manager (or the display manager), you can log in with the graphical interface. Currently, Arch provides SYSTEMD service files for GDM, KDM, SLiM, XDM, and Lxdm. Take KDM as an example, configure boot startup:
# Systemctl Enable Lxdm.service
After you execute the above command, the login manager should work correctly.
At this point, after the reboot, you should be able to enter the graphical interface