Arch Linux 2014.03.01 hard disk installation Win + Grub4dos + Arch

Source: Internet
Author: User
Tags gtk arch linux

Arch Linux 2014.03.01 hard disk installation Win + Grub4dos + Arch

There are many ways to install Arch Linux, but Grub4dos can be installed with more flexibility and can be adjusted at any time.

Now, let's get started.

Step 1: Prepare

1. First of all, GRUB4DOS, which is a great help for many customers.

Grub4DOS 0.4.4 download

2. Copy the iso image to drive C (renamed as arch. iso, which will be used later), and copy the vmlinuz and archiso. img files in the boot directory of the image to the C root directory.

3. Add the menu. lst startup item. The content is as follows:

title Arch Install... root (hd0,0)kernel /vmlinuz     archisolabel=ARCH-2014initrd /archiso.img

(You can check this tutorial on your mobile phone. The above archisolabel and kernel are in the same line. Remember)

4. Restart the computer, go to GRUB, and select Arch Install...

Next, the boot process will stop, because you need to input the command to load the ISO image. The command is as follows:

mkdir /isomount -r -t vfat /dev/sda1 /isomodprobe looplosetup /dev/loop6 /iso/arch.isoln -s /dev/loop6 /dev/disk/by-label/ARCH-2014exit

(If your drive C is an NTFS partition, change the vfat of the second line above to ntfs)

Step 2: normal Installation

Hard Disk partitioning

There are many solutions here. If you are a newbie, you can divide it into only one partition. My solutions are/boot ,/, the/home partition does not use swap because my notebook has 8 GB memory.

1 fdisk /dev/sda 
2 #/Boot is sda2,/is sda3,/home is sda4
Install a File System

Install the ext4 File System on sda {2, 3, 4}

1 mkfs.ext4 /dev/sda2
2 mkfs.ext4 /dev/sda3
3 mkfs.ext4 /dev/sda4
Mount a partition
1 # Mount/
2 mount /dev/sda3 /mnt 
3 # Create boot and home to mount sda1 and sda3
4 cd /mnt 
5 mkdir boot 
6 mkdir home 
7 mount /dev/sda2 /mnt/boot 
8 mount /dev/sda4 /mnt/home
Update the rule list

We recommend that you select mirrors.163.com in China. However, when I installed mirrors.163.com, I found a problem with the 163 source. Therefore, we recommend that you enable the mirrors.ustc.edu.cn default region list to enable all source sources, therefore, we use sed to add #

Put the following addresses in front of this file
Server = http://mirrors.163.com/archlinux/$repo/ OS /$arch
Server = http://developer.bjtu.edu.cn/archlinux/javasrepo/ OS /mongoarch
Server = http://mirrors.hust.edu.cn/archlinux/$repo/ OS /$arch
Server = http://mirrors.hustunique.com/archlinux/$repo/ OS /$arch
Server = http://mirrors.neusoft.edu.cn/archlinux/$repo/ OS /$arch
Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/#repo/ OS /$arch
Server = http://mirrors.ustc.edu.cn/archlinux/$repo/ OS /$arch

1 cd /etc/pacman.d 
2 sed -i "s/^\b/#/g" mirrorlist 
3 nano mirrorlist 
4 # Remove the one before mirrors.ustc.edu.cn and mirrors6.ustc.edu.cn #
5 pacman -Syy
Install base System

We only need to install base and base-devel

1 pacstrap /mnt base base-devel 
2 # If you want to use tools such as ifconfig, add net-tools
Generate fstab

During boot, we need to mount partitions correctly, which requires fstab. Here I am using UUID recognition.

1 genfstab -U -p /mnt >>/mnt/etc/fstab
Change directory
1 arch-chroot /mnt /bin/bash
Configure locale

Open locale. gen

