Into the pit ArchLinux

Source: Internet
Author: User
Tags root access arch linux

Under the strong accusation of big yachen and sorghum, I set foot on the arch this "no return". The installation of Linux Distribution,arch as a very high personal system is too complicated for me to be a little white. But fortunately yachen throughout the continuous "whipping" me, finally I successfully installed the arch, so that my archlinux can be used as a computer system normal use. But no two days, inexplicable found the problem is too much, in view of the first installation many process still do not understand, big yachen very support I once again install arch, so, I began my second painful journey (however this time the installation feeling still a lot of don't understand!) )

Yachen wrote in his blog How to install arch in XP, (http://xuchen.wang/2017/03/08/arch/) used the grub4dos to drive the ISO file, in fact, the first time I was forced to do so, But in the end because I forgot to leave a partition for the hard drive to format the entire hard disk when the format, so that the ISO file, LiveCD can not start, and finally honest with a simple U disk boot (233). This time the diagram is convenient (in fact, I do not know how to boot the hard drive from the arch ISO file), I directly use the U-disk installed!

OK, first step, boot into bootsetup, choose U disk.

After entering LiveCD everything according to Https://wiki.archlinux.org/index.php/Installation_guide above, about the networking problem, because of the kernel module does not understand, I still can not enable the Iwlwifi module, So do not know how to enable the wireless network interface, this part then ask Yachen God! But to gain the power of LiveCD, I used a USB cable network, connected to the phone to enable the USB network, and then use the DHCPCD service in LiveCD
# DHCPCD Interface
So that the networking problem is solved.

Then the partition, where I also make the partition is very simple, because I do not need the hard disk files, so I first formatted the entire hard disk
# MKFS.EXT4/DEV/SDA
Then use the FDISK command to enter the/DEV/SDA partition, because a disk, so the installation process is very simple, enter the end can be. The last W write save and exit, so the partition is also done.

Again, the partitioned partition is formatted. In fact, and win installation is the same.
# MKFS.EXT4/DEV/SDA
It's important to remember that formatting is here, and if it's not formatted, the direct mount will prompt
Mount:/mnt:wrong FS type, bad-option, bad Superblock ON/DEV/SDA, missing-codepage or helper program, or other error.
If you know a little bit about the order, you can actually read it. It says that you may not have formatted the device.
Then the wiki mentions the Enable swap partition, here I do not understand what is the swap partition, so skip (233).

After that we need to mount the hard drive to a file directory. In fact, I personally still do not understand, but before the use of the USB stick is also used in the process of mounting. Under the command of fdisk-l we can see all the current equipment, and because of the special nature of Linux, all the equipment are in the form of files to be marked, so we see in the Fdisk-l command is our current all equipment, to my current example is two devices, one is a hard disk, The other is the loop device, the LiveCD. The hard drive will certainly not be able to enable itself, only when we use the Mount command
# mount/dev/sda1/mnt
After mounting, Linux is able to use this storage area of the hard drive, which is what we say, and/mnt is the current directory for this block of hard drives. Of course, there are multiple partitions attached in the wiki, I don't need them here, so I skip them.

After mounting the arch is installed. Different from previous installation experience, arch installation process must be connected in real time, because the installation of the core is downloaded from the Internet (this copy of the big Yachen, because I do not know how to express 233), so at the beginning of the installation I thought about the network problem, after all, no network can not install.

Since it is a networked download installation, it is the first problem to be solved. The file location of the address is given on the wiki/etc/pacman.d/mirrorlist, read the wiki carefully and you will know that this is the official image source document of our ArchLinux, edited with the ultra-convenient text editor Nano! OK, here we use the default Zhong Ke Mirror station (it is a Chinese mirror station), and then the first line of the US mirror station using # comment out, save.

OK, after setting up the download source, let's continue to look at the wiki description, use the Pacstrap script to install the base package group:
# pacstrap/mnt Base
This GR OUP does not include any tools from the live installation, such as btrfs-progs or specific wireless firmware; See Packages.both for comparison.
To install packages and other groups such as Base-devel, append the names to Pacstrap (space separated) or to Individu Al Pacman commands after the #Chroot Step. The original meaning is that we can use the above command for the core installation, but it is only the base core, not including any toolkit, in order to be able to use a tool such as Pacman we can install the Base-devel package. In fact, this is yachen remind me, or I may install a base package on the next step, then found that even Pacman can not be used only dumbfounded 233. So we use the following
# pacstrap/mnt base base-devel
OK, wait quietly, probably 270m+ ... It's time to watch the Internet.

Because my network speed is slow, half an hour after finally finished, OK, we start behind the work, configure the system. The first is to create the Fstab file, which is what, open wiki,the fstab (5) file can be used to define how disk partitions, various other block devices, or R Emote filesystems should is mounted into the filesystem. That is, it is a partitioned table that is used only during the installation of the system. So retrace
# genfstab-u/mnt >>/mnt/etc/fstab
Then switch the root directory to/mnt
# arch-chroot/mnt
Then the mode is from [email protected] ~ #变成了 [[email protected]/] #这样就表示切换成功了.

Next comes the detail work. Skip over.

Finally, embody the great moments of grub and install the boot.
Install GRUB Package First
# Pacman-s Grub
Then, install grub to the partition-complete disk
# Grub-install--TARGET=I386-PC/DEV/SDX
And then generate the master configuration file
# Grub-mkconfig-o/boot/grub/grub.cfg
Then, look at what the wiki describes: By default the Generation scripts automatically add menu entries for Arch Linux to any generated Configurat Ion. Awful Grub. At this point, the installation system is finished, then exit chroot, if you do not want to uninstall the mounted partition directly restart.

Reboot into the terminal interface, at this time we use the root account for the first login, but to immediately create a normal user and switch to the normal user, so as not to misuse the system damage. (User and user group concept see brother Bird)
# useradd-m-s/bin/bash Archie
# passwd Archie

* Use of the sudo command for ordinary users
Su and sudo are the two commands for account permissions, and here simply say that daily use of more sudo,sudo commands is given to their root account under normal account login, such as installing a package under the Archie account
# sudo pacman-s package
Using the sudo command, you must add a normal user to the sudoers file. Add here we use visudo such a special command, because the sudoers file if there is a syntax error, will cause the system crashes, so for this file editing should be very careful, in order to help users, Linux used the Visudo command, It detects the syntax of the sudoers file when you save it, preventing a fatal error from occurring. The Visudo command uses the VIM editor by default, and if you don't know it you can use
#EDITOR =nano Visudo
This command uses the Nano Editor to execute the visudo command. Give Archie account permission to use the following command
# Archie All= (All) all
No need to enter a password to require root access every time
# Archie All= (All) Nopasswd:all
This completes the installation of the ArchLinux at the terminal, the login and the privilege setting of the normal account.

* Easy to use automatic networking program NetworkManager
Https://wiki.archlinux.org/index.php/NetworkManager
For a detailed tutorial see the wiki, here are some of the problems I have encountered, in fact, in the wiki troubleshooting.

NetworkManager is an automatic networking program, meaning that as long as the system starts the service then it will automatically find a network that can be used, whether wireless or wired. What we need to do here is to enable the NetworkManager to boot. In the wiki you can see that its service module name is Networkmanager.service, and to enable it to boot only requires
# Systemctl Enable Networkmanager.service
Here is the SYSTEMD, specific content reference https://wiki.archlinux.org/index.php/Systemd

For convenience, I chose the visual front-end nm-aplet, fast and light. But when connected to an encrypted wireless network (in fact the wireless network we're in touch with is basically not unencrypted), the click doesn't respond. Here we need to install the Gnome-keyring software package, the effect has been used all agreed.

* Installation GUI
Https://wiki.archlinux.org/index.php/Xorg#Installation
Here the video card I have been disabled, so only need to install an Intel display driver, select Xf86-video-intel. After installing xorg and graphics drivers, consider how to start xorg. The first time to install the fear of trouble, the direct use is:
1. Manual Configuration
Install the Xorg-xinit package first. This package provides xinit, startx commands, and xinitrc files. After installation we can enable xorg using STARTX, while executing the STARTX command, the system automatically executes the Xinitrc file that exists in the user's home directory and executes the default/ETC/X11/XINIT/XINITRC file if it does not exist. In this file we can configure a desktop environment such as mate, as for how to configure this xinitrc file, refer to Xinit and the wiki documentation for each desktop environment. If you need to automatically execute the STARTX command when you log in to your account:
If you are using bash, edit ~/.bash_profile and add the following. If the file does not exist, copy a frame version from/etc/skel/.bash_profile.
If you use Zsh, edit the ~/.zprofile.
[-Z ' $DISPLAY "-a" $ (fgconsole) "-eq 1] && exec startx

2. Automatic configuration
Of course, the second time I am sure to try this beautiful and convenient display manager. For the sake of portability, select LIGHTDM. Install LIGHTDM first. Continue browsing the wiki document discovery, if you want to prompt the user to enter the password need to install greeter this magical item, OK, see a deepin developed, try it. Install Deepin-session-ui Package ... When I saw such a large package, I resolutely chose the default lightdm-gtk-greeter, ugly is ugly point! Well, 30M, that's acceptable. After the installation is complete, use SYSTEMD to start the Lightdm.service boot setting. As for changing the background and so on, later, but this is really simple violence, login to start the X problem solved.

After installing and configuring X, we began to install and configure the desktop environment, here in the strong recommendation of Big Yachen, I use Mate desktop, listen to the great God, this mate is actually gnome2, when Gnome changed from 2 to 3 when the change is very large, Many programmers do not want to change their habits for many years, then spontaneously organize maintenance gnome2, so that has been preserved, become today's mate, have to lament the power of Linux. Well, I hear that all faiths use mate.
Don't say anything, first install mate
# pacman-s Mate Mate-extra
250m+, slowly wait ...
Finally wait until the installation is complete! First configure the start, just mentioned in the xorg configuration, if it is manually configured xorg, then need to be configured in the ~/.xinitrc file, so we first copy the past from the/etc/x11/xinit/xinitrc file, and then at the end add
EXEC mate-session
Can. If it is configured automatically (display manager), you do not need to configure it. Now that our GUI is configured, the next thing we need to do is to improve our system for everyday use.

* Using Aur
Aur,arch user Repository. The Customer software repository. Here's a quick way to record what Yachen taught me.
First, we must first configure the ArchLinux Chinese community warehouse. This is a Chinese community-driven unofficial user repository. Use this article to set up HTTPS://LUG.USTC.EDU.CN/WIKI/MIRRORS/HELP/ARCHLINUXCN of course, you must remember the Pacman-syu update after configuration, In order to add unofficial warehouses to the use of Pacman. After configuring the address, Yachen told me a black tech, that is yaourt. This is a Aur use tool, using the Pacman command to install Yaourt on ARCHLINUXCN, we can use the Yaourt command to install any software in the Aur, but the Aur software as little as possible, you must know the results loaded. See Https://wiki.archlinux.org/index.php/AUR_helpers

Use of *mate
-mate-menu A very good start menu.
-Font Wqy-microhei
Adobe-source-code-pro-fonts
Ttf-dejavu
* Use of virtual machines
Because there is no QQ for Linux, we can only install virtual machines in Linux to solve this problem, of course, the installation of virtual machines is only for QQ. Here's a simple procedure for me to install.
The first is still download VirtualBox this virtual machine, lightweight. After installation, you can open VirtualBox for virtual machine installation. It is recommended to install XP, after all it is just a helper tool. Remember to install the virtualboxguestaddition and VirtualBox extension Pack after the installation is complete.

There are some other small details, wiki documents are also introduced, I do not have a lot of problems in the installation, in this will not mention. So for now the basic functionality has been installed (many things installed here did not mention, just a command of the matter, but also thanks to mate this desktop environment, it has helped us solve a lot of daily problems, such as auto-mount USB stick and so on). Finally to thank the big yachen to me this little white to provide help!

Into the pit ArchLinux

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.