1 cd /etc
2 nano locale.gen
3 # En_US.UTF-8, zh_CN.GBK, zh_CN.GB2312, zh_CN.GB18030, zh_CN.UTF-8 before # Remove
4 locale-gen 
5 echo LANG=zh_CN.UTF-8 >> locale.conf 
6 nano vconsole.conf 
7 # Input # KEYMAP = us FONT =
Set Time Zone
1 ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2 # The previous manjaro bug seems to have affected the reading of my hardware clock. If you have encountered a problem in time, you can soft link UTC
Set Host Name
1 echo Host Name>/etc/hostname
Generate ramdisk

If you use/usr as an independent partition, you also need to configure mkinitcpio. conf. The file contains annotations.

1 mkinitcpio -p linux
User Configuration
1 passwd 
2 # Modifying the root password
3 useradd -m -g users -G wheel -s /bin/bash User Name
4 passwd User Name
   
Note: If you do not want to use grub boot, do not install grub and pacman-S grub in other tutorials. If you have installed grub, this will not guide the original windows, you need to refresh the MBR. restart
1 exit # Exit chroot
2 umount /mnt/{home,boot} 
3 umount /mnt 
4 reboot
Restart. Go to archLinux and set GRUB. The Code is as follows: (you can write it before, or restart windows to modify it)
Title Arch Linuxroot (hd0, 1) Mount/dev/sda2 to kernel (hd0, 1)/vmlinuz-linux root =/dev/sda3 ro vga = 791 initrd (hd0, 1)/initrd. img

I installed linux in sda3, and the corresponding boot location is (hd0, 3)

2. Install ALSA driver)
1 pacman -S alsa-utils
2 alsamixer # Adjust the volume
Install the graphics card driver

I am using the snb series Processor Core

1 pacman -S mesa xf86-video-intel
2 # I am using intel's kernel display. For details, refer to our wiki.
Install the synaptics driver
1 pacman -S xf86-input-synaptics
3. Install and install xorg In the desktop environment
1 pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils
Install KDE

The next step is the desktop environment. Here I use KDE, of course, to minimize installation.

1 pacman -S kdebase # All the way to enter
2 pacman -S kdemultimedia-kmix # Volume adjustment
3 pacman -S kdeplasma-applets-plasma-nm # Network Management
4 systemctl enable NetworkManager.service # Enable the Network Management Service
5 systemctl enable kdm.service # Enable kdm
6 pacman -S kde-l10n-zh_cn # Adding Chinese support
Install Common Software
1 pacman -S synaptiks # Touchpad Management Program-moved to aur
2 pacman -S kde-gtk-config # Gtk topic management
3 pacman -S kcm-fcitx fcitx-qt kdeplasma-addons-applets-kimpanel # Fcitx Input Method
4 pacman -S kdeutils-ark kdeutils-kwallet # Install ark and kwallet, both of which are known
5 pacman -S kdegraphics-ksnapshot kdegraphics-okular kdegraphics-gwenview # Screenshot, pdf reading and Image Browsing Software
6 pacman -S unrar unzip p7zip # Ark supports extracting zip, 7z, and rar packages

 

Other desktops

Install graphical interface xfce
Pacman-S slim xfce4 fcitx-im network-manager-applet xfce4-notifyd
Slim is the logon manager, which may not be allowed to log on as a root user.
Xfce4 is a desktop environment
Fcitx-im is the input method
Network-manager-applet as the name implies, network management
Xfce4-notifyd message reminder

Startxfce4 can directly access the desktop.

I did not do any operations, because startxfce4 is directly on the desktop, so you may try it as appropriate. I copied it, but I don't know if it works.

Add a non-root User

Services running at startup
Systemctl enable slim. service
Systemctl enable NetworkManager


Cd ~
Cp/etc/skel/. xinitrc ~
Vi ~ /. Xinitrc
Export LANG = zh_CN.UTF-8
Export LC_ALL = "zh_CN.UTF-8 ″
Export GTK_IM_MODULE = fcitx
Export QT_IM_MODULE = fcitx
Export XMODIFIERS = "@ im = fcitx"
Exec startxfce4

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.